From c3a0e0375ddae760c61f6b36a8b7895c12a7975f Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 7 Jul 2022 08:27:20 -0400 Subject: [PATCH] Save an inversion on AOS verification Incredibly minor, just nagged me --- crypto/dleq/src/cross_group/aos.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crypto/dleq/src/cross_group/aos.rs b/crypto/dleq/src/cross_group/aos.rs index fb468969..926bcb64 100644 --- a/crypto/dleq/src/cross_group/aos.rs +++ b/crypto/dleq/src/cross_group/aos.rs @@ -79,7 +79,7 @@ impl< A: (G0, G1), e: (G0::Scalar, G1::Scalar) ) -> (Vec<(G0::Scalar, G0)>, Vec<(G1::Scalar, G1)>) { - (vec![(s.0, generators.0.alt), (-e.0, A.0)], vec![(s.1, generators.1.alt), (-e.1, A.1)]) + (vec![(-s.0, generators.0.alt), (e.0, A.0)], vec![(-s.1, generators.1.alt), (e.1, A.1)]) } #[allow(non_snake_case)] @@ -167,9 +167,8 @@ impl< *ring.last().unwrap(), e ); - // TODO: Make something else negative to speed up vartime - statements.0.push((-G0::Scalar::one(), R0_0)); - statements.1.push((-G1::Scalar::one(), R1_0)); + statements.0.push((G0::Scalar::one(), R0_0)); + statements.1.push((G1::Scalar::one(), R1_0)); batch.0.queue(&mut *rng, (), statements.0); batch.1.queue(&mut *rng, (), statements.1); },