aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Guido Vranken <guidovranken@users.noreply.github.com>2022-07-09 15:40:29 +0200
committerGravatar GitHub <noreply@github.com>2022-07-09 14:40:29 +0100
commit72fb3573d4347962909a2d6c733f20e7ab690b82 (patch)
treeec3ec83ef44aa007507a130ddf68a225fcc2c42b
parentd0f3e654a4d08b0f1bbaddc281aa33d41883b51f (diff)
[cryptofuzz] Disable special ECDH (#7982)
-rwxr-xr-xprojects/cryptofuzz/build.sh4
1 files changed, 4 insertions, 0 deletions
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