TechKnowSurge
NIST 800-53 SC-17 CompTIA Security+ 1.4 CompTIA SecurityX 2.2 ISC2 CISSP 3.6 CompTIA SecurityX 2.3 NIST 800-53 SC-12
VideoSecurityFree

Why PKI and Digital Certificates

Public Key Infrastructure (PKI) uses digital certificates and trusted third parties to establish authenticity and encrypt communications across public networks. RSA asymmetric encryption underpins this system, enabling secure key exchange and identity verification between users and servers.

Complete this video to capture a CTF flag worth 1 point.

About this video

Public Key Infrastructure (PKI) is a layered security framework that governs how digital certificates are issued, distributed, and validated to enable authenticated, encrypted communication over public networks. At its core is RSA asymmetric cryptography, which uses a mathematically linked key pair: data encrypted with the public key can only be decrypted by the corresponding private key, and vice versa. This asymmetry serves two purposes — it allows a client to send confidential data to a server that only the server can read, and it allows the server to prove an association with its private key by encrypting data the client can verify using the public key. Digital certificates are the mechanism through which public keys are distributed and contextualized. A certificate embeds the public key alongside metadata including version information and validity dates, and is formatted according to a standard such as X.509 version 3. Certificates can be inspected directly — on a Windows system through the certificate management console, or in a browser by examining the connection details for any HTTPS site — and they reveal the public key along with identifying information about the issuing authority. However, possession of a certificate alone does not establish authenticity, since any party can generate a key pair and create a certificate. This is where PKI extends beyond public key cryptography. A Certificate Authority (CA) serves as a mutually trusted third party that digitally signs and vouches for a certificate, confirming that the entity presenting it is who they claim to be. When a browser connects to an HTTPS site, it validates the server's certificate against a trusted CA, ensuring the encrypted content received has both integrity and authenticity — meaning it originated from the legitimate server and has not been tampered with in transit.

What you'll learn

What's covered

Public Key Infrastructure

Aligned to

NIST 800-53
SC-17 Public Key Infrastructure Certificates
SC-12 Cryptographic Key Establishment and Management
CompTIA Security+
1.4 Explain the importance of using appropriate cryptographic solutions.
CompTIA SecurityX
2.2 Given a scenario, implement appropriate PKI infrastructure solutions.
2.3 Given a scenario, implement appropriate cryptographic protocols and algorithms.
ISC2 CISSP
3.6 Select and determine cryptographic solutions

Key terms

Public Key Infrastructure
PKI
A framework of hardware, software, policies, and standards used to create, manage, and distribute digital certificates.
Digital Certificate
An electronic document that uses a digital signature to bind a public key with an identity.
Certificate Authority
CA
A trusted entity that issues digital certificates used to verify the identity of individuals, organizations, or devices.
Public Key
A cryptographic key that can be shared openly and is used to encrypt data or verify digital signatures.
Private Key
A secret cryptographic key used in asymmetric encryption to decrypt data or create digital signatures.
Asymmetric Encryption
An encryption method that uses a public key to encrypt data and a private key to decrypt it.
RSA
An asymmetric encryption algorithm based on the difficulty of factoring large prime numbers, widely used for secure data transmission.
Public Key Cryptography
A cryptographic system that uses a mathematically linked public and private key pair to encrypt data and verify identity.

Topics

Pki Digital Certificates Certificate Authorities Rsa Encryption Asymmetric Cryptography Cryptography

Transcript

Public key infrastructure and digital certificates — we're just going to scratch the surface with this, so we understand what public key infrastructure is and what these digital certificates are. We're going to actually take a look at some of those digital certificates, but this is to get a good concept of what public key infrastructure is and what it's used for.

A quick review of RSA

RSA is an encryption cipher that does some really cool stuff. It uses asymmetric keys, which means that what is used to encrypt is a different key than what is used to decrypt. It's pretty cool, and we can do some pretty awesome stuff with this.

Let's use an example of a user accessing a web server and see what things we can do with this. First of all, if we want to send confidential information, this web server can give this user its private key, and now this user can encrypt something — for instance, a shared key that is going to be used for encryption in the future — can encrypt something with this public key, send it across the public network, no one else can decrypt it, and once it gets to the web server, the web server can use the private key to decrypt it. So that's pretty cool.

