aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/rctOps.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-05-15 00:11:03 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:27:30 +0100
commit86b4426191b44eb9ab0c428e910dede9f7398dc1 (patch)
treea401a6cec791c40d480ede214a5221352fececb1 /src/ringct/rctOps.cpp
parentringct: add simple input validation (diff)
downloadmonero-86b4426191b44eb9ab0c428e910dede9f7398dc1.tar.xz
ringct: lock access to the PRNG
Diffstat (limited to 'src/ringct/rctOps.cpp')
-rw-r--r--src/ringct/rctOps.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp
index 6853becb9..0858dc4f4 100644
--- a/src/ringct/rctOps.cpp
+++ b/src/ringct/rctOps.cpp
@@ -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);