Skip to content

Commit

Permalink
Fix getting random entropy on macOS (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix committed Nov 15, 2023
1 parent 2dd87d8 commit 9c71a2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compile-circuit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ compile_and_ts() {
# time snarkjs setup -r circuit.r1cs --pk proving_key.json --vk verification_key.json
time snarkjs groth16 setup circuit.r1cs "$PTAU" circuit_0000.zkey

ENTROPY1=$(head -c 1024 /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 128)
ENTROPY2=$(head -c 1024 /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 128)
ENTROPY3=$(head -c 1024 /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 128)
ENTROPY1=$(head -c 64 /dev/urandom | od -An -tx1 -v | tr -d ' \n')
ENTROPY2=$(head -c 64 /dev/urandom | od -An -tx1 -v | tr -d ' \n')
ENTROPY3=$(head -c 64 /dev/urandom | od -An -tx1 -v | tr -d ' \n')

# time snarkjs zkey contribute circuit_0000.zkey circuit_0001.zkey --name="1st Contribution" -v -e="$ENTROPY1"
# time snarkjs zkey contribute circuit_0001.zkey circuit_0002.zkey --name="2nd Contribution" -v -e="$ENTROPY2"
Expand Down

0 comments on commit 9c71a2c

Please sign in to comment.