Pages:
Author

Topic: Can I create a Bitcoin address with pen and paper ? (Read 4372 times)

hero member
Activity: 1022
Merit: 500
I think following is the best explanation to create a bitcoin address with pen and paper...

What does 'manually' mean, pen and paper only?
Pen and paper, calculator etc...

As long as it's not made by an application.

Pen and paper would take days.

http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html
This is ONE of the hashing algorithms (SHA-256) and this man says he could do 0.67 hashes per day.

The process of generating a bitcoin address by hand (pen and paper) would be the following.

1. roll a 6 sided dice 99 times.
2. write down each result, writing a "0" for every 6 that comes up.
3. take this long string of numbers from 0-5 and convert it from base 6 to base 10.
   a. This means starting from the first non-zero digit on the left, multiply it by 6 then add it to the next digit, then multiply by 6 then add to the next digit... etc. until you get a long number with digits from 0-9.
4. Now you will have to calculate the public key. This is more easily done if the private key (the long number you made) is in binary form (1 or 0) so convert the number to binary.
5. Use the ECDSA point doubling formula and point addition formula on the generator point to get the public key. This will probably take a few days.
6. Convert the public point's x and y value both into binary. Pad each of them with 0s on the left hand side in case they're shorter than 256.
7. add 00000100 to the far left, then the padded x, then the padded y.
8. follow the video I linked above to perform a single SHA256 on the binary string created in #7
9. once you get the single 256 bit binary string... you must then perform the RIPEMD160 hash algorithm on it.
10. once you get the 160 bit length hash from it, add 00000000 to the far left of it... hold this string for later. We will do two things to it.
11. perform a SHA256 on the string from #10, then perform ANOTHER SHA256 on the result. (double SHA256)
12. take the 32 bits on the far left of the result from #11 and add it to the far right of the result from #10
13. For every 8 zeros on the far left of the result of #12, write down a number 1 on a piece of paper. Then convert the left over bits to base 58 as per the bitcoin base 58 specification (it's slightly disorienting if you're doing by hand, as 0 is represented by 1, 1 is represented by 2, 57 is represented by z etc...)
14. now you have your bitcoin address. To format your private key in the widely used WIF format, perform #10-#13 on the binary private key from #4... except instead of sticking 8 zeroes to the far left, add 10000000 to it instead.

How many hours do you estimate it will take for someone quite fast but not exceptional?
sr. member
Activity: 250
Merit: 253
Base 16? What are the numbers 10, 11, 12, 13, 14, 15, 16 with that?
One common convention is;

base 10 - base 16
---------   ---------
0             0
1             1
2             2
3             3
4             4
5             5
6             6
7             7
8             8
9             9
10            0A  ** the leading zeros help to distinguish these hexdigits from other alphabetic characters
11            0B
12            0C
13            0D
14            0E
15            0F
16            10

I have created another Google sheet https://docs.google.com/spreadsheets/d/1kC3IfxBsl5VGTpc6un59m5U4CrsXtl7tgUeLbcZE7G8 to illustrate; click the "using letters" tab to see the classic base 16.
I don't think I've ever seen leading zeroes on hexadecimal used in the way you describe. "0x" is the usual prefix to show it's hexadecimal, or if you're filling out 1 byte (2 hexdigits), you include a leading 0 on 0-F, not just A-F. If I saw a leading zero on an otherwise-ambiguous number, I'd assume it's octal (base 8​).
https://en.wikipedia.org/wiki/Hexadecimal is a good resource.
hero member
Activity: 709
Merit: 503
Base 16? What are the numbers 10, 11, 12, 13, 14, 15, 16 with that?
One common convention is;

base 10 - base 16
---------   ---------
0             0
1             1
2             2
3             3
4             4
5             5
6             6
7             7
8             8
9             9
10            0A  ** the leading zeros help to distinguish these hexdigits from other alphabetic characters
11            0B
12            0C
13            0D
14            0E
15            0F
16            10

I have created another Google sheet https://docs.google.com/spreadsheets/d/1kC3IfxBsl5VGTpc6un59m5U4CrsXtl7tgUeLbcZE7G8 to illustrate; click the "using letters" tab to see the classic base 16.
legendary
Activity: 2226
Merit: 1052
I think following is the best explanation to create a bitcoin address with pen and paper...

