Concept Focus

A detailed pass over the algorithms behind symmetric and asymmetric cryptography, then hybrid crypto, quantum key distribution, and the key management that holds it all together.

Recap of symmetric and asymmetric cryptography algorithms
A recap of the symmetric and asymmetric algorithm families

Symmetric algorithms

DES, why it mattered and why it's gone

Block modes

ModeTypical useCharacteristics
ECBVery short data, e.g. transmitting a DES keyNo IV; identical blocks produce identical ciphertext; only for tiny, non-repeating data
CBCAuthenticationNeeds an unpredictable IV; error propagates one block forward
CFBAuthenticationStream-like; uses an IV; error propagates
OFBAuthenticationStream-like; uses an IV; no error propagation
CTRHigh-speed applications like IPSecNonce + counter; parallelizable; great for high-throughput audio, video, and streams

2DES and the Meet-in-the-Middle problem

2DES applies DES twice with two different keys: plaintext is encrypted with Key 1 to an intermediate ciphertext, then encrypted again with Key 2. The Meet-in-the-Middle attack targets this by matching intermediate results from both ends, reducing the effective security far below the expected 112 bits.

Meet-in-the-middle attack against 2DES matching intermediate ciphertext from both ends
Meet-in-the-Middle, matching the intermediate result from both ends collapses 2DES

AES and RC4

AES was standardized by NIST in 2001 to replace DES. It works on 128-bit blocks with key sizes of 128, 192, or 256 bits, applying 10, 12, or 14 rounds of substitution, permutation, and mixing.

RC4 is a fast, simple stream cipher with a variable-length key. With a key of at least 128 bits there are no practical attacks on the algorithm itself; the WEP attacks came from poor implementation, key reuse, and short, predictable IVs, not from RC4 alone.

Asymmetric algorithms

Comparison of RSA, ECC, Diffie-Hellman and DSS across encryption, signatures and key exchange
Which asymmetric algorithm does what, encryption, digital signatures, and key exchange

Asymmetric algorithms rely on one-way functions: easy to compute forward, computationally infeasible to reverse. Multiplying two large primes is easy; factoring the product back is extremely hard (the basis for RSA). Generating a public key from a private key is simple; deriving the private key from the public key is hard.

RSA

Diffie–Hellman and ElGamal

Elliptic Curve Cryptography (ECC)

Hybrid cryptography

Symmetric encryption is fast for large data; asymmetric is secure for key exchange. Hybrid uses both: the message is encrypted with a symmetric key (SK), the SK is encrypted with the receiver's public key, and both the encrypted message and the encrypted SK are transmitted. The receiver decrypts the SK with their private key, then decrypts the message with the SK. This is how SSL / TLS, PGP, S/MIME, and online banking work: asymmetric to move the key, symmetric for the bulk data.

Quantum cryptography

A set of protocols that use quantum mechanics to create and distribute secret keys. Traditional cryptography rests on mathematical hardness (factoring, discrete logs); quantum crypto rests on the laws of physics, the Heisenberg Uncertainty Principle (measuring a quantum state disturbs it) and the No-Cloning Theorem (quantum information cannot be copied exactly).

Quantum key distribution between Alice and Bob with eavesdropper detection
Quantum key distribution, any interception disturbs the photons and is detected

Quantum Key Distribution (QKD). Alice generates a key encoded in photons and sends it over a quantum channel; any eavesdropping by Eve disturbs the photons and is detectable. Bob receives with a detector, and if there is no interference he holds the same key. The actual ciphertext travels over normal channels; the security comes from the quantum-protected key.

Key management

A cryptosystem must remain secure even if everything about it is public except the key. Security depends only on the secrecy of the key, not the secrecy of the algorithm.

Operational controls.

Together, split knowledge and dual control reduce insider threat and enforce least privilege.

Brain Ticklers

Practice Questions — Domain 3 · Algorithms

Q1. A build system signs artifacts. Anya wants authenticity and non-repudiation without leaking code. Which change best aligns?

  1. Encrypt artifacts with the CI server's public key
  2. Hash artifacts with SHA-256 and publish the digest
  3. Sign the digest with the CI's private key and publish signature + artifact
  4. Encrypt artifacts with developers' private keys

Q2. A legacy service uses CBC with a static IV. What's the most accurate risk characterization?

  1. Only performance impact
  2. Identical plaintext blocks are linkable across sessions
  3. A padding oracle is guaranteed
  4. Error propagation disappears

Q3. Neuromesh trials 2DES for “112-bit security.” Marcus objects. Why?

  1. 2DES is slower than AES only
  2. Meet-in-the-Middle reduces effective work to about 2^57
  3. 2DES requires three keys, not two
  4. 2DES can't run in CBC

Q4. Anas proposes raw Diffie–Hellman for a device onboarding channel. What is the primary missing property?

  1. Confidentiality
  2. Integrity
  3. Authentication of peers
  4. Forward secrecy

Q5. For HSM key recovery, which pairing is best practice?

  1. Key escrow only
  2. Dual control only
  3. Split knowledge only
  4. Split knowledge + dual control