summaryrefslogtreecommitdiff
path: root/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c')
-rw-r--r--nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c
new file mode 100644
index 00000000..233bc950
--- /dev/null
+++ b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c
@@ -0,0 +1,12 @@
1#include "crypto_scalarmult_curve25519.h"
2#include "crypto_box.h"
3#include "randombytes.h"
4
5int crypto_box_keypair(
6 unsigned char *pk,
7 unsigned char *sk
8)
9{
10 randombytes(sk,32);
11 return crypto_scalarmult_curve25519_base(pk,sk);
12}