From 72fb3573d4347962909a2d6c733f20e7ab690b82 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Sat, 9 Jul 2022 15:40:29 +0200 Subject: [cryptofuzz] Disable special ECDH (#7982) --- projects/cryptofuzz/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh index d3f299ed..b5bcf29a 100755 --- a/projects/cryptofuzz/build.sh +++ b/projects/cryptofuzz/build.sh @@ -57,6 +57,10 @@ git clone https://github.com/golang/sys.git $GOPATH/src/golang.org/x/sys # This enables runtime checks for C++-specific undefined behaviour. export CXXFLAGS="$CXXFLAGS -D_GLIBCXX_DEBUG" +# wolfCrypt uses a slightly different ECDH algorithm than Trezor and libsecp256k1. +# This disables running ECDH in Trezor and libsecp256k1 to prevent mismatches. +export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_DISABLE_SPECIAL_ECDH" + export CXXFLAGS="$CXXFLAGS -I $SRC/cryptofuzz/fuzzing-headers/include" if [[ $CFLAGS = *sanitize=memory* ]] then -- cgit v1.2.3