info.txt |
|
328 |
pcurves_impl.h |
This file implements a system for compile-time instantiation of elliptic curve arithmetic.
All computations including point multiplication are implemented to be constant time,
with the exception of any function which includes "vartime" or equivalent in its
name. Randomization techniques (scalar blinding, point rerandomization) are also
used, largely to guard against situations where a compiler inserts a conditional jump
where not expected.
A specific elliptic curve is created by creating a set of EllipticCurveParameters,
which are templatized over the relevant constants (p, a, b, etc) and then
passing that set of parameters to an EllipticCurve template.
For a simple example of how these are used see pcurves_brainpool256r1.cpp
The system also includes various hooks which allow for specialized representations of
field elements (for curves where a modular reduction technique faster than Montgomery
is available) and to provide pre-computed addition chains for field and scalar
inversions. See pcurves_secp256r1.cpp or pcurves_secp256k1.cpp for examples with all
the bells and whistles.
|
58130 |
pcurves_solinas.h |
Helpers for modular reduction of Solinas primes, such as P-256 and P-384.
Instead of explicitly forming the various integers and adding/subtracting them
row-by-row, we compute the entire sum in one pass, column by column. To prevent
overflow/underflow the accumulator is a signed 64-bit integer, while the various
limbs are (at least for all NIST curves aside from P-192) 32 bit integers.
For more background on Solinas primes / Solinas reduction see
J. Solinas 'Generalized Mersenne Numbers'
<https://cacr.uwaterloo.ca/techreports/1999/corr99-39.pdf>
NIST SP 800-186 Appendix G.1
<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-186.pdf>
Handbook of Elliptic And Hyperelliptic Curve Cryptography § 10.4.3
|
2240 |
pcurves_util.h |
|
7873 |
pcurves_wrap.h |
This class provides a bridge between the "public" (actually still
internal) PrimeOrderCurve type, and the inner templates which are
subclasses of EllipticCurve from pcurves_impl.h
|
14498 |