Botan 3.5.0
Crypto and TLS for C&
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
13namespace 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
24/**
25* Return the P-521 prime
26*/
27BOTAN_TEST_API const BigInt& prime_p521();
28
29/**
30* Reduce an input modulo P-521
31*
32* Input value x must be between 0 and p**2
33*/
35
36/**
37* Return the P-384 prime
38*/
39BOTAN_TEST_API const BigInt& prime_p384();
40
41/**
42* Reduce an input modulo P-384
43*
44* Input value x must be between 0 and p**2
45*/
47
48/**
49* Return the P-256 prime
50*/
51BOTAN_TEST_API const BigInt& prime_p256();
52
53/**
54* Reduce an input modulo P-256
55*
56* Input value x must be between 0 and p**2
57*/
59
60/**
61* Return the P-224 prime
62*/
63BOTAN_TEST_API const BigInt& prime_p224();
64
65/**
66* Reduce an input modulo P-224
67*
68* Input value x must be between 0 and p**2
69*/
71
72/**
73* Return the P-192 prime
74*/
75BOTAN_TEST_API const BigInt& prime_p192();
76
77/**
78* Reduce an input modulo P-192
79*
80* Input value x must be between 0 and p**2
81*/
83
84} // namespace Botan
85
86#endif
#define BOTAN_TEST_API
Definition compiler.h:51
BOTAN_TEST_API void redc_p521(BigInt &x, secure_vector< word > &ws)
BOTAN_TEST_API void redc_p192(BigInt &x, secure_vector< word > &ws)
BOTAN_TEST_API void redc_p256(BigInt &x, secure_vector< word > &ws)
BOTAN_TEST_API void redc_p224(BigInt &x, secure_vector< word > &ws)
BOTAN_TEST_API const BigInt & prime_p384()
BOTAN_TEST_API const BigInt & prime_p224()
BOTAN_TEST_API void redc_p384(BigInt &x, secure_vector< word > &ws)
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:61
BOTAN_TEST_API const BigInt & prime_p256()
BOTAN_TEST_API const BigInt & prime_p192()
BOTAN_TEST_API const BigInt & prime_p521()