From 10070bb5fd42d9aa52e8aa03d5d7df37ba43d7a3 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 11 Jun 2018 10:21:19 -0700 Subject: [PATCH] FIPS Revalidation (acceptance fixes) 1. Backed out some changes to AES-GCM with respect PIC32 only code. (This change will not be in the FIPS boundary.) --- wolfcrypt/src/aes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index 40e3f4406..50894eaef 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -8427,10 +8427,10 @@ int AES_GCM_encrypt_C(Aes* aes, byte* out, const byte* in, word32 sz, #ifdef WOLFSSL_PIC32MZ_CRYPT if (blocks) { /* use intitial IV for PIC32 HW, but don't use it below */ - XMEMCPY(aes->tmp, ctr, AES_BLOCK_SIZE); + XMEMCPY(aes->reg, ctr, AES_BLOCK_SIZE); ret = wc_Pic32AesCrypt( - aes->key, aes->keylen, aes->tmp, AES_BLOCK_SIZE, + aes->key, aes->keylen, aes->reg, AES_BLOCK_SIZE, out, in, (blocks * AES_BLOCK_SIZE), PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM); if (ret != 0) @@ -8805,10 +8805,10 @@ int AES_GCM_decrypt_C(Aes* aes, byte* out, const byte* in, word32 sz, #ifdef WOLFSSL_PIC32MZ_CRYPT if (blocks) { /* use intitial IV for PIC32 HW, but don't use it below */ - XMEMCPY(aes->tmp, ctr, AES_BLOCK_SIZE); + XMEMCPY(aes->reg, ctr, AES_BLOCK_SIZE); ret = wc_Pic32AesCrypt( - aes->key, aes->keylen, aes->tmp, AES_BLOCK_SIZE, + aes->key, aes->keylen, aes->reg, AES_BLOCK_SIZE, out, in, (blocks * AES_BLOCK_SIZE), PIC32_DECRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_AES_GCM); if (ret != 0)