From 111d36d483e7b09258aa776bbd76acde83f4f328 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Thu, 18 Oct 2018 13:15:11 +0200 Subject: [PATCH] xmr: mlsag_hasher simplified --- src/apps/monero/xmr/sub/mlsag_hasher.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/apps/monero/xmr/sub/mlsag_hasher.py b/src/apps/monero/xmr/sub/mlsag_hasher.py index 4439daef6..dd2aefe80 100644 --- a/src/apps/monero/xmr/sub/mlsag_hasher.py +++ b/src/apps/monero/xmr/sub/mlsag_hasher.py @@ -6,18 +6,14 @@ class PreMlsagHasher: Iterative construction of the pre_mlsag_hash """ - def __init__(self, state=None): + def __init__(self): from apps.monero.xmr.sub.keccak_hasher import KeccakXmrArchive - self.is_simple = state[0] if state else None - self.state = state[1] if state else 0 - self.kc_master = state[2] if state else crypto.get_keccak() - self.rsig_hasher = state[3] if state else crypto.get_keccak() - self.rtcsig_hasher = None - if state: - self.rtcsig_hasher = KeccakXmrArchive(state[4]) if state[4] else None - else: - self.rtcsig_hasher = KeccakXmrArchive() + self.is_simple = None + self.state = 0 + self.kc_master = crypto.get_keccak() + self.rsig_hasher = crypto.get_keccak() + self.rtcsig_hasher = KeccakXmrArchive() def init(self, is_simple): if self.state != 0: