Hello and welcome to this fundamentals of cryptography.
Course, in this section, we're going beyond the introductory cryptographic concepts, those building
blocks of encryption, the general classes of cryptographic algorithms, cetera, and diving into some
more specialized applications of cryptography.
So more advanced cryptographic primitives and concepts that are designed to accomplish particular goals.
In this video, we're going to be talking about zero knowledge proofs.
And so in this video, we're going to have three main sections.
We're gonna start out with an introduction to zero knowledge proofs, sort of talking about the what
and the why.
We'll then dive into a simple example of a zero knowledge proof to understand how these work.
And then finally, we'll talk about some concrete applications of zero knowledge burps.
And so when we have a password based system, we're unable to have authentication based off of knowledge
of a secret.
For example, if you knock on the door and say, open sesame.
Then if open sesame is the password, they're going to let you in.
However, this has a couple of requirements.
One of these is that there has to be mutual knowledge of that secret.
So if you know that the passwords.
Open sesame.
But the doorman doesn't.
Then knocking on the door and saying open sesame might just get you some weird looks and might not let
you through the door.
Additionally, requires that the secret be revealed to the verifier.
So if that doorman wasn't supposed to know the password.
Or maybe if someone was eavesdropping on you, then people who aren't supposed to know the password
suddenly know it.
And so this is a problem.
And so a possible solution to this problem is a zero knowledge proof.
And so a zero knowledge proof is constructed to allow someone to verify that a person knows a secret.
However, that person that knows the secret doesn't actually need to reveal it to the other person.
And so let's talk through an example of a simple zero knowledge proof.
So in this particular proof, our goal is to prove to a colorblind person that red and green are distinct
color.
So essentially, if you have someone that's either fully colorblind or red green colorblind, they might
not actually believe that the colors, red and green exist because they can't see the difference between
them themselves.
And so we're going to prove that these two colors exist and are distinct.
However, we're going to do so using a couple of colored balls like we see in our image, but we're
keeping secret which color each ball is.
And so let's talk through this.
So what happens is we give these two colored balls to the colorblind person who we're going to call
our verifier here.
And that verifier is going to say, hide these two from the view of the proofer, the person that's
proving that color exists.
And then they're going to show one of them to the proofer.
Then they're going to hide it again and they're going to do that same thing.
They're going to show one of them to the proofer and they're going to ask the question, are these two
balls the same?
And so let's think through our different situations here.
We have the situation where colors don't exist.
And so in this situation, the person making the proof is making a 50 50 random guess.
There are two balls.
And so there's a 50/50 chance that the balls are the same or that they're different.
And so by saying one or the other, they've got a 50 percent chance of being right.
And the person who is the verifier knows that they're if they're right or not, they don't know if the
balls are the same color.
They don't know which ball is which color.
But they know, oh, I showed him ball number one.
And then I showed him ball number one again.
Did he say they were the same?
Did they say they were different in the case?
Were colors exist?
The person performing the proof should have 100 percent success rate because as long as they can distinguish
red and green, then.
They can easily differentiate if it's the same ball with the different ball based off of.
OK, the first time I saw the red ball, the second time I saw the red ball there the same or the first
time I saw the red slash green ball, the other time I saw the green slash red ball.
Therefore, they're different.
And so with a single iteration of this proof, there's a 50/50 chance that the proofer gets it right.
Even if they don't actually have colors.
Those two are the exact same color.
They're just completely indistinguishable.
However, if you iterate this proof, if you do it not enough times, then the probability of guessing
right every single time goes down exponentially.
You got a 50 percent chance the first time.
Twenty five percent chance.
The second time.
Twelve and a half percent chance.
The third time, etc..
And so very quickly reaches the point where it's mathematically and feasible that they get it right
every time.
Unless colors exist and red and green are distinct.
However, at the end of this process, the person who's colorblind are verifier doesn't actually know
which ball is red in which ball is green.
They just know that the person performing the proof has a way of differentiating them.
That theoretically is the fact that one is red and one it's green.
The problem with zero knowledge proves is if there's a weakness in that proving process, then it could
be defeated.
For example, say the balls are the same color.
There is no difference between red and green.
However, one of them has some sort of mark on it.
It's got a scratch, etc. that the prove or can use to differentiate the two.
If that's the case and there's a flaw in the process, then you can prove something that's not true.
And this is an example of a fairly simple zero knowledged proof.
There's not really any cryptography involved, but it outlines the underlying concepts.
There are much more sophisticated, zero knowledge proofs based off of cryptography that can prove a
variety of different things backed up by cryptographic guarantees.
And we care about these because it's actually often useful to reveal that you know something without
revealing what that thing is that you know.
For example, maybe you want to prove to someone that you're a member of a particular group.
Maybe you've got two spies that are undercover in some foreign country and they want to know, can I
trust that you are another member of our spy network?
And so if they just have a mutual secret password, then if one of them provides a secret password and
the other one's like, yep, yep, that's the password.
OK.
If the first one was telling the truth, then the second one now knows the secret password and could
use it to authenticate with another spy falsely.
However, if you're using zero knowledge proofs that one spy can generate a zero knowledge proof of
the secret password presented to the other, the other can generate a zero knowledge, proof of the
password presented to the first, and both of whom can authenticate each other in a secure fashion without
revealing any sensitive information.
Another application of 098 proofs is proving the existence of some particular fact.
For example, maybe you want to prove that you have solved a particular contest or some particular problem,
et cetera, without giving away the solution.
If you can generate that proof or generate that you have a particular piece of data, then it's useful
to do so without revealing that piece of data which could be sensitive, valuable, etc..
And a third application is if you have a public channel and you need to, like, authenticate over that
public channel.
So, for example, at zero Nöjd proofs are commonly used and block chain for a variety of different
purposes.
And they're useful in those contexts because anyone can see that distributed ledger that block chain
generates.
So anyone that sees the ledger could see a secret if you just posted that secret on the ledger.
But by prove it, posting a proof, anyone can verify that it's legitimate.
But they don't learn whatever value you're trying to keep secret.
And so zero, those proofs are useful in a variety of different contexts.
But it all boils down to showing that, you know, something that either that proves membership in a
group existence of a fact, et cetera, in a way that doesn't give that piece of sensitive and valuable
data away.
And so it's a quick recap.
We care about zero knowledge proofs because they take us past password based systems where we have to
provide the secret in order to gain admittance, meaning that the other person now learns the secret
to systems where you can prove that you know the secret without giving it away.
We saw a simple zero knowledge proof involving two different color balls that proved the existence of
those colors without giving away that secret that this ball is red and that ball is green.
And then finally discussed a few different applications of zero knowledge proofs.
And so conclude this discussion of zero knowledge proofs.
And thank you very much.