170 points · by petethomas · 11y ago · 63 comments
Say that you and a friend are reading a Where's Waldo book, and you want to prove that you have found Waldo, but you don't want to tell your friend where Waldo is. This seems impossible. However, you could take a large piece of cardboard, cut out a Waldo-shaped hole, and place it over the book. Now you have proven that you can find Waldo.
"But wait!" cries your friend. "How do I know the book is even under there? Let me see." But you can't do that, since he knows roughly the spot Waldo would be if you lifted the cardboard.
So, you get a second piece of cardboard and put it on top of the first. Now, you play a game. You ask your friend whether you should lift one piece of cardboard (to verify the picture of Waldo) or two pieces (to verify that the book is beneath the second piece). You can play this game as many times as required for your partner to gain a reasonable confidence that you're not cheating.
And that's a zero knowledge proof.
This then means the subsequent trials don't reveal any side channels about Waldo's location in the book. (And of course in practice the "pieces of cardboard" are big enough to obscure all book information.)
1) It doesn't have to be THAT big. As long as the cardboard has twice the dimensions of the book, having the cutout be in the center ensures that you could reveal a Waldo anywhere on the page without letting the other person see any bit of the book to try to reason which section the book is under.
2) They only get to choose one piece of cardboard to remove per iteration of the game - they don't get to lift one piece and then immediately the other, they only lift one. That means that the person placing the cardboard can't cheat (because they don't know which piece they are going to lift, the one revealing the whole book or the one revealing the waldo), and the other person can't gain any information from the reveal. You can repeat the process many times (moving BOTH pieces of cardboard each time to ensure no gained information), but you can only do one cardboard lift per cycle.
Since you don't know if it's the book under there or not, you don't know if this example is a "control".
The proportion of times that it is the book has to be the same as the odds that you could randomly guess where Waldo is, I think.
The idea is that your counterparty cannot ever ask for both the book under there and to see Waldo, so they never know where the book is. You can spin the book around under the cardboard to put it in arbitrary locations, therefore just seeing the Waldo doesn't help.
This has always been my favorite "intuitive" explanation of zero-knowledge proofs, but I never even knew the second part about two cardboards, which makes this even better!
I've been reading alot about the cryptography (and alot of bitcoin stuff), there's alot of interesting material out there.
https://en.wikipedia.org/wiki/Probability_theory
https://simple.wikipedia.org/wiki/Probability_theory
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
https://simple.wikipedia.org/wiki/Advanced_Encryption_Standa...
The edit I made was to explain how Einstein made the leap to E=mc^2 by including the step that showed how E=mv^2 for particles of a given velocity. Of course this is well known to every engineer and physicist, but the article on the proof was so hard to follow without it.
In cryptography there are ways to make such a protocol "fair". Basically both learn "bit by bit" the answer, if Bob stops early, he only gets one bit of information more than Alice and if he can bruteforce the rest, so can Alice (except if Bob is the NSA).
Is it to protect against bruteforcing? What if the hash is made expensive to compute?
If fear of collisions is the reason you don't use a crypto hash function, then you are using a broken hash function.
A hash doesn't satisfy all the requirements of the problem, but it's not because of collisions.
This fact applies to any hash function even those you don't consider broken.
The key new utility Enigma brings to the table is the ability to run computations on data, without having access to the raw data itself. For example, a group of people can provide access to their salary, and together compute the average wage of the group. Each participant learns their relative position in the group, but learns nothing about other members’ salaries. It should be made clear that this is only a motivating example. In practice, any program can be securely evaluated while maintaining the inputs a secret.
In cryptography there are ways to make such a protocol "fair". Basically both learn "bit by bit" the answer, if Bob stops early, he only gets one bit of information more than Alice and if he can bruteforce the rest, so can Alice (except if Bob is the NSA).
This sounds a bit like mental poker.
"Even if one of the parties is dishonest and deviates from the protocol, that person cannot learn anything more than if x = y."
For example you can use fully homomorphic encryption to trivially solve this problem.
It's much more significant that Logjam changes the field to something weak, than all of the servers use the same prime field.
Prove you have a working zero day, for example.
This is better put as: without allowing either party, in the event that the equality is false, to learn even so much as whether x < y or x > y.
Of course if the equality is true, each party knows everything about the other's value.