What does 'manually' mean, pen and paper only?
Pen and paper, calculator etc...

As long as it's not made by an application.

Pen and paper would take days.

http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html
This is ONE of the hashing algorithms (SHA-256) and this man says he could do 0.67 hashes per day.

The process of generating a bitcoin address by hand (pen and paper) would be the following.

1. roll a 6 sided dice 99 times.
2. write down each result, writing a "0" for every 6 that comes up.
3. take this long string of numbers from 0-5 and convert it from base 6 to base 10.
   a. This means starting from the first non-zero digit on the left, multiply it by 6 then add it to the next digit, then multiply by 6 then add to the next digit... etc. until you get a long number with digits from 0-9.
4. Now you will have to calculate the public key. This is more easily done if the private key (the long number you made) is in binary form (1 or 0) so convert the number to binary.
5. Use the ECDSA point doubling formula and point addition formula on the generator point to get the public key. This will probably take a few days.
6. Convert the public point's x and y value both into binary. Pad each of them with 0s on the left hand side in case they're shorter than 256.
7. add 00000100 to the far left, then the padded x, then the padded y.
8. follow the video I linked above to perform a single SHA256 on the binary string created in #7
9. once you get the single 256 bit binary string... you must then perform the RIPEMD160 hash algorithm on it.
10. once you get the 160 bit length hash from it, add 00000000 to the far left of it... hold this string for later. We will do two things to it.
11. perform a SHA256 on the string from #10, then perform ANOTHER SHA256 on the result. (double SHA256)
12. take the 32 bits on the far left of the result from #11 and add it to the far right of the result from #10
13. For every 8 zeros on the far left of the result of #12, write down a number 1 on a piece of paper. Then convert the left over bits to base 58 as per the bitcoin base 58 specification (it's slightly disorienting if you're doing by hand, as 0 is represented by 1, 1 is represented by 2, 57 is represented by z etc...)
14. now you have your bitcoin address. To format your private key in the widely used WIF format, perform #10-#13 on the binary private key from #4... except instead of sticking 8 zeroes to the far left, add 10000000 to it instead.
legendary
Activity: 1540
Merit: 1001
Crypto since 2014
Base 16? What are the numbers 10, 11, 12, 13, 14, 15, 16 with that?
sr. member
Activity: 378
Merit: 250
The idea of bitcoin started with pen and paper. I'm pretty sure if you're a math genius you can do a lot with pen and paper. Unfortunately I'm not gifted with such a talent
legendary
Activity: 2604
Merit: 1036
This sheet reminded me of the TV show Numb3rs for some reason  Cool
sr. member
Activity: 322
Merit: 250
of course you can, but you don't have to.
legendary
Activity: 1820
Merit: 1001
Why make your life complicated...

For the same reason almost every coder has written code in assembler.. to understand the basics.

Agreed if someone is good with code and maths and likes to crunch numbers then indeed it can be done to understand the basics of it but even then I  do know some code and basics but to go that deep into  the rabbit hole is a whole new meaning. I wouldn't go as far as that too much work and effort to go into basics to rip down.
legendary
Activity: 2226
Merit: 1052
hero member
Activity: 709
Merit: 503
If you can do it by downloading and running bitaddress.org open source software then why would you waste your time? You seriously want to replicate today's technology with the tools of the past? Take about backwards.
That's great; if you can "learn" by reading JavaScript.  Within the client-side code we find;

