libsecp256k1-0.0.0: Bindings for secp256k1
LicenseUNLICENSE
MaintainerKeagan McClelland <keagan.mcclelland@gmail.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Secp256k1.Prim

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 Bytes (n :: Nat) Source #

type Ret = CInt Source #

type NonceFun a = Ptr CUChar -> Ptr CUChar -> Ptr CUChar -> Ptr CUChar -> Ptr a -> CInt -> IO CInt Source #

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

setErrorCallback Source #

Arguments

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

message, data

-> Ptr a

data

-> IO () 

setIllegalCallback Source #

Arguments

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

message, data

-> Ptr a

data

-> IO () 

ecdsaSign Source #

Arguments

:: Ctx 
-> Ptr Sig64 
-> Ptr Msg32 
-> Ptr Seckey32 
-> FunPtr (NonceFun a) 
-> Ptr a

nonce data

-> IO Ret 

ecdsaSignatureNormalize Source #

Arguments

:: Ctx 
-> Ptr Sig64

output

-> Ptr Sig64

input

-> IO Ret 

ecdsaSignatureParseDer Source #

Arguments

:: Ctx 
-> Ptr Sig64 
-> Ptr (Bytes n)

encoded DER signature

-> CSize

size of encoded signature

-> IO Ret 

ecdsaSignatureSerializeDer Source #

Arguments

:: Ctx 
-> Ptr (Bytes n)

array for encoded signature, must be large enough

-> Ptr CSize

size of encoded signature, will be updated

-> Ptr Sig64 
-> IO Ret 

ecPrivkeyNegate :: Ctx -> Ptr Tweak32 -> IO Ret Source #

Deprecated: use ecSeckeyNegate instead

ecPrivkeyTweakAdd :: Ctx -> Ptr Seckey32 -> Ptr Tweak32 -> IO Ret Source #

Deprecated: use ecSeckeyTweakAdd instead

ecPrivkeyTweakMul :: Ctx -> Ptr Seckey32 -> Ptr Tweak32 -> IO Ret Source #

Deprecated: use ecSeckeyTweakMul instead

ecPubKeyCombine Source #

Arguments

:: Ctx 
-> Ptr Pubkey64

pointer to public key storage

-> Ptr (Ptr Pubkey64)

pointer to array of public keys

-> CInt

number of public keys

-> IO Ret 

ecPubkeyParse Source #

Arguments

:: Ctx 
-> Ptr Pubkey64 
-> Ptr (Bytes n)

encoded public key array

-> CSize

size of encoded public key array

-> IO Ret 

ecPubKeySerialize Source #

Arguments

:: Ctx 
-> Ptr (Bytes n)

array for encoded public key, must be large enough

-> Ptr CSize

size of encoded public key, will be updated

-> Ptr Pubkey64 
-> SerFlags 
-> IO Ret 

taggedSha256 :: Ctx -> Ptr (Bytes 32) -> Ptr (Bytes n) -> CSize -> Ptr (Bytes n) -> CSize -> IO Ret Source #