Add EIP 1024 APDUs

This commit is contained in:
BTChip github
2022-01-11 08:56:57 +01:00
parent 170f3eeb7b
commit 78f4642b6c
10 changed files with 302 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
Ethereum application : Common Technical Specifications
=======================================================
Ledger Firmware Team <hello@ledger.fr>
Application version 1.5.0 - 25th of September 2020
Application version 1.9.16 - 10th of January 2022
## 1.0
- Initial release
@@ -26,6 +26,9 @@ Application version 1.5.0 - 25th of September 2020
## 1.9.13
- Add SET PLUGIN
## 1.9.16
- Add PERFORM PRIVACY OPERATION
## About
This application describes the APDU messages interface to communicate with the Ethereum application.
@@ -379,6 +382,52 @@ type || version || len(pluginName) || pluginName || address || selector || chain
None
### PERFORM PRIVACY OPERATION
#### Description
This command performs privacy operations as defined in EIP 1024 (https://ethereum-magicians.org/t/eip-1024-cross-client-encrypt-decrypt/505)
It can return the public encryption key on Curve25519 for a given Ethereum account or the shared secret (generated by the scalar multiplication of the remote public key by the account private key on Curve25519) used to decrypt private data encrypted for a given Ethereum account
All data can be optionally checked on the device before being returned.
#### Coding
'Command'
[width="80%"]
|==============================================================================================================================
| *CLA* | *INS* | *P1* | *P2* | *Lc* | *Le*
| E0 | 18 | 00 : return data
01 : display data and confirm before returning
| 00 : return the public encryption key
01 : return the shared secret | variable | variable
|==============================================================================================================================
'Input data'
[width="80%"]
|==============================================================================================================================
| *Description* | *Length*
| Number of BIP 32 derivations to perform (max 10) | 1
| First derivation index (big endian) | 4
| ... | 4
| Last derivation index (big endian) | 4
| Third party public key on Curve25519, if returning the shared secret | 32
|==============================================================================================================================
'Output data'
[width="80%"]
|==============================================================================================================================
| *Description* | *Length*
| Public encryption key or shared secret | 32
|==============================================================================================================================
### GET APP CONFIGURATION
#### Description