diff --git a/common/protob/messages-crypto.proto b/common/protob/messages-crypto.proto index 55a0df479a..bb85698074 100644 --- a/common/protob/messages-crypto.proto +++ b/common/protob/messages-crypto.proto @@ -83,6 +83,7 @@ message GetECDHSessionKey { */ message ECDHSessionKey { required bytes session_key = 1; // ECDH session key + optional bytes public_key = 2; // identity public key } /** diff --git a/core/src/trezor/messages/ECDHSessionKey.py b/core/src/trezor/messages/ECDHSessionKey.py index bb86939c15..03d1a4ffaf 100644 --- a/core/src/trezor/messages/ECDHSessionKey.py +++ b/core/src/trezor/messages/ECDHSessionKey.py @@ -17,11 +17,14 @@ class ECDHSessionKey(p.MessageType): self, *, session_key: bytes, + public_key: bytes = None, ) -> None: self.session_key = session_key + self.public_key = public_key @classmethod def get_fields(cls) -> Dict: return { 1: ('session_key', p.BytesType, p.FLAG_REQUIRED), + 2: ('public_key', p.BytesType, None), } diff --git a/python/src/trezorlib/messages/ECDHSessionKey.py b/python/src/trezorlib/messages/ECDHSessionKey.py index b7bca33b68..84ee339f52 100644 --- a/python/src/trezorlib/messages/ECDHSessionKey.py +++ b/python/src/trezorlib/messages/ECDHSessionKey.py @@ -17,11 +17,14 @@ class ECDHSessionKey(p.MessageType): self, *, session_key: bytes, + public_key: bytes = None, ) -> None: self.session_key = session_key + self.public_key = public_key @classmethod def get_fields(cls) -> Dict: return { 1: ('session_key', p.BytesType, p.FLAG_REQUIRED), + 2: ('public_key', p.BytesType, None), }