diff options
author | Simon Warta <[email protected]> | 2015-07-06 13:08:46 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-07-08 15:53:03 +0200 |
commit | 619ac24bba4441762576d47a36099788afadb685 (patch) | |
tree | 7ac45fce6c4101ceb07053362f0248a4032699b6 /src/lib/pubkey/mceies | |
parent | 54c6336c7105e59506a4f6f0214693834c216d7e (diff) |
Fix module combi: adler32,mce
Diffstat (limited to 'src/lib/pubkey/mceies')
-rw-r--r-- | src/lib/pubkey/mceies/info.txt | 2 | ||||
-rw-r--r-- | src/lib/pubkey/mceies/mceies.cpp | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/pubkey/mceies/info.txt b/src/lib/pubkey/mceies/info.txt index b4a25329e..547e4a47a 100644 --- a/src/lib/pubkey/mceies/info.txt +++ b/src/lib/pubkey/mceies/info.txt @@ -1,5 +1,7 @@ +define MCEIES 20150706 <requires> +aes mce ocb </requires> diff --git a/src/lib/pubkey/mceies/mceies.cpp b/src/lib/pubkey/mceies/mceies.cpp index 9e9ae1cb8..58dde2e27 100644 --- a/src/lib/pubkey/mceies/mceies.cpp +++ b/src/lib/pubkey/mceies/mceies.cpp @@ -45,9 +45,10 @@ mceies_encrypt(const McEliece_PublicKey& pubkey, BOTAN_ASSERT(mce_ciphertext.size() == mce_code_bytes, "Unexpected size"); - std::unique_ptr<AEAD_Mode> aead(get_aead("AES-256/OCB", ENCRYPTION)); + const std::string algo = "AES-256/OCB"; + std::unique_ptr<AEAD_Mode> aead(get_aead(algo, ENCRYPTION)); if(!aead) - throw std::runtime_error("mce_encrypt unable to create AEAD instance"); + throw std::runtime_error("mce_encrypt unable to create AEAD instance '" + algo + "'"); const size_t nonce_len = aead->default_nonce_length(); @@ -77,9 +78,11 @@ mceies_decrypt(const McEliece_PrivateKey& privkey, const size_t mce_code_bytes = (privkey.get_code_length() + 7) / 8; - std::unique_ptr<AEAD_Mode> aead(get_aead("AES-256/OCB", DECRYPTION)); + + const std::string algo = "AES-256/OCB"; + std::unique_ptr<AEAD_Mode> aead(get_aead(algo, DECRYPTION)); if(!aead) - throw std::runtime_error("Unable to create AEAD instance"); + throw std::runtime_error("Unable to create AEAD instance '" + algo + "'"); const size_t nonce_len = aead->default_nonce_length(); |