From 07729b3dea20645748febcc9a5eabdad37d1cc39 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 5 May 2024 14:45:46 -0400 Subject: [PATCH] Remove unused PoK gadget --- crypto/fcmps/src/circuit.rs | 8 ++++---- crypto/fcmps/src/gadgets/interactive.rs | 19 ------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/crypto/fcmps/src/circuit.rs b/crypto/fcmps/src/circuit.rs index cd6a7e61..d5b903ad 100644 --- a/crypto/fcmps/src/circuit.rs +++ b/crypto/fcmps/src/circuit.rs @@ -139,7 +139,7 @@ impl Circuit { branch: Vec>, ) { let O = self.on_curve(curve, O); - let o_blind = self.discrete_log_pok(transcript, curve, o_blind); + let o_blind = self.discrete_log(transcript, curve, o_blind); self.incomplete_add_pub(O_tilde, o_blind, O); // This cannot simply be removed in order to cheat this proof @@ -160,11 +160,11 @@ impl Circuit { self.incomplete_add_pub(I_tilde, i_blind_u, I); let i_blind_v = self.discrete_log(transcript, curve, i_blind_v); - let i_blind_blind = self.discrete_log_pok(transcript, curve, i_blind_blind); + let i_blind_blind = self.discrete_log(transcript, curve, i_blind_blind); self.incomplete_add_pub(R, i_blind_v, i_blind_blind); let C = self.on_curve(curve, C); - let c_blind = self.discrete_log_pok(transcript, curve, c_blind); + let c_blind = self.discrete_log(transcript, curve, c_blind); self.incomplete_add_pub(C_tilde, c_blind, C); self.permissible(C::F::ONE, C::F::ONE, O.y); @@ -181,7 +181,7 @@ impl Circuit { hash: (Variable, Variable), branch: Vec, ) { - let blind = self.discrete_log_pok(transcript, curve, blind); + let blind = self.discrete_log(transcript, curve, blind); let hash = self.on_curve(curve, hash); self.incomplete_add_pub(blinded_hash, blind, hash); self.permissible(C::F::ONE, C::F::ONE, hash.y); diff --git a/crypto/fcmps/src/gadgets/interactive.rs b/crypto/fcmps/src/gadgets/interactive.rs index 0a7d9c0e..47b46f3d 100644 --- a/crypto/fcmps/src/gadgets/interactive.rs +++ b/crypto/fcmps/src/gadgets/interactive.rs @@ -302,23 +302,4 @@ impl Circuit { point } - - /// Prove knowledge of the discrete logarithm for the specified point over the specified - /// generator. - /// - /// The variable used as knowledge of the discrete log representation must be treated as a - /// non-canonical, opaque black box which is inconsistent across uses (and accordingly unsafe to - /// reuse). - /// - /// Ensures the point is on-curve. - pub(crate) fn discrete_log_pok( - &mut self, - transcript: &mut T, - curve: &CurveSpec, - claim: ClaimedPointWithDlog, - ) -> OnCurve { - // For now, we use the more expensive Discrete Log instead of attempting any more optimized - // versions of this gadget - self.discrete_log(transcript, curve, claim) - } }