diff --git a/Crypto/PubKey/ECC/P256.hs b/Crypto/PubKey/ECC/P256.hs index 66d5f92..60a1315 100644 --- a/Crypto/PubKey/ECC/P256.hs +++ b/Crypto/PubKey/ECC/P256.hs @@ -64,6 +64,11 @@ toPoint :: Scalar -> Point toPoint s = withNewPoint $ \px py -> withScalar s $ \p -> ccryptonite_p256_basepoint_mul p px py +pointMul :: Scalar -> Point -> Point +pointMul scalar p = withNewPoint $ \dx dy -> + withScalar scalar $ \n -> withPoint p $ \px py -> + ccryptonite_p256_point_mul n dx dy px py + ------------------------------------------------------------------------ -- Scalar methods ------------------------------------------------------------------------