/*!
* Crypto-JS v2.5.4   SHA256.js
* http://code.google.com/p/crypto-js/
* Copyright (c) 2009-2013, Jeff Mott. All rights reserved.
* http://code.google.com/p/crypto-js/wiki/License
*/
(function () {

   // Shortcuts
   var C = Crypto,
      util = C.util,
      charenc = C.charenc,
      UTF8 = charenc.UTF8,
      Binary = charenc.Binary;

   // Constants
   var K = [0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
        0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
        0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
        0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
        0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
        0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
        0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
        0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
        0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
        0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
        0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
        0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
        0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
        0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
        0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
        0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2];

   // Public API
   var SHA256 = C.SHA256 = function (message, options) {
      var digestbytes = util.wordsToBytes(SHA256._sha256(message));
      return options && options.asBytes ? digestbytes :
       options && options.asString ? Binary.bytesToString(digestbytes) :
       util.bytesToHex(digestbytes);
   };

   // The core
   SHA256._sha256 = function (message) {

      // Convert to byte array
      if (message.constructor == String) message = UTF8.stringToBytes(message);
      /* else, assume byte array already */

      var m = util.bytesToWords(message),
      l = message.length * 8,
      H = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
            0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19],
      w = [],
      a, b, c, d, e, f, g, h, i, j,
      t1, t2;

      // Padding
      m[l >> 5] |= 0x80 << (24 - l % 32);
      m[((l + 64 >> 9) << 4) + 15] = l;

      for (var i = 0; i < m.length; i += 16) {

         a = H[0];
         b = H[1];
         c = H[2];
         d = H[3];
         e = H[4];
         f = H[5];
         g = H[6];
         h = H[7];

         for (var j = 0; j < 64; j++) {

            if (j < 16) w[j] = m[j + i];
            else {

               var gamma0x = w[j - 15],
            gamma1x = w[j - 2],
            gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
                        ((gamma0x << 14) | (gamma0x >>> 18)) ^
                        (gamma0x >>> 3),
            gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
                        ((gamma1x << 13) | (gamma1x >>> 19)) ^
                        (gamma1x >>> 10);

               w[j] = gamma0 + (w[j - 7] >>> 0) +
                gamma1 + (w[j - 16] >>> 0);

            }

            var ch = e & f ^ ~e & g,
         maj = a & b ^ a & c ^ b & c,
         sigma0 = ((a << 30) | (a >>> 2)) ^
                     ((a << 19) | (a >>> 13)) ^
                     ((a << 10) | (a >>> 22)),
         sigma1 = ((e << 26) | (e >>> 6)) ^
                     ((e << 21) | (e >>> 11)) ^
                     ((e << 7) | (e >>> 25));


            t1 = (h >>> 0) + sigma1 + ch + (K[j]) + (w[j] >>> 0);
            t2 = sigma0 + maj;

            h = g;
            g = f;
            f = e;
            e = (d + t1) >>> 0;
            d = c;
            c = b;
            b = a;
            a = (t1 + t2) >>> 0;

         }

         H[0] += a;
         H[1] += b;
         H[2] += c;
         H[3] += d;
         H[4] += e;
         H[5] += f;
         H[6] += g;
         H[7] += h;

      }

      return H;

   };

   // Package private blocksize
   SHA256._blocksize = 16;

   SHA256._digestsize = 32;

})();

Whilst meaningful to many the code above eludes many more.  Meanwhile it is my hope that https://docs.google.com/spreadsheets/d/1mOTrqckdetCoRxY5QkVcyQ7Z0gcYIH-Dc0tu7t9f7tw reveals SHA256 to at least a few more folks that are sheet-knowledgeable but Java-naïve.

Trusting a website to do what it claims is ok up to some threshold of investment.  Having the technical capability to confirm that it is indeed fully client-side with absolutely no backdoor is beyond many.  For investments above some threshold, an air-gapped system is truly wise.
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
Sure, just write down a 1, some random numbers and letters, then compute the checksum by hand and add that to the end.
What?  So, if I write down "1David" (ok, not so random but your algorithm does not apparently exclude it) then you're saying the SHA256 hash of it, AC8CD3CAD235EC200B017C6B585C00915F0442BFB17DA7AD5E9D39D7F1B677BD, appended to it is the private key?  You think the private key is "1DavidAC8CD3CAD235EC200B017C6B585C00915F0442BFB17DA7AD5E9D39D7F1B677BD"?  I beg to differ.

