Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/crypto/src/ecc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ macro_rules! curve_api {
use crate::{
Error, Random,
hash::$hash,
nist::{$curve, Point, Scalar},
nist::{$curve, Curve, Point, Scalar},
secret::Secret,
};
pub struct PublicKey {
Expand Down Expand Up @@ -56,7 +56,7 @@ macro_rules! curve_api {
pub fn public_key(&self) -> PublicKey {
// The base point's multiple by a nonzero scalar below n
// is finite and on the curve.
let point = Point::base().mul(&self.0);
let point = <$curve as Curve<$limbs>>::base_mul(&self.0);
let mut encoded = [0; $encoded];
point.encode(&mut encoded).expect("nonzero prime-order scalar");
PublicKey { point, encoded }
Expand Down
Loading