Botan  2.9.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 #define BOTAN_HAS_NIST_PRIME_REDUCERS_W32
27 
28 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384();
29 BOTAN_PUBLIC_API(2,0) void redc_p384(BigInt& x, secure_vector<word>& ws);
30 
31 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p256();
32 BOTAN_PUBLIC_API(2,0) void redc_p256(BigInt& x, secure_vector<word>& ws);
33 
34 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p224();
35 BOTAN_PUBLIC_API(2,0) void redc_p224(BigInt& x, secure_vector<word>& ws);
36 
37 BOTAN_PUBLIC_API(2,0) const BigInt& prime_p192();
38 BOTAN_PUBLIC_API(2,0) void redc_p192(BigInt& x, secure_vector<word>& ws);
39 
40 }
41 
42 #endif
void redc_p256(BigInt &x, secure_vector< word > &ws)
const BigInt & prime_p192()
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
const BigInt & prime_p256()
void redc_p384(BigInt &x, secure_vector< word > &ws)
const BigInt & prime_p224()
Definition: alg_id.cpp:13
void redc_p521(BigInt &x, secure_vector< word > &ws)
Definition: nistp_redc.cpp:23
void redc_p224(BigInt &x, secure_vector< word > &ws)
const BigInt & prime_p521()
Definition: nistp_redc.cpp:15
void redc_p192(BigInt &x, secure_vector< word > &ws)
std::vector< T, secure_allocator< T > > secure_vector
Definition: secmem.h:65
const BigInt & prime_p384()