BitNerd (OP)
|
|
February 01, 2015, 10:06:56 AM |
|
Stupid people should just be happy with the fact that we let them remain here with us on Earth and they get to benefit from all the smart people who make cool shit. BitNerd, Don't try to figure out math. You are annoying the numbers.
I don't need to "let you" live in the same planet as I live. You are born with the natural right of private property, no need to worry. And numbers are not alive, don't worry about them either.
|
|
|
|
BitNerd (OP)
|
|
February 01, 2015, 10:29:19 AM |
|
Thanks, it's very interesting. Now I'm curious about how are public and private btc keys generated. Do you know a site explaining that?
|
|
|
|
sifter
|
|
February 01, 2015, 10:37:00 AM |
|
If computers can calculate an address from its private key, then why can't they do the reverse and calculate a private key from an address?
Not all calculations are reversible. Suppose private keys and address work like this: private keys are long numbers, and addresses are the sum of all digits. Obviously a simplification, but just as an example. So if you have private key = 134505719542, then you can easily calculate the address: 1+3+4+5+0+5+7+1+9+5+4+2 = 46. Now I have another address: 43. What's the private key? I understand this. It's a good example.There are too many combinations
|
|
|
|
luv2drnkbr
|
|
February 02, 2015, 03:49:41 AM |
|
In his example, it is extremely easy to calculate not just one, but many and all the possible private keys of an address, with nearly the same difficulty of the reverse, it surely doesn't explain bitcoin at all.
Nope, that does explain Bitcoin. Each address represents around 2^96 possible private keys. It is believed to be computationally infeasible to generate a collision. But all of the 2^96 possible private keys of an address work, don't they? Or only one works? Yes, because a bitcoin address is a 160 bit hash, and since a private key (and its corresponding public key) are 256 bits, there are 2^96 (96 = 256 - 160) public keys which should have the same 160 bit hash. That has nothing to do with the private key to public key operation. It has to do with the fact inputting 256 bits into a hash and getting out 160 bits. The number of possible inputs is higher than the number of possible outputs, so therefore some inputs MUST have the same output as others. And so yes, any of those 2^96 private keys will work, because the mathematical requirement for sending a bitcoin is only that the signature is valid and that the hash matches, so any key that can produce the hash will satisfy that requirement. Problem is you have to brute force through 160 bits before you are guaranteed to start getting those collisions... (And "bits" means it's exponential. 160 bits isn't twice as hard to brute force as 80 bits, it's 2^80 times as hard.)
|
|
|
|
doof
|
|
February 02, 2015, 04:55:07 AM |
|
Also, SHA-256 is used to hash the public key. SHA-256 uses two logical functions. 1. the majority function and 2. the choosing function.
Majority function works how it sounds. Given 3 bits, it selects the majority. So;
MAJ(0,0,0) = 0 MAJ(0,0,1) = 0 MAJ(0,1,0) = 0 MAJ(1,0,0) = 0
Thus 4 combinations of inputs yield one and only one output.
The choosing function works in a similar way. The first input chooses the second. If first is positive, choose the second, else choose the third.
CH(0,0,0) = 0 CH(1,0,0) = 0 CH(0,1,0) = 0 CH(1,1,0) = 0
And so on.
|
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3486
Merit: 4832
|
|
February 02, 2015, 05:41:59 AM |
|
Thanks, it's very interesting. Now I'm curious about how are public and private btc keys generated. Do you know a site explaining that? Private keys are "generated" as a randomly chosen number between: 0x01 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 (1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336) The programer of a wallet (or address generating software) chooses how they want to generate the random number. If you like, you can even do it with dice or a deck of cards. Once you've chosen a random private key, the public key is calculated as described at that arstechnica link above using the secp256k1 curve.
|
|
|
|
BitNerd (OP)
|
|
February 02, 2015, 10:30:06 AM |
|
Thanks, it's very interesting. Now I'm curious about how are public and private btc keys generated. Do you know a site explaining that? Private keys are "generated" as a randomly chosen number between: 0x01 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 (1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336) The programer of a wallet (or address generating software) chooses how they want to generate the random number. If you like, you can even do it with dice or a deck of cards. Once you've chosen a random private key, the public key is calculated as described at that arstechnica link above using the secp256k1 curve. Thank you. Now I wonder how do you convert the big number to the smaller one with upper and lower case letters?
|
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3486
Merit: 4832
|
|
February 02, 2015, 02:29:03 PM |
|
Thanks, it's very interesting. Now I'm curious about how are public and private btc keys generated. Do you know a site explaining that? Private keys are "generated" as a randomly chosen number between: 0x01 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 (1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336) The programer of a wallet (or address generating software) chooses how they want to generate the random number. If you like, you can even do it with dice or a deck of cards. Once you've chosen a random private key, the public key is calculated as described at that arstechnica link above using the secp256k1 curve. Thank you. Now I wonder how do you convert the big number to the smaller one with upper and lower case letters? https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses(Have you never heard of internet search engines? Most of these answers come up with about 30 seconds of effort on Google, Yahoo, Bing, etc.)
|
|
|
|
Beliathon
|
|
February 02, 2015, 02:42:54 PM |
|
If computers can calculate an address from its private key, then why can't they do the reverse and calculate a private key from an address?
Because you don't have a quantum computer at your disposal, and you never will.
|
|
|
|
BitNerd (OP)
|
|
February 02, 2015, 06:37:52 PM |
|
Thanks, it's very interesting. Now I'm curious about how are public and private btc keys generated. Do you know a site explaining that? Private keys are "generated" as a randomly chosen number between: 0x01 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 (1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336) The programer of a wallet (or address generating software) chooses how they want to generate the random number. If you like, you can even do it with dice or a deck of cards. Once you've chosen a random private key, the public key is calculated as described at that arstechnica link above using the secp256k1 curve. Thank you. Now I wonder how do you convert the big number to the smaller one with upper and lower case letters? https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses(Have you never heard of internet search engines? Most of these answers come up with about 30 seconds of effort on Google, Yahoo, Bing, etc.) Thanks. So, a private key is nothing more than a random number between 1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336 converted to base58? Very interesting. Ok, I will try to google my next questions and will ask here in case I don't find the answer.
|
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3486
Merit: 4832
|
|
February 02, 2015, 08:21:00 PM |
|
So, a private key is nothing more than a random number between 1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336 converted to base58?
Not exactly. A Bitcoin private key is nothing more than a random number between 1 and 115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336. You are welcome to convert it into any base you like. It's just a number. The Wallet Import Format (WIF) of a Bitcoin private key is a specific representation of that private key that concatenates: a one byte version number, the private key, and a 4 byte checksum. This value is then converted into base58 using the rules described here: https://en.bitcoin.it/wiki/Base58Check_encoding
|
|
|
|
galbros
Legendary
Offline
Activity: 1022
Merit: 1000
|
|
February 03, 2015, 12:37:15 AM |
|
I'd like to thank everyone, especially Kazimir, for laying this all out so clearly. I feel a lot better about sites like directory.io and www.Buttcoins.com being out there now. Even though directory.io was said to be a hoax, the news story about it was focused more on how many address and key pairs there were rather than you can't get the private key from the public one. Thanks.
|
|
|
|
|
Ingatqhvq
|
|
February 03, 2015, 03:51:12 AM |
|
If computers can calculate an address from its private key, then why can't they do the reverse and calculate a private key from an address?
Not every process is reversible.
|
|
|
|
|