From 985d16e84fceab0ad59cd91a324e1691b8aa9701 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Fri, 17 Nov 2023 05:13:13 -0800 Subject: [PATCH] [fix/optimization] `mul_by_3b` special case should be `CURVE_ID == "bn256_g1"` (#101) fix: `mul_by_3b` special case should be `CURVE_ID == "bn256_g1"` --- src/derive/curve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/derive/curve.rs b/src/derive/curve.rs index 660e85d8..c5a73128 100644 --- a/src/derive/curve.rs +++ b/src/derive/curve.rs @@ -393,7 +393,7 @@ macro_rules! new_curve_impl { } fn mul_by_3b(input: &$base) -> $base { - if $name::CURVE_ID == "bn256"{ + if $name::CURVE_ID == "bn256_g1"{ input.double().double().double() + input } else { input * $name::curve_constant_3b()