Skip to main content
Hello — this lesson explains the fundamentals of SSL/TLS certificates: what they are, why they matter, and how to configure certificates to secure SSH and HTTPS services. We’ll cover the roles of asymmetric and symmetric cryptography, how certificates establish trust, and the lifecycle from key generation to certificate validation. A certificate (in this context) establishes trust between two parties during a transaction. For example, when a user connects to a web server, TLS certificates make sure the communication is encrypted and that the server is actually who it claims to be.
A simple diagram showing a blue user icon on the left and a purple server tower on the right connected by a green line with a handshake icon in the center. A certificate symbol above the handshake suggests a trusted or authenticated connection.
Why encryption matters Without secure connectivity, sensitive data (credentials, payment details) could be transmitted in plain text and intercepted by attackers. Encryption protects data in transit by transforming readable data into ciphertext that is useless without the correct key. Basic cryptography modes
  • Symmetric encryption: same key encrypts and decrypts data. Fast and efficient, but requires a secure method to share the key.
  • Asymmetric encryption (public-key cryptography): uses a key pair — a private key (kept secret) and a public key (shared). One key encrypts and the other decrypts, removing the need to transmit a shared secret.
A white rectangular box with a green key icon and the words "SYMMETRIC ENCRYPTION" in bold black text. The box has a thin green border and sits on a pale background.
A simple diagram titled "ASYMMETRIC ENCRYPTION" with a green key icon on the left labeled "Private Key" and a green padlock icon on the right labeled "Public Key."
Analogy: public key = lock anyone can use to secure a message; private key = the single key that opens what the lock protects. The private key must always remain confidential. SSH key-based authentication — a practical asymmetric example Generate an SSH key pair locally and copy the public key to the server:
A diagram titled "Asymmetric Encryption - SSH" showing user icons with private keys and corresponding public locks connecting to locked server icons. It illustrates SSH public/private key authentication.
Example SSH workflow (commands and notes):
Consider newer key types: ed25519 keys are recommended for new SSH key pairs due to stronger security and better performance compared to older RSA keys. Example: ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519.
TLS for HTTPS: combining asymmetric + symmetric cryptography TLS uses both cryptography types:
  • Use asymmetric cryptography (public/private keys) to securely agree on a symmetric session key.
  • Use symmetric encryption for the bulk of the session because it’s faster.
A server typically has a private/public key pair and a certificate containing the server’s public key and identifying details. Browsers obtain that certificate when establishing an HTTPS connection. Example of a server private key (PEM format):
High-level RSA-style key-exchange flow (illustrative)
  1. Browser connects to https://my-bank.com.
  2. Server sends its certificate (includes the server public key and identity).
  3. Browser verifies the certificate (domain, CA signature, validity).
  4. Browser encrypts a symmetric session key with the server’s public key and sends it.
  5. Server decrypts the session key with its private key.
  6. Both use the symmetric key for the session.
Note: Modern TLS commonly uses ephemeral Diffie–Hellman (for example, ECDHE) to provide forward secrecy. In ECDHE, the certificate authenticates the server but the session key is agreed via the key-agreement protocol rather than being directly encrypted with the server’s public key.
Never expose private keys. If a private key is leaked, attackers can impersonate your server or decrypt traffic. Store private keys securely (use HSMs, encrypted key storage, or restricted file permissions).
Realistic attack example (phishing + fake certificate) An attacker could host a replica of your bank’s website and terminate HTTPS with their own certificate. The connection between the browser and the malicious server is encrypted, but the attacker still receives your credentials because you connected to their site. This is why certificate validation and CA trust matter. How browsers validate certificates Browsers do more than accept a public key; they validate a digital certificate that contains identifying info (subject/CN and SANs) and a digital signature from a Certificate Authority (CA). Validation steps include:
  • Confirm the certificate’s subject or Subject Alternative Names match the URL.
  • Verify the certificate’s signature using the issuing CA’s public key.
  • Check validity dates and, where applicable, revocation status (CRL/OCSP).
If a certificate is self-signed or signed by an unknown CA, the browser will warn the user.
A web browser displays a security warning page saying "Your connection is not private" with a red padlock and a "Not secure" notice beside the URL (https://my-bank.com). The page indicates an invalid SSL certificate error (NET::ERR_CERT_AUTHORITY_INVALID).
Certificate Authorities (CAs) and requesting trusted certificates To get a certificate that browsers trust, use a CA. The CA validates your domain ownership and (depending on the validation level) your organization, then signs a certificate that chains to a trusted root in browser/OS trust stores. Popular public CAs include DigiCert, GlobalSign, and others. Generate a CSR (Certificate Signing Request) with OpenSSL:
Send my-bank.csr to the CA. After validation, the CA issues a signed certificate that your users’ browsers will trust because the CA’s root certificate is included in their trust stores.
An infographic about SSL/TLS certificates showing a browser with an online banking site and padlock on the left and a framed certificate for "my-bank.com" on the right. Across the top are certificate authority logos (e.g., Symantec, GlobalSign, DigiCert) and key icons representing issued keys.
Private/internal CAs For internal services you can run a private CA and install the CA root certificate into employee devices so certificates signed by your private CA are trusted within your organization. TLS handshake summary (simplified)
  1. Client connects to https://example.com.
  2. Server sends its certificate (server public key + identity).
  3. Client verifies the certificate (domain match, CA signature, validity).
  4. Client and server agree on or exchange a symmetric session key (often via ECDHE for forward secrecy).
  5. Client and server use symmetric encryption for application data.
  6. The CA’s root public key (in the client trust store) validates the server certificate signature.
Client certificates TLS can also authenticate clients: during the handshake the server requests a client certificate and validates it. Client certificates are common in high-security or enterprise environments but rare on public consumer websites.
An infographic diagram showing a Certificate Authority (CA) workflow with client and serving certificates. It includes icons of locks, keys, users, a server, the Symantec logo, and a masked attacker figure in the center.
Public Key Infrastructure (PKI) The ecosystem that manages keys, certificates, issuance, revocation, and trust is called Public Key Infrastructure (PKI). PKI combines technology, processes, and people to maintain secure certificate lifecycles. Clarifying the lock/key roles
  • Signing with a private key allows anyone with the public key to verify authenticity (digital signatures).
  • Encrypting with a public key ensures only the private key holder can decrypt (confidentiality).
Keep private keys private — compromise leads to impersonation and decryption risks.
The image shows two orange icons on a pale background: a padlock on the left labeled "Public Key (Lock)" and a key on the right labeled "Private Key." It visually represents the public/private key concept used in cryptography.
Common naming conventions and file extensions Use these as a quick reference. Filenames containing the word “key” or extension .key usually indicate private keys. Certificates and public keys commonly use .crt or .pem. Further reading and references That concludes this lesson on SSL/TLS basics: asymmetric vs symmetric cryptography, certificate authorities, certificate validation in browsers, and practical examples for SSH and HTTPS. Thank you for reading.

Watch Video

Practice Lab