Botan  2.7.0
Crypto and TLS for C++11
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/secmem.h>
16 #include <botan/types.h>
17 #include <botan/pk_ops.h>
18 #include <botan/mceliece.h>
19 
20 namespace Botan {
21 
22 void mceliece_decrypt(secure_vector<uint8_t>& plaintext_out,
23  secure_vector<uint8_t>& error_mask_out,
24  const uint8_t ciphertext[],
25  size_t ciphertext_len,
26  const McEliece_PrivateKey& key);
27 
28 void mceliece_decrypt(secure_vector<uint8_t>& plaintext_out,
29  secure_vector<uint8_t>& error_mask_out,
30  const secure_vector<uint8_t>& ciphertext,
31  const McEliece_PrivateKey& key);
32 
33 secure_vector<uint8_t> mceliece_decrypt(
34  secure_vector<gf2m> & error_pos,
35  const uint8_t *ciphertext, uint32_t ciphertext_len,
36  const McEliece_PrivateKey & key);
37 
38 void mceliece_encrypt(secure_vector<uint8_t>& ciphertext_out,
39  secure_vector<uint8_t>& error_mask_out,
40  const secure_vector<uint8_t>& plaintext,
41  const McEliece_PublicKey& key,
42  RandomNumberGenerator& rng);
43 
44 McEliece_PrivateKey generate_mceliece_key(RandomNumberGenerator &rng,
45  uint32_t ext_deg,
46  uint32_t code_length,
47  uint32_t t);
48 
49 }
50 
51 
52 #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)
Definition: goppa_code.cpp:127
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:117
McEliece_PrivateKey generate_mceliece_key(RandomNumberGenerator &rng, uint32_t ext_deg, uint32_t code_length, uint32_t t)
Definition: alg_id.cpp:13
uint32_t code_length