Created
November 6, 2021 17:40
-
-
Save Michael-Qedit/089954e667b7faf43d44c275cf023770 to your computer and use it in GitHub Desktop.
Solution to ZKHack Puzzle 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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