Fix formatting
Small table fixes
This commit is contained in:
@@ -3,17 +3,17 @@ Ethereum application : Common Technical Specifications
|
|||||||
Ledger Firmware Team <hello@ledger.fr>
|
Ledger Firmware Team <hello@ledger.fr>
|
||||||
Application version 1.2 - 19th of August 2017
|
Application version 1.2 - 19th of August 2017
|
||||||
|
|
||||||
== 1.0
|
## 1.0
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
== 1.1
|
## 1.1
|
||||||
- Add GET APP CONFIGURATION
|
- Add GET APP CONFIGURATION
|
||||||
- Add an option to return the chain code in GET ETH PUBLIC ADDRESS
|
- Add an option to return the chain code in GET ETH PUBLIC ADDRESS
|
||||||
|
|
||||||
== 1.2
|
## 1.2
|
||||||
- Add SIGN ETH PERSONAL MESSAGE
|
- Add SIGN ETH PERSONAL MESSAGE
|
||||||
|
|
||||||
== About
|
## About
|
||||||
|
|
||||||
This application describes the APDU messages interface to communicate with the Ethereum application.
|
This application describes the APDU messages interface to communicate with the Ethereum application.
|
||||||
|
|
||||||
@@ -25,17 +25,17 @@ The application covers the following functionalities :
|
|||||||
|
|
||||||
The application interface can be accessed over HID or BLE
|
The application interface can be accessed over HID or BLE
|
||||||
|
|
||||||
== General purpose APDUs
|
## General purpose APDUs
|
||||||
|
|
||||||
=== GET ETH PUBLIC ADDRESS
|
### GET ETH PUBLIC ADDRESS
|
||||||
|
|
||||||
==== Description
|
#### Description
|
||||||
|
|
||||||
This command returns the public key and Ethereum address for the given BIP 32 path.
|
This command returns the public key and Ethereum address for the given BIP 32 path.
|
||||||
|
|
||||||
The address can be optionally checked on the device before being returned.
|
The address can be optionally checked on the device before being returned.
|
||||||
|
|
||||||
==== Coding
|
#### Coding
|
||||||
|
|
||||||
'Command'
|
'Command'
|
||||||
|
|
||||||
@@ -74,9 +74,9 @@ The address can be optionally checked on the device before being returned.
|
|||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
|
|
||||||
=== SIGN ETH TRANSACTION
|
### SIGN ETH TRANSACTION
|
||||||
|
|
||||||
==== Description
|
#### Description
|
||||||
|
|
||||||
This command signs an Ethereum transaction after having the user validate the following parameters
|
This command signs an Ethereum transaction after having the user validate the following parameters
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ This command signs an Ethereum transaction after having the user validate the fo
|
|||||||
|
|
||||||
The input data is the RLP encoded transaction (as per https://github.com/ethereum/pyethereum/blob/develop/ethereum/transactions.py#L22), without v/r/s present, streamed to the device in 255 bytes maximum data chunks.
|
The input data is the RLP encoded transaction (as per https://github.com/ethereum/pyethereum/blob/develop/ethereum/transactions.py#L22), without v/r/s present, streamed to the device in 255 bytes maximum data chunks.
|
||||||
|
|
||||||
==== Coding
|
#### Coding
|
||||||
|
|
||||||
'Command'
|
'Command'
|
||||||
|
|
||||||
@@ -129,11 +129,13 @@ The input data is the RLP encoded transaction (as per https://github.com/ethereu
|
|||||||
| v | 1
|
| v | 1
|
||||||
| r | 32
|
| r | 32
|
||||||
| s | 32
|
| s | 32
|
||||||
|======================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
=== SIGN ETH PERSONAL MESSAGE
|
|
||||||
|
|
||||||
==== Description
|
|
||||||
|
### SIGN ETH PERSONAL MESSAGE
|
||||||
|
|
||||||
|
#### Description
|
||||||
|
|
||||||
This command signs an Ethereum message following the personal_sign specification (https://github.com/ethereum/go-ethereum/pull/2940) after having the user validate the SHA-256 hash of the message being signed.
|
This command signs an Ethereum message following the personal_sign specification (https://github.com/ethereum/go-ethereum/pull/2940) after having the user validate the SHA-256 hash of the message being signed.
|
||||||
|
|
||||||
@@ -141,7 +143,7 @@ This command has been supported since firmware version 1.0.8
|
|||||||
|
|
||||||
The input data is the message to sign, streamed to the device in 255 bytes maximum data chunks
|
The input data is the message to sign, streamed to the device in 255 bytes maximum data chunks
|
||||||
|
|
||||||
==== Coding
|
#### Coding
|
||||||
|
|
||||||
'Command'
|
'Command'
|
||||||
|
|
||||||
@@ -151,7 +153,7 @@ The input data is the message to sign, streamed to the device in 255 bytes maxim
|
|||||||
| E0 | 08 | 00 : first message data block
|
| E0 | 08 | 00 : first message data block
|
||||||
|
|
||||||
80 : subsequent message data block
|
80 : subsequent message data block
|
||||||
| 00 | variable | variable
|
| 00 | variable | variable
|
||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
'Input data (first message data block)'
|
'Input data (first message data block)'
|
||||||
@@ -183,23 +185,23 @@ The input data is the message to sign, streamed to the device in 255 bytes maxim
|
|||||||
| v | 1
|
| v | 1
|
||||||
| r | 32
|
| r | 32
|
||||||
| s | 32
|
| s | 32
|
||||||
|======================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
|
|
||||||
=== GET APP CONFIGURATION
|
### GET APP CONFIGURATION
|
||||||
|
|
||||||
==== Description
|
#### Description
|
||||||
|
|
||||||
This command returns specific application configuration
|
This command returns specific application configuration
|
||||||
|
|
||||||
==== Coding
|
#### Coding
|
||||||
|
|
||||||
'Command'
|
'Command'
|
||||||
|
|
||||||
[width="80%"]
|
[width="80%"]
|
||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
| *CLA* | *INS* | *P1* | *P2* | *Lc* | *Le*
|
| *CLA* | *INS* | *P1* | *P2* | *Lc* | *Le*
|
||||||
| E0 | 06 | 00 | 00 | 00 | 04
|
| E0 | 06 | 00 | 00 | 00 | 04
|
||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
'Input data'
|
'Input data'
|
||||||
@@ -212,9 +214,7 @@ None
|
|||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
| *Description* | *Length*
|
| *Description* | *Length*
|
||||||
| Flags
|
| Flags
|
||||||
|
|
||||||
0x01 : arbitrary data signature enabled by user
|
0x01 : arbitrary data signature enabled by user
|
||||||
|
|
||||||
| 01
|
| 01
|
||||||
| Application major version | 01
|
| Application major version | 01
|
||||||
| Application minor version | 01
|
| Application minor version | 01
|
||||||
@@ -222,9 +222,9 @@ None
|
|||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
|
|
||||||
== Transport protocol
|
## Transport protocol
|
||||||
|
|
||||||
=== General transport description
|
### General transport description
|
||||||
|
|
||||||
Ledger APDUs requests and responses are encapsulated using a flexible protocol allowing to fragment large payloads over different underlying transport mechanisms.
|
Ledger APDUs requests and responses are encapsulated using a flexible protocol allowing to fragment large payloads over different underlying transport mechanisms.
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ The Command tag describes the message content. Use TAG_APDU (0x05) for standard
|
|||||||
|
|
||||||
The Packet sequence index describes the current sequence for fragmented payloads. The first fragment index is 0x00.
|
The Packet sequence index describes the current sequence for fragmented payloads. The first fragment index is 0x00.
|
||||||
|
|
||||||
=== APDU Command payload encoding
|
### APDU Command payload encoding
|
||||||
|
|
||||||
APDU Command payloads are encoded as follows :
|
APDU Command payloads are encoded as follows :
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ APDU payload is encoded according to the APDU case
|
|||||||
| 4 | !0 | !0 | Both Input and Output Data are present - L is set to Lc
|
| 4 | !0 | !0 | Both Input and Output Data are present - L is set to Lc
|
||||||
|=======================================================================================
|
|=======================================================================================
|
||||||
|
|
||||||
=== APDU Response payload encoding
|
### APDU Response payload encoding
|
||||||
|
|
||||||
APDU Response payloads are encoded as follows :
|
APDU Response payloads are encoded as follows :
|
||||||
|
|
||||||
@@ -283,11 +283,11 @@ APDU Response payloads are encoded as follows :
|
|||||||
| APDU response data and Status Word | var
|
| APDU response data and Status Word | var
|
||||||
|==============================================================================================================================
|
|==============================================================================================================================
|
||||||
|
|
||||||
=== USB mapping
|
### USB mapping
|
||||||
|
|
||||||
Messages are exchanged with the dongle over HID endpoints over interrupt transfers, with each chunk being 64 bytes long. The HID Report ID is ignored.
|
Messages are exchanged with the dongle over HID endpoints over interrupt transfers, with each chunk being 64 bytes long. The HID Report ID is ignored.
|
||||||
|
|
||||||
=== BLE mapping
|
### BLE mapping
|
||||||
|
|
||||||
A similar encoding is used over BLE, without the Communication channel ID.
|
A similar encoding is used over BLE, without the Communication channel ID.
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ When using this service, the client sends requests to the characteristic D973F2E
|
|||||||
|
|
||||||
Requests are encoded using the standard BLE 20 bytes MTU size
|
Requests are encoded using the standard BLE 20 bytes MTU size
|
||||||
|
|
||||||
== Status Words
|
## Status Words
|
||||||
|
|
||||||
The following standard Status Words are returned for all APDUs - some specific Status Words can be used for specific commands and are mentioned in the command description.
|
The following standard Status Words are returned for all APDUs - some specific Status Words can be used for specific commands and are mentioned in the command description.
|
||||||
|
|
||||||
@@ -312,4 +312,4 @@ The following standard Status Words are returned for all APDUs - some specific S
|
|||||||
| 6B00 | Incorrect parameter P1 or P2
|
| 6B00 | Incorrect parameter P1 or P2
|
||||||
| 6Fxx | Technical problem (Internal error, please report)
|
| 6Fxx | Technical problem (Internal error, please report)
|
||||||
| 9000 | Normal ending of the command
|
| 9000 | Normal ending of the command
|
||||||
|================================================================================================
|
|===============================================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user