PKI, Public Key Infrastructure, Overview

Secure encryption has until lately relied on secret keys. The encryption is typically very strong, the problem is how to securely distribute the keys. This is already difficult if only two parties are involved, with more than two parties the risk that the key gets compromised increases drastically. Public key encryption has no secret key that needs to be distributed. This has made public key encryption very popular on the Internet.

Public key encryption uses two different keys, one public key and one private key. Like the name implies, the private key is kept secret and is only known by the owner. The public key on the other hand, can be freely distributed. That the public key is known by third parties does not pose a security problem. This makes it very easy to distribute the public key, all that is needed is a public key infrastructure. Despite that the public key is not secret, some management of the keys is necessary. It must be possible to identify the owner of the private key and the owner may need to revoke a key.

In public key encryption, one key is used to encrypt the message and the other key is used to decrypt the message. The two keys are mathematically related. If the private key is used to encrypt the message, it can be decrypt with the public key and you know that only the owner of the private key can have encrypted the message. If the public key is used to encrypt the message, only the owner of the private key can decrypt the message. It is also possible to both sign and encrypt a message that you send. You simply sign the message using your private key and then encrypt the message, including your digital signature, using the recipient’s public key.

A private key infrastructure needs some kind of trusted authority. This authority tries to verify the identity of the people who request keys from them. Users want to be sure that they are communicating with their bank and not with a fake site that has created a certificate with the name of the bank. The central authority can also revoke keys. This is very important in case a private key has been compromised. At the same time it is very important that no malicious revocation of private keys is allowed. The system would quickly collapse if one person could revoke keys he does not own.

The most widely used PKI standard is X.509 which was created back in 1988 by the ITU, International Telecommunications Union. The standard belongs to the X.500 family of protocols. The X.509 standard has a hierarchical system of certificate authorities. This hierarchical system has later on been replaced with a structure that supports other topologies as well.

The certificate authorities manage the digital certificates. The digital certificates are based on public key encryption. They contain the owner’s name and public key plus some other information, such as an expiration date. The digital certificate also contains information about the issuer, the certificate authority, also known as the CA.

SSL (Secure Socket Layer) certificates are used to ensure that the data you send to a website is encrypted and that you are communicating with the right website. SSL certificates are issued by CAs and placed on the webserver. This allows browsers to verify that they are communicating with the right site and to encrypt the communication between the browser and the website.

Note that all browsers come with the public keys of several CAs. The browser will always trust certificates issued by these CA. If your browser did not have any pre-loaded CAs it could trust, it would not be possible to verify if an SSL certificate was real or not. If the website you are visiting has a certificate issued by one of the CAs your browser trusts, it will also trust the website. But if certificate is issued by a CA that your browser does not know, it will check the certificate of that CA. If it has been issued by one its trusted CAs, your browser will trust this CA as well.

Leave a Reply