summaryrefslogtreecommitdiff
path: root/libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-10-08 20:59:56 +0300
committeraunsane <aunsane@gmail.com>2018-10-08 20:59:56 +0300
commit1656da33a4750283e1024ea65e1c6573a07fd50a (patch)
treeba298f7f7aeb7db6df4061e806486b50a4708a89 /libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c
parentb8ad6c3cc2edef99dc2a416667c3933c1061994c (diff)
updated libsodium to version 1.0.17
Diffstat (limited to 'libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c')
-rw-r--r--libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c b/libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c
index b7b9aa4ad3..6f5d3851c3 100644
--- a/libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c
+++ b/libs/libsodium/src/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c
@@ -72,9 +72,6 @@ chacha20_encrypt_bytes(chacha_ctx *ctx, const uint8_t *m, uint8_t *c,
if (!bytes) {
return; /* LCOV_EXCL_LINE */
}
- if (bytes > crypto_stream_chacha20_MESSAGEBYTES_MAX) {
- sodium_misuse();
- }
# include "u4.h"
# include "u1.h"
# include "u0.h"
@@ -100,8 +97,8 @@ stream_ref(unsigned char *c, unsigned long long clen, const unsigned char *n,
}
static int
-stream_ietf_ref(unsigned char *c, unsigned long long clen,
- const unsigned char *n, const unsigned char *k)
+stream_ietf_ext_ref(unsigned char *c, unsigned long long clen,
+ const unsigned char *n, const unsigned char *k)
{
struct chacha_ctx ctx;
@@ -144,9 +141,9 @@ stream_ref_xor_ic(unsigned char *c, const unsigned char *m,
}
static int
-stream_ietf_ref_xor_ic(unsigned char *c, const unsigned char *m,
- unsigned long long mlen, const unsigned char *n,
- uint32_t ic, const unsigned char *k)
+stream_ietf_ext_ref_xor_ic(unsigned char *c, const unsigned char *m,
+ unsigned long long mlen, const unsigned char *n,
+ uint32_t ic, const unsigned char *k)
{
struct chacha_ctx ctx;
uint8_t ic_bytes[4];
@@ -166,9 +163,9 @@ stream_ietf_ref_xor_ic(unsigned char *c, const unsigned char *m,
struct crypto_stream_chacha20_implementation
crypto_stream_chacha20_dolbeau_ssse3_implementation = {
SODIUM_C99(.stream =) stream_ref,
- SODIUM_C99(.stream_ietf =) stream_ietf_ref,
+ SODIUM_C99(.stream_ietf_ext =) stream_ietf_ext_ref,
SODIUM_C99(.stream_xor_ic =) stream_ref_xor_ic,
- SODIUM_C99(.stream_ietf_xor_ic =) stream_ietf_ref_xor_ic
+ SODIUM_C99(.stream_ietf_ext_xor_ic =) stream_ietf_ext_ref_xor_ic
};
#endif