From 3197d67e62f6439240dfb569da956bb48a23300b Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Tue, 28 Jan 2020 09:08:05 -0600 Subject: [PATCH] Testing aes_*_xts --- wolfcrypt/test/test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 7eacde33d..d84e10717 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -6039,6 +6039,14 @@ EVP_TEST_END: } #endif +#ifdef OPENSSL_EXTRA + ret = EVP_test(EVP_aes_128_xts(), key2, iv2, plain2, sizeof(plain2), + cipher2, sizeof(cipher2)); + if (ret != 0) { + return ret; + } +#endif + ret = wc_AesSetKey(&enc, key2, sizeof(key2), iv2, AES_ENCRYPTION); if (ret != 0) return -5000; @@ -6115,6 +6123,14 @@ EVP_TEST_END: } #endif +#ifdef OPENSSL_EXTRA + ret = EVP_test(EVP_aes_256_xts(), key1, iv1, plain1, sizeof(plain1), + cipher1, sizeof(cipher1)); + if (ret != 0) { + return ret; + } +#endif + ret = wc_AesSetKey(&enc, key1, sizeof(key1), iv1, AES_ENCRYPTION); if (ret != 0) return -5012;