Skip to content

Commit

Permalink
fush
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed Dec 12, 2017
1 parent 07e5ce2 commit 873c013
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions auto_migrate/config_generate_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ disable_periodic = true
[secretstore]
disable = false
disable_acl_check = true
service_contract = \"registry\"
self_secret = \"${secret[i]}\"
nodes = [$ssnodes]
interface = \"local\"
Expand Down
12 changes: 12 additions & 0 deletions sign_test/generate_signature.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python2.7
import secp256k1 # install by typing `pip install secp256k1`

key_id = bytes(bytearray.fromhex('0000000000000000000000000000000000000000000000000000000000000001'))
sk = secp256k1.PrivateKey()
sig_raw = sk.ecdsa_sign_recoverable(key_id, raw=True)
sig_der = sk.ecdsa_recoverable_serialize(sig_raw)
pub_der = sk.pubkey.serialize(compressed=False)

print 'SECRET: ' + ''.join('{:02x}'.format(ord(c)) for c in sk.private_key)
print 'PUBLIC: ' + ''.join('{:02x}'.format(ord(c)) for c in pub_der[1:])
print 'SIGNATURE: ' + ''.join('{:02x}'.format(ord(c)) for c in sig_der[0]) + '{:02x}'.format(sig_der[1])

0 comments on commit 873c013

Please sign in to comment.