|
939 | 939 |
|
940 | 940 | if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6 || test "$FIPS_VERSION" = "v5-dev"; then |
941 | 941 | 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 |
942 | 943 | test "$enable_aessiv" = "" && enable_aessiv=yes |
943 | 944 | fi |
944 | 945 |
|
@@ -1078,6 +1079,7 @@ then |
1078 | 1079 |
|
1079 | 1080 | if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6 || test "$FIPS_VERSION" = "v5-dev"; then |
1080 | 1081 | 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 |
1081 | 1083 | test "$enable_aessiv" = "" && enable_aessiv=yes |
1082 | 1084 | fi |
1083 | 1085 |
|
@@ -4848,6 +4850,17 @@ AC_ARG_ENABLE([aesxts], |
4848 | 4850 | [ ENABLED_AESXTS=no ] |
4849 | 4851 | ) |
4850 | 4852 |
|
| 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 | + |
4851 | 4864 | # legacy old option name, for compatibility: |
4852 | 4865 | AC_ARG_ENABLE([xts], |
4853 | 4866 | [AS_HELP_STRING([--enable-xts],[Please use --enable-aesxts])], |
@@ -5070,6 +5083,9 @@ AS_CASE([$FIPS_VERSION], |
5070 | 5083 | AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"], |
5071 | 5084 | [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"]) |
5072 | 5085 |
|
| 5086 | + AS_IF([test "x$ENABLED_AESXTS_STREAM" = "xno" && ! (test "$ENABLED_ARMASM" = "yes" || test "$ENABLED_ARMASM_CRYPTO" = "no")], |
| 5087 | + [ENABLED_AESXTS_STREAM="yes"]) |
| 5088 | +
|
5073 | 5089 | AS_IF([(test "$ENABLED_AESCCM" = "yes" && test "$HAVE_AESCCM_PORT" != "yes") || |
5074 | 5090 | (test "$ENABLED_AESCTR" = "yes" && test "$HAVE_AESCTR_PORT" != "yes") || |
5075 | 5091 | (test "$ENABLED_AESGCM" = "yes" && test "$HAVE_AESGCM_PORT" != "yes") || |
@@ -8351,15 +8367,20 @@ then |
8351 | 8367 | for lkcapi_alg in $(echo "$ENABLED_LINUXKM_LKCAPI_REGISTER" | tr ',' ' ') |
8352 | 8368 | do |
8353 | 8369 | 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" ;; |
8355 | 8372 | '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.]) |
8356 | 8374 | AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCBC" ;; |
8357 | 8375 | '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.]) |
8358 | 8377 | AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCFB" ;; |
8359 | 8378 | 'gcm(aes)') test "$ENABLED_AESGCM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-GCM implementation not enabled.]) |
8360 | 8379 | 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.]) |
8361 | 8381 | AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESGCM" ;; |
8362 | 8382 | '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.]) |
8363 | 8384 | AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESXTS" ;; |
8364 | 8385 | *) AC_MSG_ERROR([Unsupported LKCAPI algorithm "$lkcapi_alg".]) ;; |
8365 | 8386 | esac |
@@ -9009,6 +9030,17 @@ then |
9009 | 9030 | fi |
9010 | 9031 | fi |
9011 | 9032 |
|
| 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 | +
|
9012 | 9044 | if test "$ENABLED_IOTSAFE" != "no" |
9013 | 9045 | then |
9014 | 9046 | AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_IOTSAFE" |
@@ -9769,6 +9801,7 @@ echo " * AES-CTR: $ENABLED_AESCTR" |
9769 | 9801 | echo " * AES-CFB: $ENABLED_AESCFB" |
9770 | 9802 | echo " * AES-OFB: $ENABLED_AESOFB" |
9771 | 9803 | echo " * AES-XTS: $ENABLED_AESXTS" |
| 9804 | +echo " * AES-XTS streaming: $ENABLED_AESXTS_STREAM" |
9772 | 9805 | echo " * AES-SIV: $ENABLED_AESSIV" |
9773 | 9806 | echo " * AES-EAX: $ENABLED_AESEAX" |
9774 | 9807 | echo " * AES Bitspliced: $ENABLED_AESBS" |
|
0 commit comments