keypair.c 267 B

123456789101112
  1. #include "crypto_scalarmult_curve25519.h"
  2. #include "crypto_box.h"
  3. #include "randombytes.h"
  4. int crypto_box_curve25519xsalsa20poly1305_ref_keypair(
  5. unsigned char *pk,
  6. unsigned char *sk
  7. )
  8. {
  9. randombytes(sk,32);
  10. return crypto_scalarmult_curve25519_base(pk,sk);
  11. }