web3-0.8.3.1: Ethereum API for Haskell

CopyrightAlexander Krupenkin 2018
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Crypto.Ethereum.Utils

Description

EC cryptography on Secp256k1 curve.

Synopsis

Documentation

importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey Source #

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

sha3 :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout Source #

Keccak 256 hash function.