Bitcoin Forum
November 18, 2024, 03:13:31 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Can you create a Bitcoin address manually?  (Read 2884 times)
matt4054
Legendary
*
Offline Offline

Activity: 1946
Merit: 1035



View Profile
January 12, 2015, 02:48:27 PM
 #21

Why dont just go to coinbase or blockchain and create a bitcoin wallet.... simple... because creating one manually is like wut? why would you want to do that?

For the same kind of reasons as the guy who ported Quake to an oscilloscope I guess? i.e. for the challenge
llanillo
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
January 12, 2015, 03:04:22 PM
 #22

Why dont just go to coinbase or blockchain and create a bitcoin wallet.... simple... because creating one manually is like wut? why would you want to do that?

For the same kind of reasons as the guy who ported Quake to an oscilloscope I guess? i.e. for the challenge


Lol that's actually pretty nice ... well good luck to him ..  i don't know how to help him anyways he surrendered xD

TIDEX ▬▬ .CRYPTO COINS AND ASSET TRADING. ▬▬ TIDEX
▬▬▰▰▬▬▰▰▰▬▬▰▰▰▬▬▰▰▰▬▬▰▰▬▬
NEW EXCHANGE   ZERO FEES
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 12, 2015, 05:31:31 PM
 #23

Wouldn't it be more efficient to just use 10 sided dice? This way you can skip some conversions?

Since you are trying to create a 256 bit number typically represented as either Hex or base58, wouldn't it be more efficient to use either:
sixty-four 16-sided dice, or eighty-six 8-sided dice, or one hundred twenty-eight 4-sided dice?

Or a single standard deck of cards.


DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
January 12, 2015, 05:38:53 PM
 #24

Since you are trying to create a 256 bit number typically represented as either Hex or base58, wouldn't it be more efficient to use either:
sixty-four 16-sided dice, or eighty-six 8-sided dice, or one hundred twenty-eight 4-sided dice?
Or a single standard deck of cards.

I know we've discussed this before (I even considered including it with my dice suggestions), but I can't seem to remember the method of converting card suits and values to a 256 bit value.

Was it just to list out all the card names and numbers and then take SHA256 of the list? Or was there some way of assigning bit values to the cards?  I left it out of my suggestion, because I couldn't remember how to do it.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 12, 2015, 05:57:35 PM
 #25

Was it just to list out all the card names and numbers and then take SHA256 of the list?

That is the easiest and most direct.  It is slightly less than 256 bits of entropy (225 bits for 52 card deck, 237 for 54 card deck).


Quote
Or was there some way of assigning bit values to the cards?  I left it out of my suggestion, because I couldn't remember how to do it.

You probably could but it would be tedious.  I never came up with any such system.  At some point one needs to trust something.   Still if one absolutely needed to generate the private key by hand only then the simplest (although not the most efficient) would be to just look at the suits but it would require at least 3 (4 is probably better) passes through the deck.
Ralphs
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
January 12, 2015, 07:57:49 PM
 #26

You can... but doing some complicated elliptic curve math and then manually hashing the address with two different hashing algorithms sounds like a lot less fun than having a computer generated one Tongue
TimS
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
January 12, 2015, 08:15:23 PM
 #27

Quote
Or was there some way of assigning bit values to the cards?  I left it out of my suggestion, because I couldn't remember how to do it.

You probably could but it would be tedious.  I never came up with any such system.  At some point one needs to trust something.   Still if one absolutely needed to generate the private key by hand only then the simplest (although not the most efficient) would be to just look at the suits but it would require at least 3 (4 is probably better) passes through the deck.
It is possible to assign a bit value to permutations, but I couldn't tell you exactly how to do it. You can't assign bit values directly to cards (at least in the way I'm thinking), because 52^52 > 2^256. It is very similar to Project Euler's Problem 24. By analogy for a 3-card deck: assign each permutation a number value.
1: 012
2: 021
3: 102
4: 120
5: 201
6: 210
Represent this as a 3-bit value. That's your private key, with ~2.6 bits of entropy. This analogy can also show you why a straightforward conversion like "represent each card as a base 3 digit in the number, then convert to binary" won't work: 222_3 = 26, which would require 5 bits to store in binary, not just 3.
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 267


View Profile
January 13, 2015, 07:39:06 AM
 #28

Quote
Or was there some way of assigning bit values to the cards?  I left it out of my suggestion, because I couldn't remember how to do it.

You probably could but it would be tedious.  I never came up with any such system.  At some point one needs to trust something.   Still if one absolutely needed to generate the private key by hand only then the simplest (although not the most efficient) would be to just look at the suits but it would require at least 3 (4 is probably better) passes through the deck.
It is possible to assign a bit value to permutations, but I couldn't tell you exactly how to do it. You can't assign bit values directly to cards (at least in the way I'm thinking), because 52^52 > 2^256. It is very similar to Project Euler's Problem 24. By analogy for a 3-card deck: assign each permutation a number value.
1: 012
2: 021
3: 102
4: 120
5: 201
6: 210
Represent this as a 3-bit value. That's your private key, with ~2.6 bits of entropy. This analogy can also show you why a straightforward conversion like "represent each card as a base 3 digit in the number, then convert to binary" won't work: 222_3 = 26, which would require 5 bits to store in binary, not just 3.

If you use permutations of a deck of cards you get 52! possibilities which is <2^256. You need a few more cards.
To convert a given permutation to a number with a pen and paper you can do this using 1 2 0 as en example
- go from left to right, write the digit you see and then change the number to the right by subtracting 1 to every number that is greater than that digit

1 2 0 -> first digit 1, rest is 2 0 -> write 1, update the rest to 1 0 -> now we have 1 1 0
1 1 0 -> second digit is 1, rest is 0 -> write 1, the rest doesn't change -> final list 1 1 0

- ditch the last digit => now we have 1 1
- keep an accumulator. set it to 0 => acc = 0
- go left to right, pair the digit with a counter that starts at the length of the list (here 2) and decrements by 1 =>
  + every step, sum the digit with the acc and multiply by the counter
  + store the result in the acc
  => step 1: acc = 0, cnt = 2, digit = 1 => acc = 0 + 2*1 = 2
  => step 2: acc = 2, cnt = 1, digit = 1 => acc = 2 + 1*1 = 3

The final value of your acc is your permutation number.

Code:
perm :: [Int] -> [Int]
perm [] = []
perm (top:rest) = top:perm [if x>top then x-1 else x|x <-rest]

permN :: [Int] -> Int
permN deck =
  let trim = init(perm deck)
      n = length trim
  in foldl (\acc (c,d) -> (acc+d)*c) 0 (zip [n,n-1..1] trim)


jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
January 15, 2015, 01:11:40 AM
 #29

yeah but why do you need that much entropy when there's only 2^160 addresses?

Pages: « 1 [2]  All
  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!