secp256k1-0.1.7: secp256k1 bindings for Haskell

LicensePublicDomain
Maintainerroot@haskoin.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Secp256k1.Internal

Description

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

Synopsis

Documentation

data Ctx Source

Constructors

Ctx 

newtype Ret Source

Constructors

Ret 

Fields

getRet :: CInt
 

type NonceFunction a Source

Arguments

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

extra data

-> CUInt

attempt

-> Ret 

Nonce32-generating function

set_illegal_callback Source

Arguments

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

message, data

-> Ptr a

data

-> IO () 

set_error_callback Source

Arguments

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

message, data

-> Ptr a

data

-> IO () 

ec_pubkey_parse Source

Arguments

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

encoded public key array

-> CSize

size of encoded public key array

-> IO Ret 

ec_pubkey_serialize Source

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 

ecdsa_signature_parse_der Source

Arguments

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

encoded DER signature

-> CSize

size of encoded signature

-> IO Ret 

ecdsa_signature_serialize_der Source

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 

ecdsa_sign Source

Arguments

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

nonce data

-> IO Ret 

ec_privkey_export Source

Arguments

:: Ptr Ctx 
-> Ptr CUChar

array to store BER-encoded key (allocate 279 bytes)

-> Ptr CSize

size of previous array, will be updated

-> Ptr SecKey32 
-> SerFlags 
-> IO Ret 

ec_privkey_import Source

Arguments

:: Ptr Ctx 
-> Ptr SecKey32 
-> Ptr CUChar

BER-encoded private key

-> CSize 
-> IO Ret 

ec_pubkey_combine Source

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