From ee3ca5c5d7e5539b7f1318d11f20fba3d9c731da Mon Sep 17 00:00:00 2001 From: BTChip github Date: Sat, 19 Aug 2017 11:00:49 +0200 Subject: [PATCH] Add SIGN ETH PERSONAL MESSAGE specification --- doc/ethapp.asc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/doc/ethapp.asc b/doc/ethapp.asc index 6eae7f4..1225bdf 100644 --- a/doc/ethapp.asc +++ b/doc/ethapp.asc @@ -1,7 +1,7 @@ Ethereum application : Common Technical Specifications ======================================================= Ledger Firmware Team -Application version 1.1 - 11th of October 2016 +Application version 1.2 - 19th of August 2017 == 1.0 - Initial release @@ -10,6 +10,9 @@ Application version 1.1 - 11th of October 2016 - Add GET APP CONFIGURATION - Add an option to return the chain code in GET ETH PUBLIC ADDRESS +== 1.2 + - Add SIGN ETH PERSONAL MESSAGE + == About This application describes the APDU messages interface to communicate with the Ethereum application. @@ -128,6 +131,61 @@ The input data is the RLP encoded transaction (as per https://github.com/ethereu | s | 32 |====================================================================================================== +=== 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 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 + +==== Coding + +'Command' + +[width="80%"] +|============================================================================================================================== +| *CLA* | *INS* | *P1* | *P2* | *Lc* | *Le* +| E0 | 08 | 00 : first message data block + + 80 : subsequent message data block + | 00 | variable | variable +|============================================================================================================================== + +'Input data (first message data block)' + +[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 +| Message chunk | variable +|============================================================================================================================== + +'Input data (other transaction data block)' + +[width="80%"] +|============================================================================================================================== +| *Description* | *Length* +| Message chunk | variable +|============================================================================================================================== + + +'Output data' + +[width="80%"] +|============================================================================================================================== +| *Description* | *Length* +| v | 1 +| r | 32 +| s | 32 +|====================================================================================================== + + === GET APP CONFIGURATION ==== Description