Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
luffykai committed Dec 17, 2024
1 parent e759ec9 commit f899c7e
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions extensions/ecc/guest/src/p256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use num_bigint_dig::BigUint;
use openvm_algebra_guest::IntMod;

use super::group::{CyclicGroup, Group};
use crate::weierstrass::{CachedMulTable, IntrinsicCurve};
use crate::weierstrass::IntrinsicCurve;

#[cfg(not(target_os = "zkvm"))]
lazy_static! {
Expand Down Expand Up @@ -65,16 +65,5 @@ impl IntrinsicCurve for P256 {
type Scalar = P256Scalar;
type Point = P256Point;

fn msm(coeffs: &[Self::Scalar], bases: &[Self::Point]) -> Self::Point
where
for<'a> &'a Self::Point: Add<&'a Self::Point, Output = Self::Point>,
{
// heuristic
if coeffs.len() < 25 {
let table = CachedMulTable::<Self>::new_with_prime_order(bases, 4);
table.windowed_mul(coeffs)
} else {
crate::msm(coeffs, bases)
}
}
// TODO: msm optimization if needed
}

0 comments on commit f899c7e

Please sign in to comment.