Botan  2.11.0
Crypto and TLS for C++11
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 namespace Botan {
14 
15 /**
16 * NIST Prime reduction functions.
17 *
18 * Reduces the value in place
19 *
20 * ws is a workspace function which is used as a temporary,
21 * and will be resized as needed.
22 */
23 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p521();
24 BOTAN_PUBLIC_API(2,0) void redc_p521(BigInt& x, secure_vector<word>& ws);
25 
26 /*
27 Previously this macro indicated if the P-{192,224,256,384} reducers
28 were available. Now they are always enabled and this macro has no meaning.
29 The define will be removed in a future major release.
30 */
31 #define BOTAN_HAS_NIST_PRIME_REDUCERS_W32
32 
33 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384();
34 BOTAN_PUBLIC_API(2,0) void redc_p384(BigInt& x, secure_vector<word>& ws);
35 
36 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p256();
37 BOTAN_PUBLIC_API(2,0) void redc_p256(BigInt& x, secure_vector<word>& ws);
38 
39 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p224();
40 BOTAN_PUBLIC_API(2,0) void redc_p224(BigInt& x, secure_vector<word>& ws);
41 
42 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p192();
43 BOTAN_PUBLIC_API(2,0) void redc_p192(BigInt& x, secure_vector<word>& ws);
44 
45 }
46 
47 #endif
BigInt const BigInt & x
Definition: numthry.h:139
void redc_p256(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:310
const BigInt & prime_p192()
Definition: nistp_redc.cpp:105
secure_vector< word > & ws
Definition: curve_nistp.h:24
const BigInt & prime_p256()
Definition: nistp_redc.cpp:304
void redc_p384(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:439
const BigInt & prime_p521()
Definition: nistp_redc.cpp:15
const BigInt & prime_p224()
Definition: nistp_redc.cpp:201
Definition: alg_id.cpp:13
void redc_p521(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:23
class BOTAN_PUBLIC_API(2, 0) AlgorithmIdentifier final bool BOTAN_PUBLIC_API(2, 0) operator
Name Constraints.
Definition: asn1_obj.h:66
void redc_p224(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:207
void redc_p192(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:111
std::vector< T, secure_allocator< T > > secure_vector
Definition: secmem.h:65
const BigInt & prime_p384()
Definition: nistp_redc.cpp:433