Copyright | No rights reserved |
---|---|
License | MIT |
Maintainer | jprupp@protonmail.ch |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
ECDSA signatures using secp256k1 curve. Uses functions from upstream secp256k1 library.
Synopsis
- signHash :: Ctx -> SecKey -> Hash256 -> Sig
- verifyHashSig :: Ctx -> Hash256 -> Sig -> PubKey -> Bool
- isCanonicalHalfOrder :: Ctx -> Sig -> Bool
- decodeStrictSig :: Ctx -> ByteString -> Maybe Sig
- exportSig :: Ctx -> Sig -> ByteString
Signatures
signHash :: Ctx -> SecKey -> Hash256 -> Sig Source #
Sign a 256-bit hash using secp256k1 elliptic curve.
verifyHashSig :: Ctx -> Hash256 -> Sig -> PubKey -> Bool Source #
Verify an ECDSA signature for a 256-bit hash.
decodeStrictSig :: Ctx -> ByteString -> Maybe Sig Source #
Decode signature strictly.
exportSig :: Ctx -> Sig -> ByteString #
Encode signature as strict DER.