web3-crypto-1.0.0.0: Cryptograhical primitives for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Crypto.Ecdsa.Utils

Description

ECDSA module helper functions.

Synopsis

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).

exportPubKeyCompress :: ByteArray publicKey => PublicKey -> publicKey Source #

Export compressed public key to byte array (33 byte length).