diff options
Diffstat (limited to 'nacl/crypto_box/curve25519xsalsa20poly1305')
8 files changed, 0 insertions, 85 deletions
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/checksum b/nacl/crypto_box/curve25519xsalsa20poly1305/checksum deleted file mode 100644 index 56a20083..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/checksum +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | 5fac7400caabc14a99c5c0bc13fb1df5e468e870382a3a1c | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/after.c b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/after.c deleted file mode 100644 index eb243e22..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/after.c +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #include "crypto_secretbox_xsalsa20poly1305.h" | ||
2 | #include "crypto_box.h" | ||
3 | |||
4 | int crypto_box_afternm( | ||
5 | unsigned char *c, | ||
6 | const unsigned char *m,unsigned long long mlen, | ||
7 | const unsigned char *n, | ||
8 | const unsigned char *k | ||
9 | ) | ||
10 | { | ||
11 | return crypto_secretbox_xsalsa20poly1305(c,m,mlen,n,k); | ||
12 | } | ||
13 | |||
14 | int crypto_box_open_afternm( | ||
15 | unsigned char *m, | ||
16 | const unsigned char *c,unsigned long long clen, | ||
17 | const unsigned char *n, | ||
18 | const unsigned char *k | ||
19 | ) | ||
20 | { | ||
21 | return crypto_secretbox_xsalsa20poly1305_open(m,c,clen,n,k); | ||
22 | } | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/api.h b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/api.h deleted file mode 100644 index ce7762df..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/api.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #define CRYPTO_PUBLICKEYBYTES 32 | ||
2 | #define CRYPTO_SECRETKEYBYTES 32 | ||
3 | #define CRYPTO_BEFORENMBYTES 32 | ||
4 | #define CRYPTO_NONCEBYTES 24 | ||
5 | #define CRYPTO_ZEROBYTES 32 | ||
6 | #define CRYPTO_BOXZEROBYTES 16 | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/before.c b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/before.c deleted file mode 100644 index 279bb12a..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/before.c +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #include "crypto_core_hsalsa20.h" | ||
2 | #include "crypto_scalarmult_curve25519.h" | ||
3 | #include "crypto_box.h" | ||
4 | |||
5 | static const unsigned char sigma[16] = "expand 32-byte k"; | ||
6 | static const unsigned char n[16] = {0}; | ||
7 | |||
8 | int crypto_box_beforenm( | ||
9 | unsigned char *k, | ||
10 | const unsigned char *pk, | ||
11 | const unsigned char *sk | ||
12 | ) | ||
13 | { | ||
14 | unsigned char s[32]; | ||
15 | crypto_scalarmult_curve25519(s,sk,pk); | ||
16 | return crypto_core_hsalsa20(k,n,s,sigma); | ||
17 | } | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/box.c b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/box.c deleted file mode 100644 index 81ff72e2..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/box.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #include "crypto_box.h" | ||
2 | |||
3 | int crypto_box( | ||
4 | unsigned char *c, | ||
5 | const unsigned char *m,unsigned long long mlen, | ||
6 | const unsigned char *n, | ||
7 | const unsigned char *pk, | ||
8 | const unsigned char *sk | ||
9 | ) | ||
10 | { | ||
11 | unsigned char k[crypto_box_BEFORENMBYTES]; | ||
12 | crypto_box_beforenm(k,pk,sk); | ||
13 | return crypto_box_afternm(c,m,mlen,n,k); | ||
14 | } | ||
15 | |||
16 | int crypto_box_open( | ||
17 | unsigned char *m, | ||
18 | const unsigned char *c,unsigned long long clen, | ||
19 | const unsigned char *n, | ||
20 | const unsigned char *pk, | ||
21 | const unsigned char *sk | ||
22 | ) | ||
23 | { | ||
24 | unsigned char k[crypto_box_BEFORENMBYTES]; | ||
25 | crypto_box_beforenm(k,pk,sk); | ||
26 | return crypto_box_open_afternm(m,c,clen,n,k); | ||
27 | } | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c b/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c deleted file mode 100644 index 233bc950..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/ref/keypair.c +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #include "crypto_scalarmult_curve25519.h" | ||
2 | #include "crypto_box.h" | ||
3 | #include "randombytes.h" | ||
4 | |||
5 | int 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 | } | ||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/selected b/nacl/crypto_box/curve25519xsalsa20poly1305/selected deleted file mode 100644 index e69de29b..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/selected +++ /dev/null | |||
diff --git a/nacl/crypto_box/curve25519xsalsa20poly1305/used b/nacl/crypto_box/curve25519xsalsa20poly1305/used deleted file mode 100644 index e69de29b..00000000 --- a/nacl/crypto_box/curve25519xsalsa20poly1305/used +++ /dev/null | |||