diff --git a/tests/api.c b/tests/api.c index 92a5f1f7e..2d541b9f8 100644 --- a/tests/api.c +++ b/tests/api.c @@ -10065,18 +10065,14 @@ static int test_wc_Chacha_Process (void) AssertIntEQ(ret, 0); AssertIntEQ(XMEMCMP(expected, cipher, 64), 0); - ret = wc_Chacha_Process(&enc, cipher, input2 + 64, 64); + ret = wc_Chacha_Process(&enc, cipher, input2 + 64, 128); AssertIntEQ(ret, 0); - AssertIntEQ(XMEMCMP(expected + 64, cipher, 64), 0); + AssertIntEQ(XMEMCMP(expected + 64, cipher, 128), 0); /* partial */ - ret = wc_Chacha_Process(&enc, cipher, input2 + 128, 32); + ret = wc_Chacha_Process(&enc, cipher, input2 + 192, 32); AssertIntEQ(ret, 0); - AssertIntEQ(XMEMCMP(expected + 128, cipher, 32), 0); - - ret = wc_Chacha_Process(&enc, cipher, input2 + 160, 64); - AssertIntEQ(ret, 0); - AssertIntEQ(XMEMCMP(expected + 160, cipher, 64), 0); + AssertIntEQ(XMEMCMP(expected + 192, cipher, 32), 0); ret = wc_Chacha_Process(&enc, cipher, input2 + 224, 32); AssertIntEQ(ret, 0); diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6b26ce71c..7206b6734 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -5036,7 +5036,12 @@ int chacha20_poly1305_aead_test(void) int err; ChaChaPoly_Aead aead; + +#if !defined(USE_INTEL_CHACHA_SPEEDUP) && !defined(WOLFSSL_ARMASM) #define TEST_SMALL_CHACHA_CHUNKS 32 +#else + #define TEST_SMALL_CHACHA_CHUNKS 64 +#endif #ifdef TEST_SMALL_CHACHA_CHUNKS word32 testLen; #endif