diff options
Diffstat (limited to 'src/math/numbertheory')
-rw-r--r-- | src/math/numbertheory/dsa_gen.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/math/numbertheory/dsa_gen.cpp b/src/math/numbertheory/dsa_gen.cpp index e88af0d87..e09de4b04 100644 --- a/src/math/numbertheory/dsa_gen.cpp +++ b/src/math/numbertheory/dsa_gen.cpp @@ -121,11 +121,9 @@ SecureVector<byte> generate_dsa_primes(RandomNumberGenerator& rng, BigInt& p, BigInt& q, u32bit pbits, u32bit qbits) { - SecureVector<byte> seed(qbits/8); - while(true) { - rng.randomize(&seed[0], seed.size()); + SecureVector<byte> seed = rng.random_vec(qbits / 8); if(generate_dsa_primes(rng, af, p, q, pbits, qbits, seed)) return seed; |