Skip to content
Snippets Groups Projects
Commit 55726355 authored by Niels Möller's avatar Niels Möller
Browse files

*** empty log message ***

Rev: src/nettle/ChangeLog:1.57
Rev: src/nettle/rsa.c:1.7
parent 99fb36a2
No related branches found
No related tags found
No related merge requests found
2002-01-16 Niels Mller <nisse@cuckoo.hack.org>
* testsuite/yarrow-test.c: Deleted ran_array code, use
knuth-lfib.h instead.
* testsuite/testutils.c (test_rsa_md5, test_rsa_sha1): Moved
functions here...
* testsuite/rsa-test.c: ...from here.
* testsuite/rsa-keygen-test.c: New file.
* testsuite/knuth-lfib-test.c: New file.
* Makefile.am (libnettle_a_SOURCES): Added knuth-lfib.c and
rsa-keygen.c.
* rsa-keygen.c: New file.
* rsa.h (RSA_MINIMUM_N_OCTETS): New constant.
(RSA_MINIMUM_N_BITS): New constant.
(nettle_random_func, nettle_progress_func): New typedefs. Perhaps
they don't really belong in this file.
(rsa_generate_keypair): Added progress-callback argument.
* macros.h (READ_UINT24, WRITE_UINT24, READ_UINT16, WRITE_UINT16):
New macros.
* knuth-lfib.c, knuth-lfib.h: New files, implementing a
non-cryptographic prng.
2002-01-15 Niels Mller <nisse@cuckoo.hack.org>
* hmac-sha1.c: New file.
......
......@@ -64,13 +64,7 @@ rsa_check_size(mpz_t n)
/* Round upwards */
unsigned size = (mpz_sizeinbase(n, 2) + 7) / 8;
/* For PKCS#1 to make sense, the size of the modulo, in octets, must
* be at least 11 + the length of the DER-encoded Digest Info.
*
* And a DigestInfo is 34 octets for md5, and 35 octets for sha1.
* 46 octets is 368 bits. */
if (size < 46)
if (size < RSA_MINIMUM_N_OCTETS)
return 0;
return size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment