This course will introduce you to the foundations of modern cryptography, with an eye toward practical applications.

Loading...

From the course by University of Maryland, College Park

Cryptography

415 ratings

This course will introduce you to the foundations of modern cryptography, with an eye toward practical applications.

- Jonathan KatzProfessor, University of Maryland, and Director, Maryland Cybersecurity Center

Maryland Cybersecurity Center

[NOISE] In this lecture, we'll talk about identification schemes and

Â then see their application to the construction of digital signatures.

Â Now identification schemes are quite interesting in their own right, both for

Â what they can achieve as well as in their analysis.

Â And I hope you'll agree with me about that after you watch today's lecture.

Â However, identification schemes have only limited efficability on their own.

Â We're covering them here because they are extremely important as a building block

Â for digital signature schemes.

Â That is they provide a very important frame work for

Â the construction of digital signatures.

Â Now because we're only interested in them as a building block and

Â we're ultimately interested in the signature schemes themselves,

Â we're going to be somewhat informal in our treatment of identification schemes.

Â I hope that's okay.

Â An identification scheme is a protocol that's run in the public key setting,

Â just like public key encryption and digital signatures.

Â Here, we're going to have two entities, one of which we'll call a prover, and

Â the prover is going to be the one who locally generates a pair of public and

Â private keys.

Â And then as usual, publicizes their public key and makes it widely available.

Â A second entity, whom we'll call a verifier,

Â is assumed to be able to obtain an authentic copy of the prover's public key.

Â So now we have a situation where the verifier has a copy of the prover's public

Â key, and the prover has a copy of the corresponding private key.

Â Now the goal of an identification scheme is to allow the prover

Â to convince the verifier that the prover is who he claims he is.

Â That is the prover wants to convince the verifier that he indeed is

Â the one who generated.

Â The public key that the verifier holds,

Â along with of course the corresponding private key.

Â And so the prover needs to be able to interact with the verifier, and

Â through this interaction convince the verifier of his own identity.

Â And we're going to be interested only in identification schemes having

Â a very particular form,

Â in particular they are going to work in three rounds of interaction.

Â Where in the first round the prover sends a message we'll denote by A.

Â Then in the second round the verifier chooses its message, by choosing

Â a challenge that we'll denote by c, uniformly from some space omega.

Â After receiving that challenge, the prover, based on the original message A,

Â its own private key, as well as,

Â of course, the challenge, computes a response that we'll denote by s.

Â And the verifier will then be able to run some local

Â verification procedure involving the public key, along with the challenge,

Â and the response s, and will then check whether or

Â not the computation run on those three elements yields the first message, A.

Â So this verification procedure, just think about it now abstractly, as some

Â mechanism that processes the public key, the challenge and the response.

Â And the verifier will accept, that is be convinced it's talking to the prover,

Â if and only if the verification procedure when

Â running those three items yields the first message A.

Â We'll see an example later on and this will make more sense hopefully.

Â Now the security that we're going to be interested in is a relatively weak

Â notion of security, that is, security against passive eavesdropping attacks.

Â And the model here is that you can imagine an attacker who eavesdrops on

Â multiple honest executions between the prover and

Â a verifier, and of course, also has access to the public key itself.

Â And the idea of, about this security notion, is that even after eavesdropping

Â on these multiple honest executions, the attacker should not then be able to turn

Â around, and convince a verifier falsely that the attacker is the prover.

Â That is the attacker should not be able to succeed in carrying out an execution of

Â the identification protocol with a verifier, when the prover,

Â when the real prover, is not around.

Â So this just means that the identification protocol is achieving the notion that it's

Â claiming to, that is, that it's actually identifying this prover,

Â who holds the corresponding private key.

Â And that an imposter, i.e this attacker, cannot fool the verifier into believing

Â that the verifier is interacting with the real prover, even after the, even after

Â the attacker has eavesdropped on multiple honest executions of the protocol.

Â Now for technical reasons we're going to also make the assumption that

Â the identification protocol we're talking about is non-degenerate.

Â And this just means that the first message A has a negligible probably of repeating.

Â And this will be satisfied by almost any natural protocol fitting into

Â this three-round paradigm.

Â Now, a prototypical application of identification schemes

Â is in-person identification.

Â So imagine here something like using a swipe card to gain access to some room.

Â And there what you might have is you might have on your smart card,

Â you might have a private key stored and when you swipe your card you might imagine

Â that you're able to execute a protocol with the access card reader and your card.

Â So that is your card which holds your private key will be acting as a prover,

Â and the card reader which is connected to the door will be acting as the verifier.

Â And then you could imagine, actually, that these, that the card and

Â the reader are actually executing this three-round protocol.

Â And if and only if the card is able to convince the reader that it is who it

Â claims it is, well, the card reader unlocks the door and allows access.

Â Now, why am I mentioning in-person identification.

Â Because in fact, identification protocols as described, are not suitable for

Â remote authentication, i.e authentication over the internet.

Â And the reason for that is a little bit subtle.

Â So in fact, identification protocols are fine for

Â proving to another party that you are indeed who you claim you are.

Â The problem is that if you then communicate after that, for example,

Â if I run an identification protocol with a verifier, and then start sending commands

Â or requests or other messages, there's nothing that binds my subsequent

Â communication with the verifier with the original execution of the protocol.

Â And I, for example, if you imagine that you would try to set up authentication to

Â your bank, using a, an identification protocol as, as just described, and

Â that is, the customer would run the identification protocol with the bank,

Â following which, the customer can then request, for $100.00 to be transferred.

Â That's going to be completely insecure.

Â And the reason is, is that an attacker can simply wait for

Â the customer in the bank to finish executing the protocol, and

Â then immediately afterward after a successful execution of the protocol,

Â the attacker can jump in and send any message it wants to the prover.

Â So it turns out that identification protocol's are not super useful for

Â things over the internet.

Â They can be used for in-person authentication and

Â identification, but it's, that's a relatively limited domain.

Â Now for our purposes again, we're most interested in the application of

Â identification schemes, to constructing digital signatures.

Â And the basic idea by which identification schemes can be used to construct digital

Â signatures, is that we're going to have the prover find a message,

Â by running the identification scheme by itself, as it were.

Â Generating the challenge, that is the second message of the protocol,

Â using a hash function, and I'll show how this works in a moment.

Â This transformation from identification schemes to signatures,

Â is known as the Fiat Shamir transform,

Â after the two authors who first suggested and analyzed it.

Â So let's see how that might work in a little bit more detail.

Â So we have this entity who, before we called a prover, but

Â now we'll call a signer, and they have a private key, along with some message, M,

Â that they wish to sign.

Â And the idea as I said is that this entity will begin

Â running the identification protocol by itself.

Â So that means that what the signer will do is begin by generating an initial

Â message A, but now there's no other entity with which this party's interacting.

Â So as indicated what this party will do, is generate the second message of

Â the protocol, the challenge, c, using a hash function.

Â And in this case, by applying the hash function to the initial message A,

Â along with the message m, that it wishes to sign, and it will interpret the result

Â as a challenge c, and then the signer will compute

Â the last message of the identification protocol that we've been calling s.

Â The signature on the message m, will then consist of c and s.

Â How does somebody verify the signature?

Â What they're going to do, they're going to, as it were rerun the execution of

Â the identification protocol and check that the it results in a accepting execution.

Â How that going to work is verifier will

Â take the message m along with signature c and s.

Â Along with the public key that it must also know,

Â because remember we're still in the public key setting.

Â This is a digital signature scheme,

Â we assume the verifier holds a copy of the signer's public key.

Â The verifier will then run the verification procedure, using the public

Â key and the signature, c and s, and that will result in an output value A.

Â And the idea then is that the verifier wants to check whether

Â this A is the value the signer on the left-hand side here actually used.

Â And it can check that by recomputing the hash over A and

Â m, and checking whether the result is the value c contained in the signature.

Â And we can prove that this signature scheme is secure if

Â the original identification scheme is.

Â More formally, we have the following theorem,

Â if the identification scheme is secure against passive attacks, and

Â if we model the hash function H as a random function.

Â Then the signature scheme we derive by applying the [INAUDIBLE] transform, as in

Â the previous slide, is indeed secure, it gives us a secure signature scheme.

Â The proof of this theorem is a little bit complex and

Â we're not going to go into it here.

Â Now, I want to give an example, a concrete example of an identification scheme.

Â And then the signature scheme that can be derived from that scheme.

Â So let me just recall briefly,

Â the setting for cryptographic schemes based on the discreet logarithm problem.

Â We have some group generation algorithm that outputs a description of

