Botan
1.10.17
src
pubkey
dlies
dlies.h
Go to the documentation of this file.
1
/*
2
* DLIES
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Distributed under the terms of the Botan license
6
*/
7
8
#ifndef BOTAN_DLIES_H__
9
#define BOTAN_DLIES_H__
10
11
#include <botan/pubkey.h>
12
#include <botan/mac.h>
13
#include <botan/kdf.h>
14
15
namespace
Botan
{
16
17
/**
18
* DLIES Encryption
19
*/
20
class
BOTAN_DLL
DLIES_Encryptor
:
public
PK_Encryptor
21
{
22
public
:
23
DLIES_Encryptor
(
const
PK_Key_Agreement_Key
&,
24
KDF
* kdf,
25
MessageAuthenticationCode
* mac,
26
size_t
mac_key_len = 20);
27
28
~DLIES_Encryptor
();
29
30
void
set_other_key
(
const
MemoryRegion<byte>
&);
31
private
:
32
SecureVector<byte>
enc(
const
byte
[],
size_t
,
33
RandomNumberGenerator
&)
const
;
34
size_t
maximum_input_size()
const
;
35
36
SecureVector<byte>
other_key, my_key;
37
38
PK_Key_Agreement
ka;
39
KDF
* kdf;
40
MessageAuthenticationCode
* mac;
41
size_t
mac_keylen;
42
};
43
44
/**
45
* DLIES Decryption
46
*/
47
class
BOTAN_DLL
DLIES_Decryptor
:
public
PK_Decryptor
48
{
49
public
:
50
DLIES_Decryptor
(
const
PK_Key_Agreement_Key
&,
51
KDF
* kdf,
52
MessageAuthenticationCode
* mac,
53
size_t
mac_key_len = 20);
54
55
~DLIES_Decryptor
();
56
57
private
:
58
SecureVector<byte>
dec(
const
byte
[],
size_t
)
const
;
59
60
SecureVector<byte>
my_key;
61
62
PK_Key_Agreement
ka;
63
KDF
* kdf;
64
MessageAuthenticationCode
* mac;
65
size_t
mac_keylen;
66
};
67
68
}
69
70
#endif
Botan::DLIES_Decryptor::DLIES_Decryptor
DLIES_Decryptor(const PK_Key_Agreement_Key &, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20)
Definition
dlies.cpp:90
Botan::DLIES_Encryptor::DLIES_Encryptor
DLIES_Encryptor(const PK_Key_Agreement_Key &, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20)
Definition
dlies.cpp:16
Botan::DLIES_Encryptor::set_other_key
void set_other_key(const MemoryRegion< byte > &)
Definition
dlies.cpp:74
Botan::KDF
Definition
kdf.h:21
Botan::MemoryRegion
Definition
secmem.h:22
Botan::MessageAuthenticationCode
Definition
mac.h:22
Botan::PK_Decryptor::PK_Decryptor
PK_Decryptor()
Definition
pubkey.h:109
Botan::PK_Encryptor::PK_Encryptor
PK_Encryptor()
Definition
pubkey.h:72
Botan::PK_Key_Agreement_Key
Definition
pk_keys.h:119
Botan::PK_Key_Agreement
Definition
pubkey.h:313
Botan::RandomNumberGenerator
Definition
rng.h:21
Botan::SecureVector
Definition
secmem.h:329
Botan
Definition
algo_base.h:14
Generated by
1.18.0