1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 19:38:09 +00:00

Merge pull request #12 from romanz/master

Add support for ECDH session key generation (according to SLIP-0017)
This commit is contained in:
Pavol Rusnak 2016-06-11 20:34:39 +02:00 committed by GitHub
commit e6295a33cd

View File

@ -69,6 +69,8 @@ enum MessageType {
MessageType_EthereumSignTx = 58 [(wire_in) = true]; MessageType_EthereumSignTx = 58 [(wire_in) = true];
MessageType_EthereumTxRequest = 59 [(wire_out) = true]; MessageType_EthereumTxRequest = 59 [(wire_out) = true];
MessageType_EthereumTxAck = 60 [(wire_in) = true]; MessageType_EthereumTxAck = 60 [(wire_in) = true];
MessageType_GetECDHSessionKey = 61 [(wire_in) = true];
MessageType_ECDHSessionKey = 62 [(wire_out) = true];
MessageType_DebugLinkDecision = 100 [(wire_debug_in) = true]; MessageType_DebugLinkDecision = 100 [(wire_debug_in) = true];
MessageType_DebugLinkGetState = 101 [(wire_debug_in) = true]; MessageType_DebugLinkGetState = 101 [(wire_debug_in) = true];
MessageType_DebugLinkState = 102 [(wire_debug_out) = true]; MessageType_DebugLinkState = 102 [(wire_debug_out) = true];
@ -658,6 +660,29 @@ message SignedIdentity {
optional bytes signature = 3; // signature of the identity data optional bytes signature = 3; // signature of the identity data
} }
///////////////////
// ECDH messages //
///////////////////
/**
* Request: Ask device to generate ECDH session key
* @next ECDHSessionKey
* @next Failure
*/
message GetECDHSessionKey {
optional IdentityType identity = 1; // identity
optional bytes peer_public_key = 2; // peer's public key
optional string ecdsa_curve_name = 3; // ECDSA curve name to use
}
/**
* Response: Device provides ECDH session key
* @prev GetECDHSessionKey
*/
message ECDHSessionKey {
optional bytes session_key = 1; // ECDH session key
}
///////////////////////// /////////////////////////
// Bootloader messages // // Bootloader messages //
///////////////////////// /////////////////////////