adjust test cases

This commit is contained in:
Jacob Barthelmeh
2020-01-10 10:31:56 -07:00
parent 0c25588ad1
commit 99d657af4f
2 changed files with 9 additions and 8 deletions

View File

@@ -10065,18 +10065,14 @@ static int test_wc_Chacha_Process (void)
AssertIntEQ(ret, 0); AssertIntEQ(ret, 0);
AssertIntEQ(XMEMCMP(expected, cipher, 64), 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(ret, 0);
AssertIntEQ(XMEMCMP(expected + 64, cipher, 64), 0); AssertIntEQ(XMEMCMP(expected + 64, cipher, 128), 0);
/* partial */ /* partial */
ret = wc_Chacha_Process(&enc, cipher, input2 + 128, 32); ret = wc_Chacha_Process(&enc, cipher, input2 + 192, 32);
AssertIntEQ(ret, 0); AssertIntEQ(ret, 0);
AssertIntEQ(XMEMCMP(expected + 128, cipher, 32), 0); AssertIntEQ(XMEMCMP(expected + 192, cipher, 32), 0);
ret = wc_Chacha_Process(&enc, cipher, input2 + 160, 64);
AssertIntEQ(ret, 0);
AssertIntEQ(XMEMCMP(expected + 160, cipher, 64), 0);
ret = wc_Chacha_Process(&enc, cipher, input2 + 224, 32); ret = wc_Chacha_Process(&enc, cipher, input2 + 224, 32);
AssertIntEQ(ret, 0); AssertIntEQ(ret, 0);

View File

@@ -5036,7 +5036,12 @@ int chacha20_poly1305_aead_test(void)
int err; int err;
ChaChaPoly_Aead aead; ChaChaPoly_Aead aead;
#if !defined(USE_INTEL_CHACHA_SPEEDUP) && !defined(WOLFSSL_ARMASM)
#define TEST_SMALL_CHACHA_CHUNKS 32 #define TEST_SMALL_CHACHA_CHUNKS 32
#else
#define TEST_SMALL_CHACHA_CHUNKS 64
#endif
#ifdef TEST_SMALL_CHACHA_CHUNKS #ifdef TEST_SMALL_CHACHA_CHUNKS
word32 testLen; word32 testLen;
#endif #endif