Speaking the language of HTTPS
Moving a site to HTTPS means confronting a series of unfamiliar terms: key pairs, certificates, and certificate authorities all play a role in establishing a secure connection. Before you can configure your server, it helps to understand what these pieces are and how they fit together.
Public and private key pairs
A public/private key pair is a set of two very large numbers with a special mathematical relationship, used for encryption and decryption. The most common system is the RSA cryptosystem. The public key encrypts messages, and those messages can only feasibly be decrypted with the matching private key. Your web server advertises its public key to the world of clients, who use it to establish a secure channel.
Certificate authorities and X.509 certificates
A certification authority (CA) is an organization that vouches for the connection between a public key and a public DNS name, such as www.foobar.com. Without that voucher, a client has no way to know whether a particular public key is the true key for a given site. The CA asserts that a key is genuine for a site by using its own private key to cryptographically sign the website's public key; that signature is computationally infeasible to forge.
Clients such as browsers maintain trust anchor stores with the public keys of well-known CAs, which they use to cryptographically verify a CA's signature.
An X.509 certificate is the data format that packages a public key with metadata about its owner. On the web, the owner is the site operator and the key metadata is the server's DNS name. When a client connects to an HTTPS server, the server presents its certificate and the client checks three things:
- The certificate has not expired.
- The DNS name in the certificate matches the server the client is trying to reach.
- A known trust anchor CA signed the certificate.
In most deployments, a CA doesn't sign the server's certificate directly. Instead, there is a chain of certificates that links a trust anchor to one or more intermediate signers, ending at the web server's own certificate, known as the end entity.
Certificate signing requests
A certificate signing request (CSR) is a data format that also bundles a public key with ownership metadata, but it is not interpreted by clients. CAs read CSRs. When you want a CA to vouch for your server's public key, you send a CSR. The CA validates the information in the request, uses it to generate a certificate, and sends the final certificate back to you. You then install that certificate, usually as part of a chain, along with your private key on your web server.



