1
0

Trezor: Matrix recovery support

New Trezor firmware has matrix recovery support, which is a new
recovery method that doesn't leak the entered words.
This commit is contained in:
Jochen Hoenicke
2017-01-22 22:20:24 +01:00
committed by SomberNight
parent 034b0a0313
commit 6dd5161729
2 changed files with 95 additions and 0 deletions

View File

@@ -84,6 +84,15 @@ class GuiMixin(object):
return self.proto.PassphraseStateAck()
def callback_WordRequest(self, msg):
if (msg.type is not None
and msg.type in (self.types.WordRequestType_Matrix9,
self.types.WordRequestType_Matrix6)):
num = 9 if msg.type == self.types.WordRequestType_Matrix9 else 6
char = self.handler.get_matrix(num)
if (char == 'x'):
return self.proto.Cancel()
return self.proto.WordAck(word=char)
self.step += 1
msg = _("Step {}/24. Enter seed word as explained on "
"your {}:").format(self.step, self.device)