Skip to content

Commit fee6e83

Browse files
Adrian Nagysebastiencs
authored andcommitted
feat(signer): Create method to multiply with secret key scalar
1 parent 3bb9349 commit fee6e83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

signer/src/keypair.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ impl Keypair {
9393
pub fn to_hex(&self) -> String {
9494
hex::encode(self.to_bytes())
9595
}
96+
97+
/// Performs scalar multiplication with the secret key
98+
pub fn secret_multiply_with_curve_point(&self, multiplicand: CurvePoint) -> CurvePoint {
99+
use ark_ec::AffineCurve;
100+
multiplicand.mul(self.secret.clone().into_scalar()).into_affine()
101+
}
96102
}
97103

98104
impl fmt::Debug for Keypair {

0 commit comments

Comments
 (0)