diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c index 88183ea6..e2a03faa 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c @@ -22,6 +22,6 @@ int crypto_box_keypair( unsigned char *sk ) { - randombytes(sk,32); + randombytes_buf(sk,32); return crypto_scalarmult_curve25519_base(pk,sk); } diff --git a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c index 920cf0f0..2268cd60 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c @@ -32,7 +32,7 @@ int crypto_sign_keypair(unsigned char *pk, unsigned char *sk) unsigned char seed[32]; int ret; - randombytes(seed, sizeof seed); + randombytes_buf(seed, sizeof seed); ret = crypto_sign_seed_keypair(pk, sk, seed); sodium_memzero(seed, sizeof seed); diff --git a/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c b/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c index 885d7b1a..9c548dcf 100644 --- a/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +++ b/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c @@ -13,7 +13,7 @@ int crypto_sign_keypair( sc25519 scsk; ge25519 gepk; - randombytes(sk, 32); + randombytes_buf(sk, 32); crypto_hash_sha512(sk, sk, 32); sk[0] &= 248; sk[31] &= 127;