blob: dc89a878d782cfb4a3140f801df32c1c09d4aff0 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* ECKAEG Core
* (C) 1999-2007 Jack Lloyd
* (C) 2007 FlexSecure GmbH
*
* Distributed under the terms of the Botan license
*/
#include <botan/eckaeg_core.h>
#include <botan/numthry.h>
#include <botan/pk_engine.h>
#include <botan/parsing.h>
#include <algorithm>
namespace Botan {
/*
* ECKAEG_Core Constructor
*/
ECKAEG_Core::ECKAEG_Core(const EC_Domain_Params& dom_pars,
const BigInt& priv_key,
const PointGFp& pub_key)
{
op = Engine_Core::eckaeg_op(dom_pars, priv_key, pub_key);
}
/*
* ECKAEG_Core Copy Constructor
*/
ECKAEG_Core::ECKAEG_Core(const ECKAEG_Core& core)
{
op = 0;
if(core.op)
op = core.op->clone();
blinder = core.blinder;
}
/*
* ECKAEG_Core Assignment Operator
*/
ECKAEG_Core& ECKAEG_Core::operator=(const ECKAEG_Core& core)
{
delete op;
if(core.op)
op = core.op->clone();
blinder = core.blinder;
return (*this);
}
/*
* ECKAEG Operation
*/
SecureVector<byte> ECKAEG_Core::agree(const PointGFp& otherKey) const
{
//assert(op.get());
return op->agree(otherKey);
}
}
|