Skip to content

Commit

Permalink
Cryptofuzz: add Mbed TLS PSA Crypto API module (#11532)
Browse files Browse the repository at this point in the history
Start fuzzing the new (since 2018) crypto API in Mbed TLS, before the
old API becomes deprecated and partly removed in 2024. See
https://github.com/guidovranken/cryptofuzz/issues/47

---------

Signed-off-by: Gilles Peskine <[email protected]>
  • Loading branch information
gilles-peskine-arm authored Jan 24, 2024
1 parent c09de34 commit 63c3fd3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions projects/cryptofuzz/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ cd $SRC/cryptofuzz/modules/cryptopp
make -B

##############################################################################
# Compile mbed TLS
# Compile Mbed TLS
cd $SRC/mbedtls/
scripts/config.py set MBEDTLS_PLATFORM_MEMORY
scripts/config.py set MBEDTLS_CMAC_C
Expand All @@ -387,11 +387,16 @@ cmake .. -DENABLE_PROGRAMS=0 -DENABLE_TESTING=0
make -j$(nproc)
export MBEDTLS_LIBMBEDCRYPTO_A_PATH="$SRC/mbedtls/build/library/libmbedcrypto.a"
export MBEDTLS_INCLUDE_PATH="$SRC/mbedtls/include"
export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_MBEDTLS"
# Compile Cryptofuzz mbed crypto module
export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_MBEDTLS -DCRYPTOFUZZ_TF_PSA_CRYPTO"

# Compile Cryptofuzz module for Mbed TLS with the legacy crypto API
cd $SRC/cryptofuzz/modules/mbedtls
make -B

# Compile Cryptofuzz module for Mbed TLS with the PSA crypto API
cd $SRC/cryptofuzz/modules/tf-psa-crypto
make -B

##############################################################################
# Compile Botan
cd $SRC/botan
Expand Down

0 comments on commit 63c3fd3

Please sign in to comment.