diff --git a/src/libsodium/include/sodium/core.h b/src/libsodium/include/sodium/core.h index 55d2c2a0..6be22104 100644 --- a/src/libsodium/include/sodium/core.h +++ b/src/libsodium/include/sodium/core.h @@ -8,6 +8,7 @@ extern "C" { #endif +SODIUM_EXPORT int sodium_init(void); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_auth.h b/src/libsodium/include/sodium/crypto_auth.h index 2c0b67ea..dec3518c 100644 --- a/src/libsodium/include/sodium/crypto_auth.h +++ b/src/libsodium/include/sodium/crypto_auth.h @@ -11,17 +11,22 @@ extern "C" { #endif #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES +SODIUM_EXPORT size_t crypto_auth_bytes(void); #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES +SODIUM_EXPORT size_t crypto_auth_keybytes(void); #define crypto_auth_PRIMITIVE "hmacsha512256" +SODIUM_EXPORT const char *crypto_auth_primitive(void); +SODIUM_EXPORT int crypto_auth(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k); +SODIUM_EXPORT int crypto_auth_verify(const unsigned char *h, const unsigned char *in, unsigned long long inlen,const unsigned char *k); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_auth_hmacsha256.h b/src/libsodium/include/sodium/crypto_auth_hmacsha256.h index da4e31b7..c0271e86 100644 --- a/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +++ b/src/libsodium/include/sodium/crypto_auth_hmacsha256.h @@ -10,7 +10,10 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_auth_hmacsha256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_auth_hmacsha256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h b/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h index 02b9f5c2..d12c9f8b 100644 --- a/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +++ b/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h @@ -10,7 +10,10 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_auth_hmacsha512256_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_auth_hmacsha512256_ref_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_box.h b/src/libsodium/include/sodium/crypto_box.h index f0fd55ae..11cf4279 100644 --- a/src/libsodium/include/sodium/crypto_box.h +++ b/src/libsodium/include/sodium/crypto_box.h @@ -11,46 +11,60 @@ extern "C" { #endif #define crypto_box_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES +SODIUM_EXPORT size_t crypto_box_publickeybytes(void); #define crypto_box_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES +SODIUM_EXPORT size_t crypto_box_secretkeybytes(void); #define crypto_box_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES +SODIUM_EXPORT size_t crypto_box_beforenmbytes(void); #define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES +SODIUM_EXPORT size_t crypto_box_noncebytes(void); #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES +SODIUM_EXPORT size_t crypto_box_zerobytes(void); #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES +SODIUM_EXPORT size_t crypto_box_boxzerobytes(void); #define crypto_box_MACBYTES crypto_box_curve25519xsalsa20poly1305_MACBYTES +SODIUM_EXPORT size_t crypto_box_macbytes(void); #define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305" +SODIUM_EXPORT const char *crypto_box_primitive(void); +SODIUM_EXPORT int crypto_box_keypair(unsigned char *pk, unsigned char *sk); +SODIUM_EXPORT int crypto_box_beforenm(unsigned char *k, const unsigned char *pk, const unsigned char *sk); +SODIUM_EXPORT int crypto_box_afternm(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *k); +SODIUM_EXPORT int crypto_box_open_afternm(unsigned char *m, const unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *k); +SODIUM_EXPORT 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); +SODIUM_EXPORT 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); diff --git a/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h b/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h index d16e5ad9..c60078d8 100644 --- a/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +++ b/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h @@ -15,11 +15,22 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref_keypair(unsigned char *,unsigned char *); + +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref_beforenm(unsigned char *,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_core_hsalsa20.h b/src/libsodium/include/sodium/crypto_core_hsalsa20.h index ea527981..b4465e2c 100644 --- a/src/libsodium/include/sodium/crypto_core_hsalsa20.h +++ b/src/libsodium/include/sodium/crypto_core_hsalsa20.h @@ -12,6 +12,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_core_hsalsa20_ref2(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_core_salsa20.h b/src/libsodium/include/sodium/crypto_core_salsa20.h index 34205abb..7bdfb2d8 100644 --- a/src/libsodium/include/sodium/crypto_core_salsa20.h +++ b/src/libsodium/include/sodium/crypto_core_salsa20.h @@ -12,6 +12,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_core_salsa20_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_core_salsa2012.h b/src/libsodium/include/sodium/crypto_core_salsa2012.h index e9bfe2d3..b1083462 100644 --- a/src/libsodium/include/sodium/crypto_core_salsa2012.h +++ b/src/libsodium/include/sodium/crypto_core_salsa2012.h @@ -12,6 +12,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_core_salsa2012_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_core_salsa208.h b/src/libsodium/include/sodium/crypto_core_salsa208.h index 27a6bd2f..22ebd268 100644 --- a/src/libsodium/include/sodium/crypto_core_salsa208.h +++ b/src/libsodium/include/sodium/crypto_core_salsa208.h @@ -12,6 +12,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_core_salsa208_ref(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_generichash.h b/src/libsodium/include/sodium/crypto_generichash.h index db8fe31d..1f9e4780 100644 --- a/src/libsodium/include/sodium/crypto_generichash.h +++ b/src/libsodium/include/sodium/crypto_generichash.h @@ -11,37 +11,47 @@ extern "C" { #endif #define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN +SODIUM_EXPORT size_t crypto_generichash_bytes_min(void); #define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX +SODIUM_EXPORT size_t crypto_generichash_bytes_max(void); #define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN +SODIUM_EXPORT size_t crypto_generichash_keybytes_min(void); #define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX +SODIUM_EXPORT size_t crypto_generichash_keybytes_max(void); #define crypto_generichash_BLOCKBYTES crypto_generichash_blake2b_BLOCKBYTES +SODIUM_EXPORT size_t crypto_generichash_blockbytes(void); #define crypto_generichash_PRIMITIVE "blake2b" +SODIUM_EXPORT const char *crypto_generichash_primitive(void); typedef crypto_generichash_blake2b_state crypto_generichash_state; +SODIUM_EXPORT int crypto_generichash(unsigned char *out, size_t outlen, const unsigned char *in, unsigned long long inlen, const unsigned char *key, size_t keylen); +SODIUM_EXPORT int crypto_generichash_init(crypto_generichash_blake2b_state *state, const unsigned char *key, const size_t keylen, const size_t outlen); +SODIUM_EXPORT int crypto_generichash_update(crypto_generichash_blake2b_state *state, const unsigned char *in, unsigned long long inlen); +SODIUM_EXPORT int crypto_generichash_final(crypto_generichash_blake2b_state *state, unsigned char *out, const size_t outlen); diff --git a/src/libsodium/include/sodium/crypto_generichash_blake2b.h b/src/libsodium/include/sodium/crypto_generichash_blake2b.h index c86d219b..02fccc03 100644 --- a/src/libsodium/include/sodium/crypto_generichash_blake2b.h +++ b/src/libsodium/include/sodium/crypto_generichash_blake2b.h @@ -33,19 +33,23 @@ CRYPTO_ALIGN(64) typedef struct { } crypto_generichash_blake2b_state; #pragma pack(pop) +SODIUM_EXPORT int crypto_generichash_blake2b_ref(unsigned char *out, size_t outlen, const unsigned char *in, unsigned long long inlen, const unsigned char *key, size_t keylen); +SODIUM_EXPORT int crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *state, const unsigned char *key, const size_t keylen, const size_t outlen); +SODIUM_EXPORT int crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state, const unsigned char *in, unsigned long long inlen); +SODIUM_EXPORT int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state, unsigned char *out, const size_t outlen); diff --git a/src/libsodium/include/sodium/crypto_hash.h b/src/libsodium/include/sodium/crypto_hash.h index ebd6104e..738180f4 100644 --- a/src/libsodium/include/sodium/crypto_hash.h +++ b/src/libsodium/include/sodium/crypto_hash.h @@ -12,6 +12,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen); diff --git a/src/libsodium/include/sodium/crypto_hash_sha256.h b/src/libsodium/include/sodium/crypto_hash_sha256.h index e1a45876..b9742f96 100644 --- a/src/libsodium/include/sodium/crypto_hash_sha256.h +++ b/src/libsodium/include/sodium/crypto_hash_sha256.h @@ -10,6 +10,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_hash_sha256_ref(unsigned char *,const unsigned char *,unsigned long long); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_hash_sha512.h b/src/libsodium/include/sodium/crypto_hash_sha512.h index 3f49573e..a7f0361e 100644 --- a/src/libsodium/include/sodium/crypto_hash_sha512.h +++ b/src/libsodium/include/sodium/crypto_hash_sha512.h @@ -10,6 +10,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_hash_sha512_ref(unsigned char *,const unsigned char *,unsigned long long); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_hashblocks_sha256.h b/src/libsodium/include/sodium/crypto_hashblocks_sha256.h index f9009def..2143ad02 100644 --- a/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +++ b/src/libsodium/include/sodium/crypto_hashblocks_sha256.h @@ -10,6 +10,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_hashblocks_sha256_ref(unsigned char *,const unsigned char *,unsigned long long); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_hashblocks_sha512.h b/src/libsodium/include/sodium/crypto_hashblocks_sha512.h index 086ee1b7..91fb21a0 100644 --- a/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +++ b/src/libsodium/include/sodium/crypto_hashblocks_sha512.h @@ -10,6 +10,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_hashblocks_sha512_ref(unsigned char *,const unsigned char *,unsigned long long); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h index fe56a0f8..e341f391 100644 --- a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +++ b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h @@ -26,18 +26,23 @@ typedef struct crypto_onetimeauth_poly1305_implementation { const unsigned char *k); } crypto_onetimeauth_poly1305_implementation; +SODIUM_EXPORT const char *crypto_onetimeauth_poly1305_ref_implementation_name(void); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_set_implementation(crypto_onetimeauth_poly1305_implementation *impl); +SODIUM_EXPORT crypto_onetimeauth_poly1305_implementation * crypto_onetimeauth_pick_best_implementation(void); +SODIUM_EXPORT int crypto_onetimeauth_poly1305(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_verify(const unsigned char *h, const unsigned char *in, unsigned long long inlen, diff --git a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h index fd2bef58..cdf93223 100644 --- a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +++ b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h @@ -8,16 +8,20 @@ extern "C" { #endif +SODIUM_EXPORT extern struct crypto_onetimeauth_poly1305_implementation crypto_onetimeauth_poly1305_53_implementation; +SODIUM_EXPORT const char *crypto_onetimeauth_poly1305_53_implementation_name(void); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_53(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_53_verify(const unsigned char *h, const unsigned char *in, unsigned long long inlen, diff --git a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_ref.h b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_ref.h index 93209340..3cb131c5 100644 --- a/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_ref.h +++ b/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_ref.h @@ -8,16 +8,20 @@ extern "C" { #endif +SODIUM_EXPORT extern struct crypto_onetimeauth_poly1305_implementation crypto_onetimeauth_poly1305_ref_implementation; +SODIUM_EXPORT const char *crypto_onetimeauth_poly1305_ref_implementation_name(void); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_ref(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k); +SODIUM_EXPORT int crypto_onetimeauth_poly1305_ref_verify(const unsigned char *h, const unsigned char *in, unsigned long long inlen, diff --git a/src/libsodium/include/sodium/crypto_scalarmult.h b/src/libsodium/include/sodium/crypto_scalarmult.h index 34672fbd..34646fcb 100644 --- a/src/libsodium/include/sodium/crypto_scalarmult.h +++ b/src/libsodium/include/sodium/crypto_scalarmult.h @@ -11,16 +11,21 @@ extern "C" { #endif #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES +SODIUM_EXPORT size_t crypto_scalarmult_bytes(void); #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES +SODIUM_EXPORT size_t crypto_scalarmult_scalarbytes(void); #define crypto_scalarmult_PRIMITIVE "curve25519" +SODIUM_EXPORT const char *crypto_scalarmult_primitive(void); +SODIUM_EXPORT int crypto_scalarmult_base(unsigned char *q, const unsigned char *n); +SODIUM_EXPORT int crypto_scalarmult(unsigned char *q, const unsigned char *n, const unsigned char *p); diff --git a/src/libsodium/include/sodium/crypto_secretbox.h b/src/libsodium/include/sodium/crypto_secretbox.h index 68d64e80..1f89676e 100644 --- a/src/libsodium/include/sodium/crypto_secretbox.h +++ b/src/libsodium/include/sodium/crypto_secretbox.h @@ -11,24 +11,31 @@ extern "C" { #endif #define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES +SODIUM_EXPORT size_t crypto_secretbox_keybytes(void); #define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES +SODIUM_EXPORT size_t crypto_secretbox_noncebytes(void); #define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES +SODIUM_EXPORT size_t crypto_secretbox_zerobytes(void); #define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES +SODIUM_EXPORT size_t crypto_secretbox_boxzerobytes(void); #define crypto_secretbox_PRIMITIVE "xsalsa20poly1305" +SODIUM_EXPORT const char *crypto_secretbox_primitive(void); +SODIUM_EXPORT int crypto_secretbox(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *k); +SODIUM_EXPORT int crypto_secretbox_open(unsigned char *m, const unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *k); diff --git a/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h b/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h index 0c211508..8d2a4733 100644 --- a/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +++ b/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h @@ -12,7 +12,10 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_secretbox_xsalsa20poly1305_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_secretbox_xsalsa20poly1305_ref_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_shorthash.h b/src/libsodium/include/sodium/crypto_shorthash.h index ffbc999b..eeb179be 100644 --- a/src/libsodium/include/sodium/crypto_shorthash.h +++ b/src/libsodium/include/sodium/crypto_shorthash.h @@ -11,14 +11,18 @@ extern "C" { #endif #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES +SODIUM_EXPORT size_t crypto_shorthash_bytes(void); #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES +SODIUM_EXPORT size_t crypto_shorthash_keybytes(void); #define crypto_shorthash_PRIMITIVE "siphash24" +SODIUM_EXPORT const char *crypto_shorthash_primitive(void); +SODIUM_EXPORT int crypto_shorthash(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k); diff --git a/src/libsodium/include/sodium/crypto_shorthash_siphash24.h b/src/libsodium/include/sodium/crypto_shorthash_siphash24.h index f09b5231..b419c835 100644 --- a/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +++ b/src/libsodium/include/sodium/crypto_shorthash_siphash24.h @@ -10,6 +10,7 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_shorthash_siphash24_ref(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_sign.h b/src/libsodium/include/sodium/crypto_sign.h index 775e9cba..dd7d9e5a 100644 --- a/src/libsodium/include/sodium/crypto_sign.h +++ b/src/libsodium/include/sodium/crypto_sign.h @@ -11,26 +11,34 @@ extern "C" { #endif #define crypto_sign_BYTES crypto_sign_ed25519_BYTES +SODIUM_EXPORT size_t crypto_sign_bytes(void); #define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES +SODIUM_EXPORT size_t crypto_sign_publickeybytes(void); #define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES +SODIUM_EXPORT size_t crypto_sign_secretkeybytes(void); #define crypto_sign_PRIMITIVE "ed25519" +SODIUM_EXPORT const char *crypto_sign_primitive(void); +SODIUM_EXPORT int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk, const unsigned char *seed); +SODIUM_EXPORT int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); +SODIUM_EXPORT int crypto_sign(unsigned char *sm, unsigned long long *smlen, const unsigned char *m, unsigned long long mlen, const unsigned char *sk); +SODIUM_EXPORT int crypto_sign_open(unsigned char *m, unsigned long long *mlen, const unsigned char *sm, unsigned long long smlen, const unsigned char *pk); diff --git a/src/libsodium/include/sodium/crypto_sign_ed25519.h b/src/libsodium/include/sodium/crypto_sign_ed25519.h index 75d2aebb..6b74fafc 100644 --- a/src/libsodium/include/sodium/crypto_sign_ed25519.h +++ b/src/libsodium/include/sodium/crypto_sign_ed25519.h @@ -11,9 +11,17 @@ extern "C" { #endif + +SODIUM_EXPORT int crypto_sign_ed25519_ref10(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_sign_ed25519_ref10_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_sign_ed25519_ref10_keypair(unsigned char *,unsigned char *); + +SODIUM_EXPORT int crypto_sign_ed25519_ref10_seed_keypair(unsigned char *,unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h b/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h index f344e0e3..ad20ce9d 100644 --- a/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +++ b/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h @@ -11,8 +11,13 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_sign_edwards25519sha512batch_ref(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_sign_edwards25519sha512batch_ref_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); + +SODIUM_EXPORT int crypto_sign_edwards25519sha512batch_ref_keypair(unsigned char *,unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_stream.h b/src/libsodium/include/sodium/crypto_stream.h index e26599ab..9ac6a259 100644 --- a/src/libsodium/include/sodium/crypto_stream.h +++ b/src/libsodium/include/sodium/crypto_stream.h @@ -19,9 +19,11 @@ size_t crypto_stream_noncebytes(void); #define crypto_stream_PRIMITIVE "xsalsa20" const char *crypto_stream_primitive(void); +SODIUM_EXPORT int crypto_stream(unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *k); +SODIUM_EXPORT int crypto_stream_xor(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *k); diff --git a/src/libsodium/include/sodium/crypto_stream_aes128ctr.h b/src/libsodium/include/sodium/crypto_stream_aes128ctr.h index 749df9a4..6a721225 100644 --- a/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +++ b/src/libsodium/include/sodium/crypto_stream_aes128ctr.h @@ -11,10 +11,20 @@ extern "C" { #endif + +SODIUM_EXPORT int crypto_stream_aes128ctr_portable(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_aes128ctr_portable_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_aes128ctr_portable_beforenm(unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_aes128ctr_portable_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_aes128ctr_portable_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_stream_salsa20.h b/src/libsodium/include/sodium/crypto_stream_salsa20.h index 3bc12875..4669ee48 100644 --- a/src/libsodium/include/sodium/crypto_stream_salsa20.h +++ b/src/libsodium/include/sodium/crypto_stream_salsa20.h @@ -10,10 +10,19 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_stream_salsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa20_ref_beforenm(unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_stream_salsa2012.h b/src/libsodium/include/sodium/crypto_stream_salsa2012.h index 31945155..313aa8cd 100644 --- a/src/libsodium/include/sodium/crypto_stream_salsa2012.h +++ b/src/libsodium/include/sodium/crypto_stream_salsa2012.h @@ -10,10 +10,19 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_stream_salsa2012_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa2012_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa2012_ref_beforenm(unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa2012_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa2012_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_stream_salsa208.h b/src/libsodium/include/sodium/crypto_stream_salsa208.h index 29204d72..9ccbc7dd 100644 --- a/src/libsodium/include/sodium/crypto_stream_salsa208.h +++ b/src/libsodium/include/sodium/crypto_stream_salsa208.h @@ -10,10 +10,19 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_stream_salsa208_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa208_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa208_ref_beforenm(unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa208_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_salsa208_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_stream_xsalsa20.h b/src/libsodium/include/sodium/crypto_stream_xsalsa20.h index af2309b8..3ecbbf2c 100644 --- a/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +++ b/src/libsodium/include/sodium/crypto_stream_xsalsa20.h @@ -10,10 +10,19 @@ extern "C" { #endif +SODIUM_EXPORT int crypto_stream_xsalsa20_ref(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_xsalsa20_ref_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_xsalsa20_ref_beforenm(unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_xsalsa20_ref_afternm(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); + +SODIUM_EXPORT int crypto_stream_xsalsa20_ref_xor_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_verify_16.h b/src/libsodium/include/sodium/crypto_verify_16.h index e73199dc..99d3c5c0 100644 --- a/src/libsodium/include/sodium/crypto_verify_16.h +++ b/src/libsodium/include/sodium/crypto_verify_16.h @@ -7,9 +7,11 @@ #ifdef __cplusplus extern "C" { - #endif + +SODIUM_EXPORT int crypto_verify_16(const unsigned char *x, const unsigned char *y); + #define crypto_verify_16_ref crypto_verify_16 #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/crypto_verify_32.h b/src/libsodium/include/sodium/crypto_verify_32.h index a205201a..4351483d 100644 --- a/src/libsodium/include/sodium/crypto_verify_32.h +++ b/src/libsodium/include/sodium/crypto_verify_32.h @@ -8,7 +8,10 @@ #ifdef __cplusplus extern "C" { #endif + +SODIUM_EXPORT int crypto_verify_32(const unsigned char *x, const unsigned char *y); + #define crypto_verify_32_ref crypto_verify_32 #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/randombytes.h b/src/libsodium/include/sodium/randombytes.h index 4866b7a9..674efb92 100644 --- a/src/libsodium/include/sodium/randombytes.h +++ b/src/libsodium/include/sodium/randombytes.h @@ -22,15 +22,28 @@ typedef struct randombytes_implementation { int (*close)(void); } randombytes_implementation; +SODIUM_EXPORT int randombytes_set_implementation(randombytes_implementation *impl); +SODIUM_EXPORT void randombytes(unsigned char *buf, unsigned long long size); +SODIUM_EXPORT const char *randombytes_implementation_name(void); + +SODIUM_EXPORT uint32_t randombytes_random(void); + +SODIUM_EXPORT void randombytes_stir(void); + +SODIUM_EXPORT uint32_t randombytes_uniform(const uint32_t upper_bound); + +SODIUM_EXPORT void randombytes_buf(void * const buf, const size_t size); + +SODIUM_EXPORT int randombytes_close(void); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/randombytes_salsa20_random.h b/src/libsodium/include/sodium/randombytes_salsa20_random.h index d4d5bef5..f6b66b7c 100644 --- a/src/libsodium/include/sodium/randombytes_salsa20_random.h +++ b/src/libsodium/include/sodium/randombytes_salsa20_random.h @@ -11,14 +11,25 @@ extern "C" { #endif +SODIUM_EXPORT extern struct randombytes_implementation randombytes_salsa20_implementation; +SODIUM_EXPORT const char *randombytes_salsa20_implementation_name(void); +SODIUM_EXPORT uint32_t randombytes_salsa20_random(void); + +SODIUM_EXPORT void randombytes_salsa20_random_stir(void); + +SODIUM_EXPORT uint32_t randombytes_salsa20_random_uniform(const uint32_t upper_bound); + +SODIUM_EXPORT void randombytes_salsa20_random_buf(void * const buf, const size_t size); + +SODIUM_EXPORT int randombytes_salsa20_random_close(void); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/randombytes_sysrandom.h b/src/libsodium/include/sodium/randombytes_sysrandom.h index 1c7d3c6b..49ec967d 100644 --- a/src/libsodium/include/sodium/randombytes_sysrandom.h +++ b/src/libsodium/include/sodium/randombytes_sysrandom.h @@ -11,14 +11,25 @@ extern "C" { #endif +SODIUM_EXPORT extern struct randombytes_implementation randombytes_sysrandom_implementation; +SODIUM_EXPORT const char *randombytes_sysrandom_implementation_name(void); +SODIUM_EXPORT uint32_t randombytes_sysrandom(void); + +SODIUM_EXPORT void randombytes_sysrandom_stir(void); + +SODIUM_EXPORT uint32_t randombytes_sysrandom_uniform(const uint32_t upper_bound); + +SODIUM_EXPORT void randombytes_sysrandom_buf(void * const buf, const size_t size); + +SODIUM_EXPORT int randombytes_sysrandom_close(void); #ifdef __cplusplus diff --git a/src/libsodium/include/sodium/utils.h b/src/libsodium/include/sodium/utils.h index 3e8f90f3..fae1805c 100644 --- a/src/libsodium/include/sodium/utils.h +++ b/src/libsodium/include/sodium/utils.h @@ -10,11 +10,12 @@ extern "C" { #endif -void sodium_memzero(void * const pnt, const size_t len); - void *_sodium_alignedcalloc(unsigned char ** const unaligned_p, const size_t len); +SODIUM_EXPORT +void sodium_memzero(void * const pnt, const size_t len); + #ifdef __cplusplus } #endif