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.Ethereum.Signature

Description

Recoverable Ethereum signature support.

Synopsis

Documentation

hashMessage :: ByteArrayAccess message => message -> Digest Keccak_256 Source #

Ethereum standard hashed message.

The data will be UTF-8 HEX decoded and enveloped as follows: "x19Ethereum Signed Message:n" + message.length + message and hashed using keccak256.

signMessage :: (ByteArrayAccess message, ByteArray rsv) => PrivateKey -> message -> rsv Source #

Make Ethereum standard signature.

The message is before enveloped as follows: "x19Ethereum Signed Message:n" + message.length + message

WARNING: Vulnerable to timing attacks.

signTransaction Source #

Arguments

:: ByteArray ba 
=> (Maybe (Integer, Integer, Word8) -> ba)

Two way transaction packer (unsigned and signed)

-> PrivateKey

Private key

-> ba

Encoded transaction

Sign Ethereum transaction.

WARNING: Vulnerable to timing attacks.