1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 07:18:09 +00:00

tools: add get_sign_keys

This commit is contained in:
Pavol Rusnak 2017-10-04 14:27:13 +02:00
parent 06a4bfbed8
commit e6704a3f35
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

16
tools/get_sign_keys Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/python3
import binascii
from trezorlib.client import TrezorClient
from trezorlib.transport_hid import HidTransport
devices = HidTransport.enumerate()
if len(devices) > 0:
t = TrezorClient(devices[0])
else:
raise Exception('No TREZOR found')
for i in [0, 1, 2]:
path = "m/10018'/%d'" % i
pk = t.get_public_node(t.expand_path(path), ecdsa_curve_name='ed25519', show_display=True)
print(path, '=>', binascii.hexlify(pk.node.public_key).decode())