1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

tools: add getkey command to keyctl to retrieve the public key

This commit is contained in:
Pavol Rusnak 2018-01-28 15:02:13 +01:00
parent b77a1eb12f
commit 5e164ebaf1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -29,6 +29,16 @@ def cli():
pass
@cli.command(help='')
@click.argument('index', type=click.Choice(indexmap.keys()))
def getkey(index):
index = indexmap[index]
t = get_trezor()
path = "10018'/%d'" % index
node = t.get_public_node(t.expand_path(path), ecdsa_curve_name='ed25519').node
print('%s' % (binascii.hexlify(node.public_key[1:]).decode()))
@cli.command(help='')
@click.argument('index', type=click.Choice(indexmap.keys()))
@click.argument('filename')