summaryrefslogtreecommitdiff
path: root/nacl/crypto_stream/xsalsa20/ref
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
commitd4fe483efd3e0062f12430efe9deb66d43d914d7 (patch)
treee6aa9ac716ae82cdb15c6e6cb5d9d1d9d29f053b /nacl/crypto_stream/xsalsa20/ref
parent835ef0320d47372eac14bef31c979b8217d04498 (diff)
NaCl moved to other repo.
Diffstat (limited to 'nacl/crypto_stream/xsalsa20/ref')
-rw-r--r--nacl/crypto_stream/xsalsa20/ref/api.h2
-rw-r--r--nacl/crypto_stream/xsalsa20/ref/implementors1
-rw-r--r--nacl/crypto_stream/xsalsa20/ref/stream.c22
-rw-r--r--nacl/crypto_stream/xsalsa20/ref/xor.c23
4 files changed, 0 insertions, 48 deletions
diff --git a/nacl/crypto_stream/xsalsa20/ref/api.h b/nacl/crypto_stream/xsalsa20/ref/api.h
deleted file mode 100644
index 6910a7dc..00000000
--- a/nacl/crypto_stream/xsalsa20/ref/api.h
+++ /dev/null
@@ -1,2 +0,0 @@
1#define CRYPTO_KEYBYTES 32
2#define CRYPTO_NONCEBYTES 24
diff --git a/nacl/crypto_stream/xsalsa20/ref/implementors b/nacl/crypto_stream/xsalsa20/ref/implementors
deleted file mode 100644
index f6fb3c73..00000000
--- a/nacl/crypto_stream/xsalsa20/ref/implementors
+++ /dev/null
@@ -1 +0,0 @@
1Daniel J. Bernstein
diff --git a/nacl/crypto_stream/xsalsa20/ref/stream.c b/nacl/crypto_stream/xsalsa20/ref/stream.c
deleted file mode 100644
index 2d710709..00000000
--- a/nacl/crypto_stream/xsalsa20/ref/stream.c
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2version 20080914
3D. J. Bernstein
4Public domain.
5*/
6
7#include "crypto_core_hsalsa20.h"
8#include "crypto_stream_salsa20.h"
9#include "crypto_stream.h"
10
11static const unsigned char sigma[16] = "expand 32-byte k";
12
13int crypto_stream(
14 unsigned char *c,unsigned long long clen,
15 const unsigned char *n,
16 const unsigned char *k
17)
18{
19 unsigned char subkey[32];
20 crypto_core_hsalsa20(subkey,n,k,sigma);
21 return crypto_stream_salsa20(c,clen,n + 16,subkey);
22}
diff --git a/nacl/crypto_stream/xsalsa20/ref/xor.c b/nacl/crypto_stream/xsalsa20/ref/xor.c
deleted file mode 100644
index 13f3134a..00000000
--- a/nacl/crypto_stream/xsalsa20/ref/xor.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2version 20080913
3D. J. Bernstein
4Public domain.
5*/
6
7#include "crypto_core_hsalsa20.h"
8#include "crypto_stream_salsa20.h"
9#include "crypto_stream.h"
10
11static const unsigned char sigma[16] = "expand 32-byte k";
12
13int crypto_stream_xor(
14 unsigned char *c,
15 const unsigned char *m,unsigned long long mlen,
16 const unsigned char *n,
17 const unsigned char *k
18)
19{
20 unsigned char subkey[32];
21 crypto_core_hsalsa20(subkey,n,k,sigma);
22 return crypto_stream_salsa20_xor(c,m,mlen,n + 16,subkey);
23}