mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
tools: add more verbose output to keyctl-coordinator
This commit is contained in:
parent
ecf2dc19ec
commit
de2178a1e9
@ -52,23 +52,26 @@ def sign(index, filename, participants):
|
||||
proxy.append(Pyro4.Proxy(uri))
|
||||
# collect commits
|
||||
pks, Rs = [], []
|
||||
for p in proxy:
|
||||
for i, p in enumerate(proxy):
|
||||
pk, R = p.get_commit(index, digest)
|
||||
pk, R = serpent.tobytes(pk), serpent.tobytes(R)
|
||||
pks.append(pk)
|
||||
Rs.append(R)
|
||||
print('collected commit #%d from %s' % (i, p._pyroUri.host))
|
||||
# compute global commit
|
||||
global_pk = cosi.combine_keys(pks)
|
||||
global_R = cosi.combine_keys(Rs)
|
||||
# collect signatures
|
||||
sigs = []
|
||||
for p in proxy:
|
||||
for i, p in enumerate(proxy):
|
||||
sig = p.get_signature(index, digest, global_R, global_pk)
|
||||
sig = serpent.tobytes(sig)
|
||||
sigs.append(sig)
|
||||
print('collected signature #%d from %s' % (i, p._pyroUri.host))
|
||||
# compute global signature
|
||||
sig = cosi.combine_sig(global_R, sigs)
|
||||
cosi.verify(sig, digest, global_pk)
|
||||
print('global signature:')
|
||||
print(binascii.hexlify(sig).decode())
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user