Pages:
Author

Topic: For the super paranoid: How do I get the public key from a private key by hand? - page 2. (Read 4700 times)

full member
Activity: 217
Merit: 259
Computing the public key d*G from the private key d needs a lot of computations.  It takes about 1000 multiplications of 77 digit numbers.  Not something you can easily do with pen and paper.
member
Activity: 98
Merit: 10
It is enough to "generate" private key on the paper. Obtain bitcoin address is too difficult without computer.
newbie
Activity: 12
Merit: 0
I wonder if it would be possible to draw a giant elliptic curve and do it that way. Elliptic curves probably aren't geometrical for finite fields though.
administrator
Activity: 5222
Merit: 13032
If the private key is d, then the public key is d * G, where G is a specific point on the elliptic curve (everyone uses the same G), and * is not normal multiplication, but elliptic curve multiplication.

There's a good guide on elliptic curve math here:
http://www.johannes-bauer.com/compsci/ecc/
Your main goal will be to do "scalar point multiplication", which is what d*G is. To do that you'll need to do elliptic curve addition & doubling. And all math must be done using modular arithmetic, also explained on that page. It's actually fairly simple, but when dealing with Bitcoin's huge 256-bit numbers, it'll take a very long time.

Bitcoin's values for the constants G (the generator point needed for getting a public key point from a private key number), a, b (used to define the curve itself), and p (the modulus used for modular arithmetic) are listed here:
https://en.bitcoin.it/wiki/Secp256k1
There G is encoded in a standard way; what it means is that G is the point (79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798, 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8).
legendary
Activity: 1512
Merit: 1012
Not sure if I can really help you, but you can start here
newbie
Activity: 12
Merit: 0
Okay, so let's say I have flipped a fair coin (on which I've done extensive statistical analysis on (doing the statistics by hand)) 256 times and now have a private key. How would one go about calculating the public key by hand? This way the private key has only gone through one brain, an organic one.

I'm okay with using things like paper and pencil, and even an abacus, but nothing that uses electricity. (Mechanical computers of sufficient complexity should also be avoided. The human mind should be doing the brunt of the work.)

(P.S. If you are actually interested in creating private keys by hand, I would recommend shuffling a deck. A randomly shuffled deck has about 225 bits of entropy. (See en.wikipedia.org/wiki/Shuffling#Research and other sources for random shuffling.) If you want all 256 bits, shuffle the deck again and draw 6 cards. Although you could convert this to a number using a mixed radix method (en.wikipedia.org/wiki/Mixed_radix), its easier to type in the deck and hash it. The advantage of the deck method as opposed to computer based methods is you don't have to worry as much about your entropy source being compromised (its only likely that the NSA has tampered with the thickness or amount of friction between the cards.))
Pages:
Jump to: