1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-31 18:40:56 +00:00

fixup! feat(common): Add messages for entropy check workflow.

This commit is contained in:
matejcik 2024-12-20 16:39:49 +01:00 committed by Andrew Kozlik
parent 0ca958c6f1
commit 72d99c3b2b
10 changed files with 187 additions and 128 deletions

View File

@ -452,24 +452,27 @@ message EntropyRequest {
/** /**
* Request: Provide additional entropy for seed generation function * Request: Provide additional entropy for seed generation function
* @next Success * @next Success
* @next EntropyCheckReady
*/ */
message EntropyAck { message EntropyAck {
required bytes entropy = 1; // 256 bits (32 bytes) of the host's random data required bytes entropy = 1; // 256 bits (32 bytes) of the host's random data
} }
/** /**
* Request: Ask Trezor to reveal its internal entropy. * Response: Trezor is ready for the next phase of the entropy check protocol.
* @next EntropyAck * @next EntropyCheckContinue
* @next GetPublicKey
*/ */
message ResetDeviceContinue { message EntropyCheckReady {
} }
/** /**
* Request: Last step in the entropy check protocol. Stores the generated seed. * Request: Proceed with the next phase of the entropy check protocol.
* @start
* @next Success * @next Success
* @next EntropyRequest
*/ */
message ResetDeviceFinish { message EntropyCheckContinue {
optional bool finish = 1 [default=false]; // finish the entropy check protocol, store the seed
} }
/** /**

View File

@ -45,8 +45,8 @@ enum MessageType {
MessageType_BackupDevice = 34 [(bitcoin_only) = true, (wire_in) = true]; MessageType_BackupDevice = 34 [(bitcoin_only) = true, (wire_in) = true];
MessageType_EntropyRequest = 35 [(bitcoin_only) = true, (wire_out) = true]; MessageType_EntropyRequest = 35 [(bitcoin_only) = true, (wire_out) = true];
MessageType_EntropyAck = 36 [(bitcoin_only) = true, (wire_in) = true]; MessageType_EntropyAck = 36 [(bitcoin_only) = true, (wire_in) = true];
MessageType_ResetDeviceContinue = 994 [(bitcoin_only) = true, (wire_in) = true]; MessageType_EntropyCheckReady = 994 [(bitcoin_only) = true, (wire_out) = true];
MessageType_ResetDeviceFinish = 995 [(bitcoin_only) = true, (wire_in) = true]; MessageType_EntropyCheckContinue = 995 [(bitcoin_only) = true, (wire_in) = true];
MessageType_PassphraseRequest = 41 [(bitcoin_only) = true, (wire_out) = true]; MessageType_PassphraseRequest = 41 [(bitcoin_only) = true, (wire_out) = true];
MessageType_PassphraseAck = 42 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; MessageType_PassphraseAck = 42 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true];
MessageType_RecoveryDevice = 45 [(bitcoin_only) = true, (wire_in) = true]; MessageType_RecoveryDevice = 45 [(bitcoin_only) = true, (wire_in) = true];

View File

@ -29,8 +29,8 @@ Nonce = 33
BackupDevice = 34 BackupDevice = 34
EntropyRequest = 35 EntropyRequest = 35
EntropyAck = 36 EntropyAck = 36
ResetDeviceContinue = 994 EntropyCheckReady = 994
ResetDeviceFinish = 995 EntropyCheckContinue = 995
PassphraseRequest = 41 PassphraseRequest = 41
PassphraseAck = 42 PassphraseAck = 42
RecoveryDevice = 45 RecoveryDevice = 45

View File

@ -373,8 +373,8 @@ if TYPE_CHECKING:
BackupDevice = 34 BackupDevice = 34
EntropyRequest = 35 EntropyRequest = 35
EntropyAck = 36 EntropyAck = 36
ResetDeviceContinue = 994 EntropyCheckReady = 994
ResetDeviceFinish = 995 EntropyCheckContinue = 995
PassphraseRequest = 41 PassphraseRequest = 41
PassphraseAck = 42 PassphraseAck = 42
RecoveryDevice = 45 RecoveryDevice = 45

View File

@ -2602,16 +2602,24 @@ if TYPE_CHECKING:
def is_type_of(cls, msg: Any) -> TypeGuard["EntropyAck"]: def is_type_of(cls, msg: Any) -> TypeGuard["EntropyAck"]:
return isinstance(msg, cls) return isinstance(msg, cls)
class ResetDeviceContinue(protobuf.MessageType): class EntropyCheckReady(protobuf.MessageType):
@classmethod @classmethod
def is_type_of(cls, msg: Any) -> TypeGuard["ResetDeviceContinue"]: def is_type_of(cls, msg: Any) -> TypeGuard["EntropyCheckReady"]:
return isinstance(msg, cls) return isinstance(msg, cls)
class ResetDeviceFinish(protobuf.MessageType): class EntropyCheckContinue(protobuf.MessageType):
finish: "bool"
def __init__(
self,
*,
finish: "bool | None" = None,
) -> None:
pass
@classmethod @classmethod
def is_type_of(cls, msg: Any) -> TypeGuard["ResetDeviceFinish"]: def is_type_of(cls, msg: Any) -> TypeGuard["EntropyCheckContinue"]:
return isinstance(msg, cls) return isinstance(msg, cls)
class RecoveryDevice(protobuf.MessageType): class RecoveryDevice(protobuf.MessageType):

View File

@ -11,7 +11,7 @@ SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdPro
UnlockBootloader AuthenticateDevice AuthenticityProof \ UnlockBootloader AuthenticateDevice AuthenticityProof \
Solana StellarClaimClaimableBalanceOp \ Solana StellarClaimClaimableBalanceOp \
ChangeLanguage TranslationDataRequest TranslationDataAck \ ChangeLanguage TranslationDataRequest TranslationDataAck \
SetBrightness DebugLinkOptigaSetSecMax ResetDeviceContinue GResetDeviceFinish \ SetBrightness DebugLinkOptigaSetSecMax EntropyCheckReady EntropyCheckContinue \
BenchmarkListNames BenchmarkRun BenchmarkNames BenchmarkResult BenchmarkListNames BenchmarkRun BenchmarkNames BenchmarkResult
ifeq ($(BITCOIN_ONLY), 1) ifeq ($(BITCOIN_ONLY), 1)

View File

@ -426,8 +426,8 @@ class MessageType(IntEnum):
BackupDevice = 34 BackupDevice = 34
EntropyRequest = 35 EntropyRequest = 35
EntropyAck = 36 EntropyAck = 36
ResetDeviceContinue = 994 EntropyCheckReady = 994
ResetDeviceFinish = 995 EntropyCheckContinue = 995
PassphraseRequest = 41 PassphraseRequest = 41
PassphraseAck = 42 PassphraseAck = 42
RecoveryDevice = 45 RecoveryDevice = 45
@ -3814,12 +3814,22 @@ class EntropyAck(protobuf.MessageType):
self.entropy = entropy self.entropy = entropy
class ResetDeviceContinue(protobuf.MessageType): class EntropyCheckReady(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 994 MESSAGE_WIRE_TYPE = 994
class ResetDeviceFinish(protobuf.MessageType): class EntropyCheckContinue(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 995 MESSAGE_WIRE_TYPE = 995
FIELDS = {
1: protobuf.Field("finish", "bool", repeated=False, required=False, default=False),
}
def __init__(
self,
*,
finish: Optional["bool"] = False,
) -> None:
self.finish = finish
class RecoveryDevice(protobuf.MessageType): class RecoveryDevice(protobuf.MessageType):

View File

@ -24,8 +24,8 @@ trezor_message_impl! {
BackupDevice => MessageType_BackupDevice, BackupDevice => MessageType_BackupDevice,
EntropyRequest => MessageType_EntropyRequest, EntropyRequest => MessageType_EntropyRequest,
EntropyAck => MessageType_EntropyAck, EntropyAck => MessageType_EntropyAck,
ResetDeviceContinue => MessageType_ResetDeviceContinue, EntropyCheckReady => MessageType_EntropyCheckReady,
ResetDeviceFinish => MessageType_ResetDeviceFinish, EntropyCheckContinue => MessageType_EntropyCheckContinue,
PassphraseRequest => MessageType_PassphraseRequest, PassphraseRequest => MessageType_PassphraseRequest,
PassphraseAck => MessageType_PassphraseAck, PassphraseAck => MessageType_PassphraseAck,
RecoveryDevice => MessageType_RecoveryDevice, RecoveryDevice => MessageType_RecoveryDevice,

View File

@ -78,10 +78,10 @@ pub enum MessageType {
MessageType_EntropyRequest = 35, MessageType_EntropyRequest = 35,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EntropyAck) // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EntropyAck)
MessageType_EntropyAck = 36, MessageType_EntropyAck = 36,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ResetDeviceContinue) // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EntropyCheckReady)
MessageType_ResetDeviceContinue = 994, MessageType_EntropyCheckReady = 994,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ResetDeviceFinish) // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EntropyCheckContinue)
MessageType_ResetDeviceFinish = 995, MessageType_EntropyCheckContinue = 995,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_PassphraseRequest) // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_PassphraseRequest)
MessageType_PassphraseRequest = 41, MessageType_PassphraseRequest = 41,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_PassphraseAck) // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_PassphraseAck)
@ -558,8 +558,8 @@ impl ::protobuf::Enum for MessageType {
34 => ::std::option::Option::Some(MessageType::MessageType_BackupDevice), 34 => ::std::option::Option::Some(MessageType::MessageType_BackupDevice),
35 => ::std::option::Option::Some(MessageType::MessageType_EntropyRequest), 35 => ::std::option::Option::Some(MessageType::MessageType_EntropyRequest),
36 => ::std::option::Option::Some(MessageType::MessageType_EntropyAck), 36 => ::std::option::Option::Some(MessageType::MessageType_EntropyAck),
994 => ::std::option::Option::Some(MessageType::MessageType_ResetDeviceContinue), 994 => ::std::option::Option::Some(MessageType::MessageType_EntropyCheckReady),
995 => ::std::option::Option::Some(MessageType::MessageType_ResetDeviceFinish), 995 => ::std::option::Option::Some(MessageType::MessageType_EntropyCheckContinue),
41 => ::std::option::Option::Some(MessageType::MessageType_PassphraseRequest), 41 => ::std::option::Option::Some(MessageType::MessageType_PassphraseRequest),
42 => ::std::option::Option::Some(MessageType::MessageType_PassphraseAck), 42 => ::std::option::Option::Some(MessageType::MessageType_PassphraseAck),
45 => ::std::option::Option::Some(MessageType::MessageType_RecoveryDevice), 45 => ::std::option::Option::Some(MessageType::MessageType_RecoveryDevice),
@ -811,8 +811,8 @@ impl ::protobuf::Enum for MessageType {
"MessageType_BackupDevice" => ::std::option::Option::Some(MessageType::MessageType_BackupDevice), "MessageType_BackupDevice" => ::std::option::Option::Some(MessageType::MessageType_BackupDevice),
"MessageType_EntropyRequest" => ::std::option::Option::Some(MessageType::MessageType_EntropyRequest), "MessageType_EntropyRequest" => ::std::option::Option::Some(MessageType::MessageType_EntropyRequest),
"MessageType_EntropyAck" => ::std::option::Option::Some(MessageType::MessageType_EntropyAck), "MessageType_EntropyAck" => ::std::option::Option::Some(MessageType::MessageType_EntropyAck),
"MessageType_ResetDeviceContinue" => ::std::option::Option::Some(MessageType::MessageType_ResetDeviceContinue), "MessageType_EntropyCheckReady" => ::std::option::Option::Some(MessageType::MessageType_EntropyCheckReady),
"MessageType_ResetDeviceFinish" => ::std::option::Option::Some(MessageType::MessageType_ResetDeviceFinish), "MessageType_EntropyCheckContinue" => ::std::option::Option::Some(MessageType::MessageType_EntropyCheckContinue),
"MessageType_PassphraseRequest" => ::std::option::Option::Some(MessageType::MessageType_PassphraseRequest), "MessageType_PassphraseRequest" => ::std::option::Option::Some(MessageType::MessageType_PassphraseRequest),
"MessageType_PassphraseAck" => ::std::option::Option::Some(MessageType::MessageType_PassphraseAck), "MessageType_PassphraseAck" => ::std::option::Option::Some(MessageType::MessageType_PassphraseAck),
"MessageType_RecoveryDevice" => ::std::option::Option::Some(MessageType::MessageType_RecoveryDevice), "MessageType_RecoveryDevice" => ::std::option::Option::Some(MessageType::MessageType_RecoveryDevice),
@ -1063,8 +1063,8 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_BackupDevice, MessageType::MessageType_BackupDevice,
MessageType::MessageType_EntropyRequest, MessageType::MessageType_EntropyRequest,
MessageType::MessageType_EntropyAck, MessageType::MessageType_EntropyAck,
MessageType::MessageType_ResetDeviceContinue, MessageType::MessageType_EntropyCheckReady,
MessageType::MessageType_ResetDeviceFinish, MessageType::MessageType_EntropyCheckContinue,
MessageType::MessageType_PassphraseRequest, MessageType::MessageType_PassphraseRequest,
MessageType::MessageType_PassphraseAck, MessageType::MessageType_PassphraseAck,
MessageType::MessageType_RecoveryDevice, MessageType::MessageType_RecoveryDevice,
@ -1321,8 +1321,8 @@ impl ::protobuf::EnumFull for MessageType {
MessageType::MessageType_BackupDevice => 22, MessageType::MessageType_BackupDevice => 22,
MessageType::MessageType_EntropyRequest => 23, MessageType::MessageType_EntropyRequest => 23,
MessageType::MessageType_EntropyAck => 24, MessageType::MessageType_EntropyAck => 24,
MessageType::MessageType_ResetDeviceContinue => 25, MessageType::MessageType_EntropyCheckReady => 25,
MessageType::MessageType_ResetDeviceFinish => 26, MessageType::MessageType_EntropyCheckContinue => 26,
MessageType::MessageType_PassphraseRequest => 27, MessageType::MessageType_PassphraseRequest => 27,
MessageType::MessageType_PassphraseAck => 28, MessageType::MessageType_PassphraseAck => 28,
MessageType::MessageType_RecoveryDevice => 29, MessageType::MessageType_RecoveryDevice => 29,
@ -1561,7 +1561,7 @@ impl MessageType {
} }
static file_descriptor_proto_data: &'static [u8] = b"\ static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xe7U\ \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xe8U\
\n\x0bMessageType\x12(\n\x16MessageType_Initialize\x10\0\x1a\x0c\x80\xa6\ \n\x0bMessageType\x12(\n\x16MessageType_Initialize\x10\0\x1a\x0c\x80\xa6\
\x1d\x01\xb0\xb5\x18\x01\x90\xb5\x18\x01\x12\x1e\n\x10MessageType_Ping\ \x1d\x01\xb0\xb5\x18\x01\x90\xb5\x18\x01\x12\x1e\n\x10MessageType_Ping\
\x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\x13MessageType_S\ \x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\x13MessageType_S\
@ -1592,9 +1592,9 @@ static file_descriptor_proto_data: &'static [u8] = b"\
essageType_BackupDevice\x10\"\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\ essageType_BackupDevice\x10\"\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\
\x12(\n\x1aMessageType_EntropyRequest\x10#\x1a\x08\x80\xa6\x1d\x01\x98\ \x12(\n\x1aMessageType_EntropyRequest\x10#\x1a\x08\x80\xa6\x1d\x01\x98\
\xb5\x18\x01\x12$\n\x16MessageType_EntropyAck\x10$\x1a\x08\x80\xa6\x1d\ \xb5\x18\x01\x12$\n\x16MessageType_EntropyAck\x10$\x1a\x08\x80\xa6\x1d\
\x01\x90\xb5\x18\x01\x12.\n\x1fMessageType_ResetDeviceContinue\x10\xe2\ \x01\x90\xb5\x18\x01\x12,\n\x1dMessageType_EntropyCheckReady\x10\xe2\x07\
\x07\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12,\n\x1dMessageType_Reset\ \x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12/\n\x20MessageType_EntropyCh\
DeviceFinish\x10\xe3\x07\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12+\n\ eckContinue\x10\xe3\x07\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12+\n\
\x1dMessageType_PassphraseRequest\x10)\x1a\x08\x80\xa6\x1d\x01\x98\xb5\ \x1dMessageType_PassphraseRequest\x10)\x1a\x08\x80\xa6\x1d\x01\x98\xb5\
\x18\x01\x12/\n\x19MessageType_PassphraseAck\x10*\x1a\x10\xc0\xb5\x18\ \x18\x01\x12/\n\x19MessageType_PassphraseAck\x10*\x1a\x10\xc0\xb5\x18\
\x01\xb0\xb5\x18\x01\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageTy\ \x01\xb0\xb5\x18\x01\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageTy\

View File

@ -8080,38 +8080,38 @@ impl ::protobuf::reflect::ProtobufValue for EntropyAck {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
} }
// @@protoc_insertion_point(message:hw.trezor.messages.management.ResetDeviceContinue) // @@protoc_insertion_point(message:hw.trezor.messages.management.EntropyCheckReady)
#[derive(PartialEq,Clone,Default,Debug)] #[derive(PartialEq,Clone,Default,Debug)]
pub struct ResetDeviceContinue { pub struct EntropyCheckReady {
// special fields // special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.management.ResetDeviceContinue.special_fields) // @@protoc_insertion_point(special_field:hw.trezor.messages.management.EntropyCheckReady.special_fields)
pub special_fields: ::protobuf::SpecialFields, pub special_fields: ::protobuf::SpecialFields,
} }
impl<'a> ::std::default::Default for &'a ResetDeviceContinue { impl<'a> ::std::default::Default for &'a EntropyCheckReady {
fn default() -> &'a ResetDeviceContinue { fn default() -> &'a EntropyCheckReady {
<ResetDeviceContinue as ::protobuf::Message>::default_instance() <EntropyCheckReady as ::protobuf::Message>::default_instance()
} }
} }
impl ResetDeviceContinue { impl EntropyCheckReady {
pub fn new() -> ResetDeviceContinue { pub fn new() -> EntropyCheckReady {
::std::default::Default::default() ::std::default::Default::default()
} }
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0); let mut fields = ::std::vec::Vec::with_capacity(0);
let mut oneofs = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ResetDeviceContinue>( ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EntropyCheckReady>(
"ResetDeviceContinue", "EntropyCheckReady",
fields, fields,
oneofs, oneofs,
) )
} }
} }
impl ::protobuf::Message for ResetDeviceContinue { impl ::protobuf::Message for EntropyCheckReady {
const NAME: &'static str = "ResetDeviceContinue"; const NAME: &'static str = "EntropyCheckReady";
fn is_initialized(&self) -> bool { fn is_initialized(&self) -> bool {
true true
@ -8150,71 +8150,98 @@ impl ::protobuf::Message for ResetDeviceContinue {
&mut self.special_fields &mut self.special_fields
} }
fn new() -> ResetDeviceContinue { fn new() -> EntropyCheckReady {
ResetDeviceContinue::new() EntropyCheckReady::new()
} }
fn clear(&mut self) { fn clear(&mut self) {
self.special_fields.clear(); self.special_fields.clear();
} }
fn default_instance() -> &'static ResetDeviceContinue { fn default_instance() -> &'static EntropyCheckReady {
static instance: ResetDeviceContinue = ResetDeviceContinue { static instance: EntropyCheckReady = EntropyCheckReady {
special_fields: ::protobuf::SpecialFields::new(), special_fields: ::protobuf::SpecialFields::new(),
}; };
&instance &instance
} }
} }
impl ::protobuf::MessageFull for ResetDeviceContinue { impl ::protobuf::MessageFull for EntropyCheckReady {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor { fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("ResetDeviceContinue").unwrap()).clone() descriptor.get(|| file_descriptor().message_by_package_relative_name("EntropyCheckReady").unwrap()).clone()
} }
} }
impl ::std::fmt::Display for ResetDeviceContinue { impl ::std::fmt::Display for EntropyCheckReady {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f) ::protobuf::text_format::fmt(self, f)
} }
} }
impl ::protobuf::reflect::ProtobufValue for ResetDeviceContinue { impl ::protobuf::reflect::ProtobufValue for EntropyCheckReady {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
} }
// @@protoc_insertion_point(message:hw.trezor.messages.management.ResetDeviceFinish) // @@protoc_insertion_point(message:hw.trezor.messages.management.EntropyCheckContinue)
#[derive(PartialEq,Clone,Default,Debug)] #[derive(PartialEq,Clone,Default,Debug)]
pub struct ResetDeviceFinish { pub struct EntropyCheckContinue {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.management.EntropyCheckContinue.finish)
pub finish: ::std::option::Option<bool>,
// special fields // special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.management.ResetDeviceFinish.special_fields) // @@protoc_insertion_point(special_field:hw.trezor.messages.management.EntropyCheckContinue.special_fields)
pub special_fields: ::protobuf::SpecialFields, pub special_fields: ::protobuf::SpecialFields,
} }
impl<'a> ::std::default::Default for &'a ResetDeviceFinish { impl<'a> ::std::default::Default for &'a EntropyCheckContinue {
fn default() -> &'a ResetDeviceFinish { fn default() -> &'a EntropyCheckContinue {
<ResetDeviceFinish as ::protobuf::Message>::default_instance() <EntropyCheckContinue as ::protobuf::Message>::default_instance()
} }
} }
impl ResetDeviceFinish { impl EntropyCheckContinue {
pub fn new() -> ResetDeviceFinish { pub fn new() -> EntropyCheckContinue {
::std::default::Default::default() ::std::default::Default::default()
} }
// optional bool finish = 1;
pub fn finish(&self) -> bool {
self.finish.unwrap_or(false)
}
pub fn clear_finish(&mut self) {
self.finish = ::std::option::Option::None;
}
pub fn has_finish(&self) -> bool {
self.finish.is_some()
}
// Param is passed by value, moved
pub fn set_finish(&mut self, v: bool) {
self.finish = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0); let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ResetDeviceFinish>( fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"ResetDeviceFinish", "finish",
|m: &EntropyCheckContinue| { &m.finish },
|m: &mut EntropyCheckContinue| { &mut m.finish },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EntropyCheckContinue>(
"EntropyCheckContinue",
fields, fields,
oneofs, oneofs,
) )
} }
} }
impl ::protobuf::Message for ResetDeviceFinish { impl ::protobuf::Message for EntropyCheckContinue {
const NAME: &'static str = "ResetDeviceFinish"; const NAME: &'static str = "EntropyCheckContinue";
fn is_initialized(&self) -> bool { fn is_initialized(&self) -> bool {
true true
@ -8223,6 +8250,9 @@ impl ::protobuf::Message for ResetDeviceFinish {
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? { while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag { match tag {
8 => {
self.finish = ::std::option::Option::Some(is.read_bool()?);
},
tag => { tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
}, },
@ -8235,12 +8265,18 @@ impl ::protobuf::Message for ResetDeviceFinish {
#[allow(unused_variables)] #[allow(unused_variables)]
fn compute_size(&self) -> u64 { fn compute_size(&self) -> u64 {
let mut my_size = 0; let mut my_size = 0;
if let Some(v) = self.finish {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32); self.special_fields.cached_size().set(my_size as u32);
my_size my_size
} }
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.finish {
os.write_bool(1, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?; os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(()) ::std::result::Result::Ok(())
} }
@ -8253,36 +8289,38 @@ impl ::protobuf::Message for ResetDeviceFinish {
&mut self.special_fields &mut self.special_fields
} }
fn new() -> ResetDeviceFinish { fn new() -> EntropyCheckContinue {
ResetDeviceFinish::new() EntropyCheckContinue::new()
} }
fn clear(&mut self) { fn clear(&mut self) {
self.finish = ::std::option::Option::None;
self.special_fields.clear(); self.special_fields.clear();
} }
fn default_instance() -> &'static ResetDeviceFinish { fn default_instance() -> &'static EntropyCheckContinue {
static instance: ResetDeviceFinish = ResetDeviceFinish { static instance: EntropyCheckContinue = EntropyCheckContinue {
finish: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(), special_fields: ::protobuf::SpecialFields::new(),
}; };
&instance &instance
} }
} }
impl ::protobuf::MessageFull for ResetDeviceFinish { impl ::protobuf::MessageFull for EntropyCheckContinue {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor { fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("ResetDeviceFinish").unwrap()).clone() descriptor.get(|| file_descriptor().message_by_package_relative_name("EntropyCheckContinue").unwrap()).clone()
} }
} }
impl ::std::fmt::Display for ResetDeviceFinish { impl ::std::fmt::Display for EntropyCheckContinue {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f) ::protobuf::text_format::fmt(self, f)
} }
} }
impl ::protobuf::reflect::ProtobufValue for ResetDeviceFinish { impl ::protobuf::reflect::ProtobufValue for EntropyCheckContinue {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>; type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
} }
@ -11654,52 +11692,52 @@ static file_descriptor_proto_data: &'static [u8] = b"\
member_count\x18\x02\x20\x02(\rR\x0bmemberCount\"b\n\x0eEntropyRequest\ member_count\x18\x02\x20\x02(\rR\x0bmemberCount\"b\n\x0eEntropyRequest\
\x12-\n\x12entropy_commitment\x18\x01\x20\x01(\x0cR\x11entropyCommitment\ \x12-\n\x12entropy_commitment\x18\x01\x20\x01(\x0cR\x11entropyCommitment\
\x12!\n\x0cprev_entropy\x18\x02\x20\x01(\x0cR\x0bprevEntropy\"&\n\nEntro\ \x12!\n\x0cprev_entropy\x18\x02\x20\x01(\x0cR\x0bprevEntropy\"&\n\nEntro\
pyAck\x12\x18\n\x07entropy\x18\x01\x20\x02(\x0cR\x07entropy\"\x15\n\x13R\ pyAck\x12\x18\n\x07entropy\x18\x01\x20\x02(\x0cR\x07entropy\"\x13\n\x11E\
esetDeviceContinue\"\x13\n\x11ResetDeviceFinish\"\x8d\x04\n\x0eRecoveryD\ ntropyCheckReady\"5\n\x14EntropyCheckContinue\x12\x1d\n\x06finish\x18\
evice\x12\x1d\n\nword_count\x18\x01\x20\x01(\rR\twordCount\x123\n\x15pas\ \x01\x20\x01(\x08:\x05falseR\x06finish\"\x8d\x04\n\x0eRecoveryDevice\x12\
sphrase_protection\x18\x02\x20\x01(\x08R\x14passphraseProtection\x12%\n\ \x1d\n\nword_count\x18\x01\x20\x01(\rR\twordCount\x123\n\x15passphrase_p\
\x0epin_protection\x18\x03\x20\x01(\x08R\rpinProtection\x12\x1e\n\x08lan\ rotection\x18\x02\x20\x01(\x08R\x14passphraseProtection\x12%\n\x0epin_pr\
guage\x18\x04\x20\x01(\tR\x08languageB\x02\x18\x01\x12\x14\n\x05label\ otection\x18\x03\x20\x01(\x08R\rpinProtection\x12\x1e\n\x08language\x18\
\x18\x05\x20\x01(\tR\x05label\x12)\n\x10enforce_wordlist\x18\x06\x20\x01\ \x04\x20\x01(\tR\x08languageB\x02\x18\x01\x12\x14\n\x05label\x18\x05\x20\
(\x08R\x0fenforceWordlist\x12j\n\x0cinput_method\x18\x08\x20\x01(\x0e2G.\ \x01(\tR\x05label\x12)\n\x10enforce_wordlist\x18\x06\x20\x01(\x08R\x0fen\
hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceInputMethodR\ forceWordlist\x12j\n\x0cinput_method\x18\x08\x20\x01(\x0e2G.hw.trezor.me\
\x0binputMethod\x12\x1f\n\x0bu2f_counter\x18\t\x20\x01(\rR\nu2fCounter\ ssages.management.RecoveryDevice.RecoveryDeviceInputMethodR\x0binputMeth\
\x12O\n\x04type\x18\n\x20\x01(\x0e2+.hw.trezor.messages.management.Recov\ od\x12\x1f\n\x0bu2f_counter\x18\t\x20\x01(\rR\nu2fCounter\x12O\n\x04type\
eryType:\x0eNormalRecoveryR\x04type\";\n\x19RecoveryDeviceInputMethod\ \x18\n\x20\x01(\x0e2+.hw.trezor.messages.management.RecoveryType:\x0eNor\
\x12\x12\n\x0eScrambledWords\x10\0\x12\n\n\x06Matrix\x10\x01J\x04\x08\ malRecoveryR\x04type\";\n\x19RecoveryDeviceInputMethod\x12\x12\n\x0eScra\
\x07\x10\x08\"\xc5\x01\n\x0bWordRequest\x12N\n\x04type\x18\x01\x20\x02(\ mbledWords\x10\0\x12\n\n\x06Matrix\x10\x01J\x04\x08\x07\x10\x08\"\xc5\
\x0e2:.hw.trezor.messages.management.WordRequest.WordRequestTypeR\x04typ\ \x01\n\x0bWordRequest\x12N\n\x04type\x18\x01\x20\x02(\x0e2:.hw.trezor.me\
e\"f\n\x0fWordRequestType\x12\x19\n\x15WordRequestType_Plain\x10\0\x12\ ssages.management.WordRequest.WordRequestTypeR\x04type\"f\n\x0fWordReque\
\x1b\n\x17WordRequestType_Matrix9\x10\x01\x12\x1b\n\x17WordRequestType_M\ stType\x12\x19\n\x15WordRequestType_Plain\x10\0\x12\x1b\n\x17WordRequest\
atrix6\x10\x02\"\x1d\n\x07WordAck\x12\x12\n\x04word\x18\x01\x20\x02(\tR\ Type_Matrix9\x10\x01\x12\x1b\n\x17WordRequestType_Matrix6\x10\x02\"\x1d\
\x04word\"0\n\rSetU2FCounter\x12\x1f\n\x0bu2f_counter\x18\x01\x20\x02(\r\ \n\x07WordAck\x12\x12\n\x04word\x18\x01\x20\x02(\tR\x04word\"0\n\rSetU2F\
R\nu2fCounter\"\x13\n\x11GetNextU2FCounter\"1\n\x0eNextU2FCounter\x12\ Counter\x12\x1f\n\x0bu2f_counter\x18\x01\x20\x02(\rR\nu2fCounter\"\x13\n\
\x1f\n\x0bu2f_counter\x18\x01\x20\x02(\rR\nu2fCounter\"\x11\n\x0fDoPreau\ \x11GetNextU2FCounter\"1\n\x0eNextU2FCounter\x12\x1f\n\x0bu2f_counter\
thorized\"\x16\n\x14PreauthorizedRequest\"\x15\n\x13CancelAuthorization\ \x18\x01\x20\x02(\rR\nu2fCounter\"\x11\n\x0fDoPreauthorized\"\x16\n\x14P\
\"\x9a\x02\n\x12RebootToBootloader\x12o\n\x0cboot_command\x18\x01\x20\ reauthorizedRequest\"\x15\n\x13CancelAuthorization\"\x9a\x02\n\x12Reboot\
\x01(\x0e2=.hw.trezor.messages.management.RebootToBootloader.BootCommand\ ToBootloader\x12o\n\x0cboot_command\x18\x01\x20\x01(\x0e2=.hw.trezor.mes\
:\rSTOP_AND_WAITR\x0bbootCommand\x12'\n\x0ffirmware_header\x18\x02\x20\ sages.management.RebootToBootloader.BootCommand:\rSTOP_AND_WAITR\x0bboot\
\x01(\x0cR\x0efirmwareHeader\x123\n\x14language_data_length\x18\x03\x20\ Command\x12'\n\x0ffirmware_header\x18\x02\x20\x01(\x0cR\x0efirmwareHeade\
\x01(\r:\x010R\x12languageDataLength\"5\n\x0bBootCommand\x12\x11\n\rSTOP\ r\x123\n\x14language_data_length\x18\x03\x20\x01(\r:\x010R\x12languageDa\
_AND_WAIT\x10\0\x12\x13\n\x0fINSTALL_UPGRADE\x10\x01\"\x10\n\x08GetNonce\ taLength\"5\n\x0bBootCommand\x12\x11\n\rSTOP_AND_WAIT\x10\0\x12\x13\n\
:\x04\x88\xb2\x19\x01\"#\n\x05Nonce\x12\x14\n\x05nonce\x18\x01\x20\x02(\ \x0fINSTALL_UPGRADE\x10\x01\"\x10\n\x08GetNonce:\x04\x88\xb2\x19\x01\"#\
\x0cR\x05nonce:\x04\x88\xb2\x19\x01\";\n\nUnlockPath\x12\x1b\n\taddress_\ \n\x05Nonce\x12\x14\n\x05nonce\x18\x01\x20\x02(\x0cR\x05nonce:\x04\x88\
n\x18\x01\x20\x03(\rR\x08addressN\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\ \xb2\x19\x01\";\n\nUnlockPath\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\
\x03mac\"'\n\x13UnlockedPathRequest\x12\x10\n\x03mac\x18\x01\x20\x01(\ \x08addressN\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\x03mac\"'\n\x13Unloc\
\x0cR\x03mac\"\x14\n\x12ShowDeviceTutorial\"\x12\n\x10UnlockBootloader\"\ kedPathRequest\x12\x10\n\x03mac\x18\x01\x20\x01(\x0cR\x03mac\"\x14\n\x12\
%\n\rSetBrightness\x12\x14\n\x05value\x18\x01\x20\x01(\rR\x05value*\x99\ ShowDeviceTutorial\"\x12\n\x10UnlockBootloader\"%\n\rSetBrightness\x12\
\x01\n\nBackupType\x12\t\n\x05Bip39\x10\0\x12\x10\n\x0cSlip39_Basic\x10\ \x14\n\x05value\x18\x01\x20\x01(\rR\x05value*\x99\x01\n\nBackupType\x12\
\x01\x12\x13\n\x0fSlip39_Advanced\x10\x02\x12\x1c\n\x18Slip39_Single_Ext\ \t\n\x05Bip39\x10\0\x12\x10\n\x0cSlip39_Basic\x10\x01\x12\x13\n\x0fSlip3\
endable\x10\x03\x12\x1b\n\x17Slip39_Basic_Extendable\x10\x04\x12\x1e\n\ 9_Advanced\x10\x02\x12\x1c\n\x18Slip39_Single_Extendable\x10\x03\x12\x1b\
\x1aSlip39_Advanced_Extendable\x10\x05*G\n\x10SafetyCheckLevel\x12\n\n\ \n\x17Slip39_Basic_Extendable\x10\x04\x12\x1e\n\x1aSlip39_Advanced_Exten\
\x06Strict\x10\0\x12\x10\n\x0cPromptAlways\x10\x01\x12\x15\n\x11PromptTe\ dable\x10\x05*G\n\x10SafetyCheckLevel\x12\n\n\x06Strict\x10\0\x12\x10\n\
mporarily\x10\x02*=\n\x0fDisplayRotation\x12\t\n\x05North\x10\0\x12\x08\ \x0cPromptAlways\x10\x01\x12\x15\n\x11PromptTemporarily\x10\x02*=\n\x0fD\
\n\x04East\x10Z\x12\n\n\x05South\x10\xb4\x01\x12\t\n\x04West\x10\x8e\x02\ isplayRotation\x12\t\n\x05North\x10\0\x12\x08\n\x04East\x10Z\x12\n\n\x05\
*0\n\x10HomescreenFormat\x12\x08\n\x04Toif\x10\x01\x12\x08\n\x04Jpeg\x10\ South\x10\xb4\x01\x12\t\n\x04West\x10\x8e\x02*0\n\x10HomescreenFormat\
\x02\x12\x08\n\x04ToiG\x10\x03*H\n\x0cRecoveryType\x12\x12\n\x0eNormalRe\ \x12\x08\n\x04Toif\x10\x01\x12\x08\n\x04Jpeg\x10\x02\x12\x08\n\x04ToiG\
covery\x10\0\x12\n\n\x06DryRun\x10\x01\x12\x18\n\x14UnlockRepeatedBackup\ \x10\x03*H\n\x0cRecoveryType\x12\x12\n\x0eNormalRecovery\x10\0\x12\n\n\
\x10\x02BB\n#com.satoshilabs.trezor.lib.protobufB\x17TrezorMessageManage\ \x06DryRun\x10\x01\x12\x18\n\x14UnlockRepeatedBackup\x10\x02BB\n#com.sat\
ment\x80\xa6\x1d\x01\ oshilabs.trezor.lib.protobufB\x17TrezorMessageManagement\x80\xa6\x1d\x01\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file
@ -11747,8 +11785,8 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
messages.push(BackupDevice::generated_message_descriptor_data()); messages.push(BackupDevice::generated_message_descriptor_data());
messages.push(EntropyRequest::generated_message_descriptor_data()); messages.push(EntropyRequest::generated_message_descriptor_data());
messages.push(EntropyAck::generated_message_descriptor_data()); messages.push(EntropyAck::generated_message_descriptor_data());
messages.push(ResetDeviceContinue::generated_message_descriptor_data()); messages.push(EntropyCheckReady::generated_message_descriptor_data());
messages.push(ResetDeviceFinish::generated_message_descriptor_data()); messages.push(EntropyCheckContinue::generated_message_descriptor_data());
messages.push(RecoveryDevice::generated_message_descriptor_data()); messages.push(RecoveryDevice::generated_message_descriptor_data());
messages.push(WordRequest::generated_message_descriptor_data()); messages.push(WordRequest::generated_message_descriptor_data());
messages.push(WordAck::generated_message_descriptor_data()); messages.push(WordAck::generated_message_descriptor_data());