Skip to content

Instantly share code, notes, and snippets.

View kalaspuff's full-sized avatar
🎧
techno

Carl Oscar Aaro kalaspuff

🎧
techno
View GitHub Profile
@kalaspuff
kalaspuff / readme.md
Last active June 21, 2023 11:37
Validating Ledger signatures relayed via MetaMask by implementing a simple function that corrects the {v} value of an invalid vrs signature

Validating Ledger signatures relayed via MetaMask

Find the full article at https://mirror.xyz/coa.eth/mvPbLPXvy375CXi1_XwMTzG84lwlSKYUBHDx_R1TIgU, which includes some additional context, descriptions of symptoms, etc.

"Ledger devices produces vrs signatures with a canonical {v} value of 0 or 1."

This write-up goes through some brief details on vrs signatures, what makes signature validation fail on some web apps when signing using a Ledger device connected through MetaMask extension, followed by what to do about it.

- "I'm in hurry and just want things to work."
- "Reasonable. Scroll down some for the fix. It's just four rows of JS + comments."

did:3:kjzl6cwe1jw148pn9suhre0uta2a51c71v3w6mve6fjqkpsa2pi0plq85gd7d0n
@kalaspuff
kalaspuff / carloscar.pub
Last active October 29, 2020 03:34
public-keys
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFoT4osBEADWq8Anquk9LmQojhlTTsJrV5rFZFm7pWvc46YX6BLoi3OU1rAj
AcTS7POZozm8kD7/ETSAp+B0KKVBn1Kn6D3aP2SuK+RYJnDPqBH5WYax5xr2BcWF
Htoc/Iu6Y/AziGQd7xBg5VW6BkONp4zq8ADuSgjsU+Ma/1pIVXtNKbcC6KNgwpuz
e5gtu+cS/sXkSnJObOOVtFfC50bBNkueMg5ASZzzQcuNVOoseJha6v0Ee5iYYvU7
G+ghogKkGU0V5U2jmai9nnWWPdpCiqZ/ttgSU2BoJOry3/0rYRGxZcuJnwqekdgN
d5BK/7pIOL0FIpQIGnkjJpTdSccKrFK2DPtspBn3AzjE0aTdZCu87E+ON149EF5g
U7p+o64p1pnb16dYSGYfAsCu+CaP1FClJob/nq/lbbIhcPYYwZE1WzRH8ALJZSJm
Jsf+5RdKleinPqZrW+E9+hC4cPVszZmJyWNT2cqlP265I2snoKYpc9tKR5vsU6KV

Keybase proof

I hereby claim:

  • I am kalaspuff on github.
  • I am carloscar (https://keybase.io/carloscar) on keybase.
  • I have a public key whose fingerprint is 5A84 DCEE 73C5 7AC1 6DA6 AC95 E05A 9514 6D18 CE4B

To claim this, I am signing this object: