mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 08:31:15 +00:00
Shorten prime array in mbedtls_rsa_deduce_primes
This commit is contained in:
parent
c36aab69b5
commit
4055a3a16f
|
@ -79,15 +79,14 @@ int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N,
|
||||||
mbedtls_mpi T; /* Holds largest odd divisor of DE - 1 */
|
mbedtls_mpi T; /* Holds largest odd divisor of DE - 1 */
|
||||||
mbedtls_mpi K; /* Temporary holding the current candidate */
|
mbedtls_mpi K; /* Temporary holding the current candidate */
|
||||||
|
|
||||||
const unsigned int primes[] = { 2,
|
const unsigned char primes[] = { 2,
|
||||||
3, 5, 7, 11, 13, 17, 19, 23,
|
3, 5, 7, 11, 13, 17, 19, 23,
|
||||||
29, 31, 37, 41, 43, 47, 53, 59,
|
29, 31, 37, 41, 43, 47, 53, 59,
|
||||||
61, 67, 71, 73, 79, 83, 89, 97,
|
61, 67, 71, 73, 79, 83, 89, 97,
|
||||||
101, 103, 107, 109, 113, 127, 131, 137,
|
101, 103, 107, 109, 113, 127, 131, 137,
|
||||||
139, 149, 151, 157, 163, 167, 173, 179,
|
139, 149, 151, 157, 163, 167, 173, 179,
|
||||||
181, 191, 193, 197, 199, 211, 223, 227,
|
181, 191, 193, 197, 199, 211, 223, 227,
|
||||||
229, 233, 239, 241, 251, 257, 263, 269,
|
229, 233, 239, 241, 251
|
||||||
271, 277, 281, 283, 293, 307, 311, 313
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const size_t num_primes = sizeof( primes ) / sizeof( *primes );
|
const size_t num_primes = sizeof( primes ) / sizeof( *primes );
|
||||||
|
|
Loading…
Reference in a new issue