Skip to content

Commit

Permalink
Merge pull request #42 from FullyRobert/efficient
Browse files Browse the repository at this point in the history
replace mul with gmul in pk_from_sk function
  • Loading branch information
Pencil-Yao authored May 12, 2022
2 parents af862cd + 379488f commit 208e5ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sm2/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl SigCtx {
if *sk >= *curve.get_n() || *sk == BigUint::zero() {
return Err(Sm2Error::InvalidSecretKey);
}
curve.mul(sk, &curve.generator()?)
curve.g_mul(sk)
}

pub fn load_pubkey(&self, buf: &[u8]) -> Result<Point, Sm2Error> {
Expand Down

0 comments on commit 208e5ca

Please sign in to comment.