This commit is contained in:
Nicholas Ward 2022-09-26 11:11:41 -07:00
parent 4668e8c5f8
commit 3bc1e65a7a
2 changed files with 3 additions and 1 deletions

View File

@ -303,7 +303,7 @@ impl GoldilocksField {
} else if self.is_quadratic_residue() {
let t = (Self::order() - BigUint::from(1u32))
/ (BigUint::from(2u32).pow(Self::TWO_ADICITY as u32));
let mut z = Self::POWER_OF_TWO_GENERATOR.exp_biguint(&t);
let mut z = Self::MULTIPLICATIVE_GROUP_GENERATOR.exp_biguint(&t);
let mut w = self.exp_biguint(&((t - BigUint::from(1u32)) / BigUint::from(2u32)));
let mut x = w * *self;
let mut b = x * w;

View File

@ -30,7 +30,9 @@ impl SimpleGenerator<GoldilocksField> for SquareRootGenerator<GoldilocksField, 2
out_buffer: &mut GeneratedValues<GoldilocksField>,
) {
let x_squared = witness.get_target(self.x_squared);
dbg!(x_squared);
let x = x_squared.sqrt().unwrap();
dbg!(x);
out_buffer.set_target(self.x, x);
}