]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Delete _nettle_chacha_crypt_2core and _nettle_chacha_crypt32_2core.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 30 Nov 2020 19:05:31 +0000 (20:05 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 30 Nov 2020 19:05:31 +0000 (20:05 +0100)
ChangeLog
chacha-crypt.c

index d47c138e78ea5b99fffcbc6ff76d15c2c7cd1bd4..67003aa45f17408f2f78aaac62ea4267d1789cfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * chacha-crypt.c: (_nettle_chacha_crypt_4core)
        (_nettle_chacha_crypt32_4core): New functions.
+       (_nettle_chacha_crypt_2core, _nettle_chacha_crypt32_2core):
+       Deleted, no longer needed.
        * chacha-internal.h: Add prototypes for _nettle_chacha_4core and
        related functions.
        * configure.ac (asm_nettle_optional_list): Add chacha-4core.asm.
index d3af5f5874b3b4769ceb6e15dacecd39a8f933ea..081ebcf46741738bf1611c66a7311e4176aeb186 100644 (file)
@@ -151,41 +151,6 @@ _nettle_chacha_crypt_3core(struct chacha_ctx *ctx,
 }
 #endif
 
-#if 0
-void
-_nettle_chacha_crypt_2core(struct chacha_ctx *ctx,
-                          size_t length,
-                          uint8_t *dst,
-                          const uint8_t *src)
-{
-  uint32_t x[2*_CHACHA_STATE_LENGTH];
-
-  if (!length)
-    return;
-
-  while (length > CHACHA_BLOCK_SIZE)
-    {
-      _nettle_chacha_2core (x, ctx->state, CHACHA_ROUNDS);
-      ctx->state[12] += 2;
-      ctx->state[13] += (ctx->state[12] < 2);
-      if (length <= 2*CHACHA_BLOCK_SIZE)
-       {
-         memxor3 (dst, src, x, length);
-         return;
-       }
-      memxor3 (dst, src, x, 2*CHACHA_BLOCK_SIZE);
-
-      length -= 2*CHACHA_BLOCK_SIZE;
-      dst += 2*CHACHA_BLOCK_SIZE;
-      src += 2*CHACHA_BLOCK_SIZE;
-    }
-
-  _nettle_chacha_core (x, ctx->state, CHACHA_ROUNDS);
-  memxor3 (dst, src, x, length);
-  ctx->state[13] += (++ctx->state[12] == 0);
-}
-#endif
-
 #if !(HAVE_NATIVE_chacha_4core || HAVE_NATIVE_chacha_3core)
 void
 _nettle_chacha_crypt_1core(struct chacha_ctx *ctx,
@@ -302,40 +267,6 @@ _nettle_chacha_crypt32_3core(struct chacha_ctx *ctx,
 }
 #endif
 
-#if 0
-void
-_nettle_chacha_crypt32_2core(struct chacha_ctx *ctx,
-                            size_t length,
-                            uint8_t *dst,
-                            const uint8_t *src)
-{
-  uint32_t x[2*_CHACHA_STATE_LENGTH];
-
-  if (!length)
-    return;
-
-  while (length > CHACHA_BLOCK_SIZE)
-    {
-      _nettle_chacha_2core32 (x, ctx->state, CHACHA_ROUNDS);
-      ctx->state[12] += 2;
-      if (length <= 2*CHACHA_BLOCK_SIZE)
-       {
-         memxor3 (dst, src, x, length);
-         return;
-       }
-      memxor3 (dst, src, x, 2*CHACHA_BLOCK_SIZE);
-
-      length -= 2*CHACHA_BLOCK_SIZE;
-      dst += 2*CHACHA_BLOCK_SIZE;
-      src += 2*CHACHA_BLOCK_SIZE;
-    }
-
-  _nettle_chacha_core (x, ctx->state, CHACHA_ROUNDS);
-  memxor3 (dst, src, x, length);
-  ++ctx->state[12];
-}
-#endif
-
 #if !(HAVE_NATIVE_chacha_4core || HAVE_NATIVE_chacha_3core)
 void
 _nettle_chacha_crypt32_1core(struct chacha_ctx *ctx,