Botan 3.6.1
Crypto and TLS for C&
mce_internal.h
Go to the documentation of this file.
1/*
2 * (C) Copyright Projet SECRET, INRIA, Rocquencourt
3 * (C) Bhaskar Biswas and Nicolas Sendrier
4 *
5 * (C) 2014 cryptosource GmbH
6 * (C) 2014 Falko Strenzke fstrenzke@cryptosource.de
7 *
8 * Botan is released under the Simplified BSD License (see license.txt)
9 *
10 */
11
12#ifndef BOTAN_MCELIECE_INTERNAL_H_
13#define BOTAN_MCELIECE_INTERNAL_H_
14
15#include <botan/mceliece.h>
16#include <botan/pk_ops.h>
17#include <botan/internal/polyn_gf2m.h>
18
19namespace Botan {
20
22 secure_vector<uint8_t>& error_mask_out,
23 const uint8_t ciphertext[],
24 size_t ciphertext_len,
25 const McEliece_PrivateKey& key);
26
28 secure_vector<uint8_t>& error_mask_out,
29 const secure_vector<uint8_t>& ciphertext,
30 const McEliece_PrivateKey& key);
31
33 const uint8_t* ciphertext,
34 size_t ciphertext_len,
35 const McEliece_PrivateKey& key);
36
37void mceliece_encrypt(secure_vector<uint8_t>& ciphertext_out,
38 secure_vector<uint8_t>& error_mask_out,
39 const secure_vector<uint8_t>& plaintext,
40 const McEliece_PublicKey& key,
41 RandomNumberGenerator& rng);
42
43McEliece_PrivateKey generate_mceliece_key(RandomNumberGenerator& rng, size_t ext_deg, size_t code_length, size_t t);
44
45} // namespace Botan
46
47#endif
void mceliece_decrypt(secure_vector< uint8_t > &plaintext_out, secure_vector< uint8_t > &error_mask_out, const secure_vector< uint8_t > &ciphertext, const McEliece_PrivateKey &key)
void mceliece_encrypt(secure_vector< uint8_t > &ciphertext_out, secure_vector< uint8_t > &error_mask_out, const secure_vector< uint8_t > &plaintext, const McEliece_PublicKey &key, RandomNumberGenerator &rng)
Definition mceliece.cpp:109
McEliece_PrivateKey generate_mceliece_key(RandomNumberGenerator &rng, size_t ext_deg, size_t code_length, size_t t)
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:61