summaryrefslogtreecommitdiffstats
path: root/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208
diff options
context:
space:
mode:
Diffstat (limited to 'external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208')
-rw-r--r--external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h9
-rw-r--r--external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c57
-rw-r--r--external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c60
-rw-r--r--external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c11
4 files changed, 0 insertions, 137 deletions
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h
deleted file mode 100644
index 14b4a775..00000000
--- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#include "crypto_stream_salsa208.h"
-
-#define crypto_stream crypto_stream_salsa208
-#define crypto_stream_xor crypto_stream_salsa208_xor
-#define crypto_stream_KEYBYTES crypto_stream_salsa208_KEYBYTES
-#define crypto_stream_NONCEBYTES crypto_stream_salsa208_NONCEBYTES
-#define crypto_stream_IMPLEMENTATION crypto_stream_salsa208_IMPLEMENTATION
-#define crypto_stream_VERSION crypto_stream_salsa208_VERSION
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c
deleted file mode 100644
index 6a15ff15..00000000
--- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-version 20140420
-D. J. Bernstein
-Public domain.
-*/
-
-#include "api.h"
-#include "crypto_core_salsa208.h"
-#include "utils.h"
-
-typedef unsigned int uint32;
-
-static const unsigned char sigma[16] = {
- 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
-};
-
-int crypto_stream(
- unsigned char *c,unsigned long long clen,
- const unsigned char *n,
- const unsigned char *k
-)
-{
- unsigned char in[16];
- unsigned char block[64];
- unsigned char kcopy[32];
- unsigned int i;
- unsigned int u;
-
- if (!clen) return 0;
-
- for (i = 0;i < 32;++i) kcopy[i] = k[i];
- for (i = 0;i < 8;++i) in[i] = n[i];
- for (i = 8;i < 16;++i) in[i] = 0;
-
- while (clen >= 64) {
- crypto_core_salsa208(c,in,kcopy,sigma);
-
- u = 1;
- for (i = 8;i < 16;++i) {
- u += (unsigned int) in[i];
- in[i] = u;
- u >>= 8;
- }
-
- clen -= 64;
- c += 64;
- }
-
- if (clen) {
- crypto_core_salsa208(block,in,kcopy,sigma);
- for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i];
- }
- sodium_memzero(block, sizeof block);
- sodium_memzero(kcopy, sizeof kcopy);
-
- return 0;
-}
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c
deleted file mode 100644
index de0eae9f..00000000
--- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-version 20140420
-D. J. Bernstein
-Public domain.
-*/
-
-#include "api.h"
-#include "crypto_core_salsa208.h"
-#include "utils.h"
-
-typedef unsigned int uint32;
-
-static const unsigned char sigma[16] = {
- 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
-};
-
-int crypto_stream_xor(
- unsigned char *c,
- const unsigned char *m,unsigned long long mlen,
- const unsigned char *n,
- const unsigned char *k
-)
-{
- unsigned char in[16];
- unsigned char block[64];
- unsigned char kcopy[32];
- unsigned int i;
- unsigned int u;
-
- if (!mlen) return 0;
-
- for (i = 0;i < 32;++i) kcopy[i] = k[i];
- for (i = 0;i < 8;++i) in[i] = n[i];
- for (i = 8;i < 16;++i) in[i] = 0;
-
- while (mlen >= 64) {
- crypto_core_salsa208(block,in,kcopy,sigma);
- for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i];
-
- u = 1;
- for (i = 8;i < 16;++i) {
- u += (unsigned int) in[i];
- in[i] = u;
- u >>= 8;
- }
-
- mlen -= 64;
- c += 64;
- m += 64;
- }
-
- if (mlen) {
- crypto_core_salsa208(block,in,kcopy,sigma);
- for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i];
- }
- sodium_memzero(block, sizeof block);
- sodium_memzero(kcopy, sizeof kcopy);
-
- return 0;
-}
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c
deleted file mode 100644
index 640a8b2e..00000000
--- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "crypto_stream_salsa208.h"
-
-size_t
-crypto_stream_salsa208_keybytes(void) {
- return crypto_stream_salsa208_KEYBYTES;
-}
-
-size_t
-crypto_stream_salsa208_noncebytes(void) {
- return crypto_stream_salsa208_NONCEBYTES;
-}