Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CurveOrder is the order of the secp256k1 elliptic curve. CurveOrder = secp256k1.S256().Params().N // CurveOrderHalf = CurveOrder / 2. CurveOrderHalf = new(big.Int).Div(CurveOrder, new(big.Int).SetUint64(2)) )
Functions ¶
func KmsToEVMSignature ¶
func KmsToEVMSignature(pubKey ecdsa.PublicKey, kmsSig KmsSignature, digestedMsg common.Hash, ) ([]byte, error)
KmsToEVMSignature converts a KmsSignature into an EVM-compatible signature of the following form: r || s || v, with v either 0 or 1. The `WithSignature` function will adjust the value of v based on the Signer type (types.Signer). Reference: https://eips.ethereum.org/EIPS/eip-155.
Types ¶
type KmsSignature ¶
KmsSignature represents decoded signatures returned from the KMS.
A KmsSignature only consists of 2 points: R, S. In order for it to be EVM-compatible, we need to manually convert it to the (r || s || v) form.
Click to show internal directories.
Click to hide internal directories.