Botan  2.1.0
Crypto and TLS for C++11
mceies.h
Go to the documentation of this file.
1 /*
2 * McEliece Integrated Encryption System
3 * (C) 2014,2015 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_MCEIES_H__
9 #define BOTAN_MCEIES_H__
10 
11 #include <botan/secmem.h>
12 #include <botan/rng.h>
13 
14 namespace Botan {
15 
16 class McEliece_PublicKey;
17 class McEliece_PrivateKey;
18 
19 /**
20 * McEliece Integrated Encryption System
21 * Derive a shared key using MCE KEM and encrypt/authenticate the
22 * plaintext and AD using AES-256 in OCB mode.
23 */
24 secure_vector<uint8_t>
25 BOTAN_DLL mceies_encrypt(const McEliece_PublicKey& pubkey,
26  const uint8_t pt[], size_t pt_len,
27  const uint8_t ad[], size_t ad_len,
28  RandomNumberGenerator& rng,
29  const std::string& aead = "AES-256/OCB");
30 
31 /**
32 * McEliece Integrated Encryption System
33 * Derive a shared key using MCE KEM and decrypt/authenticate the
34 * ciphertext and AD using AES-256 in OCB mode.
35 */
36 secure_vector<uint8_t>
37 BOTAN_DLL mceies_decrypt(const McEliece_PrivateKey& privkey,
38  const uint8_t ct[], size_t ct_len,
39  const uint8_t ad[], size_t ad_len,
40  const std::string& aead = "AES-256/OCB");
41 
42 
43 }
44 
45 #endif
secure_vector< uint8_t > mceies_decrypt(const McEliece_PrivateKey &privkey, const uint8_t ct[], size_t ct_len, const uint8_t ad[], size_t ad_len, const std::string &algo)
Definition: mceies.cpp:70
secure_vector< uint8_t > mceies_encrypt(const McEliece_PublicKey &pubkey, const uint8_t pt[], size_t pt_len, const uint8_t ad[], size_t ad_len, RandomNumberGenerator &rng, const std::string &algo)
Definition: mceies.cpp:33
Definition: alg_id.cpp:13