Skip to content

Commit

Permalink
AES bitsliced implementation added
Browse files Browse the repository at this point in the history
AES bitsliced implementation that is cache attack safe.
Configure with:
  --enable-aes-bitslice
or define:
  WC_AES_BITSLICE
  HAVE_AES_ECB
  HAVE_AES_DIRECT
Very slow for CBC, CFB, OFB and any mode that uses a previous encrypt
block to calculate current.
CTR, GCM, XTS can parallelize the data and be much faster.

Added AES-ECB test to test.c.
  • Loading branch information
SparkiDev committed Oct 10, 2023
1 parent 832e0f3 commit e918432
Show file tree
Hide file tree
Showing 4 changed files with 1,761 additions and 389 deletions.
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,16 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_CFB"
fi

AC_ARG_ENABLE([aes-bitsliced],
[AS_HELP_STRING([--enable-aes-bitsliced],[Enable bitsliced implementation of AES (default: disabled)])],
[ ENABLED_AESBS=$enableval ],
[ ENABLED_AESBS=no ]
)

if test "$ENABLED_AESBS" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DWC_AES_BITSLICED -DHAVE_AES_ECB -DHAVE_AES_DIRECT"
fi

# SM4
ENABLED_SM4="no"
Expand Down Expand Up @@ -9394,6 +9404,7 @@ echo " * AES-CFB: $ENABLED_AESCFB"
echo " * AES-OFB: $ENABLED_AESOFB"
echo " * AES-SIV: $ENABLED_AESSIV"
echo " * AES-EAX: $ENABLED_AESEAX"
echo " * AES Bitspliced: $ENABLED_AESBS"
echo " * ARIA: $ENABLED_ARIA"
echo " * DES3: $ENABLED_DES3"
echo " * Camellia: $ENABLED_CAMELLIA"
Expand Down
Loading

0 comments on commit e918432

Please sign in to comment.