mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 09:28:13 +00:00
add EncryptMessage and DecryptMessage
This commit is contained in:
parent
f264f01314
commit
b0d84af06f
@ -48,6 +48,8 @@ enum MessageType {
|
||||
MessageType_SignMessage = 38 [(wire_in) = true];
|
||||
MessageType_VerifyMessage = 39 [(wire_in) = true];
|
||||
MessageType_MessageSignature = 40 [(wire_out) = true];
|
||||
MessageType_EncryptMessage = 48 [(wire_in) = true];
|
||||
MessageType_DecryptMessage = 49 [(wire_in) = true];
|
||||
MessageType_PassphraseRequest = 41 [(wire_out) = true];
|
||||
MessageType_PassphraseAck = 42 [(wire_in) = true];
|
||||
MessageType_EstimateTxSize = 43 [(wire_in) = true];
|
||||
@ -384,15 +386,38 @@ message MessageSignature {
|
||||
// Encryption/decryption //
|
||||
///////////////////////////
|
||||
|
||||
/**
|
||||
* Request: Ask device to encrypt message
|
||||
* @next Success
|
||||
* @next Failure
|
||||
*/
|
||||
message EncryptMessage {
|
||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||
optional bytes pubkey = 2; // public key
|
||||
optional bytes message = 3; // message to encrypt
|
||||
}
|
||||
|
||||
/**
|
||||
* Request: Ask device to decrypt message
|
||||
* @next Success
|
||||
* @next Failure
|
||||
*/
|
||||
message DecryptMessage {
|
||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||
optional bytes pubkey = 2; // public key
|
||||
optional bytes message = 3; // message to decrypt
|
||||
optional bool show_only = 4; // show just on display? (don't send back via wire)
|
||||
}
|
||||
|
||||
/**
|
||||
* Request: Ask device to encrypt or decrypt value of given key
|
||||
* @next Success
|
||||
* @next Failure
|
||||
*/
|
||||
message CipherKeyValue {
|
||||
repeated uint32 address_n = 1;
|
||||
optional string key = 2;
|
||||
optional bytes value = 3;
|
||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||
optional string key = 2; // key component of key:value
|
||||
optional bytes value = 3; // value component of key:value
|
||||
optional bool encrypt = 4; // are we encrypting (True) or decrypting (False)?
|
||||
optional bool ask_on_encrypt = 5; // should we ask on encrypt operation?
|
||||
optional bool ask_on_decrypt = 6; // should we ask on decrypt operation?
|
||||
|
@ -122,7 +122,7 @@ message CoinType {
|
||||
optional uint64 maxfee_kb = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Type of redeem script used in input
|
||||
* @used_in TxInputType
|
||||
*/
|
||||
@ -181,7 +181,8 @@ message TransactionType {
|
||||
optional uint32 outputs_cnt = 7;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structure representing request details
|
||||
* @used_in TxRequest
|
||||
*/
|
||||
message TxRequestDetailsType {
|
||||
@ -189,7 +190,8 @@ message TxRequestDetailsType {
|
||||
optional bytes tx_hash = 2; // tx_hash of requested transaction
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structure representing serialized data
|
||||
* @used_in TxRequest
|
||||
*/
|
||||
message TxRequestSerializedType {
|
||||
|
Loading…
Reference in New Issue
Block a user