Skip to content

Instantly share code, notes, and snippets.

@Michael-Qedit
Created November 6, 2021 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Michael-Qedit/089954e667b7faf43d44c275cf023770 to your computer and use it in GitHub Desktop.
Save Michael-Qedit/089954e667b7faf43d44c275cf023770 to your computer and use it in GitHub Desktop.
Solution to ZKHack Puzzle 2
use ark_bls12_381::{Fr, Bls12_381, Fq12};
use ark_ec::{AffineCurve, PairingEngine};
use prompt::{puzzle, welcome};
use std::str::FromStr;
use trusted_setup::data::puzzle_data;
use trusted_setup::PUZZLE_DESCRIPTION;
use std::collections::HashMap;
fn main() {
welcome();
puzzle(PUZZLE_DESCRIPTION);
let (_ts1, _ts2) = puzzle_data();
/* Your solution here! (s in decimal)*/
let s = Fr::from_str("114939083266787167213538091034071020048").unwrap();
assert_eq!(_ts1[0].mul(s), _ts1[1]);
assert_eq!(_ts2[0].mul(s), _ts2[1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment