Skip to content

Commit

Permalink
SFT-1708: removed debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg-foundation committed Oct 14, 2023
1 parent 6469a58 commit 0f884ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions ports/stm32/boards/Passport/modules/chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions ports/stm32/boards/Passport/modules/taproot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down

0 comments on commit 0f884ff

Please sign in to comment.