summaryrefslogtreecommitdiffstats
path: root/botan/build/botan/dh_core.h
blob: 91b50a27af112f102a0bed1e0d3b42fc54c2da16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* DH Core
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/

#ifndef BOTAN_DH_CORE_H__
#define BOTAN_DH_CORE_H__

#include <botan/dh_op.h>
#include <botan/blinding.h>

namespace Botan {

/*
* DH Core
*/
class BOTAN_DLL DH_Core
   {
   public:
      BigInt agree(const BigInt&) const;

      DH_Core& operator=(const DH_Core&);

      DH_Core() { op = 0; }
      DH_Core(const DH_Core&);
      DH_Core(RandomNumberGenerator& rng,
              const DL_Group&, const BigInt&);
      ~DH_Core() { delete op; }
   private:
      DH_Operation* op;
      Blinder blinder;
   };

}

#endif