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

348 ratings

University of Maryland, College Park

348 ratings

Course 3 of 5 in the Specialization Cybersecurity

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

From the lesson

Week 7

Digital Signatures

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

Maryland Cybersecurity Center

[SOUND].

Â In this lecture, we'll talk about Public-key infrastructures.

Â Now let's remind ourselves about how Public-key distribution is

Â supposed to work.

Â Both for Public-key encryption and for digital signatures.

Â The discussion here actually is just about the Public-key setting generally.

Â It doesn't matter which of those two primitives we're talking about.

Â So, remember the idea was that one party would generate locally a pair of

Â public and private-keys and then put their public-key in some central repository.

Â Now, we haven't worried very much about names until now, but of course, names and

Â identities are important in practice.

Â And so in practice what might happen is that

Â this entity named Alice would actually insert a record into

Â some public database saying that Alice's public-key is pk.

Â When another user wants to obtain a copy of that other user's Public-key.

Â They can do a look up in the database,

Â to find the Public-key belonging to the entity named Alice.

Â And as we've described it,

Â they will then be able to obtain an authentic copy of Alice's key, pk.

Â Now the problem is that we haven't until now been worried, or thought about

Â the potential for an active attacker, who can try to manipulate this process.

Â And in particular, nothing prevents an attacker from inserting their own

Â public key, pk*, into this public database using the same name, Alice.

Â The database is not doing any kind of checking of the identities of

Â people putting public-keys into that database.

Â And so nothing prevents an attacker from trying to claim somebody else's name.

Â Moreover, the attacker might be able to prevent the communication from

Â Alice from reaching the database.

Â And whether or not it can do that, the other party trying to

Â obtain a copy of Alice's public-key is going to end up being confused.

Â In the best case,

Â they're going to obtain Alice's public-key pk along with an incorrect public key pk*.

Â They won't know which one is the correct one to use.

Â If they try using both, that'll just lead to spurious results.

Â In the worst case, the attacker will be able to prevent Alice's communication from

Â reaching the public repository.

Â And in that case, the other party won't be able to obtain Alice's public-key at all.

Â They won't notice anything has gone wrong, because it will have

Â obtained only a single public-key, corresponding to the identity Alice.

Â And if they then try to use that key, they'll really be communicating with

Â the attacker, rather than with the party with whom they intended to communicate.

Â Another problem is that even if Alice is able to put a copy of her public-key into

Â the central repository, and even if the repository is somehow doing checking to

Â make sure that the party inserting their public-key is who they claim they are.

Â What about the channel between Bob, the other party, and the central repository.

Â If an attacker can block the communication from the repository to Bob, and

Â potentially even inject its own public-key pk* again onto that channel, well then

Â again Bob will be fooled into accepting an incorrect public-key pk* to use for

Â communication with Alice.

Â And once again, the results will be disastrous.

Â Now the idea behind public key infrastructures is to

Â use signatures themselves for secured distribution of public keys.

Â So the idea is to assume in the simplest setting

Â a trusted party with a public key known to everyone.

Â And we'll call this trusted party a CA, which stands for a certificate authority.

Â And we'll denote the public key of this entity by pkCA.

Â So that's the public key belonging to the certificate authority.

Â And the idea is now that Alice, in the previous diagram, could ask the CA

Â to sign the binding between her identity, her name, and her public key.

Â That is the CA should sign some message indicating that Alice's public key is pk.

Â And we can call that signature on the binding between the public key and

Â the identity, a certificate.

Â So here I just displayed some notation where the certificate of the CA on Alice's

Â public key is a signature by the CA that is using the CA's secret key

Â on some sentence that binds together Alice's identity and her public key.

Â Now note that implicit here is the idea that the CA is somehow doing some kind of

Â verification of Alice's identity out of band.

Â If the CA is willing to sign anything that anybody sends it, well then

Â nothing's going to prevent the attacker from sending Alice, pk* just like before.

