Bitcoin Forum
November 11, 2024, 08:07:16 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Why can't a private key be calculated from its address?  (Read 3061 times)
BitNerd (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
February 01, 2015, 10:06:56 AM
 #21

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)
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
February 01, 2015, 10:29:19 AM
 #22

Thanks for the response. I like mathematics but never studied too much of it. I would like to understand in more detail both about functions that can't be reversed and the ones which reversion is much harder than the original,
- snip -

http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/1/

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
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


CoinBooster Rep


View Profile
February 01, 2015, 10:37:00 AM
 #23

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

CoinBooster.io - Earn up to 67mil satoshi per day. Claim every 5 minutes. NO POP UPS! HIGH ROI
Bitcointalk Official Thread
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1026



View Profile
February 02, 2015, 03:49:41 AM
 #24

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
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
February 02, 2015, 04:55:07 AM
 #25

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 Offline

Activity: 3486
Merit: 4832



View Profile
February 02, 2015, 05:41:59 AM
 #26

Thanks for the response. I like mathematics but never studied too much of it. I would like to understand in more detail both about functions that can't be reversed and the ones which reversion is much harder than the original,
- snip -

http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/1/

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)
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
February 02, 2015, 10:30:06 AM
 #27

Thanks for the response. I like mathematics but never studied too much of it. I would like to understand in more detail both about functions that can't be reversed and the ones which reversion is much harder than the original,
- snip -

http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/1/

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 Offline

Activity: 3486
Merit: 4832



View Profile
February 02, 2015, 02:29:03 PM
 #28

Thanks for the response. I like mathematics but never studied too much of it. I would like to understand in more detail both about functions that can't be reversed and the ones which reversion is much harder than the original,
- snip -

http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/1/

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
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


https://youtu.be/PZm8TTLR2NU


View Profile WWW
February 02, 2015, 02:42:54 PM
 #29

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.

Remember Aaron Swartz, a 26 year old computer scientist who died defending the free flow of information.
BitNerd (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
February 02, 2015, 06:37:52 PM
 #30

Thanks for the response. I like mathematics but never studied too much of it. I would like to understand in more detail both about functions that can't be reversed and the ones which reversion is much harder than the original,
- snip -

http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/1/

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 Offline

Activity: 3486
Merit: 4832



View Profile
February 02, 2015, 08:21:00 PM
 #31

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 Offline

Activity: 1022
Merit: 1000


View Profile
February 03, 2015, 12:37:15 AM
 #32

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.
juju
Sr. Member
****
Offline Offline

Activity: 381
Merit: 250



View Profile
February 03, 2015, 01:11:16 AM
 #33

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?

Op check out: https://www.khanacademy.org/computing/computer-science/cryptography

Takes less than few hours at most, and its free.
Ingatqhvq
Hero Member
*****
Offline Offline

Activity: 532
Merit: 500



View Profile
February 03, 2015, 03:51:12 AM
 #34

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.
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!