Pages:
Author

Topic: Why is it hard to track backwards from public address to private key? - page 2. (Read 4321 times)

member
Activity: 115
Merit: 10
I multiplied 2 prime integers... (Actual ECDSA pubkey I just made).

RSA instead of ECDSA?  I don't think ECDSA public keys can be created by simply multiplying integers.

Given that the number ends in a 4, I'll bet that one of the integers was 2, or perhaps more realistically, there was a transcription mistake.

Christ the people on this forum are sharp as a tack! Indeed, I simplified to the two primes example to just explain the basics of public vs private key, and completely forgot that ECDSA's dont work that way when I posed that actual integer PubKey (even though that key was in fact made by multiplying a private key with another number, they arent both primes).

And I thought that was a very clear way of explaining it...now the clarity of the explanation is in danger!
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
I multiplied 2 prime integers... (Actual ECDSA pubkey I just made).

RSA instead of ECDSA?  I don't think ECDSA public keys can be created by simply multiplying integers.

Given that the number ends in a 4, I'll bet that one of the integers was 2, or perhaps more realistically, there was a transcription mistake.
member
Activity: 115
Merit: 10
My take on explaining it:
Simplification: PublicKey = PrivateKey*AnotherNumber

So try to answer these questions, and hopefully you'll catch onto the concept real quick.

I multiplied 2 prime integers and got 21.
What two integers did I use?

I multiplied 2 prime integers and got 187.
What two integers did I use?

I multiplied 2 prime integers and got 1688063245889.
What two integers did I use?

ECDSA Public keys (used in bitcoin) are also the product of two large numbers...resulting in a huge product: 6013791818574714160321075769550160928403040221691660914916154278519966847051905 1547600040617210584736371110675553294866150136440087998368169814283413476604.
(Actual ECDSA pubkey I just made).
Factoring this would be tough!

(Thanks to casascius for pointing out my careless screwup that ECDSA are not 2 prime factors).







hero member
Activity: 743
Merit: 500
THE BETTER video to explain this.

http://www.youtube.com/watch?v=3QnD2c4Xovk
This is symmetric cryptography. Ie. cryptography where the encrypting and decrypting keys are the same. It explains how two people can agree on a shared secret key when their communication is intercepted by a third party, without that third party being able to figure out what the key is. This is called the Diffie-Hellman key exchange.

Bitcoin uses asymmetric cryptography, where the are two keys: the public and the private, and one encrypts and the other decrypts.

ArtOfTheProblem is really good at explaining this stuff for non-mathematicians though. They've also made a video on public key cryptography. This one covers RSA. http://www.youtube.com/watch?v=wXB-V_Keiu8
Really great video! They are good explaining the extreme complex concepts we are dealing with. The important thing, in my opinion, is understanding the one way function.  Both videos explain it with the same color mixing examples.
really liked both videos ^ ,but I would like to see simple video with ECC Public Key Cryptography be the same author Brit Cruise
I asked him and he answered that he'll be making one "in the not too distant future": http://www.youtube.com/watch?v=wXB-V_Keiu8&lcor=1&lc=Ba-m_R8yp790_LA4eLMLqV6QUQ2iJ5Z4T4Iywos68Z4

If you're still interested in learning about ECC, from a tutorial expressed in simple terms, I recommend these two documents by Certicom. The first is an introduction, and the next is a tutorial where you learn the various aspects of ECC and prime fields one step at a time. The latter includes a lot of visual aid, which was a great way to learn it for me.

Introduction: http://www.certicom.com/images/pdfs/WP-ECCprimer.pdf
Tutorial: http://www.certicom.com/index.php/ecc-tutorial
I read all the comments just now,thumbs up thx
Off the top of my head http://www.khanacademy.org/ should set up a BTC donation button great site.
legendary
Activity: 980
Merit: 1008
THE BETTER video to explain this.

http://www.youtube.com/watch?v=3QnD2c4Xovk
This is symmetric cryptography. Ie. cryptography where the encrypting and decrypting keys are the same. It explains how two people can agree on a shared secret key when their communication is intercepted by a third party, without that third party being able to figure out what the key is. This is called the Diffie-Hellman key exchange.

Bitcoin uses asymmetric cryptography, where the are two keys: the public and the private, and one encrypts and the other decrypts.

