Pages:
Author

Topic: Pywallet 2.2: manage your wallet [Update required] - page 39. (Read 208290 times)

full member
Activity: 140
Merit: 430
Firstbits: 1samr7
This new signature feature is pretty darn cool.  Looking forward to seeing the verification work.

One of these days, pywallet will become the new PGP!
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Code:
root@inana:~# /usr/local/bin/python2.7 pywallet.py
Traceback (most recent call last):
  File "pywallet.py", line 81, in
    curve_secp256k1 = ecdsa.ellipticcurve.CurveFp (_p, _a, _b)
NameError: name 'ecdsa' is not defined

I installed it anyway.  For those you you doing it the hard way, you can find the ecdsa package on this page, or use this direct link.
I found why, it's now fixed here but I will push it later, thanks!

Not having much luck signing.  I tried to verify my own message, and it fails.  I clicked a few more times, and I get a different signature each time.

Code:
Signature of 'does it sign?' by 1CNs777TvaENvZpTDmCUFE4xsDKwaasrzk: 3045022100c126528db7cbab77d0cf7f25ca5a154239ac0b89d27a85ff734d1be080e313e70220556fe87721933703e391453a1976bd1f444ff1a645d5a4d51610aea5c1976f50
Pubkey: 04f9d1306312ad46edce343fca404213825ac218bde1ffd30a03c0adc4fe67a6d79f55afe4bfd50ee5de0c1b5161aabd9d1e2f550768d62540be2c7cd81070fb8f

Other sigs I've seen for the same message/key:
Code:
3045022037a8d7ba379516293ff4e84306d24f5ee53ad4a57d1c1a76f1f7767e68a58cc202210092a54c9dbed2ff05c8ffc18cd7ac54bcb810e9f37438f6876c94411d308d0686
3045022100c94837ea529f9bc1840e992ce12a40d145425393f049ba3a74a1fa5f21e496c802206e4f22c034a4757181f1c633fc5ca8e517f262e3728f38ac9c525a37aefa7da2
3046022100a1879e71aaea0905c243a7d41dcaa804f43f2cc08a727b3ee1828bc7d4c21c48022100a90627c76d00bf1091ebe3d11270e8f5304146c841031c93c34db92474e2d9d1
3044022002a1a70e671f056147026030f72e73aae40802f6017b0d8b66268a7657dcbfcc02206a8c75b26f7929558ef5242fea8d59c18967c20d983fd07b0007c496e2a448a8
Not good, I can't verify your sigs neither
At least does it verify your own sigs?

Btw, different sig for same msg/key is normal
kjj
legendary
Activity: 1302
Merit: 1026
Code:
root@inana:~# /usr/local/bin/python2.7 pywallet.py
Traceback (most recent call last):
  File "pywallet.py", line 81, in
    curve_secp256k1 = ecdsa.ellipticcurve.CurveFp (_p, _a, _b)
NameError: name 'ecdsa' is not defined

I installed it anyway.  For those you you doing it the hard way, you can find the ecdsa package on this page, or use this direct link.

Not having much luck signing.  I tried to verify my own message, and it fails.  I clicked a few more times, and I get a different signature each time.

Code:
Signature of 'does it sign?' by 1CNs777TvaENvZpTDmCUFE4xsDKwaasrzk: 3045022100c126528db7cbab77d0cf7f25ca5a154239ac0b89d27a85ff734d1be080e313e70220556fe87721933703e391453a1976bd1f444ff1a645d5a4d51610aea5c1976f50
Pubkey: 04f9d1306312ad46edce343fca404213825ac218bde1ffd30a03c0adc4fe67a6d79f55afe4bfd50ee5de0c1b5161aabd9d1e2f550768d62540be2c7cd81070fb8f

