Skip to content

Commit

Permalink
Disable XTS-384 as an allowed use in FIPS mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleb-himes committed Feb 26, 2025
1 parent 3557cc7 commit 9063093
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fips-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ linuxv5|linuxv5.2.1)
)
;;
v6.0.0)
WOLF_REPO_TAG='WCv6.0.0-RC3'
WOLF_REPO_TAG='WCv6.0.0-RC4'
FIPS_REPO_TAG='WCv6.0.0-RC4'
ASM_PICKUPS_TAG='WCv6.0.0-RC3'
ASM_PICKUPS_TAG='WCv6.0.0-RC4'
FIPS_OPTION='v6'
FIPS_FILES=(
"wolfcrypt/src/fips.c:${FIPS_REPO_TAG}"
Expand Down
5 changes: 5 additions & 0 deletions wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -12818,7 +12818,12 @@ int wc_AesXtsSetKeyNoInit(XtsAes* aes, const byte* key, word32 len, int dir)
}

if ((len != (AES_128_KEY_SIZE*2)) &&
#ifndef HAVE_FIPS
/* XTS-384 not allowed by FIPS and can not be treated like
* RSA-4096 bit keys back in the day, can not vendor affirm
* the use of 2 concatenated 192-bit keys (XTS-384) */
(len != (AES_192_KEY_SIZE*2)) &&
#endif
(len != (AES_256_KEY_SIZE*2)))
{
WOLFSSL_MSG("Unsupported key size");
Expand Down

0 comments on commit 9063093

Please sign in to comment.