ArtOfTheProblem is really good at explaining this stuff for non-mathematicians though. They've also made a video on public key cryptography. This one covers RSA. http://www.youtube.com/watch?v=wXB-V_Keiu8
Really great video! They are good explaining the extreme complex concepts we are dealing with. The important thing, in my opinion, is understanding the one way function.  Both videos explain it with the same color mixing examples.
really liked both videos ^ ,but I would like to see simple video with ECC Public Key Cryptography be the same author Brit Cruise
I asked him and he answered that he'll be making one "in the not too distant future": http://www.youtube.com/watch?v=wXB-V_Keiu8&lcor=1&lc=Ba-m_R8yp790_LA4eLMLqV6QUQ2iJ5Z4T4Iywos68Z4

If you're still interested in learning about ECC, from a tutorial expressed in simple terms, I recommend these two documents by Certicom. The first is an introduction, and the next is a tutorial where you learn the various aspects of ECC and prime fields one step at a time. The latter includes a lot of visual aid, which was a great way to learn it for me.

Introduction: http://www.certicom.com/images/pdfs/WP-ECCprimer.pdf
Tutorial: http://www.certicom.com/index.php/ecc-tutorial
newbie
Activity: 46
Merit: 0
There is an old survey paper called "The Tale of One-Way Functions" by Leonid Levin. Unfortunately it is not written to be accessible without a strong background in theoretical computer science. Nevertheless, at the end he gives a simple example of a "complete" one-way function, which perhaps gives a feel for why inverting such functions should be difficult: consider a set of square tiles marked with a letter at each corner. Starting with a row of such tiles, we would like to extend it to a square by filling in the rows below it one tile at a time, with the rule that we may put down a tile only if it is the unique tile whose corners match what is already there:

+---+---+
|a x|x c|
|e r|r z|
+---+---+
|e r|r z|
|n s|s z|  
+---+---+

The one-way function takes as input the top row of tiles, internally expands it to a square, and outputs the bottom row (if we get stuck, just output the top row). By definition, this is easy to compute, just by looking through the permitted set of tiles at each step and checking what fits. The trouble is to go backwards...

Summary: computing the top row given the bottom (or a private key given a public key, or...) is hard because there are too many possibilities to check, too many to go through in "a little time".
hero member
Activity: 743
Merit: 500
THE BETTER video to explain this.

http://www.youtube.com/watch?v=3QnD2c4Xovk
This is symmetric cryptography. Ie. cryptography where the encrypting and decrypting keys are the same. It explains how two people can agree on a shared secret key when their communication is intercepted by a third party, without that third party being able to figure out what the key is. This is called the Diffie-Hellman key exchange.

Bitcoin uses asymmetric cryptography, where the are two keys: the public and the private, and one encrypts and the other decrypts.

ArtOfTheProblem is really good at explaining this stuff for non-mathematicians though. They've also made a video on public key cryptography. This one covers RSA. http://www.youtube.com/watch?v=wXB-V_Keiu8
Really great video! They are good explaining the extreme complex concepts we are dealing with. The important thing, in my opinion, is understanding the one way function.  Both videos explain it with the same color mixing examples.
really liked both videos ^ ,but I would like to see simple video with ECC Public Key Cryptography be the same author Brit Cruise
legendary
Activity: 980
Merit: 1008
^ Yup. It's probably a good idea to watch both the videos. Or the whole series from the beginning.
hero member
Activity: 597
Merit: 500
THE BETTER video to explain this.

http://www.youtube.com/watch?v=3QnD2c4Xovk
This is symmetric cryptography. Ie. cryptography where the encrypting and decrypting keys are the same. It explains how two people can agree on a shared secret key when their communication is intercepted by a third party, without that third party being able to figure out what the key is. This is called the Diffie-Hellman key exchange.

Bitcoin uses asymmetric cryptography, where the are two keys: the public and the private, and one encrypts and the other decrypts.

ArtOfTheProblem is really good at explaining this stuff for non-mathematicians though. They've also made a video on public key cryptography. This one covers RSA. http://www.youtube.com/watch?v=wXB-V_Keiu8
Really great video! They are good explaining the extreme complex concepts we are dealing with. The important thing, in my opinion, is understanding the one way function.  Both videos explain it with the same color mixing examples.
legendary
Activity: 980
Merit: 1008
THE BETTER video to explain this.

