Solinas prime
In mathematics, a Solinas prime, or generalized Mersenne prime, is a prime number that has the form , where
is a low-degree polynomial with small integer coefficients.[1][2] These primes allow fast modular reduction algorithms and are widely used in cryptography. They are named after Jerome Solinas.
This class of numbers encompasses a few other categories of prime numbers:
Modular reduction algorithm
[edit]Let be a monic polynomial of degree
with coefficients in
and suppose that
is a Solinas prime. Given a number
with up to
bits, we want to find a number congruent to
mod
with only as many bits as
– that is, with at most
bits.
First, represent in base
:
Next, generate a -by-
matrix
by stepping
times the linear-feedback shift register defined over
by the polynomial
: starting with the
-integer register
, shift right one position, injecting
on the left and adding (component-wise) the output value times the vector
at each step (see [1] for details). Let
be the integer in the
th register on the
th step and note that the first row of
is given by
. Then if we denote by
the integer vector given by:
,
it can be easily checked that:
.
Thus represents an
-bit integer congruent to
.
For judicious choices of (again, see [1]), this algorithm involves only a relatively small number of additions and subtractions (and no divisions!), so it can be much more efficient than the naive modular reduction algorithm (
).
Examples
[edit]In 1999, NIST recommended four Solinas primes as moduli for elliptic curve cryptography:[4]
- curve p-192 uses modulus
- curve p-224 uses modulus
- curve p-256 uses modulus
- curve p-384 uses modulus
.
A newer Curve448 uses modulus .
A Solinas prime that fits into a typical 64-bit unsigned integer is , it is
where
is the cyclotomic polynomial, thus it is a unique prime in base 2 (with period length 192). This size is too small for cryptography, but finds use in implementing a number-theoretic transform for efficient multiplication of large numbers.[5]
A complete list of with
, a small modular reduction weight
, and
(i.e. multiples of a computer word size) was produced by José de Jesús Angel Angel and Guillermo Morales-Luna in 2010.[6]
The Curve25519 uses , which has also been called pseudo-Mersenne.[7]
See also
[edit]- Proth prime: several examples on this page are also Proth primes
References
[edit]- ↑ Solinas, Jerome A. (1999). Generalized Mersenne Numbers (PDF) (Technical report). Center for Applied Cryptographic Research, University of Waterloo. CORR-99-39.
- ↑ Solinas, Jerome A. (2011). "Generalized Mersenne Prime". In Tilborg, Henk C. A. van; Jajodia, Sushil (eds.). Encyclopedia of Cryptography and Security. Springer US. pp. 509–510. doi:10.1007/978-1-4419-5906-5_32. ISBN 978-1-4419-5905-8.
- ↑ US patent 5159632, Richard E. Crandall, "Method and apparatus for public key exchange in a cryptographic system", issued 1992-10-27, assigned to NeXT Computer, Inc.
- ↑ Recommended Elliptic Curves for Federal Government Use (PDF) (Technical report). NIST. 1999.
- ↑ Craig-Wood, Nick. "Integer DWTs mod 2^64-2^32+1". www.craig-wood.com.
- ↑ de Jesús Angel Angel, José; Morales-Luna, Guillermo (2010). "Solinas primes of small weight for fixed sizes". Cryptology ePrint Archive, Paper 2010/058.
- ↑ Nath, Kaushik; Sarkar, Palash (2018), Efficient Arithmetic In (Pseudo-)Mersenne Prime Order Fields, 2018/985, retrieved 2025-05-10