From f84dfccf93bdd5d9d89e044875fd1b1c880a8bb8 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:50:38 -0800 Subject: [PATCH] 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 467c1be0..fea9d7a8 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()