diff options
Diffstat (limited to 'external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305')
6 files changed, 0 insertions, 167 deletions
diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c deleted file mode 100644 index 1c002d2d..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "crypto_box_curve25519xsalsa20poly1305.h" - -size_t -crypto_box_curve25519xsalsa20poly1305_seedbytes(void) { - return crypto_box_curve25519xsalsa20poly1305_SEEDBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_publickeybytes(void) { - return crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_secretkeybytes(void) { - return crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_beforenmbytes(void) { - return crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_noncebytes(void) { - return crypto_box_curve25519xsalsa20poly1305_NONCEBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_zerobytes(void) { - return crypto_box_curve25519xsalsa20poly1305_ZEROBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_boxzerobytes(void) { - return crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES; -} - -size_t -crypto_box_curve25519xsalsa20poly1305_macbytes(void) { - return crypto_box_curve25519xsalsa20poly1305_MACBYTES; -} diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c deleted file mode 100644 index a830936b..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "api.h" -#include "crypto_secretbox_xsalsa20poly1305.h" - -int crypto_box_afternm( - unsigned char *c, - const unsigned char *m,unsigned long long mlen, - const unsigned char *n, - const unsigned char *k -) -{ - return crypto_secretbox_xsalsa20poly1305(c,m,mlen,n,k); -} - -int crypto_box_open_afternm( - unsigned char *m, - const unsigned char *c,unsigned long long clen, - const unsigned char *n, - const unsigned char *k -) -{ - return crypto_secretbox_xsalsa20poly1305_open(m,c,clen,n,k); -} diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h deleted file mode 100644 index 7f320c6f..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +++ /dev/null @@ -1,20 +0,0 @@ - -#include "crypto_box_curve25519xsalsa20poly1305.h" - -#define crypto_box crypto_box_curve25519xsalsa20poly1305 -#define crypto_box_open crypto_box_curve25519xsalsa20poly1305_open -#define crypto_box_seed_keypair crypto_box_curve25519xsalsa20poly1305_seed_keypair -#define crypto_box_keypair crypto_box_curve25519xsalsa20poly1305_keypair -#define crypto_box_beforenm crypto_box_curve25519xsalsa20poly1305_beforenm -#define crypto_box_afternm crypto_box_curve25519xsalsa20poly1305_afternm -#define crypto_box_open_afternm crypto_box_curve25519xsalsa20poly1305_open_afternm -#define crypto_box_SEEDBYTES crypto_box_curve25519xsalsa20poly1305_SEEDBYTES -#define crypto_box_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES -#define crypto_box_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES -#define crypto_box_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES -#define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES -#define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES -#define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES -#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) -#define crypto_box_IMPLEMENTATION crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION -#define crypto_box_VERSION crypto_box_curve25519xsalsa20poly1305_VERSION diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c deleted file mode 100644 index 40d4300e..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "api.h" -#include "crypto_core_hsalsa20.h" -#include "crypto_scalarmult_curve25519.h" - -static const unsigned char sigma[16] = { - 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k' -}; -static const unsigned char n[16] = {0}; - -int crypto_box_beforenm( - unsigned char *k, - const unsigned char *pk, - const unsigned char *sk -) -{ - unsigned char s[32]; - crypto_scalarmult_curve25519(s,sk,pk); - return crypto_core_hsalsa20(k,n,s,sigma); -} diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c deleted file mode 100644 index ebc208a3..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "api.h" -#include "utils.h" - -int crypto_box( - unsigned char *c, - const unsigned char *m,unsigned long long mlen, - const unsigned char *n, - const unsigned char *pk, - const unsigned char *sk -) -{ - unsigned char k[crypto_box_BEFORENMBYTES]; - int ret; - - crypto_box_beforenm(k,pk,sk); - ret = crypto_box_afternm(c,m,mlen,n,k); - sodium_memzero(k, sizeof k); - - return ret; -} - -int crypto_box_open( - unsigned char *m, - const unsigned char *c,unsigned long long clen, - const unsigned char *n, - const unsigned char *pk, - const unsigned char *sk -) -{ - unsigned char k[crypto_box_BEFORENMBYTES]; - int ret; - - crypto_box_beforenm(k,pk,sk); - ret = crypto_box_open_afternm(m,c,clen,n,k); - sodium_memzero(k, sizeof k); - - return ret; -} diff --git a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c b/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c deleted file mode 100644 index e2a03faa..00000000 --- a/external_libs/python/pyzmq-14.7.0/bundled/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +++ /dev/null @@ -1,27 +0,0 @@ -#include <string.h> - -#include "crypto_hash_sha512.h" -#include "crypto_scalarmult_curve25519.h" -#include "api.h" -#include "randombytes.h" - -int crypto_box_seed_keypair( - unsigned char *pk, - unsigned char *sk, - const unsigned char *seed -) -{ - unsigned char hash[64]; - crypto_hash_sha512(hash,seed,32); - memmove(sk,hash,32); - return crypto_scalarmult_curve25519_base(pk,sk); -} - -int crypto_box_keypair( - unsigned char *pk, - unsigned char *sk -) -{ - randombytes_buf(sk,32); - return crypto_scalarmult_curve25519_base(pk,sk); -} |