The other thing it can do is verify identity. It can verify that whatever this public key is, it is associated with a certain private key. That in itself doesn't necessarily confirm somebody and who they are, and doesn't necessarily confirm authenticity, but it helps in this process. What we can do is, this web server gives this user its public key, and then it can encrypt data using this private key and send it to this user, and if this user can unencrypt that data with this public key, then this user knows that this public key is associated with that private key that sent the data. So this is a way of verifying some sort of identity. We call this public key cryptography.

Digital certificates

What's actually being exchanged here is what's called a digital certificate. A digital certificate contains the public key, so the public key gets inserted into this digital certificate, and this digital certificate gives it extra information — information such as what the expiration date is of the digital certificate, not necessarily the expiration of the public key, but of the certificate itself. That is then sent to this user, and then that user has access to the public key through this digital certificate.

I'm on a Windows box here, and what I'm going to do is click the Windows button and type in search, and what comes up is manage computer certificates. So I'm going to manage computer certificates. It's going to give me this UAC here, so I'll click on yes to accept, and it brings up a management console for certificates. It's got the tree over here of different certificates that we can get into, and what I'm going to do is look at this trusted root certificate authority, and we're going to take a look at these certificates.

There are a lot of different certificates in here. I'm just going to open up one. We have one from Microsoft, might as well open that one up and see what it looks like. We've got Microsoft, and this one looks like it's expired — we've got a Microsoft Root Authority, it's from 1 191 1997 to 1230 2020. But it doesn't matter that it's expired, we're just going to take a look and get an idea what these certificates look like.

The version is version three. Each of these certificates has different versions to it, and version three is the standard version now that we're on. We have the validity date, we already took a look at the validity dates there. Then the public key: here is the public key. This is what I was saying, that the public key goes inside of the certificate. We've got this hex number here of the public key, it's 248 bits that are in that, and then some other information in regards to this as well. So we have this certificate on this machine, and this is what a digital certificate looks like.

Third-party trust and public key infrastructure

A digital certificate isn't enough for authenticity. That is, anybody can generate a public/private key pair, anybody can create one of these digital certificates. So just this web server sending over a digital certificate with a public key in itself doesn't verify who this web server is. All you can do at this point in time is verify that there is an association between this private key and this public key, because the public key can decrypt something that the private key sends.

What we need is a trusted third party, somebody that both the user and the web server trust, and we call this public key infrastructure. One thing to note: this is not public key cryptography. Public key cryptography is this idea where we have a private and public key, so it is a component of public key infrastructure, but only a component of it. Public key infrastructure is a much bigger aspect: it includes some sort of trusted third party, so that when you have this certificate you can use this trusted third party to validate this digital certificate that you received. That way you can verify that this web server is who that web server says they are.

So it is a form of authenticity. It's not authentication — we're not actually authenticating — but we're making sure that the data that this web server is sending this user is authentic, that it is from who it says that it's from.

Seeing it in the browser

Let's see what this looks like in real life. What I've done is I pulled up a Chrome browser and browsed to techknowsurge.com. Specifically, it's showing me the newsletter signup page. This is the page that was downloaded, and it was encrypted. I know it was encrypted because it used HTTPS — the S at the end of it means that this was encrypted and then I decrypted it. It also has been verified through a certificate authority, so with the certificate authority I verified that this is actually authentic, it's coming from the actual techknowsurge.com web servers.

What does that look like? I can give you some more insight into it. We can click on this little lock right here and go down to connection is secure. I'm going to click on that, and it says certificate is valid, so it validated the certificate. The web server gave me the certificate, and I validated that that was a valid certificate, and then I used the public key inside of that certificate to decrypt this website. So now I know the website has integrity to it, and authenticity.

I'm going to click on this certificate is valid, and I can see that public key inside of here that was used to decrypt this message. I can also look at additional details here, and as I scroll through, some of the information is — where's that trusted third party? I can click on here to see that trusted third party, who is the CA issuer. That is the certificate authority, that trusted third party that was used to make sure that this was an authentic website.

So that's what a digital certificate looks like, that's how it uses that public and private key, and that's how it makes sure that the page that I received was in fact encrypted and also authentic, from the correct web servers.

RSA has that public and private key, and at least the public key is incorporated into a digital certificate. Third-party trust is where we both trust a third party who validates that certificate, and the fact that I can then unencrypt that data that was encrypted by the private key provides me a certain amount of authenticity and also integrity. So that is public key infrastructure and how public key infrastructure is set up.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →