Pages:
Author

Topic: [BOUNTY: 2.0 BTC] [CLAIMED] Message Signing in Armory - page 2. (Read 7978 times)

legendary
Activity: 1258
Merit: 1001
There is a webpage which can do the work for you
http://brainwallet.org/#sign
You need to provide your private key (u can get it on the SIGN MESSAGE window of armory by selecting the address using address button)
This runs on java script - so your private key wont get sent to any web server
The point is precisely not to use another software but rather having everything done in Python
I do agree. But this is just for people who wish to sign a message but are using armory. I had to spend lot of time to figure this out as needed to sign some message. I hope it helps someone Smiley
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
There is a webpage which can do the work for you
http://brainwallet.org/#sign
You need to provide your private key (u can get it on the SIGN MESSAGE window of armory by selecting the address using address button)
This runs on java script - so your private key wont get sent to any web server
The point is precisely not to use another software but rather having everything done in Python
legendary
Activity: 1258
Merit: 1001
There is a webpage which can do the work for you
http://brainwallet.org/#sign
You need to provide your private key (u can get it on the SIGN MESSAGE window of armory by selecting the address using address button)
This runs on java script - so your private key wont get sent to any web server
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
I have an armory wallet and need to sign a message to prove ownership of a particular address to recover scammed funds. I'm running the MacOSx. Is the message signing compatible with bitcoin-qt yet? If so, How do I sign in this method? I currently tried verifying a signed message and it failed in bitcoin-qt.

Thank you!
I don't think etotheipi already put the code in Armory (I can be wrong though)
If you have python on your OSX I can make tweak my code a bit to do what you want until it's implemented
hero member
Activity: 714
Merit: 500
champion! thanks
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
1.
You need to add that function:
Code:
def DecodeBase58Check(sec):
vchRet = b58decode(sec, None)
secret = vchRet[0:-4]
csum = vchRet[-4:]
hash = Hash(secret)
cs32 = hash[0:4]
if cs32 != csum:
return None
else:
return secret

pvk1=DecodeBase58Check("5KWLD8VF29WR36qR2YM3wWLDuePHJAP4YKgCMcfvNN7TTxSFgFx")

2.
Code:
pubkey = EC_KEY(pvk1, bool(compressed key or not?)).pubkey  #this is an object
pbk = pubkey.ser()   #the serialization itself: 04+x+y or 02+x or 03+x
hero member
Activity: 714
Merit: 500
I just released on github before your message: https://github.com/jackjack-jj/jasvet/blob/master/jasvet.py

Im trying to make a quick and dirty script to sign messages that are compatible with Bitcoin & Armory clients and came across your nicely written Python module .

Just wondering if you could give me a couple of pointers to get me started

Quote
#
#  Some tests with ugly output
#  You can delete the print commands in FormatText() after testing
#

pvk1='\x01'*32


text0='Hello world!'


FTVerbose=True
sv0=ASv0(pvk1, text0)
print sv0
verifySignature(sv0['address'], sv0['b64-signature'], sv0['message'])
print
print ASv1B64(pvk1, text0)
print
print ASv1CS(pvk1, text0)

How can I get a representation of my private key from base58 format (e.g. 5KWLD8VF29WR36qR2YM3wWLDuePHJAP4YKgCMcfvNN7TTxSFgFx) so I can plug it into `pvk1` ?

Can I just do the following ...

Quote
pvk1 = b58decode('5KWLD...', None)

Secondly, how can I calculate the public key from pvk1?

cheers!



hero member
Activity: 547
Merit: 500
Decor in numeris
Ahh.  You know I never used easy_install, but I just tried it.  That really is easy! 


At least until you want to uninstall again.  No luck.  Which is why pip is preferred over easy_install, and preferably in a virtual_env.
Care to explain? I never heard anything about that

unlike real packaging systems, easy_install drops everything in the main Python directory structure.  There is no central database of what was installed by which package, and no way to uninstall the stuff again.  This can make it kind of hard to return to a clean installation, or to get rid of unnecessary packages.
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
Ahh.  You know I never used easy_install, but I just tried it.  That really is easy! 


At least until you want to uninstall again.  No luck.  Which is why pip is preferred over easy_install, and preferably in a virtual_env.
Care to explain? I never heard anything about that
hero member
Activity: 547
Merit: 500
Decor in numeris
Ahh.  You know I never used easy_install, but I just tried it.  That really is easy! 


At least until you want to uninstall again.  No luck.  Which is why pip is preferred over easy_install, and preferably in a virtual_env.

legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
As etotheipi asked me I just pushed a new version, which doesn't need any dependency
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
Thanks
I think it's easily tweakable. If anybody (etotheipi or any reader in the future) got a problem, just PM me or complain here!
legendary
Activity: 1072
Merit: 1181
Just as a FYI, the C secp256k1 library I'm writing has support for creating recoverable signatures, and doing key recovery (though not the - admittedly weird - serialization that Bitcoin uses for it).
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
easy_install ecdsa must work
I'm sure I can get rid of that dependency though

Ahh.  You know I never used easy_install, but I just tried it.  That really is easy! 

Okay, it works now.  I might have to dig in a little bit to tweak things.  But it looks like exactly what I wanted.  PM me a payment address.
Thanks jackjack!
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
easy_install ecdsa must work
I'm sure I can get rid of that dependency though
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
I changed the Readme, is it enough?

Code looks good, but I can't try it because I don't have the ecdsa module.  What/where is that?
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
I changed the Readme, is it enough?
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
Great

The CRC24 is used to check that the ASCII armor wasn't modified. So it's calculated on the data you send to base64, ie (lb+r+s) or (lb+r+s+msg)
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
As a Bitcoin signed message will always have the same, fixed format I think we don't need to use packets as they are used to provide flexibility
That would for example lead to:
  • signature = byte + r + s
  • sig+msg = byte + r + s + msg
Text rules (dash, etc...) in RFC2440 can (and should imo) be used

That way we have a simple format
Code:
lb, r, s, msg = data[0] + data[1:33] + data[33:65] + data[65:]
if msg:
  ...
else:
  ...


Or tell me what you prefer

That sounds good to me.  We want the standardized encoding/formatting, but don't need to all the flexibility in those serializations, since we have a very static/simple system for Bitcoin.  So clearsign will be identical to RFC2440 for the message, dash-esc, etc, but the signature will only be 65 bytes in base64.  The opaque version will simply be the header & footer, with the the properly-formatted message as you described above, all converted to base64. 

Where does crc24 fit into this?  Was that implemented and used?  I didn't look too closely at where it fit in.  Or was it only useful for the OpenPGP-formatted stuff?
legendary
Activity: 1176
Merit: 1260
May Bitcoin be touched by his Noodly Appendage
As a Bitcoin signed message will always have the same, fixed format I think we don't need to use packets as they are used to provide flexibility
That would for example lead to:
  • signature = byte + r + s
  • sig+msg = byte + r + s + msg
Text rules (dash, etc...) in RFC2440 can (and should imo) be used

That way we have a simple format
Code:
lb, r, s, msg = data[0] + data[1:33] + data[33:65] + data[65:]
if msg:
  ...
else:
  ...


Or tell me what you prefer
Pages:
Jump to: