Skip to content
GitLab
Menu
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
5172adc3
Commit
5172adc3
authored
Jan 31, 2013
by
Niels Möller
Browse files
nettle_mpz_random: Increased number of extra bits to 64, following FIPS 186-3.
parent
a6671dc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
5172adc3
2013-01-31 Niels Möller <nisse@lysator.liu.se>
* bignum-random.c (nettle_mpz_random): Increased number of extra
bits to 64, following FIPS 186-3.
2013-01-12 Niels Möller <nisse@lysator.liu.se>
* configure.ac: Use AC_LANG_SOURCE.
...
...
bignum-random.c
View file @
5172adc3
...
...
@@ -75,11 +75,12 @@ nettle_mpz_random(mpz_t x,
*/
/* Add a few bits extra, to decrease the bias from the final modulo
* operation. */
* operation. NIST FIPS 186-3 specifies 64 extra bits, for use with
* DSA. */
nettle_mpz_random_size
(
x
,
ctx
,
random
,
mpz_sizeinbase
(
n
,
2
)
+
1
6
);
mpz_sizeinbase
(
n
,
2
)
+
6
4
);
mpz_fdiv_r
(
x
,
x
,
n
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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