[MUSIC] Hello, welcome back. In this lesson, we will look into the concept of public infrastructure, and learn about its two important applications, namely digital signatures and digital certificates. A public key infrastructure, or PKI, is a fundamental component of many security protocols of the web. A PKI is a collection of all software, hardware, people, policies, and processes that aim to manage, generate, distribute, and revoke cryptographic keys and digital certificates. Digital certificates are documents that are used to prove the ownership of public keys. Public key cryptography is a powerful tool, which is widely used in many security solutions. One of the most important uses of public key cryptography is to provide confidentiality for the information in electronics communications. This is made possible by encryption of data. Public key cryptography can also be used for the following purposes. First, ensuring the integrity of data in digital communication. Second, identification and authentication. Third, ensuring non-repudiation in digital communications. Non-repudiation associates the actions to individuals, so that they cannot deny the actions they have performed. Fourth, facilitating the establishment of trust between two parties that don't know each other. Fifth, sharing a session key in encrypted communication. As symmetric encryption is faster and computationally simpler, the actual data is typically encrypted using symmetric ciphers. While asymmetric or public key ciphers are used for exchanging encryption keys of symmetric ciphers in a communication session. Next, we are going to learn how public key encryption is capable of providing these solutions. Along with encryption of data or session keys, which provides confidentiality, public keys systems can also be used for making digital signatures. Similar to normal signature on a paper, a digital signature is a technique for providing authentication and non-repudiation for the sender and ensuring integrity of data in electronic communications. Let's see how a digital signature works. Suppose Alice and Bob want to communicate with each other. Both of them have a pair of keys, including one public key and one private key. Alice has Bob's public key. So, as she can encrypt her message using his public key and send the encrypted message to him. As we have mentioned in another lecture, no one, including Alice herself, can decrypt the message, except the one who has the corresponding private key. So, Bob receives the message, and decrypts it with his private key. In fact, anyone who has Bob's public key will be able to communicate with him, so Bob needs to make sure that the message was really sent by Alice. In a paper based communication, Alice could sign the paper so that Bob could authenticate her with her signature. Likewise in digital communication, Alice needs to associate her digital signature with her message. To do that she computes the hash value of the whole message, which is called message digest. Then she needs to encrypt the message digest using her private key. The result is Alice's digital signature. The message itself is encrypted with Bob's public key. Now she can append the digital signature to the encrypted message and send it to Bob. Bob receives both message and Alice's digital signature. First, he decrypts the message using his own private key. Then he computes the message digest of the received data, using the same hash function as Alice. Then he decrypts the digital signature with Alice's public key and gets the message digest. He then compares the two versions of the message digest with each other. And if they are identical, Bob can conclude that the message has been sent by Alice. Moreover, he can also ensure that the message has not been altered before he received it. Since Alice has signed the message with her private key, anyone who has her public key can verify if she has sent the message. Therefore, she will not be able to deny her signature. This guarantees non-repudiation of Alice's message. So, we learned how a digital signature, which employs public key encryption, can ensure authenticity, integrity and non-repudiation. Now, consider the same Alice and Bob scenario. Before communication starts, Alice needs to get Bob's public key. Imagine that before Alice has received Bob's public key, an adversary breaks into the system and sends Alice another public key, which he has created pretending to be Bob. So the question is, how can Alice authenticate the public key she has received? How can she be sure that it really belongs to Bob? Well, the solution is rather obvious. Alice can rely on a trusted third party to certify Bob's public key. This third party is called a certificate authority, or CA. And the document that contains the verified public key is called a digital certificate. CAs are usually companies that issue certificates and charge their customers. Let's see how a digital certificate works. Suppose that Bob wants to send his public key to Alice. Both Alice and Bob know a CA and trust it. So Bob sends his public key and his identification information to the CA. The CA verifies Bob’s identity, and then generates a certificate, which contains Bob's public key and some additional information. The CA signs the certificate with its private key and sends it to Bob. Now instead of sending the public key as such, Bob sends his public key certificate to Alice. Alice can then check the certificate and get Bob's authentic public key by decrypting the CA's signature in the digital certificate with the CA's public key. The CA manages public keys it has certified by, for example, revoking compromised keys and setting validation and suspension periods for keys. This kind of status information is part of a certificate. In this lesson, we learned how public key encryption and mechanisms that use public key encryption can ensure authenticity, integrity, non-repudiation, and establishment of trust between two parties. In the next video lecture, we will learn how the public key infrastructure can be used in communication security protocols such as DLS, SSL, and DTLS. [MUSIC]