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/crypto_stream/chacha20/ref/chacha20_ref.c | |
| parent | b8ad6c3cc2edef99dc2a416667c3933c1061994c (diff) | |
updated libsodium to version 1.0.17
Diffstat (limited to 'libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c')
| -rw-r--r-- | libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c | 17 | 
1 files changed, 7 insertions, 10 deletions
diff --git a/libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c b/libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c index f88a99dbdf..40cccbf8f8 100644 --- a/libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c +++ b/libs/libsodium/src/crypto_stream/chacha20/ref/chacha20_ref.c @@ -92,9 +92,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(); -    }      j0  = ctx->input[0];      j1  = ctx->input[1];      j2  = ctx->input[2]; @@ -243,8 +240,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; @@ -287,9 +284,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]; @@ -309,7 +306,7 @@ stream_ietf_ref_xor_ic(unsigned char *c, const unsigned char *m,  struct crypto_stream_chacha20_implementation      crypto_stream_chacha20_ref_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      };  | 
