Bitcoin Forum
April 19, 2024, 10:26:43 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [GUIDE] Create a Bitcoin address from scratch  (Read 4655 times)
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
August 19, 2011, 01:10:05 AM
 #1

As requested here: https://bitcointalk.org/index.php?topic=37966.msg466652#msg466652


  • Download Pywallet. You only need to install Python 2.7. If you encounter some problems installing Python, post in pywallet thread, someone will answer you quickly
  • Pick 64 random characters in the following list: [1234567890abcdef]
  • For example, say you chose "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  • Run the console (Windows-R then "cmd" then Enter on windows)
  • Run:
Code:
cd 'the directory where you downloaded pywallet'
  • Then run:
Code:
./pywallet.py --info --importhex --importprivkey 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef


This should returns:
Code:
Address (Bitcoin): 19ffB4HttNCHfY1t3YuErEytCspyHyVMwv
Privkey (Bitcoin): 5HxJb9hZNXEEk9SAM3J7gXBK6zgkkLW5dpx2WDdBZub8HxifdDH
Hexprivkey: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
The first line is your address
The second and the third is two different manners to write your private key, you don't have to save/print both, but be sure to keep at least one of them

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
1713565603
Hero Member
*
Offline Offline

Posts: 1713565603

View Profile Personal Message (Offline)

Ignore
1713565603
Reply with quote  #2

1713565603
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713565603
Hero Member
*
Offline Offline

Posts: 1713565603

View Profile Personal Message (Offline)

Ignore
1713565603
Reply with quote  #2

1713565603
Report to moderator
TTBit
Legendary
*
Offline Offline

Activity: 1136
Merit: 1001


View Profile
August 19, 2011, 12:28:15 PM
 #2

Just saw this thread. THANK YOU!

good judgment comes from experience, and experience comes from bad judgment
TTBit
Legendary
*
Offline Offline

Activity: 1136
Merit: 1001


View Profile
August 20, 2011, 07:49:52 AM
Last edit: August 20, 2011, 11:03:01 PM by TTBit
 #3

jackjack, thank you for the guide.

I was hoping someone could help, I can't get it to work.

I am not a programmer.

* Windows 7, 64bit
* installed Python 2.7, its in \Python27
* Downloaded v1.2 from: https://github.com/jackjack-jj/pywallet I threw it right in the \Python27 directory

Code:
C:\Python27>pywallet.py
Traceback (most recent call last):
  File "C:\Python27\pywallet.py", line 1320, in <module>
    class WIRoot(resource.Resource):
NameError: name 'resource' is not defined

EDIT: Fixed. Thank you!

good judgment comes from experience, and experience comes from bad judgment
davux
Sr. Member
****
Offline Offline

Activity: 288
Merit: 263


Firstbits.com/1davux


View Profile WWW
August 20, 2011, 08:26:42 AM
 #4

At first glance, this could sound like a great way to store your money: pick an easy-to-remember, passphrase-like private key and you're done. Better yet, come up with an algorithm for hashing any ASCII string as a [1234567890abcdef]{64} string and you can literally store your money in your mind.

The problem with this approach is that your private key wouldn't be so random anymore, which reduces dangerously the number of possibilities, bringing it down to a brute-forceable set.

Taking it the other way round: if people start to generate addresses based on easy-to-remember private keys, then a group of people can start to pre-calculate the most obvious ones (the amount will depend on my computing power and how much time I spend doing it), check their balance regularly and take their coins.

This is only an impression, though – I didn't do any maths and might be totally wrong (which would be nice!). It would be interesting to check this assertion with actual numbers.

1DavuxH9tLqU4c7zvG387aTG4mA7BcRpp2
México (Oaxaca) – France - Leeds
TTBit
Legendary
*
Offline Offline

Activity: 1136
Merit: 1001


View Profile
August 20, 2011, 08:42:03 AM
 #5

I intend to come up with random, save it on paper and store it where one would store jewelry/gold. What's cool is that I can now store my 'gold' in my safety deposit box at the bank, in my wallet, engraved on my toothbrush, or on a postcard sent to my grandma. Double edged sword indeed, my 'gold' can now be stolen in many different places too.

good judgment comes from experience, and experience comes from bad judgment
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
August 20, 2011, 08:49:18 AM
 #6

Jackjack,

WOuld you be willing to update pywallet to support the import of the 22-character private keys I will be using on my physical bitcoins?  I would like to encourage this (or a similar format) for other applications... 22 characters fits well on a small QR code without being ridiculously dense, yet still provides a decent amount of entropy (around 128 bits).

My codes are 22 characters, and the private key is simply the sha256 of the 22 characters as a string, with the following constraints:

1. the first character is always 'S'
2. all the characters come from the base58 alphabet
3. as a guard against typos, all my codes conform to the following rule: the sha256 of (string + "?") will be a hash that begins with eight zero bits (so, first byte is 00 hex).  That is, the string with a question mark appended, so 23 characters.
4. they are printed in the coins in four groups - five,six,six,five characters so they fit on a circle.  There are no separators or spaces between the groups for the purpose of the hash calculation, but the user might enter them anyway.  Respond gracefully.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
August 20, 2011, 08:51:48 AM
 #7

At first glance, this could sound like a great way to store your money: pick an easy-to-remember, passphrase-like private key and you're done. Better yet, come up with an algorithm for hashing any ASCII string as a [1234567890abcdef]{64} string and you can literally store your money in your mind.

One such algorithm exists... it's known as SHA256 and is used widely within Bitcoin =).  Download Casascius Bitcoin Utility and you can see passphrases converted directly to Bitcoin addresses.

The problem with this approach is that your private key wouldn't be so random anymore, which reduces dangerously the number of possibilities, bringing it down to a brute-forceable set.

Only if people chose dumb passphrases.  Anything strong will take an impossible amount of time to brute force.  Brute forcing ECDSA keys is also incredibly slow (CPU intensive), much slower than brute forcing hashes by several orders of magnitude.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
August 20, 2011, 01:11:25 PM
 #8

At first glance, this could sound like a great way to store your money: pick an easy-to-remember, passphrase-like private key and you're done. Better yet, come up with an algorithm for hashing any ASCII string as a [1234567890abcdef]{64} string and you can literally store your money in your mind.

The problem with this approach is that your private key wouldn't be so random anymore, which reduces dangerously the number of possibilities, bringing it down to a brute-forceable set.

Taking it the other way round: if people start to generate addresses based on easy-to-remember private keys, then a group of people can start to pre-calculate the most obvious ones (the amount will depend on my computing power and how much time I spend doing it), check their balance regularly and take their coins.

This is only an impression, though – I didn't do any maths and might be totally wrong (which would be nice!). It would be interesting to check this assertion with actual numbers.
In this guide there are no passphrases, just 64 hex characters randomly chosen by the user
To use passphrases you can use this, but the passphrase isn't enough to retrieve the coins. The program also prints a 10-digits number which is like an additional key, but much more practical because you can store it anywhere (mobile, postit) without being noticed as a 10-digits number is rather common
You can also use the sha256 of one of your file to get a priv key


Jackjack,

WOuld you be willing to update pywallet to support the import of the 22-character private keys I will be using on my physical bitcoins?  I would like to encourage this (or a similar format) for other applications... 22 characters fits well on a small QR code without being ridiculously dense, yet still provides a decent amount of entropy (around 128 bits).

My codes are 22 characters, and the private key is simply the sha256 of the 22 characters as a string, with the following constraints:

1. the first character is always 'S'
2. all the characters come from the base58 alphabet
3. as a guard against typos, all my codes conform to the following rule: the sha256 of (string + "?") will be a hash that begins with eight zero bits (so, first byte is 00 hex).  That is, the string with a question mark appended, so 23 characters.
4. they are printed in the coins in four groups - five,six,six,five characters so they fit on a circle.  There are no separators or spaces between the groups for the purpose of the hash calculation, but the user might enter them anyway.  Respond gracefully.
Why don't you use the privatekey format used by sipa's fork/vanitygen/pywallet/bitbills/etc which is a de facto standard?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!