blob: ceccc940efcd276a0b802c00fca7cc5d97641a14 (
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
|
/*
* ECDSA Core
* (C) 1999-2007 Jack Lloyd
* (C) 2007 FlexSecure GmbH
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_ECDSA_CORE_H__
#define BOTAN_ECDSA_CORE_H__
#include <botan/ecdsa_op.h>
#include <botan/blinding.h>
#include <botan/ec_dompar.h>
namespace Botan {
/*
* ECDSA Core
*/
class BOTAN_DLL ECDSA_Core
{
public:
bool verify(const byte signature[], u32bit sig_len,
const byte message[], u32bit mess_len) const;
SecureVector<byte> sign(const byte message[], u32bit mess_len,
RandomNumberGenerator& rng) const;
ECDSA_Core& operator=(const ECDSA_Core&);
ECDSA_Core() { op = 0; }
ECDSA_Core(const ECDSA_Core&);
ECDSA_Core(const EC_Domain_Params& dom_pars,
const BigInt& priv_key,
const PointGFp& pub_key);
~ECDSA_Core() { delete op; }
private:
ECDSA_Operation* op;
};
}
#endif
|