Â But the idea here is that the CA can be a business, can be a reputable company.

Â And can take the time and develop the resources to be

Â able to verify people's identities before certifying their public keys.

Â Now, once Alice has been able to obtain a certificate on her public key.

Â Then somehow or another if Bob can obtain a copy of that certificate,

Â along with the identity Alice and the public key itself.

Â Then Bob can simply verify the signature to check that everything's okay.

Â That is, Bob can verify that the certificate that is the signature,

Â verifies under the CA's public key the statement that Alice's public key,

Â is indeed pk.

Â And this will prevent an attacker from fooling Bob into

Â accepting an incorrect public key pk*,

Â unless the attacker is somehow able to fool the authority as well.

Â So as we've said,

Â Bob is assured, via this mechanism, that pk is indeed Alice's public key.

Â As long as the CA is trustworthy, meaning that not only is it honest but

Â that it really does properly verify Alice's identity before issuing

Â a certificate for her.

Â There's also the assumption of course that the CA's private key has not been

Â compromised, and that the signature scheme it's using is indeed secure.

Â Now, if you think about it a little bit,

Â you might be worried that there's a chicken and an egg problem here.

Â What do I mean by that?

Â Well, we said that if Bob can get a copy of the CA's public key, then he can

Â leverage that to obtain authentic copies of the public keys of other entities.

Â But how does Bob get the public key of the CA in the first place?

Â Well, there are several possibilities here.

Â I think the most natural possibility is really to imagine that there is one or

Â a few central trusted CAs that we can call roots of trust.

Â And the idea is that it's going to be much easier for

Â Bob to obtain a small number of CA's public keys rather than public keys for

Â arbitrary entities with whom Bob wants to communicate.

Â So the point is, we've kind of narrowed down our focus, so

Â rather than having to worry about secure distribution of millions of public keys.

Â We only have to worry about secure distribution of a small handful of

Â public keys.

Â And then we bootstrap from those,

Â to obtain secure distribution of other public keys.

Â And in fact, this is how things are done in practice.

Â These small set of CA's public keys, can be distributed as part of,

Â for example, an operating system, or a web browser.

Â So if you're able to obtain an authentic copy of the web browser to begin with,

Â then along with that authentic copy of the browser,

Â you might as well download authentic copies of CA's public keys.

Â And as an example, which I'll just demonstrate quickly on the next slide,

Â if you open up your favorite browser.

Â You will find that there are certificates sorry not certificates,

Â there are public keys corresponding to CA's baked into the web browser.

Â So, for example in Firefox if you follow the menus I have indicated here,

Â you can pull up a list of authorities whose

Â public keys are embedded in the Firefox web browser.

Â In fact, it's even more interesting and I, and I would encourage you to do this.

Â You can not only look at the list of authorities,

Â you can also actually see their public keys.

Â You can look at what signature schemes they're using,

Â what kind of security parameter they're using etc.

Â It's quite interesting.

Â And so as an example, if you follow those menus in Firefox,

Â you will get to a window looking something like this.

Â The contents in your window may differ depending on what version you're using and

Â other factors.

Â One thing that's interesting here is if you do this and you actually go look

Â at the Roots of trust contained in your browser, at least in Firefox, you'll see

Â that it's not really the case that there's a small number of CAs public keys.

Â In fact, there are hundreds of CA's public keys that are embedded into

Â the Firefox browser.

Â And what's interesting is that some of the names,

Â some of the companies, may be companies you've heard of.

Â For example, VeriSign which is on the bottom of the screen here,

Â is a very widely known company that acts as a CA.

Â But if you look at some of the other names, they be names that you don't

Â recognize and perhaps, if you had a choice in the matter, wouldn't choose to trust.

Â And it's sort of interesting that this is going on behind the scenes.

Â Most users of web browsers are not aware of what Roots of

Â trust are embedded in their browser.

Â And yet this is really the under pinning of pretty much of all of security on

Â the internet today.

Â Kind of a scary thought actually.

