Adding support for generating more than 32 bytes at a time.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-03-04 10:46:10 +01:00
parent 41f0b53dd5
commit 59833d08eb
7 changed files with 28 additions and 24 deletions

2
bn.c
View File

@@ -418,7 +418,7 @@ bn256_random (bn256 *X)
for (i = 0; i < 256/256; i++)
{
rand = random_bytes_get ();
rand = random_bytes_get (32);
for (j = 0; j < BN256_WORDS; j++)
X->word[i*BN256_WORDS+j] = ((uint32_t *)rand)[j];
random_bytes_free (rand);