diff --git a/protob/messages.proto b/protob/messages.proto index 7e1a9c080b..d9bfbcf46d 100644 --- a/protob/messages.proto +++ b/protob/messages.proto @@ -38,7 +38,6 @@ enum MessageType { MessageType_TxRequest = 21 [(wire_out) = true]; MessageType_TxAck = 22 [(wire_in) = true]; MessageType_CipherKeyValue = 23 [(wire_in) = true]; - MessageType_CipheredKeyValue = 48 [(wire_out) = true]; MessageType_ClearSession = 24 [(wire_in) = true]; MessageType_ApplySettings = 25 [(wire_in) = true]; MessageType_ButtonRequest = 26 [(wire_out) = true]; @@ -50,10 +49,6 @@ enum MessageType { MessageType_SignMessage = 38 [(wire_in) = true]; MessageType_VerifyMessage = 39 [(wire_in) = true]; MessageType_MessageSignature = 40 [(wire_out) = true]; - MessageType_EncryptMessage = 49 [(wire_in) = true]; - MessageType_EncryptedMessage = 50 [(wire_out) = true]; - MessageType_DecryptMessage = 51 [(wire_in) = true]; - MessageType_DecryptedMessage = 52 [(wire_out) = true]; MessageType_PassphraseRequest = 41 [(wire_out) = true]; MessageType_PassphraseAck = 42 [(wire_in) = true]; MessageType_EstimateTxSize = 43 [(wire_in) = true]; @@ -61,6 +56,13 @@ enum MessageType { MessageType_RecoveryDevice = 45 [(wire_in) = true]; MessageType_WordRequest = 46 [(wire_out) = true]; MessageType_WordAck = 47 [(wire_in) = true]; + MessageType_CipheredKeyValue = 48 [(wire_out) = true]; + MessageType_EncryptMessage = 49 [(wire_in) = true]; + MessageType_EncryptedMessage = 50 [(wire_out) = true]; + MessageType_DecryptMessage = 51 [(wire_in) = true]; + MessageType_DecryptedMessage = 52 [(wire_out) = true]; + MessageType_SignIdentity = 53 [(wire_in) = true]; + MessageType_SignedIdentity = 54 [(wire_out) = true]; MessageType_DebugLinkDecision = 100 [(wire_debug_in) = true]; MessageType_DebugLinkGetState = 101 [(wire_debug_in) = true]; MessageType_DebugLinkState = 102 [(wire_debug_out) = true]; @@ -544,6 +546,31 @@ message TxAck { optional TransactionType tx = 1; } +/////////////////////// +// Identity messages // +/////////////////////// + +/** + * Request: Ask device to sign identity + * @next SignedIdentity + * @next Failure + */ +message SignIdentity { + optional IdentityType identity = 1; // identity + optional bytes challenge_hidden = 2; // non-visible challenge + optional string challenge_visual = 3; // challenge shown on display (e.g. date+time) +} + +/** + * Response: Device provides signed identity + * @prev SignIdentity + */ +message SignedIdentity { + optional string address = 1; // identity address + optional bytes public_key = 2; // identity public key + optional bytes signature = 3; // signature of the identity data +} + ///////////////////////// // Bootloader messages // ///////////////////////// diff --git a/protob/types.proto b/protob/types.proto index 9561901d95..8410b3ca3b 100644 --- a/protob/types.proto +++ b/protob/types.proto @@ -212,3 +212,16 @@ message TxRequestSerializedType { optional bytes signature = 2; // signature of the signature_index input optional bytes serialized_tx = 3; // part of serialized and signed transaction } + +/** + * Structure representing identity data + * @used_in IdentityType + */ +message IdentityType { + optional string proto = 1; // proto part of URI + optional string user = 2; // user part of URI + optional string host = 3; // host part of URI + optional string port = 4; // port part of URI + optional string path = 5; // path part of URI + optional uint32 index = 6 [default=0]; // identity index +}