diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 4e388e15..95ae6faa 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -51,7 +51,6 @@ libsodium_la_SOURCES = \ crypto_onetimeauth/poly1305/donna/poly1305_donna32.h \ crypto_onetimeauth/poly1305/donna/poly1305_donna64.h \ crypto_onetimeauth/poly1305/donna/poly1305_donna.c \ - crypto_pwhash/crypto_pwhash.c \ crypto_pwhash/argon2/argon2-core.c \ crypto_pwhash/argon2/argon2-core.h \ crypto_pwhash/argon2/argon2-encoding.c \ @@ -64,6 +63,7 @@ libsodium_la_SOURCES = \ crypto_pwhash/argon2/blake2b-long.h \ crypto_pwhash/argon2/blamka-round-ref.h \ crypto_pwhash/argon2/pwhash_argon2i.c \ + crypto_pwhash/crypto_pwhash.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ @@ -86,11 +86,11 @@ libsodium_la_SOURCES = \ crypto_sign/ed25519/ref10/keypair.c \ crypto_sign/ed25519/ref10/open.c \ crypto_sign/ed25519/ref10/sign.c \ - crypto_stream/crypto_stream.c \ crypto_stream/chacha20/stream_chacha20.c \ crypto_stream/chacha20/stream_chacha20.h \ crypto_stream/chacha20/ref/stream_chacha20_ref.h \ crypto_stream/chacha20/ref/stream_chacha20_ref.c \ + crypto_stream/crypto_stream.c \ crypto_stream/salsa20/stream_salsa20_api.c \ crypto_stream/xsalsa20/stream_xsalsa20_api.c \ crypto_stream/xsalsa20/ref/stream_xsalsa20.c \ @@ -101,8 +101,8 @@ libsodium_la_SOURCES = \ crypto_verify/32/ref/verify_32.c \ crypto_verify/64/verify_64_api.c \ crypto_verify/64/ref/verify_64.c \ + include/sodium/private.h \ randombytes/randombytes.c \ - sodium/common.h \ sodium/core.c \ sodium/runtime.c \ sodium/utils.c \ diff --git a/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c b/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c index 29d080d2..768578e4 100644 --- a/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +++ b/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c @@ -10,7 +10,7 @@ #include "crypto_verify_16.h" #include "utils.h" -#include "../../../sodium/common.h" +#include "private/common.h" static const unsigned char _pad0[16] = { 0 }; diff --git a/src/libsodium/crypto_core/hchacha20/core_hchacha20.c b/src/libsodium/crypto_core/hchacha20/core_hchacha20.c index 8a858268..37d1c94d 100644 --- a/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +++ b/src/libsodium/crypto_core/hchacha20/core_hchacha20.c @@ -4,7 +4,7 @@ #include "core_hchacha20.h" #include "crypto_core_hchacha20.h" -#include "../../sodium/common.h" +#include "private/common.h" int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, diff --git a/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c b/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c index f55d18bd..2713bc8a 100644 --- a/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +++ b/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c @@ -8,7 +8,7 @@ Public domain. #include #include "crypto_core_hsalsa20.h" -#include "../../../sodium/common.h" +#include "private/common.h" #define ROUNDS 20 #define U32C(v) (v##U) diff --git a/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c b/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c index 4c3973c4..26fb66fd 100644 --- a/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +++ b/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c @@ -8,7 +8,7 @@ Public domain. #include #include "crypto_core_salsa20.h" -#include "../../../sodium/common.h" +#include "private/common.h" #define ROUNDS 20 #define U32C(v) (v##U) diff --git a/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c b/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c index 9e0dc09b..56581662 100644 --- a/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +++ b/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c @@ -8,7 +8,7 @@ Public domain. #include #include "crypto_core_salsa2012.h" -#include "../../../sodium/common.h" +#include "private/common.h" #define ROUNDS 12 #define U32C(v) (v##U) diff --git a/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c b/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c index 9db4b5aa..c350e84e 100644 --- a/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +++ b/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c @@ -8,7 +8,7 @@ Public domain. #include #include "crypto_core_salsa208.h" -#include "../../../sodium/common.h" +#include "private/common.h" #define ROUNDS 8 #define U32C(v) (v##U) diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c b/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c index ae874f29..8af04dd8 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c @@ -4,7 +4,7 @@ #include "blake2.h" #include "blake2-impl.h" -#include "../../../sodium/common.h" +#include "private/common.h" CRYPTO_ALIGN(64) static const uint64_t blake2b_IV[8] = { diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c index 24495e1d..676bc330 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c @@ -19,7 +19,7 @@ #include "blake2.h" #include "blake2-impl.h" #include "runtime.h" -#include "../../../sodium/common.h" +#include "private/common.h" #ifdef HAVE_TI_MODE # if defined(__SIZEOF_INT128__) diff --git a/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c b/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c index f397dbe2..0eb330e2 100644 --- a/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +++ b/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c @@ -28,7 +28,7 @@ #include "crypto_hash_sha256.h" #include "utils.h" -#include "../../../sodium/common.h" +#include "private/common.h" #include diff --git a/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c b/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c index 3c7c559f..4e6b515c 100644 --- a/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +++ b/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c @@ -28,7 +28,7 @@ #include "crypto_hash_sha512.h" #include "utils.h" -#include "../../../sodium/common.h" +#include "private/common.h" #include diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h index 5f1e1c6c..2fe9088c 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h @@ -10,7 +10,7 @@ # define POLY1305_NOINLINE #endif -#include "../../../sodium/common.h" +#include "private/common.h" #define poly1305_block_size 16 diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h index 3c4de66d..f797fe7d 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h @@ -22,7 +22,7 @@ typedef unsigned uint128_t __attribute__ ((mode(TI))); # define POLY1305_NOINLINE #endif -#include "../../../sodium/common.h" +#include "private/common.h" #define poly1305_block_size 16 diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-core.c b/src/libsodium/crypto_pwhash/argon2/argon2-core.c index 11112f69..99a4dee9 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-core.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2-core.c @@ -23,7 +23,7 @@ #include "crypto_generichash_blake2b.h" #include "runtime.h" #include "utils.h" -#include "../../sodium/common.h" +#include "private/common.h" #include "argon2-core.h" #include "argon2-impl.h" diff --git a/src/libsodium/crypto_pwhash/argon2/blake2b-long.c b/src/libsodium/crypto_pwhash/argon2/blake2b-long.c index d287095f..5e4012c2 100644 --- a/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +++ b/src/libsodium/crypto_pwhash/argon2/blake2b-long.c @@ -5,7 +5,7 @@ #include "crypto_generichash_blake2b.h" #include "utils.h" -#include "../../sodium/common.h" +#include "private/common.h" #include "argon2-impl.h" #include "blake2b-long.h" diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index 86961625..3332517a 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -36,7 +36,7 @@ #include "../pbkdf2-sha256.h" #include "../crypto_scrypt.h" -#include "../../../sodium/common.h" +#include "private/common.h" static inline void blkcpy_64(escrypt_block_t *dest, const escrypt_block_t *src) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c index da114c73..e1efdd95 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c @@ -33,7 +33,7 @@ #include "crypto_auth_hmacsha256.h" #include "pbkdf2-sha256.h" #include "utils.h" -#include "../../sodium/common.h" +#include "private/common.h" /** * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c index 5fd71f39..9baea813 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c @@ -46,7 +46,7 @@ #include "../pbkdf2-sha256.h" #include "../crypto_scrypt.h" -#include "../../../sodium/common.h" +#include "private/common.h" #if defined(__XOP__) && defined(DISABLED) #define ARX(out, in1, in2, s) \ diff --git a/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c b/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c index 72e6cf40..27f7b13c 100644 --- a/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +++ b/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c @@ -1,5 +1,5 @@ #include "crypto_shorthash_siphash24.h" -#include "../../../sodium/common.h" +#include "private/common.h" typedef uint64_t u64; typedef uint32_t u32; diff --git a/src/libsodium/crypto_stream/aes128ctr/portable/common.h b/src/libsodium/crypto_stream/aes128ctr/portable/common.h index 2eb4412e..5b7dec58 100644 --- a/src/libsodium/crypto_stream/aes128ctr/portable/common.h +++ b/src/libsodium/crypto_stream/aes128ctr/portable/common.h @@ -5,7 +5,7 @@ #define COMMON_H #include "types.h" -#include "../../../sodium/common.h" +#include "private/common.h" /* Macros required only for key expansion */ diff --git a/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c b/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c index 66740ed1..fe4c9773 100644 --- a/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +++ b/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c @@ -13,7 +13,7 @@ #include "crypto_stream_chacha20.h" #include "stream_chacha20_ref.h" #include "../stream_chacha20.h" -#include "../../../sodium/common.h" +#include "private/common.h" struct chacha_ctx { uint32_t input[16]; diff --git a/src/libsodium/sodium/common.h b/src/libsodium/include/sodium/private/common.h similarity index 100% rename from src/libsodium/sodium/common.h rename to src/libsodium/include/sodium/private/common.h