Back
Puzzle 1

26th November

19:00 UTC

Built by:

Everybody knows that you don’t really have to use the ZK version of SNARKs, because the proofs are so small anyway and can’t reveal much. Or do you?


View the solution

Puzzle Preparation

To give you a better chance of solving this puzzle, we suggest that you look through some relevant background materials.



See puzzle details on Github

Puzzle link

Puzzle Hints


Hint #1


The secret is located in a cell in the advice column of index 1 at position 3, and you have 64 evaluations of it. These are the columns that are related to hashing the secret using Poseidon and they do not depend on the nonce.


Hint #2


Try adding these two lines:
> println!("verifier x: {:?}", *x);
> println!("verifier eval: {:?}", advice_evals[0][1]);

in ./halo2/halo2_proofs/src/plonk/verifier.rs file and think if the printed values can be useful for extracting the secret.


Hint #3


Use the evaluations from the previous hint and the following interpolation function:
> use halo2_proofs::arithmetic::lagrange_interpolate;
> let coeffs = lagrange_interpolate(&xs, &evals);

to reconstruct the polynomial. Then evaluate it in w^2 for
> let w = Fr::from_str_vartime("12799441450189702121232122059226990287081568291547011007819741462284200902087").unwrap();

Puzzle Winners


gold 01

niooss-ledger

Puzzle completed

Score

1,000

silver 02

bkomuves

Puzzle completed

Score

993.6

bronze 03

Rumata888

Puzzle completed

Score

990.0


You can see all of the scores for this puzzle in the spreadsheet here.

Puzzle Solutions and Write-ups

The winner of the "Best Write-up" prize is piomiko. You can view the solution and puzzle write-up here. The background material required to solve the puzzle is also covered in the write up.
There were many interesting write-up submissions which are linked below:
* Winning write-up by piomiko
* Write-up by niooss-ledger
* Write-up by 10to4
* Write-up by 0x6980
* Write-up by huy-tn
* Write-up by Jasleen1