ringct: lock access to the PRNG

This commit is contained in:
moneromooo-monero 2016-05-15 00:11:03 +01:00
parent 4d7f073491
commit 86b4426191
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ namespace rct {
//generates a random scalar which can be used as a secret key or mask
void skGen(key &sk) {
unsigned char tmp[64];
generate_random_bytes(64, tmp);
rand(64, tmp);
memcpy(sk.bytes, tmp, 32);
sc_reduce32(sk.bytes);
}
@ -116,7 +116,7 @@ namespace rct {
//generates a random scalar which can be used as a secret key or mask
key skGen() {
unsigned char tmp[64];
generate_random_bytes(64, tmp);
rand(64, tmp);
key sk;
memcpy(sk.bytes, tmp, 32);
sc_reduce32(sk.bytes);