Botan 2.19.1
Crypto and TLS for C&
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 <string>
13
14namespace Botan {
15
16class RandomNumberGenerator;
17class McEliece_PublicKey;
18class McEliece_PrivateKey;
19
20/**
21* McEliece Integrated Encryption System
22* Derive a shared key using MCE KEM and encrypt/authenticate the
23* plaintext and AD using AES-256 in OCB mode.
24*/
25secure_vector<uint8_t>
26BOTAN_PUBLIC_API(2,0) mceies_encrypt(const McEliece_PublicKey& pubkey,
27 const uint8_t pt[], size_t pt_len,
28 const uint8_t ad[], size_t ad_len,
29 RandomNumberGenerator& rng,
30 const std::string& aead = "AES-256/OCB");
31
32/**
33* McEliece Integrated Encryption System
34* Derive a shared key using MCE KEM and decrypt/authenticate the
35* ciphertext and AD using AES-256 in OCB mode.
36*/
37secure_vector<uint8_t>
38BOTAN_PUBLIC_API(2,0) mceies_decrypt(const McEliece_PrivateKey& privkey,
39 const uint8_t ct[], size_t ct_len,
40 const uint8_t ad[], size_t ad_len,
41 const std::string& aead = "AES-256/OCB");
42
43
44}
45
46#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: alg_id.cpp:13
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:35
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
std::vector< T, secure_allocator< T > > secure_vector
Definition: secmem.h:65
Definition: bigint.h:1143