From 0f884ff3b153c3353353accb438ba88379e6b684 Mon Sep 17 00:00:00 2001 From: Matt Gleason Date: Sat, 14 Oct 2023 18:33:14 -0400 Subject: [PATCH] SFT-1708: removed debug --- ports/stm32/boards/Passport/modules/chains.py | 2 -- ports/stm32/boards/Passport/modules/taproot.py | 6 ------ 2 files changed, 8 deletions(-) diff --git a/ports/stm32/boards/Passport/modules/chains.py b/ports/stm32/boards/Passport/modules/chains.py index 4cbe3e58d..d3c4ad306 100644 --- a/ports/stm32/boards/Passport/modules/chains.py +++ b/ports/stm32/boards/Passport/modules/chains.py @@ -122,9 +122,7 @@ def address(cls, node, addr_fmt): elif addr_fmt & AFC_BECH32M: pubkey = node.public_key() internal_key = pubkey[1::] - print("internal_key: {}".format(b2a_hex(internal_key))) output_key = output_script(internal_key, None)[2::] - print("output_key: {}".format(b2a_hex(output_key))) return tcc.codecs.bech32_encode(cls.bech32_hrp, 1, output_key) # see bip-141, "P2WPKH nested in BIP16 P2SH" section diff --git a/ports/stm32/boards/Passport/modules/taproot.py b/ports/stm32/boards/Passport/modules/taproot.py index a543ceda3..a988a70e8 100644 --- a/ports/stm32/boards/Passport/modules/taproot.py +++ b/ports/stm32/boards/Passport/modules/taproot.py @@ -109,20 +109,14 @@ def has_even_y(P): def tweak_internal_key(internal_key, h): - print("1 {}".format(utime.ticks_ms())) t = int_from_bytes(hash_tap_tweak(internal_key + h)) - print("2 {}".format(utime.ticks_ms())) if t >= SECP256K1_ORDER: raise ValueError - print("3 {}".format(utime.ticks_ms())) P = lift_x(int_from_bytes(internal_key)) - print("4 {}".format(utime.ticks_ms())) if P is None: raise ValueError - print("5 {}".format(utime.ticks_ms())) # TODO: use trezor point_add Q = point_add(P, scalar_multiply(t)) - print("6 {}".format(utime.ticks_ms())) return 0 if has_even_y(Q) else 1, bytes_from_int(x(Q))