Commit 44ae2850 authored by Niels Möller's avatar Niels Möller
Browse files

(dsa_nist_gen): Fixed declaration/statement order.

Rev: src/nettle/ChangeLog:1.218
Rev: src/nettle/dsa-keygen.c:1.8
parent d17d340f
2004-01-08 Niels Mller <niels@s3.kth.se> 2004-01-08 Niels Mller <niels@s3.kth.se>
* dsa-keygen.c (dsa_nist_gen): Fixed declaration/statement order.
* rsa-keygen.c (bignum_next_prime): Fixed off-by-one error when * rsa-keygen.c (bignum_next_prime): Fixed off-by-one error when
comparing input to the largest listed prime. General cleanup, as comparing input to the largest listed prime. General cleanup, as
prime_limit > 0 always. Use TMP_DECL and TMP_ALLOC. prime_limit > 0 always. Use TMP_DECL and TMP_ALLOC.
......
...@@ -122,9 +122,10 @@ dsa_nist_gen(mpz_t p, mpz_t q, ...@@ -122,9 +122,10 @@ dsa_nist_gen(mpz_t p, mpz_t q,
/* Official maximum key size: L = 1024 => n = 6 */ /* Official maximum key size: L = 1024 => n = 6 */
TMP_DECL(buffer, uint8_t, (6 + 1) * SHA1_DIGEST_SIZE); TMP_DECL(buffer, uint8_t, (6 + 1) * SHA1_DIGEST_SIZE);
unsigned size = (n+1) * SHA1_DIGEST_SIZE; unsigned size = (n+1) * SHA1_DIGEST_SIZE;
TMP_ALLOC(buffer, size);
unsigned i, j; unsigned i, j;
TMP_ALLOC(buffer, size);
for (i = 0, j = 2; i<4096; i++, j+= n+1) for (i = 0, j = 2; i<4096; i++, j+= n+1)
{ {
unsigned k; unsigned k;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment