Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ledger doesnt support eip-155. Related to signature "V" value in attestation.jar #236

Closed
oleggrib opened this issue Mar 20, 2022 · 1 comment
Assignees

Comments

@oleggrib
Copy link
Collaborator

Hi, @jot2re , let me show request example:
Example data: (POST https://backend-liscon.attestation.id/api/attestation)

Ledger wallet address: 0x3FF1aEd5e9fB5a75AA34f33169438c13B3c19b76

POST payload with request to create attestation:
{"validity":"3600","attestor":"AlphaWallet","publicRequest":"{"signatureInHex":"0x9fe797bff20a1b5904f8589c7af06363b56bb97c4d3aa0f802a8b669645f3efe69ea0fcf3b910b9277dfafc382667552488b4adc8a8eacdbf34835b24ef9541500","jsonSigned":"{\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"version\",\"type\":\"string\"}],\"AttestationRequest\":[{\"name\":\"payload\",\"type\":\"string\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"timestamp\",\"type\":\"string\"},{\"name\":\"identifier\",\"type\":\"string\"}]},\"primaryType\":\"AttestationRequest\",\"message\":{\"payload\":\"MIIBAgIBATCB_ARBBCMZ7_4K5jupelJXNctmyd3VvuV9fBMnATo0iEOfgaynL6StRLSmD_qvn_h6l7gyRj6vdg2LF9XCFnXfBqQ2rnEEIA8YIDJ4tN8RK8k0MdE1MKigxk2vrHX9OdnccFQ588zQBEEEDfCh9NDuU-TLojJa-rzBPdNXnkyT5PuZeSYXYNh-h9IV8i8pNS7KzKDuGL6lPHoREq7ZZFo07tvDdZdh-qvl7ARSMFgzRkYxQUVENUU5RkI1QTc1QUEzNEYzMzE2OTQzOEMxM0IzQzE5Qjc2qZU50y9kqXbiNUmNpswjqJjyXO1uD4eQiw8qoNwfgHwAAAF_pyFZfA\",\"description\":\"Creating email attestation\",\"timestamp\":\"Sun Mar 20 2022 13:40:55 GMT+0200\",\"identifier\":\"mah@mah.com\"},\"domain\":{\"name\":\"http://wwww.attestation.id\\\",\\\"version\\\":\\\"0.1\\\"}}\"}"}

Answer: 400 (Validation failed)

most of the data go to the attestation.jar to create attestation

I discovered that Ledger signature set "V" value as 0x00 or 0x01, not 0x1b or 0x1c.

this object will be valid for attestation.jar when I change 00 to 1b

Looks like Ledger doesnt support eip-155, and I think currently not possible to support it because it use formula

{0,1} + CHAIN_ID * 2 + 35

while MAX V value = 65536 and for example mumbai chainID = 80001, "Arbitrum Rinkeby" chainID = 421611 so V value should be bigger then max allowed value.

Can you update attestation to support Ledger and ignore eip-155 requirments?
Or maybe you have other solution?

cc @JamesSmartCell @weiwu-zhang @AW-STJ

P/S problem related to Attestatition.id and all projects related to the attestation (autographNFT, TA, LISCON etc.)

@jot2re
Copy link
Collaborator

jot2re commented Apr 8, 2022

I am closing this with the merging of PR #238

@jot2re jot2re closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants