Author

Topic: Generating key pairs in Linux from a passphrase? (Read 1243 times)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Yes you always need to be root to install something with aptitude
Yes, just sudo and it's OK
Note that installing with sudo won't make python and other things you install have root rights
member
Activity: 93
Merit: 10
Hmm, tried to install in Ubtuntu. Got:

Quote
~$ aptitude install build-essential python-dev python-twisted python-bsddb3
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Dumb question, but do I need to be root to install? Just use sudo before "aptitude"? Always makes me nervous to install this stuff when I am not sure what Im doing.
legendary
Activity: 3514
Merit: 4895
Yeah that's pretty misleading but I made these changes when I first started to modify pywallet, that was not intended to become a real, public fork
I think it's mentionned in the readme though

When you do this you get: address, privkey, hexadecimal privkey, hash160 and pubkey

Great! Thanks.  I've been looking for something like that.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Yeah that's pretty misleading but I made these changes when I first started to modify pywallet, that was not intended to become a real, public fork
I think it's mentionned in the readme though

When you do this you get: address, privkey, hexadecimal privkey, hash160 and pubkey
legendary
Activity: 3514
Merit: 4895
pywallet.py -info -importprivkey PRIVKEY ('-importhex' if privkey is hexadecimal)

Ah, I had assumed that importprivkey would attempt to import the private key into a wallet.  I hadn't realized that it would write the public key to STDOUT.  Interesting behavior.  Can I get it to write the Bitcoin Address to STDOUT instead of the public key?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
pywallet.py -info -importprivkey PRIVKEY ('-importhex' if privkey is hexadecimal)
legendary
Activity: 3514
Merit: 4895
I'm not aware of any utilities currently available that will allow you to present a private key and receive a public key in response..
Pywallet

I didn't see anything in the usage about that.  What are the command line parameters for that behavior?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
I'm not aware of any utilities currently available that will allow you to present a private key and receive a public key in response..
Pywallet
legendary
Activity: 3514
Merit: 4895
I'm not aware of any utilities currently available that will allow you to present a private key and receive a public key in response.

There appear to be libraries for javascript, PHP, and Python to assist with the calculation of the public key.
member
Activity: 93
Merit: 10
Proff, at the link you mentioned installing Armory would seem to do the trick? But what command do I use?

Quote
echo -n C4BBCB1FBEC99D65BF59D85C8CB62EE2DB963F0FE106F483D9AFA73BD4E39A8A | python ArmoryQt.py -genPublicKey
did not seem to work.

Would like to use something other than bitaddress or brainwallet.org since I am looking to verify the output from those in the first place. Does not have to be command line based but I was looking for something command line because I was looking to do this on a bootable Puppy Linux machine.
sr. member
Activity: 252
Merit: 250

Thanks - but can you tell me what the actual commands/steps would be though for Linux to get from seed passphrase to the private/public key?


You can also download the html/js code from https://www.bitaddress.org/ Open your local instance with your browser; go to the tab "Brain wallet" and put there your password. If paranoid, unplug the net cord before proceeding.
legendary
Activity: 1974
Merit: 1030
Also, writing a space before your command doesn't keep it in bash history

You can't rely on yourself to remember that. It's better to use 'unset HISTFILE'. And close the terminal after finishing so its memory (particularly the scrollback buffer) is released to the OS.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
The wiki explains everything
Also, writing a space before your command doesn't keep it in bash history
newbie
Activity: 46
Merit: 0
Thanks - but can you tell me what the actual commands/steps would be though for Linux to get from seed passphrase to the private/public key?

Sorry I almost posted this to newbie section but thought the folks here would know how to answer.
NB Zeilap's comment. That said, look at https://bitcointalksearch.org/topic/zshopenssl-shell-script-key-generator-133220 to see how to string the commands together.
full member
Activity: 154
Merit: 100
Step 1: delete your bash history
Step 2: don't try to roll your own security tools
member
Activity: 93
Merit: 10
Pretty much anything that transforms your passphrase into 256 bits
sha256, first half of sha512, last half of sha512, sha1+sha1, ridemd256, etc

Thanks - but can you tell me what the actual commands/steps would be though for Linux to get from seed passphrase to the private/public key?

Sorry I almost posted this to newbie section but thought the folks here would know how to answer.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Pretty much anything that transforms your passphrase into 256 bits
sha256, first half of sha512, last half of sha512, sha1+sha1, ridemd256, etc
member
Activity: 93
Merit: 10
In Linux I know "echo -n passphrase | sha256sum" will give me a string which then you convert to base58 to get a private key, and then you need to do something to that to get the corresponding public key.

What are the Linux commands to do this beyond the first one "echo -n passphrase | sha256sum" to get the private/public key pairs? Or how would I do that? I am trying to verify pairs given to me by bitaddress.org or brainwallet.org...
Jump to: