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.
Synopsis
- data Ctx = Ctx
- newtype PubKey64 = PubKey64 {}
- newtype Msg32 = Msg32 {}
- newtype Sig64 = Sig64 {}
- data CompactSig = CompactSig {}
- newtype RecSig65 = RecSig65 {}
- data CompactRecSig = CompactRecSig {}
- 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
- fctx :: ForeignPtr Ctx
- withContext :: (Ptr Ctx -> IO a) -> a
- 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
- 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
- ecdsaRecoverableSignatureParseCompact :: Ptr Ctx -> Ptr RecSig65 -> Ptr CompactSig -> CInt -> IO Ret
- ecdsaRecoverableSignatureConvert :: Ptr Ctx -> Ptr Sig64 -> Ptr RecSig65 -> IO Ret
- ecdsaRecoverableSignatureSerializeCompact :: Ptr Ctx -> Ptr CompactSig -> Ptr CInt -> Ptr RecSig65 -> IO Ret
- ecdsaSignRecoverable :: Ptr Ctx -> Ptr RecSig65 -> Ptr Msg32 -> Ptr SecKey32 -> FunPtr (NonceFunction a) -> Ptr a -> IO Ret
- ecdsaRecover :: Ptr Ctx -> Ptr PubKey64 -> Ptr RecSig65 -> Ptr Msg32 -> IO Ret
Documentation
Instances
Eq PubKey64 Source # | |
Ord PubKey64 Source # | |
Defined in Crypto.Secp256k1.Internal | |
Read PubKey64 Source # | |
Show PubKey64 Source # | |
Storable PubKey64 Source # | |
Defined in Crypto.Secp256k1.Internal |
Instances
Eq Msg32 Source # | |
Ord Msg32 Source # | |
Read Msg32 Source # | |
Show Msg32 Source # | |
Storable Msg32 Source # | |
Instances
Eq Sig64 Source # | |
Ord Sig64 Source # | |
Read Sig64 Source # | |
Show Sig64 Source # | |
Storable Sig64 Source # | |
data CompactSig Source #
Instances
Instances
Eq RecSig65 Source # | |
Ord RecSig65 Source # | |
Defined in Crypto.Secp256k1.Internal | |
Read RecSig65 Source # | |
Show RecSig65 Source # | |
Storable RecSig65 Source # | |
Defined in Crypto.Secp256k1.Internal |
data CompactRecSig Source #
Instances
Instances
Eq Seed32 Source # | |
Ord Seed32 Source # | |
Read Seed32 Source # | |
Show Seed32 Source # | |
Storable Seed32 Source # | |
Instances
Eq SecKey32 Source # | |
Ord SecKey32 Source # | |
Defined in Crypto.Secp256k1.Internal | |
Read SecKey32 Source # | |
Show SecKey32 Source # | |
Storable SecKey32 Source # | |
Defined in Crypto.Secp256k1.Internal |
Instances
Eq Tweak32 Source # | |
Ord Tweak32 Source # | |
Read Tweak32 Source # | |
Show Tweak32 Source # | |
Storable Tweak32 Source # | |
Instances
Eq Nonce32 Source # | |
Ord Nonce32 Source # | |
Read Nonce32 Source # | |
Show Nonce32 Source # | |
Storable Nonce32 Source # | |
Instances
Eq Algo16 Source # | |
Ord Algo16 Source # | |
Read Algo16 Source # | |
Show Algo16 Source # | |
Storable Algo16 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 #
fctx :: ForeignPtr Ctx Source #
ecdsaRecoverableSignatureParseCompact :: Ptr Ctx -> Ptr RecSig65 -> Ptr CompactSig -> CInt -> IO Ret Source #
ecdsaRecoverableSignatureSerializeCompact :: Ptr Ctx -> Ptr CompactSig -> Ptr CInt -> Ptr RecSig65 -> IO Ret Source #