Copyright | Alexander Krupenkin 2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
ECDSA module helper functions.
Synopsis
- importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey
- exportKey :: ByteArray privateKey => PrivateKey -> privateKey
- derivePubKey :: PrivateKey -> PublicKey
- exportPubKey :: ByteArray publicKey => PublicKey -> publicKey
Documentation
importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey Source #
Import ECDSA private key from byte array.
Input array should have 32 byte length.
exportKey :: ByteArray privateKey => PrivateKey -> privateKey Source #
Export private key to byte array (32 byte length).
derivePubKey :: PrivateKey -> PublicKey Source #
Get public key appropriate to private key.
WARNING: Vulnerable to timing attacks.
exportPubKey :: ByteArray publicKey => PublicKey -> publicKey Source #
Export public key to byte array (64 byte length).