From 03e71de267e56783ca825e21ee830d2b5944b210 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Tue, 18 Sep 2018 00:41:55 +0200 Subject: [PATCH] xmr: check input permutation --- src/apps/monero/protocol/tsx_sign_builder.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/apps/monero/protocol/tsx_sign_builder.py b/src/apps/monero/protocol/tsx_sign_builder.py index b91437e23..49b2b96bc 100644 --- a/src/apps/monero/protocol/tsx_sign_builder.py +++ b/src/apps/monero/protocol/tsx_sign_builder.py @@ -602,16 +602,6 @@ def tsx_inputs_done(self): if self.inp_idx + 1 != self.num_inputs(): raise ValueError("Input count mismatch") - def tsx_inputs_done_inm(self): - """ - In-memory post processing - tx.vin[i] sorting by key image. - Used only if number of inputs is small - computable in Trezor without offloading. - """ - # Sort tx.in by key image - self.source_permutation = list(range(self.num_inputs())) - self.source_permutation.sort(key=lambda x: self.tx.vin[x].k_image, reverse=True) - self._tsx_inputs_permutation(self.source_permutation) - async def tsx_inputs_permutation(self, permutation): """ Set permutation on the inputs - sorted by key image on host. @@ -631,6 +621,7 @@ def _tsx_inputs_permutation(self, permutation): """ self.state.input_permutation() self.source_permutation = permutation + common.check_permutation(permutation) self.inp_idx = -1 async def input_vini(self, src_entr, vini_bin, hmac, pseudo_out, pseudo_out_hmac):