From 1f30911e1c7816550ee54764790355f37ee80546 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sun, 3 May 2015 20:14:54 +0100 Subject: [PATCH] [P256] define the n/p/b constants --- Crypto/PubKey/ECC/P256.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Crypto/PubKey/ECC/P256.hs b/Crypto/PubKey/ECC/P256.hs index 3aafba1..fa1c510 100644 --- a/Crypto/PubKey/ECC/P256.hs +++ b/Crypto/PubKey/ECC/P256.hs @@ -116,6 +116,12 @@ withScalar (Scalar d) f = B.withByteArray d f ------------------------------------------------------------------------ -- Foreign bindings ------------------------------------------------------------------------ +foreign import ccall "&cryptonite_SECP256r1_n" + ccryptonite_SECP256r1_n :: Ptr P256Scalar +foreign import ccall "&cryptonite_SECP256r1_p" + ccryptonite_SECP256r1_p :: Ptr P256Scalar +foreign import ccall "&cryptonite_SECP256r1_b" + ccryptonite_SECP256r1_b :: Ptr P256Scalar foreign import ccall "cryptonite_p256_init" ccryptonite_p256_init :: Ptr P256Scalar -> IO ()