Skip to content

Commit 356b979

Browse files
authored
SuperNova: check T is on curve (#119)
1 parent bbf5ca0 commit 356b979

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/supernova/circuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ impl<'a, G: Group, SC: EnforcingStepCircuit<G::Base>> SuperNovaAugmentedCircuit<
237237
.as_ref()
238238
.and_then(|inputs| inputs.T.map(|T| T.to_coordinates())),
239239
)?;
240+
T.check_on_curve(cs.namespace(|| "check T on curve"))?;
240241

241242
Ok((
242243
params,

src/supernova/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ fn test_recursive_circuit() {
651651
let ro_consts1: ROConstantsCircuit<G2> = PoseidonConstantsCircuit::default();
652652
let ro_consts2: ROConstantsCircuit<G1> = PoseidonConstantsCircuit::default();
653653

654-
test_recursive_circuit_with::<G1, G2>(&params1, &params2, ro_consts1, ro_consts2, 9840, 12031);
654+
test_recursive_circuit_with::<G1, G2>(&params1, &params2, ro_consts1, ro_consts2, 9845, 12036);
655655
}
656656

657657
fn test_pp_digest_with<G1, G2, T1, T2, NC>(non_uniform_circuit: &NC, expected: &str)
@@ -697,7 +697,7 @@ fn test_supernova_pp_digest() {
697697

698698
test_pp_digest_with::<G1, G2, _, _, _>(
699699
&test_rom,
700-
"a5ac4c8d3d54eff1cd95cac76919e6dedd3f3ca4bbdd939e463aee4d5c5fca03",
700+
"1ea5f38a96bbad918d2132d15ac3f463ee97c532988bb4fc16a761bfe7847300",
701701
);
702702

703703
let rom = vec![
@@ -712,7 +712,7 @@ fn test_supernova_pp_digest() {
712712

713713
test_pp_digest_with::<bn256::Point, grumpkin::Point, _, _, _>(
714714
&test_rom_grumpkin,
715-
"3475ab0139e6783fdddd94991a755869c9957a6731d55dc1c63860c276ba1203",
715+
"09dc431db3be49a3e4f065a67c9d7260accdaed737fb0bc2abd70c1068b8df00",
716716
);
717717

718718
let rom = vec![
@@ -727,7 +727,7 @@ fn test_supernova_pp_digest() {
727727

728728
test_pp_digest_with::<secp256k1::Point, secq256k1::Point, _, _, _>(
729729
&test_rom_secp,
730-
"d8305ae99b6735e2722ebdf315dd7d0a6df336c8f31eef2584ec50e79d821e00",
730+
"c695e71fb75c3235471fb53d5b6b02610ac698af294877c20b9d855398679102",
731731
);
732732
}
733733

0 commit comments

Comments
 (0)