P-TECH IT

Cryptography and PKI

Week 2 · Module 2: Cryptography and PKI · Download .docx

Objectives

Key terms

symmetric encryption
Encryption that uses the same key for both encrypting and decrypting; fast and efficient but requires secure key sharing in advance.
asymmetric encryption
Encryption using a mathematically related key pair: a public key to encrypt and a private key to decrypt; solves key distribution but is computationally slower.
AES
Advanced Encryption Standard — the dominant symmetric block cipher; AES-256 uses a 256-bit key and is the current gold standard for data encryption at rest and in transit.
RSA
Asymmetric algorithm based on the difficulty of factoring large prime numbers; common key sizes are 2048 to 4096 bits for strong security.
ECC
Elliptic Curve Cryptography — asymmetric algorithm providing equivalent or stronger security than RSA with much smaller key sizes; efficient for mobile and constrained environments.
hashing
A one-way mathematical function that converts any input into a fixed-length digest; cannot be reversed and is used to verify data integrity.
SHA-256
Secure Hash Algorithm 256 — produces a 256-bit digest; part of the SHA-2 family and widely used in TLS certificates, code signing, and blockchains.
avalanche effect
The property of a cryptographic hash function in which a tiny change in the input produces a completely different output digest.
digital certificate
An X.509 document issued by a CA that cryptographically binds a public key to a verified identity such as a domain, person, or organization.
CA
Certificate Authority — a trusted third party that issues, signs, and revokes digital certificates, establishing the root of trust in a PKI.
TLS
Transport Layer Security — the cryptographic protocol that secures HTTPS; uses a certificate-based handshake to authenticate the server and establish an encrypted session.
CRL
Certificate Revocation List — published by a CA and containing the serial numbers of certificates revoked before their scheduled expiration date.
OCSP
Online Certificate Status Protocol — allows real-time querying of a CA to determine whether a specific certificate is still valid or has been revoked.
digital signature
Created by applying the sender's private key to a hash of the message; recipients verify the signature using the sender's public key to confirm authenticity and integrity.

The concept

Cryptography is the mathematical foundation of virtually every security control in use today. Security+ tests cryptography as both a concept and a practical skill: you must be able to choose the right algorithm for a given scenario and explain what each algorithm type provides.

## Symmetric vs. Asymmetric Encryption

Symmetric encryption uses one shared key. The same key that encrypts the data decrypts it. This makes symmetric encryption very fast — modern hardware can encrypt gigabytes per second with AES. The problem is key distribution: how do two parties securely agree on that shared key if they have never met? Symmetric encryption alone cannot solve this. AES is the dominant symmetric algorithm. 3DES is its predecessor and is being phased out. Asymmetric encryption uses a mathematically linked key pair. Data encrypted with the public key can only be decrypted by the matching private key. The public key is freely shared; the private key is kept secret. This solves key distribution but is computationally slow — about 1,000 times slower than AES for bulk data. RSA (based on prime factorization) and ECC (based on elliptic curve math) are the two primary asymmetric algorithms. ECC achieves equivalent security to RSA with much smaller keys, making it preferred for mobile devices and certificates.

## Hashing and Data Integrity

Hashing is not encryption — it is a one-way transformation. A hash function takes any input and produces a fixed-length digest. SHA-256 always outputs 256 bits regardless of whether the input is a single character or a 10-gigabyte file. Hash functions have two critical properties: pre-image resistance (you cannot reverse a hash to find the original input) and the avalanche effect (changing even one bit in the input produces a completely different output). These properties make hashing ideal for verifying data integrity — if a file's hash before and after transmission matches, the file was not altered. MD5 and SHA-1 are broken for security purposes; SHA-256 and SHA-3 are current standards.

## PKI, Certificates, and TLS

Public Key Infrastructure (PKI) is the system of trust that allows two parties who have never met to communicate securely. A Certificate Authority (CA) — a trusted third party — issues X.509 digital certificates that bind a public key to a verified identity. When your browser connects to a bank, it receives the bank's TLS certificate, verifies that it was signed by a trusted CA, and uses the bank's public key to complete the TLS handshake. The TLS handshake negotiates a symmetric session key (using ECDHE for forward secrecy) that encrypts all subsequent traffic. If a certificate is compromised, the CA revokes it; the CRL lists revoked certificate serial numbers, while OCSP provides real-time revocation status. Digital signatures use the private key to sign — the recipient uses the sender's public key to verify the signature confirms both identity and integrity.

Worked examples

Example 1: Choosing the right algorithm for a scenario: A company needs to encrypt a 500-gigabyte backup file stored on an external drive and also needs to securely exchange the encryption key with a remote office over the internet. The correct approach is hybrid encryption. Step 1 — use AES-256 (symmetric) to encrypt the 500 GB file; AES is fast enough for bulk data. Step 2 — use RSA or ECC (asymmetric) to encrypt the AES key and transmit it securely to the remote office. The remote office decrypts the AES key using its private key and then uses the AES key to decrypt the backup. This is exactly how TLS works: asymmetric for key exchange, symmetric for bulk data transfer.
Example 2: Tracing a TLS handshake: A student visits their bank's website at https://bank.example.com. Step 1 — the browser sends a ClientHello message listing supported TLS versions and cipher suites. Step 2 — the server responds with its X.509 certificate containing its public key. Step 3 — the browser verifies the certificate chain: is the certificate signed by a trusted CA? Is it expired? Is it on the CRL? Step 4 — the browser and server perform an ECDHE key exchange to derive a shared symmetric session key — neither party transmits the symmetric key directly. Step 5 — all subsequent traffic is encrypted with AES-GCM using the session key. The padlock icon appears. If the certificate fails any check in Step 3, the browser displays a warning and does not complete the connection.

Common mistakes

Self-check

Try each one before you look. A miss here costs nothing and tells you exactly what to reread.

1. Which property of hash functions ensures that changing one character in a document produces a completely different hash?
2. To send an encrypted message that only Alice can read, you encrypt it with:
3. AES-256 is best described as a:
4. A Certificate Revocation List (CRL) contains:
5. ECC is preferred over RSA for mobile devices primarily because:

Canvas is the official record. This companion enhances the PGCC curriculum; it does not replace it. Last name and class year only. Students with a 504 plan or IEP: your accommodations apply.

← Threats, Vulnerabilities, and Social EngineeringIdentity, Access, and Security Architecture →

↑ Back to top