Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Wim Lewis
nettle
Commits
5172adc3
Commit
5172adc3
authored
Jan 31, 2013
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
ChangeLog
ChangeLog
+5
-0
bignum-random.c
bignum-random.c
+3
-2
No files found.
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
)
+
16
);
mpz_sizeinbase
(
n
,
2
)
+
64
);
mpz_fdiv_r
(
x
,
x
,
n
);
}
Write
Preview
Markdown
is supported
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