0Pricing
Cyber Security Academy · Lesson

Public Key Infrastructure

Trust with certificates.

Public Key Infrastructure is a free Cyber Security Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is PKI?

Public Key Infrastructure (PKI) is the system of policies, roles, hardware, and software that creates, manages, and validates digital certificates.

Its core job is to bind a public key to a verified identity (a website, a person, or a server) so others can trust it.

The Trust Problem

Public-key cryptography lets anyone publish a public key. But how do you know a key really belongs to bank.com and not an attacker?

PKI solves this by having a trusted third party vouch for the key by signing a certificate.

Digital Certificates

A digital certificate ties a public key to an identity. It contains:

  • The subject's name (e.g. a domain)
  • The subject's public key
  • The issuer (the authority that signed it)
  • Validity dates
  • The issuer's digital signature

X.509 Standard

Most certificates follow the X.509 standard. You can inspect one with OpenSSL.

openssl x509 -in cert.pem -noout -text

Key Pairs in PKI

Every certificate is built on an asymmetric key pair:

  • The private key stays secret on the server.
  • The public key is shared inside the certificate.

Data signed by the private key can be verified with the public key, and vice versa.

openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key

How Signing Builds Trust

An authority hashes the certificate data and encrypts that hash with its own private key. This is the signature.

Anyone with the authority's public key can verify the signature, proving the certificate has not been tampered with.

Roles in PKI

PKI involves several roles:

  • Certificate Authority (CA) issues and signs certificates.
  • Registration Authority (RA) verifies identities before issuance.
  • Certificate Repository stores and distributes certificates.
  • Relying Party is anyone who trusts and uses a certificate.

The Trust Anchor

Trust starts at a root certificate that is self-signed and pre-installed in operating systems and browsers.

This root is the trust anchor. If you trust the root, you can trust everything it correctly signs.

Certificate Signing Request

To get a certificate, you generate a Certificate Signing Request (CSR) containing your public key and identity, then send it to a CA.

openssl req -new -key private.key -out request.csr \
  -subj '/CN=example.com/O=Example Inc'

Where PKI Is Used

PKI is everywhere:

  • HTTPS / TLS for secure web traffic
  • Code signing to prove software authenticity
  • Email security via S/MIME
  • VPNs and device authentication

PKI Lifecycle

Certificates have a full lifecycle: request, issue, deploy, renew, and revoke.

Good PKI hygiene means tracking expiry dates and revoking compromised keys quickly. A neglected certificate is a security risk.

Quick Check

What is the primary purpose of PKI?

Recap

You learned that PKI binds public keys to identities using digital certificates.

  • Trust flows from pre-installed root certificates.
  • CAs sign certificates; relying parties verify signatures.
  • Certificates follow the X.509 standard and have a full lifecycle.

Next, we look at the authorities that issue these certificates.

Frequently asked questions

Is the “Public Key Infrastructure” lesson free?

Yes — the full text of “Public Key Infrastructure” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “Public Key Infrastructure”?

Trust with certificates. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cyber Security Academy?

No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Public Key Infrastructure” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cyber Security Academy lesson?

Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Public Key Infrastructure
  2. Certificate Authorities
  3. Certificate Chains
  4. Managing Certificates
← Back to Cyber Security Academy