Copyright | No rights reserved |
---|---|
License | MIT |
Maintainer | jprupp@protonmail.ch |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
ECDSA signatures using secp256k1 curve. Uses functions from upstream secp256k1 library.
Synopsis
- putSig :: MonadPut m => Sig -> m ()
- getSig :: MonadGet m => m Sig
- signHash :: SecKey -> Hash256 -> Sig
- verifyHashSig :: Hash256 -> Sig -> PubKey -> Bool
- isCanonicalHalfOrder :: Sig -> Bool
- decodeStrictSig :: ByteString -> Maybe Sig
- exportSig :: Sig -> ByteString
Signatures
getSig :: MonadGet m => m Sig Source #
Deserialize an ECDSA signature as commonly encoded in Bitcoin.
verifyHashSig :: Hash256 -> Sig -> PubKey -> Bool Source #
Verify an ECDSA signature for a 256-bit hash.
isCanonicalHalfOrder :: Sig -> Bool Source #
Is canonical half order.
decodeStrictSig :: ByteString -> Maybe Sig Source #
Decode signature strictly.
exportSig :: Sig -> ByteString #
Encode signature as strict DER.