From c360e7714827c8e27120468d0f07b10427783b57 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sun, 3 May 2015 20:14:10 +0100 Subject: [PATCH] [P256] properly define some bindings with X and Y types --- Crypto/PubKey/ECC/P256.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Crypto/PubKey/ECC/P256.hs b/Crypto/PubKey/ECC/P256.hs index 60a1315..3aafba1 100644 --- a/Crypto/PubKey/ECC/P256.hs +++ b/Crypto/PubKey/ECC/P256.hs @@ -141,11 +141,16 @@ foreign import ccall "cryptonite_p256_base_point_mul" -> IO () foreign import ccall "cryptonite_p256_point_mul" ccryptonite_p256_point_mul :: Ptr P256Scalar - -> Ptr P256Scalar -> Ptr P256Scalar - -> Ptr P256Scalar -> Ptr P256Scalar + -> Ptr P256X -> Ptr P256Y + -> Ptr P256X -> Ptr P256Y -> IO () +foreign import ccall "cryptonite_p256_point_mul_vartime" + ccryptonite_p256_point_mul_vartime :: Ptr P256Scalar -> Ptr P256Scalar + -> Ptr P256X -> Ptr P256Y + -> Ptr P256X -> Ptr P256Y + -> IO () foreign import ccall "cryptonite_p256_is_valid_point" - ccryptonite_p256_is_valid_point :: Ptr P256Scalar -> Ptr P256Scalar -> IO CInt + ccryptonite_p256_is_valid_point :: Ptr P256X -> Ptr P256Y -> IO CInt foreign import ccall "cryptonite_p256_to_bin" ccryptonite_p256_to_bin :: Ptr P256Scalar -> Ptr Word8 -> IO ()