Cryptography and PKI Fundamentals
Domain 6 covers the primitives that provide confidentiality, integrity and authenticity, and the certificate infrastructure that makes them usable at scale. L1 items ask you to choose the right algorithm or key, or to read a simple certificate scenario.
The three tool families
- Symmetric encryption uses one shared key: fast, used for bulk data. AES is standard; SM4 is the Chinese national block cipher. The hard part is distributing the key.
- Asymmetric encryption uses a key pair: encrypt with the public key so only the private key can decrypt, or sign with the private key so anyone with the public key can verify. RSA and ECC are common; SM2 is the Chinese standard.
- Hashes produce a fixed-length digest and are one-way: SHA-256, SHA-3, SM3. They detect alteration but give no confidentiality. HMAC combines a hash with a shared secret for integrity plus authenticity.
Digital signatures and certificates
A digital signature is a hash of the message encrypted with the sender's private key. It provides integrity, authenticity and non-repudiation - never confidentiality. A PKI binds public keys to identities through certificates: the subject generates a key pair and sends a request to a CA, which signs the certificate; relying parties trust the CA whose root is in their trust store, forming a chain of trust. Revocation is published by CRL (a periodic list) or OCSP (an online query). TLS is a hybrid: asymmetric handshake to agree a session key, symmetric cipher for the traffic.
Key management
The life cycle is generation, storage, distribution, use, rotation, archival and destruction. Private keys live in an HSM or TPM where possible. Losing a private key means losing the ability to decrypt or sign - recovery requires key escrow planned in advance.
Worked example
A must send B a confidential file, and B must be certain it came from A. Which keys are used? Reasoning: confidentiality for B means encrypting with B's public key, since only B's private key decrypts. Proof of origin means signing the file with A's private key, verified with A's public key. Two different keys serve two different goals; using A's public key to encrypt would let anyone decrypt, and signing with B's private key proves nothing about A.
Traps that cost marks
- Encrypting with your own public key for secrecy, or claiming a signature hides the message.
- Saying a hash encrypts data, or that MD5 and SHA-1 are still acceptable for new designs.
- Confusing CRL with OCSP, or forgetting revocation checks entirely.
- Assuming an expired or self-signed certificate provides the same assurance as a CA-issued one.