secp256k1-0.4.8: Bindings for secp256k1 library from Bitcoin Core

LicenseMIT
MaintainerJean-Pierre Rupp <root@haskoin.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Secp256k1.Internal

Description

The API for this module may change at any time. This is an internal module only exposed for hacking and experimentation.

Synopsis

Documentation

data Ctx #

Constructors

Ctx 

newtype Msg32 #

Constructors

Msg32 

Fields

newtype Sig64 #

Constructors

Sig64 

Fields

newtype Ret #

Constructors

Ret 

Fields

Instances

Eq Ret # 

Methods

(==) :: Ret -> Ret -> Bool #

(/=) :: Ret -> Ret -> Bool #

Ord Ret # 

Methods

compare :: Ret -> Ret -> Ordering #

(<) :: Ret -> Ret -> Bool #

(<=) :: Ret -> Ret -> Bool #

(>) :: Ret -> Ret -> Bool #

(>=) :: Ret -> Ret -> Bool #

max :: Ret -> Ret -> Ret #

min :: Ret -> Ret -> Ret #

Read Ret # 
Show Ret # 

Methods

showsPrec :: Int -> Ret -> ShowS #

show :: Ret -> String #

showList :: [Ret] -> ShowS #

type NonceFunction a #

Arguments

 = Ptr Nonce32 
-> Ptr Msg32 
-> Ptr SecKey32 
-> Ptr Algo16 
-> Ptr a

extra data

-> CUInt

attempt

-> Ret 

Nonce32-generating function

useByteString :: ByteString -> ((Ptr CUChar, CSize) -> IO a) -> IO a #

withContext :: (Ptr Ctx -> IO a) -> a #

setIllegalCallback #

Arguments

:: Ptr Ctx 
-> FunPtr (CString -> Ptr a -> IO ())

message, data

-> Ptr a

data

-> IO () 

setErrorCallback #

Arguments

:: Ptr Ctx 
-> FunPtr (CString -> Ptr a -> IO ())

message, data

-> Ptr a

data

-> IO () 

ecPubKeyParse #

Arguments

:: Ptr Ctx 
-> Ptr PubKey64 
-> Ptr CUChar

encoded public key array

-> CSize

size of encoded public key array

-> IO Ret 

ecPubKeySerialize #

Arguments

:: Ptr Ctx 
-> Ptr CUChar

array for encoded public key, must be large enough

-> Ptr CSize

size of encoded public key, will be updated

-> Ptr PubKey64 
-> SerFlags 
-> IO Ret 

ecdsaSignatureParseDer #

Arguments

:: Ptr Ctx 
-> Ptr Sig64 
-> Ptr CUChar

encoded DER signature

-> CSize

size of encoded signature

-> IO Ret 

ecdsaSignatureSerializeDer #

Arguments

:: Ptr Ctx 
-> Ptr CUChar

array for encoded signature, must be large enough

-> Ptr CSize

size of encoded signature, will be updated

-> Ptr Sig64 
-> IO Ret 

ecdsaSignatureNormalize #

Arguments

:: Ptr Ctx 
-> Ptr Sig64

output

-> Ptr Sig64

input

-> IO Ret 

ecdsaSign #

Arguments

:: Ptr Ctx 
-> Ptr Sig64 
-> Ptr Msg32 
-> Ptr SecKey32 
-> FunPtr (NonceFunction a) 
-> Ptr a

nonce data

-> IO Ret 

ecPubKeyCombine #

Arguments

:: Ptr Ctx 
-> Ptr PubKey64

pointer to public key storage

-> Ptr (Ptr PubKey64)

pointer to array of public keys

-> CInt

number of public keys

-> IO Ret 

ecdsaSignRecoverable #

Arguments

:: Ptr Ctx 
-> Ptr RecSig65 
-> Ptr Msg32 
-> Ptr SecKey32 
-> FunPtr (NonceFunction a) 
-> Ptr a

nonce data

-> IO Ret