http://www.youtube.com/watch?v=3QnD2c4Xovk
This is symmetric cryptography. Ie. cryptography where the encrypting and decrypting keys are the same. It explains how two people can agree on a shared secret key when their communication is intercepted by a third party, without that third party being able to figure out what the key is. This is called the Diffie-Hellman key exchange.

Bitcoin uses asymmetric cryptography, where the are two keys: the public and the private, and one encrypts and the other decrypts.

ArtOfTheProblem is really good at explaining this stuff for non-mathematicians though. They've also made a video on public key cryptography. This one covers RSA. http://www.youtube.com/watch?v=wXB-V_Keiu8
newbie
Activity: 46
Merit: 0
In the philosophical sense, we don't really know why some problems are harder than others.  It is an open question, and widely considered to be the most important questions in the field of computer science.


At the risk of belabouring your point, (leaving philosophical questions aside!) sometimes one can prove that one problem is harder than another. If problem A can be solved in a certain number of steps while problem B takes strictly more, we can say that B is harder. The proof that B requires so-and-so many steps may then provide some insight as to "why". The real challenge is to resolve some of the many open questions; eg. we do not know why NP is harder than P — if we did then presumably someone could translate that insight into a proof!

In short, people indeed do not know why these problems are hard. It is just taken on faith, since nobody yet knows a fast way to solve them.
legendary
Activity: 3472
Merit: 4801
Imagine I select a single atom out of all the atoms in our galaxy.

Now you try to find the same atom I selected by randomly selecting atoms and then seeing if it is the one I selected.
Your estimate is a bit high.  A reasonable estimate of the number of atoms in our galaxy is more on the order of 1069.  There are approximately 1.46x1048 possible bitcoin addresses.  Selecting a single atom out of our Solar System might be a closer estimate (perhaps still a bit high though)

. . . I don't like using the word FOREVER to replace 10,000 years . . .
Your estimate is VERY low. 10,000 is only 104.  Perhaps a match could be found by a single person after trying for 10,000,000,000 (1010) years?  But since the sun will likely burn out in around 5x109 years, it would seem there might be a problem keeping the computer running that long.  If the computer can't run long enough to find the match, then you can safely say FOREVER.
legendary
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
Imagine I select a single atom out of all the atoms in our galaxy.

Now you try to find the same atom I selected by randomly selecting atoms and then seeing if it is the one I selected.

Sounds pretty difficult.  I would take you basically forever to do that, right?

That (finding the matching atom) is a smaller problem than finding one of the keypairs with a given hash.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
The programmer of vanitygen specifically mentioned that it is indeed a brute force cracker. So for normal usage, you can type a short pattern, like 1Dabs, and it will look for all public key addresses that begin with that pattern. This is why there are so many 1Dice public keys.

But you can input a pattern that is just as long as the maximum length of a public key. It will find a match to that pattern, after the whole world is already dead. We know it will. We just won't be alive to see it. There is an almost negligible chance it will be found while we live, but the chance of the computer failing first is a lot higher, given that the chance of the world failing is also higher. (But people can make redundant arrays of independent computers ... ... blah blah blah.)

It can be done, and it will be done. But not in the next 10,000 years. It's a matter of semantics, I don't like using the word FOREVER to replace 10,000 years. I mean, I've been told that 2 seconds is a lifetime (in a life or death situation.)
hero member
Activity: 597
Merit: 500
legendary
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
Hmmm.

Well once a public key is found as I described above it is a point (an X and a Y coordinate)

In the Bitcoin system the next step is to hash the public key to create a public key address.   The public key addresses you know and love (starts with a 1 then a bunch of characters and digits) is not a public key.  It is a specific digest of a public key.

What you put into vanitygen is a desired public key address (hash) pattern (like 1BurtW...) not an actual public key.

And the answer to how long it takes to "go though all the possibilites" is, for all practical purposes, FOREVER.  So no, currently it cannot be done.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
Can I try?

A = B + C + D

or

12 = 3 + 4 + 5

If all you have is 12, then you wouldn't know if it was 9 + 2 + 1 or 7 + 3 + 2 or whatever was the original formula. You'd have to do trial and error or what is known as brute force; try every possibility.

I think it doesn't actually work this way, but for illustration purposes this might be easier to understand.

