PKI Certificate System · Topic 1 of 1

Digital Certificates and the PKI System

Learn digital envelopes, digital signatures, X.509 certificates, the CA, RA and repository, enrollment, CRL and OCSP for the HCIA-Security H12-711 exam.

  • 6 min
In a nutshell
  • Envelope: receiver's public key encrypts the symmetric key. Signature: sender's private key encrypts the digest.
  • A signature gives integrity, authentication and non-repudiation, but not confidentiality.
  • A certificate binds a public key to an identity and is signed by the CA's private key, in X.509 v3 format.

What it is

Encryption alone leaves three problems: sharing a symmetric key safely, proving who sent a message, and trusting that a public key belongs to its owner. The digital envelope, digital signature and digital certificate solve them in that order.

A public key infrastructure (PKI) issues, stores, checks and revokes digital certificates. Two parties who have never met can trust each other's public keys because both trust the same certificate authority.

How it works

Digital envelope

A digital envelope combines symmetric speed with asymmetric key delivery. The sender encrypts the data with a random symmetric key, then encrypts that key with the receiver's public key.

The receiver opens the key with its own private key, then decrypts the data. The envelope gives confidentiality but does not prove the sender.

Datasession keyCiphertextSession keyreceiver public keyEnvelopereceiver private keySession key

Digital signature

The sender hashes the message and encrypts the digest with the sender's private key. That encrypted digest is the signature, sent with the message.

The receiver decrypts the signature with the sender's public key and compares it with a fresh hash of the message. A match proves integrity, sender authentication and non-repudiation, because only the sender holds that private key.

MessagehashDigestsender private keySignaturesender public keyCompare digestsmatch means valid

Digital certificate

A signature is only as good as the public key that checks it, and an attacker could pass off his own key as the bank's. A digital certificate binds a public key to its owner's identity, and a trusted certificate authority (CA) signs it with the CA's private key.

Certificates follow the X.509 v3 format. The main fields are:

FieldContents
VersionX.509 version, v3 today
Serial numberUnique number given by the issuing CA
Signature algorithmAlgorithm the CA used to sign
IssuerName of the CA that issued the certificate
ValidityNot before and not after dates
SubjectName of the certificate owner
Subject public key infoThe owner's public key and its algorithm
Extensionsv3 extras such as key usage and the CRL distribution point
Issuer's signatureThe CA's signature over all the fields above

PKI system structure

ComponentRole
End entityThe user, device or application that owns a certificate, such as a firewall
CATrusted authority that issues and revokes certificates and publishes CRLs
RARegistration authority; checks the applicant's identity and forwards requests to the CA
Certificate and CRL repositoryStores certificates and CRLs for others to fetch, usually on an LDAP server

A root CA signs its own certificate, and subordinate CAs get certificates from the CA above. Trusting the root means trusting every certificate chained below it.

On Huawei firewalls you will meet four certificate types:

TypeIssued by
Self-signed certificateThe root CA to itself
CA certificateA higher CA to a subordinate CA
Local certificateA CA to an end entity, such as the firewall
Device local certificateThe device to itself, when it cannot get one from a CA

PKI working mechanism

A firewall that needs a local certificate goes through these steps:

  1. Get the CA certificate and confirm it, for example by its fingerprint.
  2. Generate a key pair and send a certificate request with the public key and identity.
  3. RA checks the identity and forwards the request to the CA.
  4. CA signs and issues the certificate and publishes it to the repository.
  5. Entities exchange certificates and verify each other's before use.
  6. Revocation and update: a compromised or expired certificate is revoked or renewed.
Get CA certificateGenerate key pairRequestRA checks identityCA signs and issuesRepositoryLDAPPeers verify

Enrollment can be online, using SCEP or CMPv2, or offline, where the request is saved as a PKCS#10 file and carried to the CA, and the issued certificate is imported by hand.

Checking a certificate

Before trusting a peer's certificate, the entity checks the CA signature with the CA's public key, the validity period, and the revocation status.

MethodHow it works
CRLDownload the CA's signed list of revoked serial numbers and look the certificate up locally
OCSPAsk an OCSP server about one certificate and get a real time answer: good, revoked or unknown
NoneSkip revocation checking

A CRL is only as fresh as its last download, while OCSP needs a reachable server.

A worked example

Two USG firewalls enroll with the same CA through SCEP and build an IPsec tunnel with certificate authentication. During IKE, FW_A sends its local certificate.

FW_B checks the CA signature, validity period and CRL, then verifies FW_A's signature with the public key in the certificate. All pass, so the peer is authenticated.

How the exam asks about this

  • "Which key does the receiver use to open a digital envelope?" → The receiver's own private key.
  • "Which PKI component checks an applicant's identity before a certificate is issued?" → The RA.
  • "Which method checks a certificate's revocation status in real time?" → OCSP.

What to remember for the exam

  • Envelope: receiver's public key encrypts the symmetric key. Signature: sender's private key encrypts the digest.
  • A signature gives integrity, authentication and non-repudiation, but not confidentiality.
  • A certificate binds a public key to an identity and is signed by the CA's private key, in X.509 v3 format.
  • PKI parts: end entity, CA, RA, certificate and CRL repository (often LDAP).
  • Revocation is checked with a CRL or OCSP; online enrollment uses SCEP or CMPv2.
Watch out

A certificate holds the owner's public key, never the private key. A PKCS#12 (.p12 or .pfx) file can bundle a private key with it, so protect that file.

Common mistakes

Signing with the public key. A signature is made with the sender's private key and checked with the sender's public key. The reverse would prove nothing.

Expecting a signature to hide data. The message travels in clear text next to its signature. For confidentiality, add encryption or a digital envelope.

Confusing the RA with the CA. The RA verifies the applicant. Only the CA signs certificates and publishes the CRL.

Check yourself

  • What problem does a digital certificate solve that a digital signature cannot?

    It proves that a public key belongs to its claimed owner, because a trusted CA signed the binding.

  • Which certificate does a root CA hold?

    A self-signed certificate, signed with the root CA's own private key.

  • What does a CRL contain?

    A list of the serial numbers of revoked certificates, signed by the CA that issued them.

Topic 1 of 1 in PKI Certificate System

Test yourself on PKI Certificate System

The full Huawei HCIA-Security H12-711 question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Huawei. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.