Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
55726355
Commit
55726355
authored
Jan 16, 2002
by
Niels Möller
Browse files
*** empty log message ***
Rev: src/nettle/ChangeLog:1.57 Rev: src/nettle/rsa.c:1.7
parent
99fb36a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
55726355
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.
...
...
rsa.c
View file @
55726355
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment