monotone

monotone Mtn Source Tree

Root/botan/dlies.h

1/*************************************************
2* DLIES Header File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_DLIES_H__
7#define BOTAN_DLIES_H__
8
9#include <botan/pubkey.h>
10
11namespace Botan {
12
13/*************************************************
14* DLIES Encryption *
15*************************************************/
16class DLIES_Encryptor : public PK_Encryptor
17 {
18 public:
19 DLIES_Encryptor(const PK_Key_Agreement_Key&,
20 const std::string& = "KDF2(SHA-160)",
21 const std::string& = "HMAC(SHA-160)", u32bit = 20);
22 void set_other_key(const MemoryRegion<byte>&);
23 private:
24 SecureVector<byte> enc(const byte[], u32bit) const;
25 u32bit maximum_input_size() const;
26 const PK_Key_Agreement_Key& key;
27 SecureVector<byte> other_key;
28 const std::string kdf_algo;
29 const std::string mac_algo;
30 const u32bit MAC_KEYLEN;
31 };
32
33/*************************************************
34* DLIES Decryption *
35*************************************************/
36class DLIES_Decryptor : public PK_Decryptor
37 {
38 public:
39 DLIES_Decryptor(const PK_Key_Agreement_Key&,
40 const std::string& = "KDF2(SHA-160)",
41 const std::string& = "HMAC(SHA-160)", u32bit = 20);
42 private:
43 SecureVector<byte> dec(const byte[], u32bit) const;
44 const PK_Key_Agreement_Key& key;
45 const std::string kdf_algo;
46 const std::string mac_algo;
47 const u32bit MAC_KEYLEN, PUBLIC_LEN;
48 };
49
50}
51
52#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status