Â a cyclic group G, having prime order q, along with a generator g of that group.

Â And the five of the order of the group, the, the bit length of Q

Â is going to be n bits, where n is the security parameter, as usual.

Â The discrete logarithm assumption says that, given a uniform value h in

Â the group, it's hard to compute the discrete logarithm of h with respect to g.

Â We can build from this assumption an identification scheme

Â called the Shnorr identification scheme, and this is named

Â after the researcher who first developed the scheme in the late 1980's.

Â The basic idea here is that the prover will generate his public and private key,

Â by running the group generation algorithm to obtain G, q, and g.

Â And then choosing a random exponent x and computing h equal to g to the x.

Â The public key of the prover will then consist of the parameters G, q,

Â and g, along with the group element h.

Â And the private key of the prover will be exponent x.

Â So remember that h is equal to g to the x.

Â An execution of the protocol works in the following way.

Â The prover begins by choosing a random exponent,

Â r, and setting the first message A equal to g to the r.

Â The verifier then chooses a random challenge in Zq.

Â The order of the group here is q so the challenge being chosen

Â here from the same space as the possible exponents here for elements in the group.

Â The prover then responds with the response s computed as cx plus r module q.

Â And finally, the verifier computes g to the s times h to the minus c,

Â and checks whether that value is equal to A.

Â And if so, it accepts, and if not, it rejects.

Â Now just a little bit of algebra will convince you of that in an honest

Â execution the verifier will always accept.

Â G to the s times h to the minus c is equal to g to the cx plur r

Â times h to the minus c.

Â By regrouping, we can write that as g to the x raise to the c,

Â times g to the r times h to the minus c.

Â And then we simply use the fact that by definition, h is equal to g to the x.

Â Things nicely cancel, we're left with g to the r, which is of course,

Â exactly equal to the initial message sent by the prover.

Â Now what can we say about security of this identification scheme?

Â Well the first thing I want to convince you is that an attacker who only

Â sees the public key.

Â So here we're not yet looking at an attacker who's also eavesdropping, but

Â an attacker who only sees the, the public key of the prover.

Â I claim that, that attacker cannot impersonate the prover

Â without solving the discrete logarithm problem.

Â Why is that the case?

Â So imaging we

Â have an attacker who observes the public parameters G, q, and g.

Â Along with h.

Â And then tries to impersonate the prover through some honest verifier.

Â Well, the attacker's going to begin by sending some initial message A.

Â A priority, we have no idea how that message was computed,

Â it doesn't really matter.

Â It just sends the message A, and then the idea is that the attacker,

Â if it's going to be successful with high probability, should be able to

Â respond correctly to at least two different challenges from the verifier.

Â If the attacker can only respond to a single challenge from the verifier,

Â he will only potentially impersonate the prover with probability of 1 over q,

Â which is negligible.

Â So roughly speaking then, that means that there's at least one challenge phi for

Â which the attacker can respond correctly with our response s for

Â which the verification condition holds.

Â And there must also be at least one other challenge, c prime,

Â distinct from c for which the attacker can also respond correctly.

Â Now from those two responses, we can in fact, derive that they must be equal.

Â That sorry, the verification conditions must be equal.

Â That is g to the s times h to the minus c,

Â must be equal to g to the s prime times h to the minus c prime.

Â And that's simply because they're both equal to A.

Â And then just a little bit of arithmetic allows you to compute from that,

Â the discreet logarithm of h with respect to g.

Â So in summary, what we've shown here is that if there is an attacker who,

Â just based on on observing the public key,

Â can successfully respond to at least two different challenges,

Â then that attacker must implicitly be able to solve a discreet logarithmic problem.

Â If the discrete logarithm problem is hard, then such an attacker cannot exist.

Â We haven't yet talked about what happens if the attacker can also eavesdrop,

Â and we might think that, in fact, eavesdropping on honest executions of

Â the protocol might potentially give an attacker some additional advantage.

Â What I want to show here is that that's not the case.

Â So let's look first at an execution of the protocol between the prover and

Â the verifier.

Â So I've just written out the steps here,

Â we have the first, first message A equals g to the r.

Â We have the response c, which was a random challenge chosen from Zq and

Â then we have the response s equals cx plus r.

Â I've omitted the mod q for simplicity.

Â And the condition that holds on the values in those transcripts, right, A,

