Skip to content

Commit 5b863dc

Browse files
committed
AES bitsliced implementation added
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.
1 parent 2ee9402 commit 5b863dc

4 files changed

Lines changed: 1549 additions & 365 deletions

File tree

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,16 @@ then
24922492
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_CFB"
24932493
fi
24942494

2495+
AC_ARG_ENABLE([aes-bitsliced],
2496+
[AS_HELP_STRING([--enable-aes-bitsliced],[Enable bitsliced implementation of AES (default: disabled)])],
2497+
[ ENABLED_AESBS=$enableval ],
2498+
[ ENABLED_AESBS=no ]
2499+
)
2500+
2501+
if test "$ENABLED_AESBS" = "yes"
2502+
then
2503+
AM_CFLAGS="$AM_CFLAGS -DWC_AES_BITSLICED -DHAVE_AES_ECB"
2504+
fi
24952505

24962506
# SM4
24972507
ENABLED_SM4="no"
@@ -9542,6 +9552,7 @@ echo " * AES-CFB: $ENABLED_AESCFB"
95429552
echo " * AES-OFB: $ENABLED_AESOFB"
95439553
echo " * AES-SIV: $ENABLED_AESSIV"
95449554
echo " * AES-EAX: $ENABLED_AESEAX"
9555+
echo " * AES Bitspliced: $ENABLED_AESBS"
95459556
echo " * ARIA: $ENABLED_ARIA"
95469557
echo " * DES3: $ENABLED_DES3"
95479558
echo " * Camellia: $ENABLED_CAMELLIA"

0 commit comments

Comments
 (0)