From 379488f36a9d740e0d7d34fd782536e3fb8cd5ba Mon Sep 17 00:00:00 2001 From: "Weikai.Zhao" Date: Thu, 12 May 2022 18:27:03 +0800 Subject: [PATCH] replace mul with gmul in pk_from_sk function --- src/sm2/signature.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sm2/signature.rs b/src/sm2/signature.rs index 7dc73c4..c756467 100644 --- a/src/sm2/signature.rs +++ b/src/sm2/signature.rs @@ -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 {