License | PublicDomain |
---|---|
Maintainer | root@haskoin.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
The API in this module may change at any time. This is an internal module only exposed for hacking and experimentation.
- data Ctx = Ctx
- newtype PubKey64 = PubKey64 {}
- newtype Msg32 = Msg32 {}
- newtype Sig64 = Sig64 {}
- newtype Seed32 = Seed32 {}
- newtype SecKey32 = SecKey32 {}
- newtype Tweak32 = Tweak32 {}
- newtype Nonce32 = Nonce32 {}
- newtype Algo16 = Algo16 {}
- newtype CtxFlags = CtxFlags {
- getCtxFlags :: CUInt
- newtype SerFlags = SerFlags {
- getSerFlags :: CUInt
- newtype Ret = Ret {}
- type NonceFunction a = Ptr Nonce32 -> Ptr Msg32 -> Ptr SecKey32 -> Ptr Algo16 -> Ptr a -> CUInt -> Ret
- verify :: CtxFlags
- sign :: CtxFlags
- signVerify :: CtxFlags
- compressed :: SerFlags
- uncompressed :: SerFlags
- useByteString :: ByteString -> ((Ptr CUChar, CSize) -> IO a) -> IO a
- packByteString :: (Ptr CUChar, CSize) -> IO ByteString
- isSuccess :: Ret -> Bool
- ctx :: Ptr Ctx
- context_create :: CtxFlags -> IO (Ptr Ctx)
- context_clone :: Ptr Ctx -> IO (Ptr Ctx)
- context_destroy :: FunPtr (Ptr Ctx -> IO ())
- set_illegal_callback :: Ptr Ctx -> FunPtr (CString -> Ptr a -> IO ()) -> Ptr a -> IO ()
- set_error_callback :: Ptr Ctx -> FunPtr (CString -> Ptr a -> IO ()) -> Ptr a -> IO ()
- ec_pubkey_parse :: Ptr Ctx -> Ptr PubKey64 -> Ptr CUChar -> CSize -> IO Ret
- ec_pubkey_serialize :: Ptr Ctx -> Ptr CUChar -> Ptr CSize -> Ptr PubKey64 -> SerFlags -> IO Ret
- ecdsa_signature_parse_der :: Ptr Ctx -> Ptr Sig64 -> Ptr CUChar -> CSize -> IO Ret
- ecdsa_signature_serialize_der :: Ptr Ctx -> Ptr CUChar -> Ptr CSize -> Ptr Sig64 -> IO Ret
- ecdsa_verify :: Ptr Ctx -> Ptr Sig64 -> Ptr Msg32 -> Ptr PubKey64 -> IO Ret
- ecdsa_sign :: Ptr Ctx -> Ptr Sig64 -> Ptr Msg32 -> Ptr SecKey32 -> FunPtr (NonceFunction a) -> Ptr a -> IO Ret
- ec_seckey_verify :: Ptr Ctx -> Ptr SecKey32 -> IO Ret
- ec_pubkey_create :: Ptr Ctx -> Ptr PubKey64 -> Ptr SecKey32 -> IO Ret
- ec_privkey_export :: Ptr Ctx -> Ptr CUChar -> Ptr CSize -> Ptr SecKey32 -> SerFlags -> IO Ret
- ec_privkey_import :: Ptr Ctx -> Ptr SecKey32 -> Ptr CUChar -> CSize -> IO Ret
- ec_privkey_tweak_add :: Ptr Ctx -> Ptr SecKey32 -> Ptr Tweak32 -> IO Ret
- ec_pubkey_tweak_add :: Ptr Ctx -> Ptr PubKey64 -> Ptr Tweak32 -> IO Ret
- ec_privkey_tweak_mul :: Ptr Ctx -> Ptr SecKey32 -> Ptr Tweak32 -> IO Ret
- ec_pubkey_tweak_mul :: Ptr Ctx -> Ptr PubKey64 -> Ptr Tweak32 -> IO Ret
- context_randomize :: Ptr Ctx -> Ptr Seed32 -> IO Ret
- ec_pubkey_combine :: Ptr Ctx -> Ptr PubKey64 -> Ptr (Ptr PubKey64) -> CInt -> IO Ret
Documentation
type NonceFunction a Source
Nonce32-generating function
useByteString :: ByteString -> ((Ptr CUChar, CSize) -> IO a) -> IO a Source
packByteString :: (Ptr CUChar, CSize) -> IO ByteString Source