diff options
author | aunsane <aunsane@gmail.com> | 2018-10-08 20:59:56 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-10-08 20:59:56 +0300 |
commit | 1656da33a4750283e1024ea65e1c6573a07fd50a (patch) | |
tree | ba298f7f7aeb7db6df4061e806486b50a4708a89 /libs/libsodium/src/include | |
parent | b8ad6c3cc2edef99dc2a416667c3933c1061994c (diff) |
updated libsodium to version 1.0.17
Diffstat (limited to 'libs/libsodium/src/include')
6 files changed, 44 insertions, 12 deletions
diff --git a/libs/libsodium/src/include/sodium/crypto_aead_aes256gcm.h b/libs/libsodium/src/include/sodium/crypto_aead_aes256gcm.h index 46a3800f37..5e67aa99c5 100644 --- a/libs/libsodium/src/include/sodium/crypto_aead_aes256gcm.h +++ b/libs/libsodium/src/include/sodium/crypto_aead_aes256gcm.h @@ -52,7 +52,7 @@ size_t crypto_aead_aes256gcm_abytes(void); #define crypto_aead_aes256gcm_MESSAGEBYTES_MAX \ SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aes256gcm_ABYTES, \ - (16ULL * ((1ULL << 32) - 2ULL)) - crypto_aead_aes256gcm_ABYTES) + (16ULL * ((1ULL << 32) - 2ULL))) SODIUM_EXPORT size_t crypto_aead_aes256gcm_messagebytes_max(void); diff --git a/libs/libsodium/src/include/sodium/crypto_aead_chacha20poly1305.h b/libs/libsodium/src/include/sodium/crypto_aead_chacha20poly1305.h index a575ec7173..8ab31243ff 100644 --- a/libs/libsodium/src/include/sodium/crypto_aead_chacha20poly1305.h +++ b/libs/libsodium/src/include/sodium/crypto_aead_chacha20poly1305.h @@ -32,7 +32,7 @@ size_t crypto_aead_chacha20poly1305_ietf_abytes(void); #define crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX \ SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ietf_ABYTES, \ - (64ULL * (1ULL << 32) - 64ULL) - crypto_aead_chacha20poly1305_ietf_ABYTES) + (64ULL * ((1ULL << 32) - 1ULL))) SODIUM_EXPORT size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void); diff --git a/libs/libsodium/src/include/sodium/crypto_secretstream_xchacha20poly1305.h b/libs/libsodium/src/include/sodium/crypto_secretstream_xchacha20poly1305.h index 7d3fa2a9e3..dac273b599 100644 --- a/libs/libsodium/src/include/sodium/crypto_secretstream_xchacha20poly1305.h +++ b/libs/libsodium/src/include/sodium/crypto_secretstream_xchacha20poly1305.h @@ -30,7 +30,8 @@ SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_keybytes(void); #define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \ - SODIUM_MIN(SODIUM_SIZE_MAX, ((1ULL << 32) - 2ULL) * 64ULL) + SODIUM_MIN(SODIUM_SIZE_MAX - crypto_secretstream_xchacha20poly1305_ABYTES, \ + (64ULL * ((1ULL << 32) - 2ULL))) SODIUM_EXPORT size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void); diff --git a/libs/libsodium/src/include/sodium/private/chacha20_ietf_ext.h b/libs/libsodium/src/include/sodium/private/chacha20_ietf_ext.h new file mode 100644 index 0000000000..2c80b96aa7 --- /dev/null +++ b/libs/libsodium/src/include/sodium/private/chacha20_ietf_ext.h @@ -0,0 +1,16 @@ +#ifndef chacha20_ietf_ext_H +#define chacha20_ietf_ext_H + +#include <stdint.h> + +/* The ietf_ext variant allows the internal counter to overflow into the IV */ + +int crypto_stream_chacha20_ietf_ext(unsigned char *c, unsigned long long clen, + const unsigned char *n, const unsigned char *k); + +int crypto_stream_chacha20_ietf_ext_xor_ic(unsigned char *c, const unsigned char *m, + unsigned long long mlen, + const unsigned char *n, uint32_t ic, + const unsigned char *k); +#endif + diff --git a/libs/libsodium/src/include/sodium/private/common.h b/libs/libsodium/src/include/sodium/private/common.h index 632fc8a73c..f87d682e53 100644 --- a/libs/libsodium/src/include/sodium/private/common.h +++ b/libs/libsodium/src/include/sodium/private/common.h @@ -1,6 +1,21 @@ #ifndef common_H #define common_H 1 +#if !defined(_MSC_VER) && 1 +# warning *** This is unstable, untested, development code. +# warning It might not compile. It might not work as expected. +# warning It might be totally insecure. +# warning Do not use this except if you are planning to contribute code. +# warning Use releases available at https://download.libsodium.org/libsodium/releases/ instead. +# warning Alternatively, use the "stable" branch in the git repository. +#endif + +#if !defined(_MSC_VER) && (!defined(CONFIGURED) || CONFIGURED != 1) +# warning *** The library is being compiled using an undocumented method. +# warning This is not supported. It has not been tested, it might not +# warning work as expected, and performance is likely to be suboptimal. +#endif + #include <stdint.h> #include <stdlib.h> #include <string.h> diff --git a/libs/libsodium/src/include/sodium/version.h b/libs/libsodium/src/include/sodium/version.h index 56ec2b9550..fc5f462da1 100644 --- a/libs/libsodium/src/include/sodium/version.h +++ b/libs/libsodium/src/include/sodium/version.h @@ -4,7 +4,7 @@ #include "export.h" -#define SODIUM_VERSION_STRING "1.0.16" +#define SODIUM_VERSION_STRING "1.0.17" #define SODIUM_LIBRARY_VERSION_MAJOR 10 #define SODIUM_LIBRARY_VERSION_MINOR 1 @@ -13,17 +13,17 @@ extern "C" { #endif -SODIUM_EXPORT -const char *sodium_version_string(void); + SODIUM_EXPORT + const char *sodium_version_string(void); -SODIUM_EXPORT -int sodium_library_version_major(void); + SODIUM_EXPORT + int sodium_library_version_major(void); -SODIUM_EXPORT -int sodium_library_version_minor(void); + SODIUM_EXPORT + int sodium_library_version_minor(void); -SODIUM_EXPORT -int sodium_library_minimal(void); + SODIUM_EXPORT + int sodium_library_minimal(void); #ifdef __cplusplus } |