Skip to content

Commit

Permalink
Update vms/evm/signer/kms_signer.go
Browse files Browse the repository at this point in the history
Co-authored-by: minghinmatthewlam <[email protected]>
Signed-off-by: cam-schultz <[email protected]>
  • Loading branch information
cam-schultz and minghinmatthewlam authored May 1, 2024
1 parent ca82907 commit 0b94adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vms/evm/signer/kms_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *KMSSigner) Address() common.Address {
// Recover the EIP-155 signature from the KMS signature.
// KMS returns the signature in ASN.1 format, but the EIP-155 signature is in R || S || V format,
// so we need to test both V = 0 and V = 1 against the recovered public key.
// Additionally, with EIP-2 S-values are capped at secp256k1n/2, so adjust that if necessary.
// Additionally, EIP-2 S-values are capped at secp256k1n/2, so adjust that if necessary.
func (s *KMSSigner) recoverEIP155Signature(txHash []byte, rBytes []byte, sBytes []byte) ([]byte, error) {
sBigInt := big.NewInt(0).SetBytes(sBytes)
secp256k1N := crypto.S256().Params().N
Expand Down

0 comments on commit 0b94adc

Please sign in to comment.