Oh I thought you just wanted a valid address.
legendary
Activity: 2184
Merit: 1024
Vave.com - Crypto Casino
If you can do it by downloading and running bitaddress.org open source software then why would you waste your time? You seriously want to replicate today's technology with the tools of the past? Take about backwards.
hero member
Activity: 709
Merit: 503
I'm pretty sure there's a reference implementation of it. There's this opensource project called Bitcoin you see...
A reference implementation is not what I would call an implementable description.  I'm looking for an English-like step-by-step description of the algorithm to calculate a Bitcoin private key and the corresponding address.
hero member
Activity: 709
Merit: 503
Sure, just write down a 1, some random numbers and letters, then compute the checksum by hand and add that to the end.
What?  So, if I write down "1David" (ok, not so random but your algorithm does not apparently exclude it) then you're saying the SHA256 hash of it, AC8CD3CAD235EC200B017C6B585C00915F0442BFB17DA7AD5E9D39D7F1B677BD, appended to it is the private key?  You think the private key is "1DavidAC8CD3CAD235EC200B017C6B585C00915F0442BFB17DA7AD5E9D39D7F1B677BD"?  I beg to differ.
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
Sure, just write down a 1, some random numbers and letters, then compute the checksum by hand and add that to the end.
full member
Activity: 154
Merit: 100
★Bitin.io★ - Instant Exchange
Just for the fun of it, inspired by Ken Shirriff, I have gone ahead and written SHA256 in a Google sheet https://docs.google.com/spreadsheets/d/1mOTrqckdetCoRxY5QkVcyQ7Z0gcYIH-Dc0tu7t9f7tw.  It does so from scratch, so to speak; it actually calculates the two sets of constants.  All steps are fully revealed demonstrating the intricate details of the algorithm.

To use it yourself, copy the sheet (File->Make a copy...) and then in your copy go to 'input'!B2 and enter up to 55 printable ASCII characters.  Be patient; it can take a minute or more to complete the calculation (many thanks to Google for making compute power available).  The resulting 512-bit hash will be displayed as 64 hex-digits at 'post-round 64'!A10.

donations 17MCh7jJ4dHU5iAfLPv2t8hdjGDDzn95DK
+1

Awesome. Can a bitcoin address creation be represented the same way in excel sheet ? That is all the ecdsa, sha256, ripemd 160 step by step ?
Thanks.  Although a lot can be done in a sheet (Excel or Google, etc.), completely computing a bitcoin address from scratch would be a big job; it was suggested and I started researching it at https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses, etc., but haven't found an implementable description of the algorithm yet.

I'm pretty sure there's a reference implementation of it. There's this opensource project called Bitcoin you see...
hero member
Activity: 709
Merit: 503
Just for the fun of it, inspired by Ken Shirriff, I have gone ahead and written SHA256 in a Google sheet https://docs.google.com/spreadsheets/d/1mOTrqckdetCoRxY5QkVcyQ7Z0gcYIH-Dc0tu7t9f7tw.  It does so from scratch, so to speak; it actually calculates the two sets of constants.  All steps are fully revealed demonstrating the intricate details of the algorithm.

To use it yourself, copy the sheet (File->Make a copy...) and then in your copy go to 'input'!B2 and enter up to 55 printable ASCII characters.  Be patient; it can take a minute or more to complete the calculation (many thanks to Google for making compute power available).  The resulting 512-bit hash will be displayed as 64 hex-digits at 'post-round 64'!A10.

donations 17MCh7jJ4dHU5iAfLPv2t8hdjGDDzn95DK
+1

Awesome. Can a bitcoin address creation be represented the same way in excel sheet ? That is all the ecdsa, sha256, ripemd 160 step by step ?
Thanks.  Although a lot can be done in a sheet (Excel or Google, etc.), completely computing a bitcoin address from scratch would be a big job; it was suggested and I started researching it at https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses, etc., but haven't found an implementable description of the algorithm yet.
legendary
Activity: 2296
Merit: 1014
don't bother except if you are a student of cryptography....
Agree, it will take SOOOOOOOOOOO long its crazy
sr. member
Activity: 311
Merit: 264
-snip-

In theory this would allow you to use google's resources to try to "mine" addresses for possible brain wallets

No it wouldnt. It* would help does willing to learn to understand how exactly an address is made. If you want to farm brain wallets there are allready pages out there that are way more efficient.

* "It" beeing the version that allows to create an address "by hand", if it is possible to do in a spreadsheet at all.

It is not creating address. It is finding hash.
Pages:
Jump to: