Botan
2.19.3
Crypto and TLS for C&
src
lib
math
numbertheory
curve_nistp.h
Go to the documentation of this file.
1
/*
2
* Arithmetic operations specialized for NIST ECC primes
3
* (C) 2014,2015 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_NIST_PRIMES_H_
9
#define BOTAN_NIST_PRIMES_H_
10
11
#include <botan/bigint.h>
12
13
BOTAN_FUTURE_INTERNAL_HEADER
(curve_nistp.h)
14
15
namespace
Botan
{
16
17
/**
18
* NIST Prime reduction functions.
19
*
20
* Reduces the value in place
21
*
22
* ws is a workspace function which is used as a temporary,
23
* and will be resized as needed.
24
*/
25
BOTAN_PUBLIC_API
(2,0) const BigInt& prime_p521();
26
BOTAN_PUBLIC_API
(2,0)
void
redc_p521(BigInt& x, secure_vector<word>& ws);
27
28
/*
29
Previously this macro indicated if the P-{192,224,256,384} reducers
30
were available. Now they are always enabled and this macro has no meaning.
31
The define will be removed in a future major release.
32
*/
33
#define BOTAN_HAS_NIST_PRIME_REDUCERS_W32
34
35
BOTAN_PUBLIC_API
(2,0) const BigInt& prime_p384();
36
BOTAN_PUBLIC_API
(2,0)
void
redc_p384(BigInt& x, secure_vector<word>& ws);
37
38
BOTAN_PUBLIC_API
(2,0) const BigInt& prime_p256();
39
BOTAN_PUBLIC_API
(2,0)
void
redc_p256(BigInt& x, secure_vector<word>& ws);
40
41
BOTAN_PUBLIC_API
(2,0) const BigInt& prime_p224();
42
BOTAN_PUBLIC_API
(2,0)
void
redc_p224(BigInt& x, secure_vector<word>& ws);
43
44
BOTAN_PUBLIC_API
(2,0) const BigInt& prime_p192();
45
BOTAN_PUBLIC_API
(2,0)
void
redc_p192(BigInt& x, secure_vector<word>& ws);
46
47
}
48
49
#endif
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition
compiler.h:31
BOTAN_FUTURE_INTERNAL_HEADER
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition
compiler.h:136
Botan
Definition
alg_id.cpp:13
Generated by
1.9.8