Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to sign messages to verify ownership of a key #20

Open
mflaxman opened this issue Aug 25, 2015 · 1 comment
Open

Add ability to sign messages to verify ownership of a key #20

mflaxman opened this issue Aug 25, 2015 · 1 comment
Assignees

Comments

@mflaxman
Copy link

Similar to bitcoind

@mflaxman mflaxman self-assigned this Aug 25, 2015
@mflaxman
Copy link
Author

Working test code, just needs a UI:

from bitcoin.main import ecdsa_recover, ecdsa_verify, ecdsa_sign

# https://unmitigatedrisk.com/?p=425
msg = '[email protected] – my voice is my passphrase authenticate me'
sig = 'G0d6BnQem1gT4nd9esfsEyn1k/GfYAxDkNJmkNvmz8wCOI2Ncw9DvIcyP7OJcEvWbUHQNIBFK3V8wYdnhEFhYHI='

assert ecdsa_verify(msg=msg, sig=sig, pub=ecdsa_recover(msg=msg, sig=sig))

# http://dev.blockcypher.com/#addresskeychain
privkeyhex = '86751cb880a9a1addcc3b67979976158dd800afe9d14b68349921299b20c94dd'
pubkeyhex = '03866586fbe3652eb219c5ed99c3fc72d125472248183f966e0673be08a1c543de'

sig2 = ecdsa_sign(msg=msg, priv=privkeyhex)

assert ecdsa_verify(msg=msg, sig=sig2, pub=pubkeyhex)

Add verify to block explorer and leave out of wallet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant