Skip to content

Commit 92806a6

Browse files
authored
Merge pull request #7522 from douzzer/20240511-aes-xts-stream
20240511-aes-xts-stream
2 parents 28bd4eb + 1469aab commit 92806a6

9 files changed

Lines changed: 5002 additions & 318 deletions

File tree

.github/workflows/openvpn.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
# List of refs to test
42-
ref: [ release/2.6, v2.6.0, master ]
42+
# disabled master on 20240514 -- see https://github.com/wolfSSL/wolfssl/issues/7508
43+
ref: [ release/2.6, v2.6.0 ]
4344
name: ${{ matrix.ref }}
4445
runs-on: ubuntu-latest
4546
# This should be a safe limit for the tests to run.

configure.ac

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@ then
939939

940940
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6 || test "$FIPS_VERSION" = "v5-dev"; then
941941
test "$enable_aesxts" = "" && enable_aesxts=yes
942+
test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && (test "$enable_armasm" = "" || test "$enable_armasm" = "no") && enable_aesxts_stream=yes
942943
test "$enable_aessiv" = "" && enable_aessiv=yes
943944
fi
944945

@@ -1078,6 +1079,7 @@ then
10781079

10791080
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6 || test "$FIPS_VERSION" = "v5-dev"; then
10801081
test "$enable_aesxts" = "" && enable_aesxts=yes
1082+
test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && (test "$enable_armasm" = "" || test "$enable_armasm" = "no") && enable_aesxts_stream=yes
10811083
test "$enable_aessiv" = "" && enable_aessiv=yes
10821084
fi
10831085

@@ -4848,6 +4850,17 @@ AC_ARG_ENABLE([aesxts],
48484850
[ ENABLED_AESXTS=no ]
48494851
)
48504852

4853+
AS_IF([test "$ENABLED_AESXTS" = "yes" && test "$ENABLED_ARMASM" = "no"],
4854+
[ ENABLED_AESXTS_STREAM_DEFAULT=yes ],
4855+
[ ENABLED_AESXTS_STREAM_DEFAULT=no ]
4856+
)
4857+
4858+
AC_ARG_ENABLE([aesxts-stream],
4859+
[AS_HELP_STRING([--enable-aesxts-stream],[Enable wolfSSL AES-XTS support with streaming APIs (default: disabled)])],
4860+
[ ENABLED_AESXTS_STREAM=$enableval ],
4861+
[ ENABLED_AESXTS_STREAM=$ENABLED_AESXTS_STREAM_DEFAULT ]
4862+
)
4863+
48514864
# legacy old option name, for compatibility:
48524865
AC_ARG_ENABLE([xts],
48534866
[AS_HELP_STRING([--enable-xts],[Please use --enable-aesxts])],
@@ -5070,6 +5083,9 @@ AS_CASE([$FIPS_VERSION],
50705083
AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"],
50715084
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
50725085
5086+
AS_IF([test "x$ENABLED_AESXTS_STREAM" = "xno" && ! (test "$ENABLED_ARMASM" = "yes" || test "$ENABLED_ARMASM_CRYPTO" = "no")],
5087+
[ENABLED_AESXTS_STREAM="yes"])
5088+
50735089
AS_IF([(test "$ENABLED_AESCCM" = "yes" && test "$HAVE_AESCCM_PORT" != "yes") ||
50745090
(test "$ENABLED_AESCTR" = "yes" && test "$HAVE_AESCTR_PORT" != "yes") ||
50755091
(test "$ENABLED_AESGCM" = "yes" && test "$HAVE_AESGCM_PORT" != "yes") ||
@@ -8351,15 +8367,20 @@ then
83518367
for lkcapi_alg in $(echo "$ENABLED_LINUXKM_LKCAPI_REGISTER" | tr ',' ' ')
83528368
do
83538369
case "$lkcapi_alg" in
8354-
all) AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_ALL" ;;
8370+
all) test "$ENABLED_EXPERIMENTAL" = "yes" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: requires --enable-experimental.])
8371+
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_ALL" ;;
83558372
'cbc(aes)') test "$ENABLED_AESCBC" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CBC implementation not enabled.])
8373+
test "$ENABLED_EXPERIMENTAL" = "yes" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: requires --enable-experimental.])
83568374
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCBC" ;;
83578375
'cfb(aes)') test "$ENABLED_AESCFB" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CFB implementation not enabled.])
8376+
test "$ENABLED_EXPERIMENTAL" = "yes" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: requires --enable-experimental.])
83588377
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCFB" ;;
83598378
'gcm(aes)') test "$ENABLED_AESGCM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-GCM implementation not enabled.])
83608379
test "$ENABLED_AESGCM_STREAM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: --enable-aesgcm-stream is required for LKCAPI.])
8380+
test "$ENABLED_EXPERIMENTAL" = "yes" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: requires --enable-experimental.])
83618381
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESGCM" ;;
83628382
'xts(aes)') test "$ENABLED_AESXTS" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-XTS implementation not enabled.])
8383+
test "$ENABLED_AESXTS_STREAM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: --enable-aesxts-stream is required for LKCAPI.])
83638384
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESXTS" ;;
83648385
*) AC_MSG_ERROR([Unsupported LKCAPI algorithm "$lkcapi_alg".]) ;;
83658386
esac
@@ -9009,6 +9030,17 @@ then
90099030
fi
90109031
fi
90119032
9033+
if test "$ENABLED_AESXTS_STREAM" != "no"
9034+
then
9035+
if test "$ENABLED_AESXTS" = "no"
9036+
then
9037+
AC_MSG_ERROR([AES-XTS streaming enabled but AES-XTS is disabled])
9038+
else
9039+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESXTS_STREAM"
9040+
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AESXTS_STREAM"
9041+
fi
9042+
fi
9043+
90129044
if test "$ENABLED_IOTSAFE" != "no"
90139045
then
90149046
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_IOTSAFE"
@@ -9769,6 +9801,7 @@ echo " * AES-CTR: $ENABLED_AESCTR"
97699801
echo " * AES-CFB: $ENABLED_AESCFB"
97709802
echo " * AES-OFB: $ENABLED_AESOFB"
97719803
echo " * AES-XTS: $ENABLED_AESXTS"
9804+
echo " * AES-XTS streaming: $ENABLED_AESXTS_STREAM"
97729805
echo " * AES-SIV: $ENABLED_AESSIV"
97739806
echo " * AES-EAX: $ENABLED_AESEAX"
97749807
echo " * AES Bitspliced: $ENABLED_AESBS"

0 commit comments

Comments
 (0)