-
Notifications
You must be signed in to change notification settings - Fork 795
Address recovered from EIP712 struct signature differs between Ledger and Wallet implementation #516
Comments
Reading through the ledger Going to see if I can use this information to fix the |
@Ryanmtate please include a firmware check to prevent attempted signing on outdated devices
|
I noticed a method to return the ethereum app version, but don't immediately know how to check the ledger firmware version. We could enforce that the ethereum app version must be greater than v1.6.0, which might suffice for preventing unsupported use in older devices. Will add this check at the very least. |
Fixed in #518. @sebastinez mentioned that on Nano X there seems to be a problem:
I tested manually on Nano S and it seemed to work fine. @prestwich does coin-ledger work with nano X? |
Hi folks,
Working on using the ability to sign a struct with the new Eip712 trait and derive macro but it found a divergence between how the Ledger and the Wallet implementation signs the encoded struct hash, and the signee address that a smart contract returns using a
ecrecover
functionThe smart contract function which I'm using to return the signee:
I saw that in the
LedgerEthereum
implementation thesign_message
function has some prepending.ethers-rs/ethers-signers/src/ledger/app.rs
Line 129 in c3528b7
It seems it is necessary for the Ledger HW to be able to sign the message. Could it be possible that this diverges the final recovered address?
I'm trying to fix this, but since it works using the LocalWallet implementation it seems to be an issue with the Ledger implementation.
I add @Ryanmtate to this issue, so he is up to date.
The text was updated successfully, but these errors were encountered: