This module on Cryptography delves into the core mechanisms that underpin digital trust, enabling secure communication, data protection, and authentication in an increasingly connected world. Encryption transforms readable data into an unreadable format, only decipherable by authorized parties, forming the bedrock of cybersecurity. Students will gain hands-on experience applying cryptographic algorithms and managing systems, with a focus on practical implementation. By the end of this module, students will be able to:
This module assumes basic math (e.g., modular arithmetic) and programming knowledge. Incorporate current trends: As of August 2025, with the rise of quantum computing threats, post-quantum cryptography (PQC) is transforming standards. NIST's finalized PQC algorithms (e.g., ML-KEM for key encapsulation, ML-DSA for signatures) are being integrated into PKI and TLS for quantum resistance. OpenSSL's latest version is 3.5.2 (released August 5, 2025), with 3.6 in development, supporting emerging PQC features. TLS 1.3 remains the standard, now enhanced with hybrid PQC key exchanges like X25519MLKEM768 to counter quantum risks. PGP continues to be secure for email and file encryption. Use case studies like the Log4Shell vulnerability (exploited via weak TLS configs) or quantum-threat simulations.
Estimated Time: 5-7 hours of lecture/discussion, plus labs (e.g., setting up a secure web server).
Prerequisites: Introduction to Cybersecurity, Basic Programming (e.g., command-line tools).
Assessment Ideas:
Symmetric algorithms use the same key for encryption and decryption, ideal for bulk data due to speed.
openssl enc -aes-256-cbc -in file.txt -out encrypted.bin for encryption.Asymmetric (public-key) cryptography uses key pairs: public for encryption/signing verification, private for decryption/signing.
RSA: Based on the difficulty of factoring large prime products. Key sizes: 2048-bit minimum, 4096-bit for long-term security in 2025. Shor's algorithm on quantum computers threatens RSA, prompting PQC shifts.
openssl genrsa -out private.key 4096 for key generation; openssl rsautl -encrypt for operations.ECC: Leverages elliptic curve discrete logarithm problem for stronger security with smaller keys (e.g., 256-bit ECC ≈ 3072-bit RSA). Curves like NIST P-256 or Curve25519 are secure; Ed25519 for signatures.
openssl ecparam -name secp256r1 -genkey -out ecc.key.Hybrid Cryptography: Combine asymmetric (for key exchange) with symmetric (for data), as asymmetric is slower.
PKI provides a framework for secure electronic transactions using public-key cryptography.
PKI Components: Root CA, intermediate CAs, end-entity certificates; revocation lists (CRL) or OCSP for validity checks.
openssl req -new -x509), issue certs (openssl x509 -req), and manage chains.Digital Certificates: X.509 standard binds public keys to identities, including subject, issuer, validity period, and extensions.
TLS encrypts and authenticates web traffic, evolving from SSL.
TLS 1.3: Mandatory since 2025 for compliance; features 0-RTT resumption, perfect forward secrecy (PFS). Deprecates weak ciphers (e.g., no RC4).
PGP: OpenPGP standard for end-to-end encryption (e.g., emails via GPG). Uses hybrid model; still secure in 2025 for at-rest/transit protection, unlike TLS (transit-only).
Incorporate these in lectures; students can modify them in Mermaid editors.
Tree diagram showing certificate chain.
graph TD
A[Root CA] --> B[Intermediate CA 1]
A --> C[Intermediate CA 2]
B --> D[Server Cert]
B --> E[Client Cert]
C --> F[Another Server Cert]
subgraph "Trust Chain"
A -.-> B
B -.-> D
end
style A fill:#ff9,stroke:#333
style D fill:#9f9,stroke:#333
Explanation in Class: Root is self-signed; trust flows down. Discuss revocation at any level.
Sequence diagram for simplified handshake.
sequenceDiagram
participant Client
participant Server
Client->>Server: ClientHello (Extensions, Key Share)
Server->>Client: ServerHello (Key Share, Cipher)
Server->>Client: Encrypted Extensions, Certificate, Verify
Client->>Server: Certificate (if mutual), Verify
Note over Client,Server: Session Keys Derived (Hybrid PQC Possible)
Client<->>Server: Application Data (Encrypted)
Explanation in Class: Highlight PQC integration in key share (e.g., ML-KEM). Compare to TLS 1.2's longer process.
Flowchart for RSA operations.
flowchart TD
A[Generate Primes p, q] --> B[Compute n = p*q, φ(n)]
B --> C[Choose e (coprime to φ)]
C --> D[Compute d (mod inverse of e)]
D --> E[Public Key (e,n), Private (d,n)]
E --> F[Encrypt: c = m^e mod n]
F --> G[Decrypt: m = c^d mod n]
style A fill:#ccf,stroke:#333
style G fill:#ccf,stroke:#333
Explanation in Class: Walk through math; note quantum threats to factoring n.
Encourage monitoring sources like Schneier on Security for PQC advancements, as quantum threats loom closer in 2025. End with Q&A on terms like those explained.