Botan 2.19.3
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
14
15namespace 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*/
25BOTAN_PUBLIC_API(2,0) const BigInt& prime_p521();
26BOTAN_PUBLIC_API(2,0) void redc_p521(BigInt& x, secure_vector<word>& ws);
27
28/*
29Previously this macro indicated if the P-{192,224,256,384} reducers
30were available. Now they are always enabled and this macro has no meaning.
31The define will be removed in a future major release.
32*/
33#define BOTAN_HAS_NIST_PRIME_REDUCERS_W32
34
35BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384();
36BOTAN_PUBLIC_API(2,0) void redc_p384(BigInt& x, secure_vector<word>& ws);
37
38BOTAN_PUBLIC_API(2,0) const BigInt& prime_p256();
39BOTAN_PUBLIC_API(2,0) void redc_p256(BigInt& x, secure_vector<word>& ws);
40
41BOTAN_PUBLIC_API(2,0) const BigInt& prime_p224();
42BOTAN_PUBLIC_API(2,0) void redc_p224(BigInt& x, secure_vector<word>& ws);
43
44BOTAN_PUBLIC_API(2,0) const BigInt& prime_p192();
45BOTAN_PUBLIC_API(2,0) void redc_p192(BigInt& x, secure_vector<word>& ws);
46
47}
48
49#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition compiler.h:136