Public key infrastructure explained: learn how PKI uses digital certificates, certificate authorities, and trust chains to verify identities and secure HTTPS.
π Master your Security+ skills with Pluralsight here: Pluralsight
Youβll learn what Public Key Infrastructure (PKI) is and how digital certificates, certificate authorities, and TLS help devices establish trust. This beginner-friendly CompTIA Security+ guide helps you understand public and private keys, certificate chains, and common security warnings.
Chapters: 0:00 Intro 0:15 What problem does PKI solve? 0:52 How do public and private keys work? 1:36 Why should you trust a digital certificate? 2:45 How does PKI protect a web connection? 3:33 What is key escrow, and why does it matter? 4:22 Outro
Affiliate notice: Some links may earn a commission. Thanks for your support.
Key Takeaways
PKI binds public keys to identities through digital certificates, certificate authorities (CAs), and trust policies, not a single encryption algorithm. NISTβs definition emphasizes certificate issuance, maintenance, and revocation.
Certificates are shareable; private keys must remain protected. A certificate contains a public key and identity information, while authentication also requires proof of control of the matching private key.
Certificate trust depends on an accepted trust anchor. Browsers validate a websiteβs certificate through intermediate CAs to a trusted root; a rootβs self-signature alone does not establish trust.
Encryption protects confidentiality; digital signatures support integrity and authentication. In typical certificate-authenticated TLS 1.3, the certificate key authenticates the handshake, while symmetric keys protect application traffic.
A valid certificate does not guarantee a safe website or harmless software. It supports a specific identity claim, not an endorsement of the certificate holderβs behavior.
Certificate management requires monitoring, renewal, and revocation. Renewal replaces a certificate; rekeying replaces its key pair. Revocation helps only when relying systems obtain and enforce certificate status information.
Investigate certificate warnings rather than bypassing them. Check the hostname, validity dates, certificate chain, trust configuration, and revocation status; never blindly trust an unfamiliar certificate.
π Turn understanding into hands-on skills with Pluralsight, an optional next step offering guided security labs, feedback, assessments, and practice exams to focus your certification preparation.
Public key infrastructure (PKI) is the framework that helps systems decide whether a public key belongs to the identity claiming it. It combines digital certificates, certificate authorities, policies, processes, and technology to establish and manage that trust.
Whenever you visit an HTTPS website, your browser uses certificate-based trust to help authenticate the server. PKI also supports secure email, software signing, device authentication, and other security functions.
To understand public key infrastructure, start with one question: How do you know whose public key you are using?
What Problem Does Public Key Infrastructure Solve?
Imagine someone gives you a public key and says, βThis belongs to your bank.β
The key might work perfectly for cryptographic operations. But that does not establish that it belongs to your bank. If an attacker substitutes their own key and you accept it, you could communicate securely with the wrong party.
Some links may earn a commission. Thanks for your support.
Watch in the video playerOpen the dedicated player for this course.
PKI helps solve this identity problem. A digital certificate binds an identity, such as a domain name, to a public key. A certificate authority signs that certificate, allowing other systems to verify the binding through an established trust relationship.
NIST defines PKI as infrastructure for issuing, maintaining, and revoking public-key certificates.
PKI is not a single encryption algorithm. It is the system for managing certificate-based trust.
How Public and Private Keys Work
Public-key cryptography uses a pair of mathematically related keys:
Key
How it is handled
Possible functions, depending on the algorithm
Public key
Can be shared openly
Verifies signatures, encrypts key material, or participates in key agreement
Private key
Must be protected from unauthorized use
Creates signatures, decrypts corresponding encrypted key material, or participates in key agreement
Not every algorithm supports every function. An algorithm designed for signatures does not necessarily support encryption.
Encryption and Digital Signatures Are Different
Encryption protects confidentiality: it prevents unauthorized parties from reading protected information.
Digital signatures support integrity and authentication:
A sender signs information using a private signing key.
A recipient verifies the signature using the corresponding public key.
Successful verification helps detect changes to the signed information.
A trusted certificate helps connect the verification key to the claimed signer.
For example, Alice signs a message, and Bob verifies it using Aliceβs public key. The signature does not hide the message. It helps Bob check that the signed information has not changed and, with a trustworthy identity binding, authenticate its origin.
This explains why keys alone are not enough: Bob still needs a reliable way to know that the public key belongs to Alice.
What Is a Digital Certificate?
A digital certificate is a signed electronic document that associates an identity with a public key.
Commonly used X.509 certificates contain:
Subject and issuer information.
The subjectβs public key.
A serial number.
Validity dates.
Extensions describing identities, constraints, and permitted uses.
The issuerβs digital signature.
A certificate does not contain its ownerβs private key. Certificates can be shared; private keys require protection.
For websites, the Subject Alternative Name (SAN) extension is particularly important because it contains service identifiers such as DNS names. A browser checks whether the certificate identifies the website being requested.
Possessing a copy of a websiteβs certificate is not enough to impersonate that website successfully. The server must also demonstrate control of the matching private key during certificate-based authentication.
The Main Components of PKI
PKI involves more than certificates and cryptographic software.
Component
Role
Certificate authority (CA)
Issues and digitally signs certificates
Registration authority (RA)
Performs enrollment-related identity or authorization checks
Subscriber or end entity
Person, device, or service receiving a certificate
Relying party
System that evaluates and relies on a certificate
Trust store
Holds accepted trust anchors
Certificate status services
Provide revocation information
Policies and procedures
Define how certificates and keys are managed
These functions do not always require separate servers. For example, an enrollment service may perform registration-authority functions.
Protecting private keys is also essential. A CAβs signing key needs especially strong protection because it is used to authorize certificate issuance.
What Does a Certificate Authority Verify?
The checks depend on the certificate type and the CAβs policies.
A valid certificate supports a specific identity claim. It is not a general endorsement of the certificate holder.
How Certificate Chains Establish Trust
A typical certificate hierarchy looks like this:
Trusted root CA β Intermediate CA β Website certificate
The root CA is the accepted starting point for trust.
An intermediate CA is certified by another CA and can issue certificates within its constraints.
The leaf certificate identifies the website, user, or device rather than issuing additional certificates.
The browser validates the leaf certificate through the intermediate certificates to an accepted trust anchor.
Why Does a Browser Trust a Root Certificate?
A root is not trusted simply because it signs its own certificate.
Trust must be established independently, for example, through a browser or operating systemβs trust store, or through an organizationβs administrative configuration.
A rootβs self-signature does not independently prove that the root deserves trust. The important question is whether the verifying system has an authorized reason to accept it.
Public PKI, Private PKI, and Self-Signed Certificates
Publicly trusted PKI supports trust across independently managed systems, such as public websites and visitorsβ browsers.
Private PKI lets an organization issue certificates and distribute trust to its own systems, such as managed laptops or internal services.
A self-signed certificate is signed using the private key corresponding to the public key inside that same certificate. It is not automatically cryptographically broken, but a verifier needs an independent basis for trusting it.
Private PKI is not the same as using self-signed website certificates. An organization can operate its own root, intermediate, and leaf certificate hierarchy.
How PKI Works: From Certificate Request to HTTPS
PKI becomes easier to understand when you separate certificate issuance from certificate use.
Step 1: Generate Keys and Request a Certificate
In a typical client-generated enrollment process:
Generate a key pair.
Create a certificate signing request (CSR). It contains the public key and requested identity information and is signed with the corresponding private key.
Validate the request. The issuing service checks the applicantβs authority over the requested identity.
Issue the certificate. The CA signs the approved certificate.
Deploy the certificate. The service must also have access to the matching private key.
In this workflow, the private key does not need to be sent to the CA. Centralized key generation and key recovery arrangements are separate possibilities, not requirements of every PKI deployment.
Step 2: Authenticate the Server During TLS
Transport Layer Security (TLS) protects modern HTTPS connections. βSSL certificateβ remains common wording, but TLS is the relevant protocol terminology.
During a typical certificate-authenticated TLS 1.3 connection:
The browser and server negotiate connection parameters.
The server supplies its certificate and supporting certificate chain.
The browser checks the certificateβs identity, validity dates, permitted uses, and chain.
The server proves control of the corresponding private key through a handshake signature.
The participants establish shared secrets and derive symmetric traffic keys.
Symmetric authenticated encryption protects the application data.
Revocation handling also depends on the client and its configuration.
The certificate key does not directly encrypt every byte of the webpage. In ordinary TLS 1.3 certificate authentication, it authenticates the handshake, while symmetric keys protect the traffic. The protocol is specified in RFC 8446.
Certificate Expiration, Renewal, and Revocation
Certificate management continues after installation:
Request β Issue β Deploy β Monitor β Renew or replace β Revoke when necessary β Retire
Two related operations are worth distinguishing:
Renewal obtains a replacement certificate.
Rekeying introduces a new key pair.
Organizations need certificate inventories, ownership records, monitoring, and renewal processes to reduce certificate-related outages.
Expiration vs. Revocation
Expiration occurs when a certificate reaches the end of its stated validity period.
Revocation identifies a certificate as no longer acceptable before its normal expiration, for example, after its private key is compromised.
Two common revocation mechanisms are:
Mechanism
Purpose
Certificate Revocation List (CRL)
Publishes a signed list identifying revoked certificates
Online Certificate Status Protocol (OCSP)
Provides signed status information about particular certificates
An OCSP βgoodβ response does not replace hostname, date, chain, or other validation checks.
Revocation also does not erase a stolen private key. It helps only when relying systems obtain and enforce the relevant status information.
What Common Certificate Warnings Mean
A certificate warning means that validation has failed. It does not always prove an attack, but it should not be dismissed.
Troubleshooting should focus on the failed check: the requested hostname, certificate dates, supplied chain, trust configuration, and certificate status.
For an internal service, an organization may need to distribute its private CAβs trust anchor through an approved process. For a public website, an unexpected warning should not be βfixedβ by blindly trusting an unfamiliar certificate.
What Is Key Escrow?
In this context, key escrow retains private decryption key material so an authorized recovery process can restore access to encrypted information.
Examples include recovering encrypted business email after a key is lost or restoring access to organizational records after key corruption.
Escrow addresses an availability problem: encryption can keep data confidential while making it inaccessible if the necessary key disappears.
However, retaining recovery material creates another sensitive access point. Recovery arrangements need:
Clear authorization rules.
Strong protection for retained key material.
Controlled recovery procedures.
Audit records.
Not every recovery system copies the userβs private key. Some use a separate recovery key.
Signing keys also require different treatment. Sharing a signing private key weakens confidence about who created a signature, so βescrow every private keyβ is not an appropriate blanket policy.
Where PKI Is Used Beyond Websites
PKI supports several everyday security functions:
Device and user authentication: Certificates can authenticate managed laptops, smart cards, Wi-Fi clients, and VPN users.
Mutual TLS: Both communicating parties authenticate using certificates.
Secure email: S/MIME supports certificate-based email signing and encryption.
Code signing: Signatures help identify publishers and detect changes to software.
Document signing: Certificate-based signatures support verification of document origin and integrity.
These uses have limits. Signed software can still be malicious, an authenticated client still needs appropriate authorization, and a website with a valid certificate can still deceive visitors.
PKI establishes and manages particular trust relationships; it does not guarantee that every action taken within them is safe.
Build Hands-On Cybersecurity Skills
Understanding certificates, trust chains, and private keys provides a foundation. Guided practice can help you apply those concepts and identify where you need more study.
Pluralsight is an optional next step with guided security labs, feedback, assessments, and practice exams to support practical learning and certification preparation.
π Explore Pluralsight to practice cybersecurity tasks, find your weak spots, and focus your next study session.
Affiliate notice: Some links may earn a commission. Thanks for your support.
Next
FAQ
Quick answers to the questions people usually ask about this topic.
What is the difference between PKI and TLS?
PKI manages certificate-based trust; TLS protects a connection. In a typical HTTPS connection, the browser uses PKI to validate the serverβs certificate, and TLS uses that authenticated handshake to establish encryption keys. Symmetric encryption then protects the traffic. PKI also supports uses outside TLS, including code signing and secure email.
Does a browser contact the certificate authority every time you visit an HTTPS website?
Not necessarily. The server supplies its certificate and supporting chain, and the browser can verify certificate signatures using locally available trust anchors. Certificate status checks may involve network requests, but revocation behavior depends on the browser and its configuration. The issuing CA does not need to participate directly in every TLS handshake.
Can PKI prevent man-in-the-middle attacks?
PKI helps prevent an attacker from impersonating a server by substituting their own public key. This protection depends on correct certificate validation, trustworthy certificate issuance, and secure private keys. Ignoring certificate warnings or installing an untrusted root certificate can undermine that protection. PKI does not protect against every threat, such as a malicious website operating with a valid certificate.
Can an incorrect device clock cause a certificate error?
Yes. Certificate validation checks whether the current time falls within the certificateβs validity period. If your deviceβs clock is significantly wrong, a valid certificate may appear expired or not yet valid. Check your date, time, and time-zone settings, but do not assume every certificate warning is a clock problem or bypass the warning without investigating.
Can certificate-based authentication replace passwords?
For some systems, yes. Certificates can authenticate devices or users connecting to services such as Wi-Fi networks, VPNs, and mutual TLS applications. However, certificates still require secure enrollment, private-key protection, renewal, and revocation. Authentication is not authorization: identifying a user or device does not automatically grant permission to access every resource.
What should you do if a certificateβs private key is compromised?
Stop relying on the compromised key, generate a new key pair securely, and obtain and deploy a replacement certificate. Request revocation of the affected certificate and investigate how the key was exposed. Renewing a certificate while reusing the compromised key does not solve the problem. Revocation also depends on relying systems obtaining and enforcing certificate status information.
How can I move from understanding PKI to practicing cybersecurity skills?
Start by inspecting a websiteβs certificate: identify its domain names, issuer, validity dates, and certificate chain. For broader guided cybersecurity practice, explore Pluralsight as an optional next step. Its guided labs, feedback, assessments, and practice exams can help you apply foundational concepts, identify knowledge gaps, and focus your certification preparation.
Affiliate link β I may earn a commission at no additional cost to you.
Jay's Recommendation
Turn understanding into hands-on confidence
You've built the foundations. Pluralsight adds opportunities to practice in guided security labs, get feedback, and check your knowledge with assessments and practice exams, so your next step is more than another video.
π Put concepts to workBuild practical skills with guided security labs and feedback.
π―Find your weak spotsUse assessments to focus on what needs more work.
πCheck your understandingUse practice exams to guide your certification preparation.
π§Give study sessions directionOrganize further learning with curated paths and progress tracking.