| Copyright | No rights reserved |
|---|---|
| License | MIT |
| Maintainer | jprupp@protonmail.ch |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Haskoin.Crypto.Signature
Contents
Description
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.
isCanonicalHalfOrder :: Ctx -> Sig -> Bool Source #
Is canonical half order.
decodeStrictSig :: Ctx -> ByteString -> Maybe Sig Source #
Decode signature strictly.
exportSig :: Ctx -> Sig -> ByteString #
Orphan instances
| Marshal Ctx Sig Source # | |
Methods marshalPut :: MonadPut m => Ctx -> Sig -> m () Source # marshalGet :: MonadGet m => Ctx -> m Sig Source # | |
| MarshalJSON Ctx Sig Source # | |
Methods marshalValue :: Ctx -> Sig -> Value Source # marshalEncoding :: Ctx -> Sig -> Encoding Source # unmarshalValue :: Ctx -> Value -> Parser Sig Source # | |