Other sigs I've seen for the same message/key:
Code:
3045022037a8d7ba379516293ff4e84306d24f5ee53ad4a57d1c1a76f1f7767e68a58cc202210092a54c9dbed2ff05c8ffc18cd7ac54bcb810e9f37438f6876c94411d308d0686
3045022100c94837ea529f9bc1840e992ce12a40d145425393f049ba3a74a1fa5f21e496c802206e4f22c034a4757181f1c633fc5ca8e517f262e3728f38ac9c525a37aefa7da2
3046022100a1879e71aaea0905c243a7d41dcaa804f43f2cc08a727b3ee1828bc7d4c21c48022100a90627c76d00bf1091ebe3d11270e8f5304146c841031c93c34db92474e2d9d1
3044022002a1a70e671f056147026030f72e73aae40802f6017b0d8b66268a7657dcbfcc02206a8c75b26f7929558ef5242fea8d59c18967c20d983fd07b0007c496e2a448a8
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
I just pushed the new release to Github

So:
  • Do not install ecdsa python package yet
  • Download the new pywallet
  • Run it, and check it says "'ecdsa' package is not installed, pywallet won't be able to sign/verify messages" in the console
  • Close pywallet, install ecdsa package, see previous post
  • Run pywallet again, check that "get info" section became "get info or sign/verify a message" with new input forms: Message, Signature, Pubkey
  • To sign a message with a private key, fill Message and Key
  • To verify a signature, fill Message, Signature and Pubkey

Some testing:
  https://bitcointalksearch.org/topic/m.93866
Quote
msg: "Hi github users :p"
{
    "address" : "1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG",
    "pubkey" : "04ef6e366cd6b0b8fbf02c0c25ad39fe892b90c597875899fdc9db16941cf43fb8c429e0534cb8b 972f5cc9f1a50f36dc3352ffad427f073e1c64a145828a3be6e",
    "sign" : "3046022100a80b6e0c7c54c54ba943f4e3cde12f5a7dc5313e3f0a15ce868f01683ced64fa02210 08b4ad7d3800a11c241dcef7aaf44c8224a7d9f1e54d3e669bf4887036b6d10af"
}

  Msg: "Thanks you guys!"
  Pubkey: 04bb50e2d89a4ed70663d080659fe0ad4b9bc3e06c17a227433966cb59ceee020decddbf6e00192 011648d13b1c00af770c0c1bb609d4d3a5c98a43772e0e18ef4
  Sig: 3046022100a2274c679dc2e54db8838b6dc827b7129de0687f0b9bfebfb191490f8a52d03002210 0c671a6f3214a4d154b231c557b6c4b3f7e30b7f432d98cd5c2ff592190516f13


Please share your signed messages so that we can all verify each others ones



Todo:
  Remove the "A if C else B" for Python2.4
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
What new features?

By the way, this doesn't work with Python 2.4.2.  I jumped right up to 2.7, so I don't know what the minimum version was.  Among other things, the "A if Condition else B" syntax appears to be pretty new.
That's going to be annoying, I didn't want pywallet to only work with one specific version of Python.... It seems to have been included in Python 2.5 though
Anyway, thanks for the feedback, I'll test all the Python versions then and modify the code to work with 2.4


New features are signing/verifying messages (this is the main thing I want to test) and no more crashing when missing dependencies



Signing/verifying messages requires the ecdsa package, but please do not install it yet to test missing dependencies warnings
It is installable with easyinstall(not sure for windows and osx):
 Linux Debian-based:
  apt-get install python-setuptools
  sudo easy_install ecdsa


 Windows:
  32bit http://pypi.python.org/pypi/setuptools#downloads to install setuptools
  64bit http://pypi.python.org/pypi/setuptools#windows to download, then run ez_setup.py
 
  Go to C:\Python27\Scripts
  Run easy_install.exe ecdsa

 OSX:
  http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other
  or found that too: http://stephenhucker.com/2008/04/08/python-easy-install-on-os-x-105-leopard/



I will post here when I push the new release in github



Also it seems that I forgot to post here that exporting/importing all the tx's to/from a json file have been implemented, see here for instructions
hero member
Activity: 792
Merit: 1000
Bite me
I'll help - what do you want testing ....
can test on windows 32bit XP , Vista 64 , linux ubuntu 64bit
kjj
legendary
Activity: 1302
Merit: 1026
What new features?