So it can be done, given enough time. But that time is measured in centuries or millennia. In fact, that's what the vanity address generator does. Try typing an entire public key though, and it will estimate for you how long it takes.
hero member
Activity: 700
Merit: 500
The one-way function is the basis of public-key cryptography generally. A simple example: take two extremely large primes p and q. Multiplying them yields a composite N but it is very difficult to derive p and q if given N.

From a mathematical non-super expert.

What you described is "large integer factorization" which is one method used in public private key cryptography but not the method used by Bitcoin.  It is the method used in RSA for example.  Eliptical curve cryptography used by Bitcoin uses a different method called "discrete logarithm problem" as outline by BurtW above.  The major advantage of ECC is that it is more efficient with key sizes.  256 bit ECC has roughly the same strength as 3072 bit RSA.

Still ECC can be somewhat difficult to grasp so large integer factorization is useful in the context as a generic problem which is easy to calculate but infeasible to reverse.   It is important to note that both RSA and ECC "work" because no efficient solution of the reverse has been found .... yet.  If someone were to discover a computationally efficient method of factoring massive numbers then RSA and other algorithms based on large integer factorization would fail.  Likewise if someone were to discover a computationally efficient method to solve discrete logarithms algorithms like ECC would fail.  This is different than finding a cryptographic flaw in a particular algorithm.

Essentially "large integer factorization" is based on the premise that it will remain exponentially more difficult to factor the product of primes and thus by chosing primes of sufficient size one can ensure the amount of work required to factor the product of those primes is beyond the capabilities of current technology.  Its strength comes from that premise and if it is flawed then all algorithms based on that premise will have no cryptographic strength.

And there's still one more step protecting an address's private key, because the address is a one way hash of the public key rather than the public key itself. As long as you never reuse addresses that you have sent coins out of, your public key will never be exposed. It is exposed when you send coins though, because it is included to validate the signature on the transaction from the private key.
donator
Activity: 1218
Merit: 1079
Gerald Davis
The one-way function is the basis of public-key cryptography generally. A simple example: take two extremely large primes p and q. Multiplying them yields a composite N but it is very difficult to derive p and q if given N.

From a mathematical non-super expert.

What you described is "large integer factorization" which is one method used in public private key cryptography but not the method used by Bitcoin.  It is the method used in RSA for example.  Elliptical curve cryptography used by Bitcoin uses a different method called "discrete logarithm problem" as outline by BurtW above.  The major advantage of ECC is that it is more efficient with key sizes.  256 bit ECC has roughly the same strength as 3072 bit RSA.

Still ECC can be somewhat difficult to grasp so large integer factorization is useful as an example of a generic problem which is computationally simple to solve (find the product of two large prime numbers) but for which the reverse requires too much computation to be feasible (given a large non-prime number find its prime factors). It is important to note that both RSA and ECC "work" because no efficient solution for the "reverse" has been found .... yet.  If someone were to discover a computationally efficient method of factoring massive numbers then RSA and other algorithms which rely on the premise that factoring large numbers will remain infeasible* will fail.  Likewise if someone were to discover a computationally efficient method to solve discrete logarithms algorithms then algorithms like ECC would fail.

This is different than finding a cryptographic flaw in a particular algorithm as the ramifications are more profound. Essentially when using an algorithm based on large integer factorization or discrete logarithms we are making an assumption that the "reverse" solution will continue to remain computationally infeasible.  If that assumption ends up being disproven then the very basis for the cipher is false.  Understand that in mathematics we can't definitively prove that a more efficient solution doesn't exist.  We are making a calculated assumption based on both theory and the body of cryptographic research (where for example finding a solution for factoring prime numbers in polynominal time likely would get you the nobel prize) that these problems will remain infeasible.



* Sometimes people will say impossible but that is technically incorrect.  Given enough resources (namely energy & time) these problems are solvable so they definately are not impossible.  Also given the random nature you could in theory brute force a key on the very first attempt.  Infeasible means that while theoretically possible to have any reasonable chance of success in any reasonable amount of time would require a scenario which is highly implausible (i.e. building a dysons sphere around the sun, turning all matter in the solar system into a giant super computer and use the output of the sun to power an attempt to break the key"). 
kjj
legendary
Activity: 1302
Merit: 1026
In the philosophical sense, we don't really know why some problems are harder than others.  It is an open question, and widely considered to be the most important questions in the field of computer science.
Pages:
Jump to: