~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to src/lib/pubkey/mceies/mceies.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
14
namespace Botan {
 
15
 
 
16
class RandomNumberGenerator;
 
17
class McEliece_PublicKey;
 
18
class 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
*/
 
25
secure_vector<uint8_t>
 
26
BOTAN_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
*/
 
37
secure_vector<uint8_t>
 
38
BOTAN_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