Botan
1.11.15
|
00001 /* 00002 * McEliece Integrated Encryption System 00003 * (C) 2014,2015 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_MCEIES_H__ 00009 #define BOTAN_MCEIES_H__ 00010 00011 #include <botan/secmem.h> 00012 #include <botan/rng.h> 00013 00014 namespace Botan { 00015 00016 class McEliece_PublicKey; 00017 class McEliece_PrivateKey; 00018 00019 /** 00020 * McEliece Integrated Encryption System 00021 * Derive a shared key using MCE KEM and encrypt/authenticate the 00022 * plaintext and AD using AES-256 in OCB mode. 00023 */ 00024 secure_vector<byte> 00025 BOTAN_DLL mceies_encrypt(const McEliece_PublicKey& pubkey, 00026 const secure_vector<byte>& pt, 00027 byte ad[], size_t ad_len, 00028 RandomNumberGenerator& rng); 00029 00030 /** 00031 * McEliece Integrated Encryption System 00032 * Derive a shared key using MCE KEM and decrypt/authenticate the 00033 * ciphertext and AD using AES-256 in OCB mode. 00034 */ 00035 secure_vector<byte> 00036 BOTAN_DLL mceies_decrypt(const McEliece_PrivateKey& privkey, 00037 const secure_vector<byte>& ct, 00038 byte ad[], size_t ad_len); 00039 00040 00041 } 00042 00043 #endif