Commit 38d74b82 authored by Simon Warta's avatar Simon Warta Committed by Pavol Rusnak

Update testvectors.py to match slip-0010 (#295)

parent 705976ef
...@@ -111,12 +111,14 @@ def show_testvector(name, curvename, seedhex, derivationpath): ...@@ -111,12 +111,14 @@ def show_testvector(name, curvename, seedhex, derivationpath):
fpr = '\x00\x00\x00\x00' fpr = '\x00\x00\x00\x00'
path = 'm' path = 'm'
print "### "+name+" for "+curvename print "### "+name+" for "+curvename
print ''
print "Seed (hex): " + seedhex print "Seed (hex): " + seedhex
print ''
print '* Chain ' + path print '* Chain ' + path
print ' * fpr: ' + binascii.hexlify(fpr) print ' * fingerprint: ' + binascii.hexlify(fpr)
print ' * chain: ' + binascii.hexlify(c) print ' * chain code: ' + binascii.hexlify(c)
print ' * prv: ' + binascii.hexlify(k) print ' * private: ' + binascii.hexlify(k)
print ' * pub: ' + binascii.hexlify(p) print ' * public: ' + binascii.hexlify(p)
depth = 0 depth = 0
for i in derivationpath: for i in derivationpath:
if curve == 'ed25519': if curve == 'ed25519':
...@@ -130,10 +132,10 @@ def show_testvector(name, curvename, seedhex, derivationpath): ...@@ -130,10 +132,10 @@ def show_testvector(name, curvename, seedhex, derivationpath):
k,c = derive(k, c, i, curve) k,c = derive(k, c, i, curve)
p = publickey(k, curve) p = publickey(k, curve)
print '* Chain ' + path print '* Chain ' + path
print ' * fpr: ' + binascii.hexlify(fpr) print ' * fingerprint: ' + binascii.hexlify(fpr)
print ' * chain: ' + binascii.hexlify(c) print ' * chain code: ' + binascii.hexlify(c)
print ' * prv: ' + binascii.hexlify(k) print ' * private: ' + binascii.hexlify(k)
print ' * pub: ' + binascii.hexlify(p) print ' * public: ' + binascii.hexlify(p)
#print b58xprv(fpr, kc, cc, depth, i) #print b58xprv(fpr, kc, cc, depth, i)
#print b58xpub(fpr, pc, cc, depth, i) #print b58xpub(fpr, pc, cc, depth, i)
print print
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment