Skip to content

Commit e46b959

Browse files
Implement IntrinsicCurve trivially for ed25519
1 parent 08b70b5 commit e46b959

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

extensions/ecc/guest/src/ed25519.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,13 @@ impl CyclicGroup for Ed25519Point {
7979
)),
8080
};
8181
}
82+
83+
impl IntrinsicCurve for Ed25519Point {
84+
type Scalar = Ed25519Scalar;
85+
type Point = Ed25519Point;
86+
87+
fn msm(coeffs: &[Self::Scalar], bases: &[Self::Point]) -> Self::Point {
88+
// TODO: idk if this can be optimized
89+
openvm_ecc_guest::msm(coeffs, bases)
90+
}
91+
}

extensions/pairing/guest/src/bn254/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ use lazy_static::lazy_static;
77
use num_bigint::BigUint;
88
use openvm_algebra_guest::{Field, IntMod};
99
use openvm_algebra_moduli_setup::moduli_declare;
10-
use openvm_ecc_guest::{
11-
weierstrass::{CachedMulTable, IntrinsicCurve},
12-
CyclicGroup, Group,
13-
};
10+
use openvm_ecc_guest::{weierstrass::CachedMulTable, CyclicGroup, Group, IntrinsicCurve};
1411
use openvm_ecc_sw_setup::sw_declare;
1512

1613
use crate::pairing::PairingIntrinsics;

0 commit comments

Comments
 (0)