randombytes() -> randombytes_buf()
Since randombytes() wraps randombytes_buf(), that's one more function the linker can strip out until it's actually used by the app.
This commit is contained in:
parent
7c7f1cfacc
commit
c6ca4c6ef8
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user