By the way, this doesn't work with Python 2.4.2.  I jumped right up to 2.7, so I don't know what the minimum version was.  Among other things, the "A if Condition else B" syntax appears to be pretty new.
member
Activity: 70
Merit: 10
Only a curious passer-by / FirstBits: 13zsc1
I would need a few testers to test new features, anybody?  Smiley

For a donation I would do it.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
I would need a few testers to test new features, anybody?  Smiley
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
jackjack,
what happens if I import a key into the address book of 2 clients ? [not that I want to - I just want to know what would happen]
You will see its balance/tx's in these wallets just like you expect it
Only the first wallet to use the coins can spend them, obviously
hero member
Activity: 792
Merit: 1000
Bite me
Can I generate some private key (not only import it but the opposite) ?

A sort of bitcoins offline.
see  https://bitcointalksearch.org/topic/vanitygen-vanity-bitcoin-address-generatorminer-v022-25804
member
Activity: 70
Merit: 10
Only a curious passer-by / FirstBits: 13zsc1
Can I generate some private key (not only import it but the opposite) ?

A sort of bitcoins offline.
hero member
Activity: 792
Merit: 1000
Bite me
jackjack,
what happens if I import a key into the address book of 2 clients ? [not that I want to - I just want to know what would happen]
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Another new feature: importing transactions
Now, offline transactions are far more simple than before (no more command lines or unofficial client)
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
As I just made a web interface I think it can now be much more useful, mainly for not-too-savvy people, that's why I post here
Here it is: https://github.com/jackjack-jj/pywallet
Download it, run './pywallet.py --web' then open 'http://localhost:8989' in your brower

If you want to reach not-too-savvy people I think a guide needs to be written how to get it up and running on Mac since bsddb is broken in (at least) Snow Leopard (I believe Leopard as well, haven't tried Lion).

Dumping related commands from my bash history, but I had Macports installed since before. The following should be tested by someone who hasn't installed Macports or pywallet, on a clean install. It's just from memory/history.

Mac pywallet installation guide:


Code:
sudo port install python27 python_select
sudo python_select python27
sudo port select --set python python27
sudo port install py-bsddb
sudo port install py27-twisted

./pywallet.py



(yeah python_select might be overkill if the user is never going to install other python versions)
Thanks!
I forgot I have a Snow Leopard VM...... I'll test that there
hero member
Activity: 530
Merit: 500
As I just made a web interface I think it can now be much more useful, mainly for not-too-savvy people, that's why I post here
Here it is: https://github.com/jackjack-jj/pywallet
Download it, run './pywallet.py --web' then open 'http://localhost:8989' in your brower

If you want to reach not-too-savvy people I think a guide needs to be written how to get it up and running on Mac since bsddb is broken in (at least) Snow Leopard (I believe Leopard as well, haven't tried Lion).

Dumping related commands from my bash history, but I had Macports installed since before. The following should be tested by someone who hasn't installed Macports or pywallet, on a clean install. It's just from memory/history.

Mac pywallet installation guide:


Code:
sudo port install python27 python_select
sudo python_select python27
sudo port select --set python python27
sudo port install py-bsddb
sudo port install py27-twisted

./pywallet.py



(yeah python_select might be overkill if the user is never going to install other python versions)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
New awesome feature: you can now delete addresses and tx's from your wallet!

So:
 no more headaches because of 0/unconfirmed transactions: find it, delete it
 easier wallet management: YOU chose exactly which addresses you want in which wallet
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
This works great! I can finally import private keys in Windows Smiley
Thanks for confirming it works in Windows!


Doesn't work in the slightest.

Code:
localhost:bin $ python3.2 ./pywallet.py
  File "pywallet.py", line 54
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax

hmmm....

I think this only works with python 2.
Yes, it works in Python 2.x. Python 3 was untested, until now, thanks for the feedback
member
Activity: 106
Merit: 10
This works great! I can finally import private keys in Windows Smiley
donator
Activity: 1654
Merit: 1354
Creator of Litecoin. Cryptocurrency enthusiast.
Doesn't work in the slightest.

Code:
localhost:bin $ python3.2 ./pywallet.py
  File "pywallet.py", line 54
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax

hmmm....

I think this only works with python 2.
Pages:
Jump to: