Module eth_types::sign_types
source · Expand description
secp256k1 signature types and helper functions.
Structs§
- Secp256k1 Curve Scalar. Reference: Section 2.4.1 (parameter
n
) in “SEC 2: Recommended Elliptic Curve Domain Parameters” document at http://www.secg.org/sec2-v2.pdf - Signature data required by the SignVerify Chip as input to verify a signature.
Functions§
- Convert a
BigUint
into 32 bytes in little endian. - Helper function to convert a
CtOption
into anResult
. Similar toOption::ok_or
. - Return the secp256k1 public key (x, y) coordinates in little endian bytes.
- Return a copy of the serialized public key with swapped Endianness.
- Recover the public key from a secp256k1 signature and the message hash.
- Do a secp256k1 signature with a given randomness value.