mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-12 17:38:13 +00:00
wip
This commit is contained in:
parent
54c64598ff
commit
38afdc9e7b
@ -72,11 +72,13 @@ message ThpHandshakeCompletionReqNoisePayload {
|
|||||||
* Request: Ask device for a new session with given passphrase.
|
* Request: Ask device for a new session with given passphrase.
|
||||||
* @start
|
* @start
|
||||||
* @next ThpNewSession
|
* @next ThpNewSession
|
||||||
|
* @next Success
|
||||||
*/
|
*/
|
||||||
message ThpCreateNewSession{
|
message ThpCreateNewSession{
|
||||||
optional string passphrase = 1;
|
optional string passphrase = 1;
|
||||||
optional bool on_device = 2; // User wants to enter passphrase on the device
|
optional bool on_device = 2; // User wants to enter passphrase on the device
|
||||||
optional bool derive_cardano = 3; // If True, Cardano keys will be derived. Ignored with BTC-only
|
optional bool derive_cardano = 3; // If True, Cardano keys will be derived. Ignored with BTC-only
|
||||||
|
optional uint32 session_id = 4; // Id of the session to modify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -239,26 +239,26 @@ if utils.USE_THP:
|
|||||||
|
|
||||||
# Do not use `ctx` beyond this point, as it is techically
|
# Do not use `ctx` beyond this point, as it is techically
|
||||||
# allowed to change in between await statements
|
# allowed to change in between await statements
|
||||||
|
if message.session_id is None:
|
||||||
|
new_session = create_new_session(channel)
|
||||||
|
try:
|
||||||
|
await unlock_device()
|
||||||
|
await derive_and_store_roots(new_session, message)
|
||||||
|
except DataError as e:
|
||||||
|
return Failure(code=FailureType.DataError, message=e.message)
|
||||||
|
except ActionCancelled as e:
|
||||||
|
return Failure(code=FailureType.ActionCancelled, message=e.message)
|
||||||
|
except NotInitialized as e:
|
||||||
|
return Failure(code=FailureType.NotInitialized, message=e.message)
|
||||||
|
# TODO handle other errors (`Exception` when "Cardano icarus secret is already set!")
|
||||||
|
|
||||||
new_session = create_new_session(channel)
|
new_session.set_session_state(SessionState.ALLOCATED)
|
||||||
try:
|
channel.sessions[new_session.session_id] = new_session
|
||||||
await unlock_device()
|
loop.schedule(new_session.handle())
|
||||||
await derive_and_store_roots(new_session, message)
|
new_session_id: int = new_session.session_id
|
||||||
except DataError as e:
|
else:
|
||||||
return Failure(code=FailureType.DataError, message=e.message)
|
# HMMMMMMMMMMMMMMMMMM
|
||||||
except ActionCancelled as e:
|
pass
|
||||||
return Failure(code=FailureType.ActionCancelled, message=e.message)
|
|
||||||
except NotInitialized as e:
|
|
||||||
return Failure(code=FailureType.NotInitialized, message=e.message)
|
|
||||||
# TODO handle other errors (`Exception`` when "Cardano icarus secret is already set!"
|
|
||||||
# and `RuntimeError` when accessing storage for mnemonic.get_secret - it actually
|
|
||||||
# happens for locked devices)
|
|
||||||
|
|
||||||
new_session.set_session_state(SessionState.ALLOCATED)
|
|
||||||
channel.sessions[new_session.session_id] = new_session
|
|
||||||
loop.schedule(new_session.handle())
|
|
||||||
new_session_id: int = new_session.session_id
|
|
||||||
|
|
||||||
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
|
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
|
||||||
log.debug(
|
log.debug(
|
||||||
__name__,
|
__name__,
|
||||||
|
@ -93,7 +93,9 @@ class SessionThpCache(ThpDataCache):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def clear(self) -> None:
|
def clear(self) -> None:
|
||||||
self.state[:] = bytearray(int.to_bytes(0, 1, "big")) # Set state to UNALLOCATED
|
self.state[:] = bytearray(
|
||||||
|
int.to_bytes(0, _SESSION_STATE_LENGTH, "big")
|
||||||
|
) # Set state to UNALLOCATED
|
||||||
self.session_id[:] = b""
|
self.session_id[:] = b""
|
||||||
super().clear()
|
super().clear()
|
||||||
|
|
||||||
@ -204,7 +206,7 @@ def set_channel_host_ephemeral_key(channel: ChannelCache, key: bytearray) -> Non
|
|||||||
channel.host_ephemeral_pubkey = key
|
channel.host_ephemeral_pubkey = key
|
||||||
|
|
||||||
|
|
||||||
def get_new_session(channel: ChannelCache) -> SessionThpCache:
|
def get_new_session(channel: ChannelCache, management: bool = False) -> SessionThpCache:
|
||||||
new_sid = get_next_session_id(channel)
|
new_sid = get_next_session_id(channel)
|
||||||
index = _get_next_session_index()
|
index = _get_next_session_index()
|
||||||
|
|
||||||
@ -215,9 +217,15 @@ def get_new_session(channel: ChannelCache) -> SessionThpCache:
|
|||||||
channel.last_usage = (
|
channel.last_usage = (
|
||||||
_get_usage_counter_and_increment()
|
_get_usage_counter_and_increment()
|
||||||
) # increment also use of the channel so it does not get replaced
|
) # increment also use of the channel so it does not get replaced
|
||||||
_SESSIONS[index].state[:] = bytearray(
|
|
||||||
_UNALLOCATED_STATE.to_bytes(_SESSION_STATE_LENGTH, "big")
|
if management:
|
||||||
)
|
_SESSIONS[index].state[:] = bytearray(
|
||||||
|
_MANAGEMENT_STATE.to_bytes(_SESSION_STATE_LENGTH, "big")
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
_SESSIONS[index].state[:] = bytearray(
|
||||||
|
_UNALLOCATED_STATE.to_bytes(_SESSION_STATE_LENGTH, "big")
|
||||||
|
)
|
||||||
return _SESSIONS[index]
|
return _SESSIONS[index]
|
||||||
|
|
||||||
|
|
||||||
|
2
core/src/trezor/messages.py
generated
2
core/src/trezor/messages.py
generated
@ -6182,6 +6182,7 @@ if TYPE_CHECKING:
|
|||||||
passphrase: "str | None"
|
passphrase: "str | None"
|
||||||
on_device: "bool | None"
|
on_device: "bool | None"
|
||||||
derive_cardano: "bool | None"
|
derive_cardano: "bool | None"
|
||||||
|
session_id: "int | None"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -6189,6 +6190,7 @@ if TYPE_CHECKING:
|
|||||||
passphrase: "str | None" = None,
|
passphrase: "str | None" = None,
|
||||||
on_device: "bool | None" = None,
|
on_device: "bool | None" = None,
|
||||||
derive_cardano: "bool | None" = None,
|
derive_cardano: "bool | None" = None,
|
||||||
|
session_id: "int | None" = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ from . import (
|
|||||||
from .checksum import CHECKSUM_LENGTH
|
from .checksum import CHECKSUM_LENGTH
|
||||||
from .transmission_loop import TransmissionLoop
|
from .transmission_loop import TransmissionLoop
|
||||||
from .writer import (
|
from .writer import (
|
||||||
|
PACKET_LENGTH,
|
||||||
CONT_HEADER_LENGTH,
|
CONT_HEADER_LENGTH,
|
||||||
INIT_HEADER_LENGTH,
|
INIT_HEADER_LENGTH,
|
||||||
write_payload_to_wire_and_add_checksum,
|
write_payload_to_wire_and_add_checksum,
|
||||||
@ -56,7 +57,7 @@ class Channel:
|
|||||||
self.channel_id: bytes = channel_cache.channel_id
|
self.channel_id: bytes = channel_cache.channel_id
|
||||||
|
|
||||||
# Shared variables
|
# Shared variables
|
||||||
self.buffer: utils.BufferType = bytearray(64)
|
self.buffer: utils.BufferType = bytearray(PACKET_LENGTH)
|
||||||
self.bytes_read: int = 0
|
self.bytes_read: int = 0
|
||||||
self.expected_payload_length: int = 0
|
self.expected_payload_length: int = 0
|
||||||
self.is_cont_packet_expected: bool = False
|
self.is_cont_packet_expected: bool = False
|
||||||
|
@ -357,13 +357,19 @@ async def _handle_state_ENCRYPTED_TRANSPORT(ctx: Channel, message_length: int) -
|
|||||||
s = session_manager.create_new_management_session(ctx)
|
s = session_manager.create_new_management_session(ctx)
|
||||||
else:
|
else:
|
||||||
s = session_manager.get_session_from_cache(ctx, session_id)
|
s = session_manager.get_session_from_cache(ctx, session_id)
|
||||||
|
|
||||||
if s is None:
|
if s is None:
|
||||||
raise ThpUnallocatedSessionError(session_id)
|
assert session_id != MANAGEMENT_SESSION_ID
|
||||||
|
|
||||||
|
# Create management session backed by cache (non-trivial session_id)
|
||||||
|
s = session_manager.create_new_management_session(ctx, session_id)
|
||||||
|
|
||||||
ctx.sessions[session_id] = s
|
ctx.sessions[session_id] = s
|
||||||
loop.schedule(s.handle())
|
loop.schedule(s.handle())
|
||||||
|
|
||||||
elif ctx.sessions[session_id].get_session_state() is SessionState.UNALLOCATED:
|
elif ctx.sessions[session_id].get_session_state() is SessionState.UNALLOCATED:
|
||||||
raise ThpUnallocatedSessionError(session_id)
|
raise ThpUnallocatedSessionError(session_id)
|
||||||
|
# TODO what should happen here? Should I create a new management session?
|
||||||
|
|
||||||
s = ctx.sessions[session_id]
|
s = ctx.sessions[session_id]
|
||||||
update_session_last_used(s.channel_id, (s.session_id).to_bytes(1, "big"))
|
update_session_last_used(s.channel_id, (s.session_id).to_bytes(1, "big"))
|
||||||
|
@ -131,13 +131,21 @@ class GenericSessionContext(Context):
|
|||||||
class ManagementSessionContext(GenericSessionContext):
|
class ManagementSessionContext(GenericSessionContext):
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, channel_ctx: Channel, session_id: int = MANAGEMENT_SESSION_ID
|
self,
|
||||||
|
channel_ctx: Channel,
|
||||||
|
session_id: int = MANAGEMENT_SESSION_ID,
|
||||||
|
session_cache: SessionThpCache | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
self.session_cache = session_cache
|
||||||
super().__init__(channel_ctx, session_id)
|
super().__init__(channel_ctx, session_id)
|
||||||
|
|
||||||
def get_session_state(self) -> SessionState:
|
def get_session_state(self) -> SessionState:
|
||||||
return SessionState.MANAGEMENT
|
return SessionState.MANAGEMENT
|
||||||
|
|
||||||
|
def release(self) -> None:
|
||||||
|
if self.session_cache is not None:
|
||||||
|
cache_thp.clear_session(self.session_cache)
|
||||||
|
|
||||||
|
|
||||||
class SessionContext(GenericSessionContext):
|
class SessionContext(GenericSessionContext):
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ def create_new_management_session(
|
|||||||
|
|
||||||
Seed cannot be derived with this type of session.
|
Seed cannot be derived with this type of session.
|
||||||
"""
|
"""
|
||||||
|
if session_id != cache_thp.MANAGEMENT_SESSION_ID:
|
||||||
|
cache_thp.get_new_session(channel_ctx.channel_cache, management=True)
|
||||||
return ManagementSessionContext(channel_ctx, session_id)
|
return ManagementSessionContext(channel_ctx, session_id)
|
||||||
|
|
||||||
|
|
||||||
|
3
python/src/trezorlib/messages.py
generated
3
python/src/trezorlib/messages.py
generated
@ -7915,6 +7915,7 @@ class ThpCreateNewSession(protobuf.MessageType):
|
|||||||
1: protobuf.Field("passphrase", "string", repeated=False, required=False, default=None),
|
1: protobuf.Field("passphrase", "string", repeated=False, required=False, default=None),
|
||||||
2: protobuf.Field("on_device", "bool", repeated=False, required=False, default=None),
|
2: protobuf.Field("on_device", "bool", repeated=False, required=False, default=None),
|
||||||
3: protobuf.Field("derive_cardano", "bool", repeated=False, required=False, default=None),
|
3: protobuf.Field("derive_cardano", "bool", repeated=False, required=False, default=None),
|
||||||
|
4: protobuf.Field("session_id", "uint32", repeated=False, required=False, default=None),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -7923,10 +7924,12 @@ class ThpCreateNewSession(protobuf.MessageType):
|
|||||||
passphrase: Optional["str"] = None,
|
passphrase: Optional["str"] = None,
|
||||||
on_device: Optional["bool"] = None,
|
on_device: Optional["bool"] = None,
|
||||||
derive_cardano: Optional["bool"] = None,
|
derive_cardano: Optional["bool"] = None,
|
||||||
|
session_id: Optional["int"] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.passphrase = passphrase
|
self.passphrase = passphrase
|
||||||
self.on_device = on_device
|
self.on_device = on_device
|
||||||
self.derive_cardano = derive_cardano
|
self.derive_cardano = derive_cardano
|
||||||
|
self.session_id = session_id
|
||||||
|
|
||||||
|
|
||||||
class ThpNewSession(protobuf.MessageType):
|
class ThpNewSession(protobuf.MessageType):
|
||||||
|
151
rust/trezor-client/src/protos/generated/messages_thp.rs
generated
151
rust/trezor-client/src/protos/generated/messages_thp.rs
generated
@ -504,6 +504,8 @@ pub struct ThpCreateNewSession {
|
|||||||
pub on_device: ::std::option::Option<bool>,
|
pub on_device: ::std::option::Option<bool>,
|
||||||
// @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.derive_cardano)
|
// @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.derive_cardano)
|
||||||
pub derive_cardano: ::std::option::Option<bool>,
|
pub derive_cardano: ::std::option::Option<bool>,
|
||||||
|
// @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.session_id)
|
||||||
|
pub session_id: ::std::option::Option<u32>,
|
||||||
// special fields
|
// special fields
|
||||||
// @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCreateNewSession.special_fields)
|
// @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCreateNewSession.special_fields)
|
||||||
pub special_fields: ::protobuf::SpecialFields,
|
pub special_fields: ::protobuf::SpecialFields,
|
||||||
@ -594,8 +596,27 @@ impl ThpCreateNewSession {
|
|||||||
self.derive_cardano = ::std::option::Option::Some(v);
|
self.derive_cardano = ::std::option::Option::Some(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional uint32 session_id = 4;
|
||||||
|
|
||||||
|
pub fn session_id(&self) -> u32 {
|
||||||
|
self.session_id.unwrap_or(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clear_session_id(&mut self) {
|
||||||
|
self.session_id = ::std::option::Option::None;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn has_session_id(&self) -> bool {
|
||||||
|
self.session_id.is_some()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Param is passed by value, moved
|
||||||
|
pub fn set_session_id(&mut self, v: u32) {
|
||||||
|
self.session_id = ::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(3);
|
let mut fields = ::std::vec::Vec::with_capacity(4);
|
||||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||||
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
|
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
|
||||||
"passphrase",
|
"passphrase",
|
||||||
@ -612,6 +633,11 @@ impl ThpCreateNewSession {
|
|||||||
|m: &ThpCreateNewSession| { &m.derive_cardano },
|
|m: &ThpCreateNewSession| { &m.derive_cardano },
|
||||||
|m: &mut ThpCreateNewSession| { &mut m.derive_cardano },
|
|m: &mut ThpCreateNewSession| { &mut m.derive_cardano },
|
||||||
));
|
));
|
||||||
|
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
|
||||||
|
"session_id",
|
||||||
|
|m: &ThpCreateNewSession| { &m.session_id },
|
||||||
|
|m: &mut ThpCreateNewSession| { &mut m.session_id },
|
||||||
|
));
|
||||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpCreateNewSession>(
|
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpCreateNewSession>(
|
||||||
"ThpCreateNewSession",
|
"ThpCreateNewSession",
|
||||||
fields,
|
fields,
|
||||||
@ -639,6 +665,9 @@ impl ::protobuf::Message for ThpCreateNewSession {
|
|||||||
24 => {
|
24 => {
|
||||||
self.derive_cardano = ::std::option::Option::Some(is.read_bool()?);
|
self.derive_cardano = ::std::option::Option::Some(is.read_bool()?);
|
||||||
},
|
},
|
||||||
|
32 => {
|
||||||
|
self.session_id = ::std::option::Option::Some(is.read_uint32()?);
|
||||||
|
},
|
||||||
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())?;
|
||||||
},
|
},
|
||||||
@ -660,6 +689,9 @@ impl ::protobuf::Message for ThpCreateNewSession {
|
|||||||
if let Some(v) = self.derive_cardano {
|
if let Some(v) = self.derive_cardano {
|
||||||
my_size += 1 + 1;
|
my_size += 1 + 1;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.session_id {
|
||||||
|
my_size += ::protobuf::rt::uint32_size(4, v);
|
||||||
|
}
|
||||||
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
|
||||||
@ -675,6 +707,9 @@ impl ::protobuf::Message for ThpCreateNewSession {
|
|||||||
if let Some(v) = self.derive_cardano {
|
if let Some(v) = self.derive_cardano {
|
||||||
os.write_bool(3, v)?;
|
os.write_bool(3, v)?;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.session_id {
|
||||||
|
os.write_uint32(4, 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(())
|
||||||
}
|
}
|
||||||
@ -695,6 +730,7 @@ impl ::protobuf::Message for ThpCreateNewSession {
|
|||||||
self.passphrase = ::std::option::Option::None;
|
self.passphrase = ::std::option::Option::None;
|
||||||
self.on_device = ::std::option::Option::None;
|
self.on_device = ::std::option::Option::None;
|
||||||
self.derive_cardano = ::std::option::Option::None;
|
self.derive_cardano = ::std::option::Option::None;
|
||||||
|
self.session_id = ::std::option::Option::None;
|
||||||
self.special_fields.clear();
|
self.special_fields.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -703,6 +739,7 @@ impl ::protobuf::Message for ThpCreateNewSession {
|
|||||||
passphrase: ::std::option::Option::None,
|
passphrase: ::std::option::Option::None,
|
||||||
on_device: ::std::option::Option::None,
|
on_device: ::std::option::Option::None,
|
||||||
derive_cardano: ::std::option::Option::None,
|
derive_cardano: ::std::option::Option::None,
|
||||||
|
session_id: ::std::option::Option::None,
|
||||||
special_fields: ::protobuf::SpecialFields::new(),
|
special_fields: ::protobuf::SpecialFields::new(),
|
||||||
};
|
};
|
||||||
&instance
|
&instance
|
||||||
@ -4046,62 +4083,62 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
|||||||
.thp.ThpPairingMethodR\x0epairingMethods\"\xb2\x01\n%ThpHandshakeComplet\
|
.thp.ThpPairingMethodR\x0epairingMethods\"\xb2\x01\n%ThpHandshakeComplet\
|
||||||
ionReqNoisePayload\x126\n\x17host_pairing_credential\x18\x01\x20\x01(\
|
ionReqNoisePayload\x126\n\x17host_pairing_credential\x18\x01\x20\x01(\
|
||||||
\x0cR\x15hostPairingCredential\x12Q\n\x0fpairing_methods\x18\x02\x20\x03\
|
\x0cR\x15hostPairingCredential\x12Q\n\x0fpairing_methods\x18\x02\x20\x03\
|
||||||
(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x0epairingMethods\"y\n\
|
(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x0epairingMethods\"\x98\
|
||||||
\x13ThpCreateNewSession\x12\x1e\n\npassphrase\x18\x01\x20\x01(\tR\npassp\
|
\x01\n\x13ThpCreateNewSession\x12\x1e\n\npassphrase\x18\x01\x20\x01(\tR\
|
||||||
hrase\x12\x1b\n\ton_device\x18\x02\x20\x01(\x08R\x08onDevice\x12%\n\x0ed\
|
\npassphrase\x12\x1b\n\ton_device\x18\x02\x20\x01(\x08R\x08onDevice\x12%\
|
||||||
erive_cardano\x18\x03\x20\x01(\x08R\rderiveCardano\"5\n\rThpNewSession\
|
\n\x0ederive_cardano\x18\x03\x20\x01(\x08R\rderiveCardano\x12\x1d\n\nses\
|
||||||
\x12$\n\x0enew_session_id\x18\x01\x20\x01(\rR\x0cnewSessionId\"5\n\x16Th\
|
sion_id\x18\x04\x20\x01(\rR\tsessionId\"5\n\rThpNewSession\x12$\n\x0enew\
|
||||||
pStartPairingRequest\x12\x1b\n\thost_name\x18\x01\x20\x01(\tR\x08hostNam\
|
_session_id\x18\x01\x20\x01(\rR\x0cnewSessionId\"5\n\x16ThpStartPairingR\
|
||||||
e\"\x20\n\x1eThpPairingPreparationsFinished\"8\n\x16ThpCodeEntryCommitme\
|
equest\x12\x1b\n\thost_name\x18\x01\x20\x01(\tR\x08hostName\"\x20\n\x1eT\
|
||||||
nt\x12\x1e\n\ncommitment\x18\x01\x20\x01(\x0cR\ncommitment\"5\n\x15ThpCo\
|
hpPairingPreparationsFinished\"8\n\x16ThpCodeEntryCommitment\x12\x1e\n\n\
|
||||||
deEntryChallenge\x12\x1c\n\tchallenge\x18\x01\x20\x01(\x0cR\tchallenge\"\
|
commitment\x18\x01\x20\x01(\x0cR\ncommitment\"5\n\x15ThpCodeEntryChallen\
|
||||||
J\n\x15ThpCodeEntryCpaceHost\x121\n\x15cpace_host_public_key\x18\x01\x20\
|
ge\x12\x1c\n\tchallenge\x18\x01\x20\x01(\x0cR\tchallenge\"J\n\x15ThpCode\
|
||||||
\x01(\x0cR\x12cpaceHostPublicKey\"P\n\x17ThpCodeEntryCpaceTrezor\x125\n\
|
EntryCpaceHost\x121\n\x15cpace_host_public_key\x18\x01\x20\x01(\x0cR\x12\
|
||||||
\x17cpace_trezor_public_key\x18\x01\x20\x01(\x0cR\x14cpaceTrezorPublicKe\
|
cpaceHostPublicKey\"P\n\x17ThpCodeEntryCpaceTrezor\x125\n\x17cpace_trezo\
|
||||||
y\"#\n\x0fThpCodeEntryTag\x12\x10\n\x03tag\x18\x02\x20\x01(\x0cR\x03tag\
|
r_public_key\x18\x01\x20\x01(\x0cR\x14cpaceTrezorPublicKey\"#\n\x0fThpCo\
|
||||||
\",\n\x12ThpCodeEntrySecret\x12\x16\n\x06secret\x18\x01\x20\x01(\x0cR\
|
deEntryTag\x12\x10\n\x03tag\x18\x02\x20\x01(\x0cR\x03tag\",\n\x12ThpCode\
|
||||||
\x06secret\"\x20\n\x0cThpQrCodeTag\x12\x10\n\x03tag\x18\x01\x20\x01(\x0c\
|
EntrySecret\x12\x16\n\x06secret\x18\x01\x20\x01(\x0cR\x06secret\"\x20\n\
|
||||||
R\x03tag\")\n\x0fThpQrCodeSecret\x12\x16\n\x06secret\x18\x01\x20\x01(\
|
\x0cThpQrCodeTag\x12\x10\n\x03tag\x18\x01\x20\x01(\x0cR\x03tag\")\n\x0fT\
|
||||||
\x0cR\x06secret\"+\n\x17ThpNfcUnidirectionalTag\x12\x10\n\x03tag\x18\x01\
|
hpQrCodeSecret\x12\x16\n\x06secret\x18\x01\x20\x01(\x0cR\x06secret\"+\n\
|
||||||
\x20\x01(\x0cR\x03tag\"4\n\x1aThpNfcUnidirectionalSecret\x12\x16\n\x06se\
|
\x17ThpNfcUnidirectionalTag\x12\x10\n\x03tag\x18\x01\x20\x01(\x0cR\x03ta\
|
||||||
cret\x18\x01\x20\x01(\x0cR\x06secret\"D\n\x14ThpCredentialRequest\x12,\n\
|
g\"4\n\x1aThpNfcUnidirectionalSecret\x12\x16\n\x06secret\x18\x01\x20\x01\
|
||||||
\x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\"i\n\
|
(\x0cR\x06secret\"D\n\x14ThpCredentialRequest\x12,\n\x12host_static_pubk\
|
||||||
\x15ThpCredentialResponse\x120\n\x14trezor_static_pubkey\x18\x01\x20\x01\
|
ey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\"i\n\x15ThpCredentialRespon\
|
||||||
(\x0cR\x12trezorStaticPubkey\x12\x1e\n\ncredential\x18\x02\x20\x01(\x0cR\
|
se\x120\n\x14trezor_static_pubkey\x18\x01\x20\x01(\x0cR\x12trezorStaticP\
|
||||||
\ncredential\"\x0f\n\rThpEndRequest\"\x10\n\x0eThpEndResponse\":\n\x15Th\
|
ubkey\x12\x1e\n\ncredential\x18\x02\x20\x01(\x0cR\ncredential\"\x0f\n\rT\
|
||||||
pCredentialMetadata\x12\x1b\n\thost_name\x18\x01\x20\x01(\tR\x08hostName\
|
hpEndRequest\"\x10\n\x0eThpEndResponse\":\n\x15ThpCredentialMetadata\x12\
|
||||||
:\x04\x98\xb2\x19\x01\"\x82\x01\n\x14ThpPairingCredential\x12R\n\rcred_m\
|
\x1b\n\thost_name\x18\x01\x20\x01(\tR\x08hostName:\x04\x98\xb2\x19\x01\"\
|
||||||
etadata\x18\x01\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredentialMetad\
|
\x82\x01\n\x14ThpPairingCredential\x12R\n\rcred_metadata\x18\x01\x20\x01\
|
||||||
ataR\x0ccredMetadata\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\x03mac:\x04\
|
(\x0b2-.hw.trezor.messages.thp.ThpCredentialMetadataR\x0ccredMetadata\
|
||||||
\x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\n\
|
\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\x03mac:\x04\x98\xb2\x19\x01\"\
|
||||||
\x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\n\
|
\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\n\x12host_static_pubke\
|
||||||
\rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredent\
|
y\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\n\rcred_metadata\x18\
|
||||||
ialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*\xf6\x06\n\x0eThpMessa\
|
\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredentialMetadataR\x0ccre\
|
||||||
geType\x12-\n\"ThpMessageType_ThpCreateNewSession\x10\xe8\x07\x1a\x04\
|
dMetadata:\x04\x98\xb2\x19\x01*\xf6\x06\n\x0eThpMessageType\x12-\n\"ThpM\
|
||||||
\x80\xa6\x1d\x01\x12'\n\x1cThpMessageType_ThpNewSession\x10\xe9\x07\x1a\
|
essageType_ThpCreateNewSession\x10\xe8\x07\x1a\x04\x80\xa6\x1d\x01\x12'\
|
||||||
\x04\x80\xa6\x1d\x01\x120\n%ThpMessageType_ThpStartPairingRequest\x10\
|
\n\x1cThpMessageType_ThpNewSession\x10\xe9\x07\x1a\x04\x80\xa6\x1d\x01\
|
||||||
\xf0\x07\x1a\x04\x80\xa6\x1d\x01\x128\n-ThpMessageType_ThpPairingPrepara\
|
\x120\n%ThpMessageType_ThpStartPairingRequest\x10\xf0\x07\x1a\x04\x80\
|
||||||
tionsFinished\x10\xf1\x07\x1a\x04\x80\xa6\x1d\x01\x12.\n#ThpMessageType_\
|
\xa6\x1d\x01\x128\n-ThpMessageType_ThpPairingPreparationsFinished\x10\
|
||||||
ThpCredentialRequest\x10\xf2\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$ThpMessa\
|
\xf1\x07\x1a\x04\x80\xa6\x1d\x01\x12.\n#ThpMessageType_ThpCredentialRequ\
|
||||||
geType_ThpCredentialResponse\x10\xf3\x07\x1a\x04\x80\xa6\x1d\x01\x12'\n\
|
est\x10\xf2\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$ThpMessageType_ThpCredent\
|
||||||
\x1cThpMessageType_ThpEndRequest\x10\xf4\x07\x1a\x04\x80\xa6\x1d\x01\x12\
|
ialResponse\x10\xf3\x07\x1a\x04\x80\xa6\x1d\x01\x12'\n\x1cThpMessageType\
|
||||||
(\n\x1dThpMessageType_ThpEndResponse\x10\xf5\x07\x1a\x04\x80\xa6\x1d\x01\
|
_ThpEndRequest\x10\xf4\x07\x1a\x04\x80\xa6\x1d\x01\x12(\n\x1dThpMessageT\
|
||||||
\x120\n%ThpMessageType_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x04\x80\
|
ype_ThpEndResponse\x10\xf5\x07\x1a\x04\x80\xa6\x1d\x01\x120\n%ThpMessage\
|
||||||
\xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\x1a\
|
Type_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$T\
|
||||||
\x04\x80\xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryCpaceHost\x10\xfa\
|
hpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\x1a\x04\x80\xa6\x1d\x01\
|
||||||
\x07\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessageType_ThpCodeEntryCpaceTrez\
|
\x12/\n$ThpMessageType_ThpCodeEntryCpaceHost\x10\xfa\x07\x1a\x04\x80\xa6\
|
||||||
or\x10\xfb\x07\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageType_ThpCodeE\
|
\x1d\x01\x121\n&ThpMessageType_ThpCodeEntryCpaceTrezor\x10\xfb\x07\x1a\
|
||||||
ntryTag\x10\xfc\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!ThpMessageType_ThpCod\
|
\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageType_ThpCodeEntryTag\x10\xfc\
|
||||||
eEntrySecret\x10\xfd\x07\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bThpMessageTyp\
|
\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!ThpMessageType_ThpCodeEntrySecret\
|
||||||
e_ThpQrCodeTag\x10\x80\x08\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageT\
|
\x10\xfd\x07\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bThpMessageType_ThpQrCodeT\
|
||||||
ype_ThpQrCodeSecret\x10\x81\x08\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessag\
|
ag\x10\x80\x08\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageType_ThpQrCod\
|
||||||
eType_ThpNfcUnidirectionalTag\x10\x88\x08\x1a\x04\x80\xa6\x1d\x01\x124\n\
|
eSecret\x10\x81\x08\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessageType_ThpNfc\
|
||||||
)ThpMessageType_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x04\x80\xa6\
|
UnidirectionalTag\x10\x88\x08\x1a\x04\x80\xa6\x1d\x01\x124\n)ThpMessageT\
|
||||||
\x1d\x01\"\x05\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\xff\xff\x07\
|
ype_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x04\x80\xa6\x1d\x01\"\x05\
|
||||||
*S\n\x10ThpPairingMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\n\tCodeEntr\
|
\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\xff\xff\x07*S\n\x10ThpPai\
|
||||||
y\x10\x02\x12\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidirectional\x10\
|
ringMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\n\tCodeEntry\x10\x02\x12\
|
||||||
\x04B;\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMessageThp\x80\
|
\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidirectional\x10\x04B;\n#com.s\
|
||||||
\xa6\x1d\x01\
|
atoshilabs.trezor.lib.protobufB\x10TrezorMessageThp\x80\xa6\x1d\x01\
|
||||||
";
|
";
|
||||||
|
|
||||||
/// `FileDescriptorProto` object which was a source for this generated file
|
/// `FileDescriptorProto` object which was a source for this generated file
|
||||||
|
Loading…
Reference in New Issue
Block a user