The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
wolfcrypt/src/port/arm/armv8-aes.c: in the WOLFSSL_ARMASM_NO_HW_CRYPTO version of wc_AesSetKey(), copy the supplied userKey to a properly aligned buffer if necessary before calling AES_set_encrypt_key();
src/dtls13.c: in Dtls13GetRnMask(), if defined(WOLFSSL_LINUXKM), return retval of wc_AesEncryptDirect();
wolfcrypt/src/misc.c: add readUnalignedWord32(), writeUnalignedWord32(), readUnalignedWords32(), and writeUnalignedWords32();
wolfcrypt/src/siphash.c: use readUnalignedWord64(), readUnalignedWord32(), and writeUnalignedWord64(), to avoid unaligned access faults, and fix cast in byte-reversing version of GET_U32().
tested with wolfssl-multi-test.sh ... linuxkm-all-fips-140-3 quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os-smallstack quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-sanitizer-Os-smallstack quantum-safe-wolfssl-all-intelasm-sp-asm-valgrind-Os super-quick-check
fixes for gating and ARM32 alignment defects:
wolfcrypt/src/port/arm/armv8-aes.c
: in theWOLFSSL_ARMASM_NO_HW_CRYPTO
version ofwc_AesSetKey()
, copy the supplieduserKey
to a properly aligned buffer if necessary before callingAES_set_encrypt_key()
;src/dtls13.c
: inDtls13GetRnMask()
, ifdefined(WOLFSSL_LINUXKM)
, return retval ofwc_AesEncryptDirect()
;wolfcrypt/src/misc.c
: addreadUnalignedWord32()
,writeUnalignedWord32()
,readUnalignedWords32()
, andwriteUnalignedWords32()
;wolfcrypt/src/siphash.c
: usereadUnalignedWord64()
,readUnalignedWord32()
, andwriteUnalignedWord64()
, to avoid unaligned access faults, and fix cast in byte-reversing version ofGET_U32()
.tested with
wolfssl-multi-test.sh ... linuxkm-all-fips-140-3 quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os-smallstack quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-sanitizer-Os-smallstack quantum-safe-wolfssl-all-intelasm-sp-asm-valgrind-Os super-quick-check