License | MIT |
---|---|
Maintainer | Jean-Pierre Rupp <root@haskoin.com> |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
The API for 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 {}
- data CompactSig = CompactSig {}
- 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
- contextCreate :: CtxFlags -> IO (Ptr Ctx)
- contextClone :: Ptr Ctx -> IO (Ptr Ctx)
- contextDestroy :: FunPtr (Ptr Ctx -> IO ())
- setIllegalCallback :: Ptr Ctx -> FunPtr (CString -> Ptr a -> IO ()) -> Ptr a -> IO ()
- setErrorCallback :: Ptr Ctx -> FunPtr (CString -> Ptr a -> IO ()) -> Ptr a -> IO ()
- ecPubKeyParse :: Ptr Ctx -> Ptr PubKey64 -> Ptr CUChar -> CSize -> IO Ret
- ecPubKeySerialize :: Ptr Ctx -> Ptr CUChar -> Ptr CSize -> Ptr PubKey64 -> SerFlags -> IO Ret
- ecdsaSignatureParseCompact :: Ptr Ctx -> Ptr Sig64 -> Ptr CompactSig -> IO Ret
- ecdsaSignatureParseDer :: Ptr Ctx -> Ptr Sig64 -> Ptr CUChar -> CSize -> IO Ret
- ecdsaSignatureSerializeDer :: Ptr Ctx -> Ptr CUChar -> Ptr CSize -> Ptr Sig64 -> IO Ret
- ecdsaSignatureSerializeCompact :: Ptr Ctx -> Ptr CompactSig -> Ptr Sig64 -> IO Ret
- ecdsaVerify :: Ptr Ctx -> Ptr Sig64 -> Ptr Msg32 -> Ptr PubKey64 -> IO Ret
- ecdsaSignatureNormalize :: Ptr Ctx -> Ptr Sig64 -> Ptr Sig64 -> IO Ret
- laxDerParse :: Ptr Ctx -> Ptr Sig64 -> Ptr CUChar -> CSize -> IO Ret
- ecdsaSign :: Ptr Ctx -> Ptr Sig64 -> Ptr Msg32 -> Ptr SecKey32 -> FunPtr (NonceFunction a) -> Ptr a -> IO Ret
- ecSecKeyVerify :: Ptr Ctx -> Ptr SecKey32 -> IO Ret
- ecPubKeyCreate :: Ptr Ctx -> Ptr PubKey64 -> Ptr SecKey32 -> IO Ret
- ecSecKeyTweakAdd :: Ptr Ctx -> Ptr SecKey32 -> Ptr Tweak32 -> IO Ret
- ecPubKeyTweakAdd :: Ptr Ctx -> Ptr PubKey64 -> Ptr Tweak32 -> IO Ret
- ecSecKeyTweakMul :: Ptr Ctx -> Ptr SecKey32 -> Ptr Tweak32 -> IO Ret
- ecPubKeyTweakMul :: Ptr Ctx -> Ptr PubKey64 -> Ptr Tweak32 -> IO Ret
- contextRandomize :: Ptr Ctx -> Ptr Seed32 -> IO Ret
- ecPubKeyCombine :: Ptr Ctx -> Ptr PubKey64 -> Ptr (Ptr PubKey64) -> CInt -> IO Ret
Documentation
data CompactSig Source
type NonceFunction a Source
Nonce32-generating function
useByteString :: ByteString -> ((Ptr CUChar, CSize) -> IO a) -> IO a Source
packByteString :: (Ptr CUChar, CSize) -> IO ByteString Source
ecdsaSignatureParseCompact :: Ptr Ctx -> Ptr Sig64 -> Ptr CompactSig -> IO Ret Source
ecdsaSignatureSerializeCompact :: Ptr Ctx -> Ptr CompactSig -> Ptr Sig64 -> IO Ret Source