Â C, and S, is that g to the s h to the minus c, is equal to A.

Â Now, what I claim is that it's possible to simulate a valid-looking execution

Â of the protocol, based only on the public key and without knowledge of, of x.

Â Okay, on the left-hand side, we had an interaction of the protocol

Â with the prover sending A, the verifier sending c, and

Â then the prover using the private value x to compute an, an appropriate response.

Â But on the right-hand side, I'm going to show how we can compute an identically,

Â an identically distributed transcript, without knowing x at all.

Â And the way that works, is that we'll take we will have access to the public key of

Â course, just like the attacker does,

Â and what we'll do is we'll begin by doing things out of order.

Â What we'll do first is we'll choose the challenge c uniformly for

Â Zq and choose s as well uniformly from Zq and

Â then compute A, the initial message of the protocol, as g to the s, h to the minus c.

Â And what I claim is that this transcript of three values.

Â A, c s on the right,

Â is distributed identically to the three values on the left.

Â It might take a little bit of playing with this to see that, but

Â let me give you my understanding of how I interpret that.

Â Well, the value c is uniformly distributed in Zq on the left and the right and,

Â furthermore, the value f is also uniformly distributed on the left and the right.

Â Right? And that's simply because, on the right,

Â we chose it uniformly and, on the left, it's equal to c times x plus r,

Â where r is a random, a uniform value.

Â Now the initial message A is computed differently in both cases.

Â But in both cases, A is the unique value for

Â which g to the s which is equal to g to the s, h to the minus c.

Â So in fact, both transcripts, on the left and

Â the right, have the identical distribution.

Â Sorry. And then what this means is that

Â observing or passively eavesdropping honest executions of the protocol is of

Â no use to the attacker, because the attacker could

Â generate simulated transcripts with the identical distribution.

Â And that means that we may as well assume the attacker doesn't eavesdrop at all.

Â And so we're back then in the situation of the previous slide, and

Â we showed there that given only knowledge of the public key,

Â an attacker could not in fact successfully impersonate a prover.

Â I should mention that this idea of being able to simulate an honest execution of

Â a protocol is a very powerful one, and

Â you may have heard of the notion of zero-knowledge proof.

Â And this same core idea is used there as well.

Â But that's a bit beyond what we can hope to cover in our lectures.

Â What can we claim, then, about the security?

Â Well, if the discrete logarithm assumption holds, then in fact,

Â the Schnorr identification scheme is secure against passive attacks,

Â that's what we've proved on the past two slides.

Â And that means as a corollary if the discrete logarithm assumption holds and

Â we model H as a random function.

Â Then the signature scheme that we derive from Schnorr identification protocol

Â by applying the Fiat-Shamir transform, is a secure signature scheme.

Â Now, I did want to mention one other signature scheme which can be

Â viewed as being derived from an identification scheme,

Â even though it's not typically presented that way.

Â And the reason I want to mention this is because it's an example of a very

Â important scheme that's widely used in practice.

Â Unfortunately for reasons I can't fully explain,

Â the Schnorr signature scheme is not very widely used in practice.

Â It has very nice theoretical properties, we can analyze it,

Â we can say a lot about it, but it isn't used very often in practice.

Â In contrast, the DSS signature scheme is a standardized scheme.

Â What one that was standardized by NIST.

Â And is used quite widely.

Â DSS stands for the digital signature standard.

Â The standard incorporates two different schemes, DSA, the digital

Â signature algorithm, which is based on the discrete-logarithm problem in subgroups of

Â Zp star, and the ECDSA, the elliptic-curve digital signature algorithm,

Â which has a very similar signature scheme, but based on a different class of groups,

Â based on elliptic-curve groups.

Â And as I mentioned, these can be viewed as being derived from identification scheme,

Â although using an unproven variant of the Fiat-Shamir transform.

Â Not exactly the Fiat-Shamir transform as we presented it.

Â So I'm not going to go into detail about that, but I did want to

Â mention the scheme because it is so widely used that you really should know about it.

Â Now, in the next two lectures,

Â we're going to look back at what we can use digital signatures for.

Â We're going to talk a little bit about public key infrastructures, and

Â how signatures can be used for securing public key infrastructures.

Â And then we'll kind of try to put everything together that we've learned in

Â this class, and look at the SSL/TLS protocol, and and

Â how that's used to secure communication on the web nowadays.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.