Skip to content

Commit

Permalink
Restore the ECC gate in TurboPlonk due to the need in auditable assets (
Browse files Browse the repository at this point in the history
  • Loading branch information
findora-crypto authored Aug 16, 2022
1 parent 48b4177 commit cbbef3f
Show file tree
Hide file tree
Showing 11 changed files with 480 additions and 17 deletions.
Binary file modified api/parameters/abar-to-ar-vk.bin
Binary file not shown.
Binary file modified api/parameters/abar-to-bar-vk.bin
Binary file not shown.
Binary file modified api/parameters/ar-to-abar-vk.bin
Binary file not shown.
Binary file modified api/parameters/bar-to-abar-vk.bin
Binary file not shown.
Binary file modified api/parameters/transfer-vk-specific.bin
Binary file not shown.
4 changes: 4 additions & 0 deletions api/src/anon_xfr/address_folding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ pub fn prove_address_folding_in_cs(
cs.push_add_selectors(one.neg(), one.neg(), one, zero);
cs.push_mul_selectors(one, zero);
cs.push_constant_selector(one);
cs.push_ecc_selector(zero);
cs.push_rescue_selectors(zero, zero, zero, zero);
cs.push_out_selector(one);
cs.wiring[0].push(flag_meet_first_different_bit_var);
Expand All @@ -276,6 +277,7 @@ pub fn prove_address_folding_in_cs(
cs.push_add_selectors(zero, one.neg(), zero, zero);
cs.push_mul_selectors(one, zero);
cs.push_constant_selector(one);
cs.push_ecc_selector(zero);
cs.push_rescue_selectors(zero, zero, zero, zero);
cs.push_out_selector(one);
cs.wiring[0].push(flag_meet_first_different_bit_var);
Expand All @@ -301,6 +303,7 @@ pub fn prove_address_folding_in_cs(
cs.push_add_selectors(one, one, zero, zero);
cs.push_mul_selectors(one.neg(), zero);
cs.push_constant_selector(zero);
cs.push_ecc_selector(zero);
cs.push_rescue_selectors(zero, zero, zero, zero);
cs.push_out_selector(one);
cs.wiring[0].push(flag_meet_first_different_bit_var);
Expand All @@ -324,6 +327,7 @@ pub fn prove_address_folding_in_cs(
cs.push_add_selectors(zero, zero, zero, zero);
cs.push_mul_selectors(one.neg(), zero);
cs.push_constant_selector(one);
cs.push_ecc_selector(zero);
cs.push_rescue_selectors(zero, zero, zero, zero);
cs.push_out_selector(zero);
cs.wiring[0].push(flag_smaller_than_modulus_var);
Expand Down
Loading

0 comments on commit cbbef3f

Please sign in to comment.