From b8a9236e5e9975e88af726ae3bcc856ce464b738 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Thu, 15 Dec 2022 12:45:49 +0100 Subject: [PATCH] [bls-signatures] Add Arkworks (#9211) --- projects/bls-signatures/Dockerfile | 2 +- projects/bls-signatures/build.sh | 8 ++++++++ projects/bls-signatures/project.yaml | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/bls-signatures/Dockerfile b/projects/bls-signatures/Dockerfile index 3f67c82a8..46c823f0a 100644 --- a/projects/bls-signatures/Dockerfile +++ b/projects/bls-signatures/Dockerfile @@ -14,7 +14,7 @@ # ################################################################################ -FROM gcr.io/oss-fuzz-base/base-builder +FROM gcr.io/oss-fuzz-base/base-builder-rust RUN apt-get update && apt-get install -y make autoconf automake libtool wget python lzip libgmp-dev RUN git clone --depth 1 https://github.com/guidovranken/cryptofuzz RUN git clone --depth 1 https://github.com/supranational/blst diff --git a/projects/bls-signatures/build.sh b/projects/bls-signatures/build.sh index 602fcfc12..edc51b718 100755 --- a/projects/bls-signatures/build.sh +++ b/projects/bls-signatures/build.sh @@ -74,8 +74,16 @@ echo -n "BignumCalc_Mod_BLS12_381_R," >>extra_options.h echo -n "KDF_HKDF," >>extra_options.h echo -n "Misc " >>extra_options.h echo -n "--digests=SHA256 " >>extra_options.h +echo -n "--curves=BLS12_381 " >>extra_options.h echo -n '"' >>extra_options.h +# Build arkworks-algebra +if [[ $CFLAGS != *-m32* && "$SANITIZER" != "memory" ]] +then + cd $SRC/cryptofuzz/modules/arkworks-algebra/ + make + export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_ARKWORKS_ALGEBRA" +fi if [[ $CFLAGS = *-m32* ]] then diff --git a/projects/bls-signatures/project.yaml b/projects/bls-signatures/project.yaml index b611dbb68..1ace5ef7e 100644 --- a/projects/bls-signatures/project.yaml +++ b/projects/bls-signatures/project.yaml @@ -17,3 +17,4 @@ auto_ccs: - "mariano@chia.net" - "arvid@chia.net" - "bill@chia.net" + - "pratyush795@gmail.com"