Â But I should mention that if you're concerned about that you can go

Â through the list here and

Â actually delete the public keys as CAs that you, that you don't trust.

Â Now another model for leveraging CAs and leveraging their certificates to learn

Â about public keys of other parties, is something called the Web of trust model.

Â And this is something that originated with the popular PGP email encryption software.

Â And the idea here is simply to obtain public keys from your friends in person.

Â So here the public key distribution problem is quote unquote solved,

Â at least for your immediate friends, because you could obtain authentic copies

Â of their public keys by interacting with them in person.

Â And people actually do this sometimes,

Â they have what's called Key-signing parties,

Â where a bunch of people who are all using the PGP software will get together, and

Â exchange public keys in person.

Â Now, once you've done that,

Â you can in addition obtain certificates on your public key from your friends.

Â And you can do that at, at the key-signing parties as well.

Â So now what I have is I have say 10 or 20 public keys of my friends.

Â And I also have 10 or 20 certificates, signed signatures by my

Â friends vouching for the binding between my identity and my public key.

Â Now you can then boot strap off of that to learn public keys of other people.

Â So, for example, if A knows pkB, and if B at some point in time

Â issued a certificate for C, so this would roughly correspond to the case where A and

Â B are friends, and B and C are separately friends.

Â Well then, A can learn about C's public key,

Â by having C send it's public key, along with the certificate to A.

Â A can verify the certificate because it knows B's public key.

Â And assuming that A finds B trustworthy, right, thinking that under the assumption

Â that B will only issue certificates for people whose public keys he's checked and

Â people who, whose identities he's validated.

Â Then A has some confidence that this really is C's public key.

Â Another idea is to have a Public-key repository.

Â That is, we can augment this Public repository we had way back at

Â the beginning of this lecture, and

Â rather than only storing a public key in a repository, we can store

Â the public key along with any certificates that I have for that public key.

Â And in fact one very well known example of this is the MIT PGP keyserver.

Â You can search for that online and find their webpage.

Â And this is eg, exactly an implementation of this idea.

Â And so you can go there actually and look up somebody's public key and

Â if they're using PGP assuming they have a public key,

Â you will find in this PGP keyserver database.

Â Their public key, along with any, any certificates that are known for

Â that public key.

Â So again, the idea here is that to find Alice's public key,

Â you would search in this database and get all public keys in the database listed for

Â this entity Alice, along with the certificates on those key.

Â And then you simply look for

Â a certificate signed by somebody whose public key you have and whom you trust.

Â Now PKI in theory,

Â as I've described it on the previous three slides, seems pretty workable.

Â In practice, however, it's been a bit more difficult.

Â And it doesn't quite work as well in theory as you

Â might think it does from sorry,

Â it doesn't quite work as well in practice as you might think it does from theory.

Â There are several reasons for

Â this that I'm really not going to go into a great detail about here.

Â This already lies more in the realm of network security than cryptography per se.

Â But I'll just mention one issue is the Proliferation of root CAs that I,

Â that I talked about a few slides ago.

Â Namely the fact that even though you have these root CAs where it's suppose to

Â verify people's sig people's public keys and issue certificates.

Â There are lots and lots of CAs that are trusted in your basic browser software.

Â And in fact if any of those are ever compromised,

Â it would have disastrous con consequences for public key distribution.

Â Another issue is the problem of Revocation.

Â That is dealing with the fact that users might occasionally forget their keys.

Â There might actually have their private keys be compromised by an attacker.

Â And if they find out about such an event,

Â they would like to be able to tell the world that their old set of

Â certificates that vouched for their public key, are no longer valid.

Â And if they've replaced their public key with a different one.

Â This is really a rather thorny issue and

Â there's no great solution even today, although there are work arounds.

Â So we're all ready for

Â bringing everything together that we've learned in the class so far.

Â And in the following lecture, we'll talk about the SSL/TLS protocol,

Â which you use every time you you open up an HTTPS connection over the web.

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