From 16ac556da8736c3f2eb3d1043e1b2dd5e21044fd Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 7 Apr 2026 12:47:02 -0700 Subject: [PATCH] F-2192 - Add negative test for AES-SIV authentication tag verification --- wolfcrypt/test/test.c | 23 +++++++++++++++++++++++ wolfssl/version.h | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index ff297d7142..4dbf2ba912 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -66715,6 +66715,29 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_siv_test(void) } } + /* Negative test: corrupted SIV must be rejected with AES_SIV_AUTH_E. */ + { + ret = wc_AesSivEncrypt(testVectors[0].key, testVectors[0].keySz, + testVectors[0].assoc1, testVectors[0].assoc1Sz, + testVectors[0].nonce, testVectors[0].nonceSz, + testVectors[0].plaintext, + testVectors[0].plaintextSz, siv, + computedCiphertext); + if (ret != 0) { + return WC_TEST_RET_ENC_EC(ret); + } + /* Corrupt one byte of the SIV tag. */ + siv[0] ^= 0x01; + ret = wc_AesSivDecrypt(testVectors[0].key, testVectors[0].keySz, + testVectors[0].assoc1, testVectors[0].assoc1Sz, + testVectors[0].nonce, testVectors[0].nonceSz, + computedCiphertext, testVectors[0].plaintextSz, + siv, computedPlaintext); + if (ret != AES_SIV_AUTH_E) { + return WC_TEST_RET_ENC_EC(ret); + } + } + return 0; } #endif diff --git a/wolfssl/version.h b/wolfssl/version.h index 903bc3f4fb..a93c997f46 100644 --- a/wolfssl/version.h +++ b/wolfssl/version.h @@ -28,8 +28,8 @@ extern "C" { #endif -#define LIBWOLFSSL_VERSION_STRING "5.9.0" -#define LIBWOLFSSL_VERSION_HEX 0x05009000 +#define LIBWOLFSSL_VERSION_STRING "5.8.4" +#define LIBWOLFSSL_VERSION_HEX 0x05008004 #ifdef __cplusplus }