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
7c49b0dc
Commit
7c49b0dc
authored
May 25, 2010
by
Niels Möller
Browse files
Comment improvement.
Rev: nettle/dsa-keygen.c:1.5
parent
f00b07bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
dsa-keygen.c
View file @
7c49b0dc
...
...
@@ -72,13 +72,9 @@ dsa_generate_keypair(struct dsa_public_key *pub,
nettle_random_prime
(
p0
,
p0_bits
,
ctx
,
random
);
/* Generate p = r q p0 + 1, such that 2^{n-1} < p < 2^n.
/* Generate p =
2
r q p0 + 1, such that 2^{n-1} < p < 2^n.
*
* Then r = (p-1) / (q p0) < (2^n-2) / (q p0)
*
* and r >= 2^{n-1} (q p0).
*
* FIXME: Check further. */
* We select r in the range i + 1 < r <= 2i, with i = floor (2^{n-2} / (p0 q). */
mpz_init
(
p0q
);
mpz_mul
(
p0q
,
p0
,
pub
->
q
);
...
...
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