Slide 01 1. Introduction & Cryptographic Services
Cryptography is the mathematical science and art of safeguarding message security by transforming intelligible information into an unreadable scrambled form.
Formal Terminology & Notation
- Plaintext (P or M): The original intelligible message before transformation (cleartext).
- Ciphertext (C): The disguised, enciphered message rendered unreadable to unauthorized third parties.
- Encryption (E): The function mapping plaintext to ciphertext under a parameterized key:
C = EK(P). - Decryption (D): The inverse function recovering plaintext from ciphertext under a parameterized key:
P = DK(C). - Cryptology: The parent mathematical discipline comprising Cryptography (the design of ciphers) and Cryptanalysis (the breaking and statistical analysis of ciphers without knowledge of the key).
Four Fundamental Cryptographic Services
| Security Service | Operational Definition | Underlying Cryptographic Mechanisms |
|---|---|---|
| 1. Confidentiality | Ensures that information content is kept strictly secret from unauthorized eavesdroppers. | Symmetric / Asymmetric Encryption (AES, ChaCha20, RSA). |
| 2. Data Integrity | Guarantees that the message has not been altered, inserted, deleted, or tampered with during transmission. | Cryptographic Hash Functions (SHA-256, SHA-3), Message Authentication Codes (HMAC). |
| 3. Authentication |
• Entity Authentication: Verifies the claimed identity of the communicating peer. • Data Origin Authentication: Confirms that the message genuinely originated from the legitimate sender. |
Digital Signatures, Challenge-Response Protocols, X.509 Digital Certificates. |
| 4. Non-repudiation | Prevents the sender from falsely denying having generated or transmitted the message. | Digital Signatures (asymmetric private signing keys held exclusively by the sender). |
Slide 02 2. Cryptographic Mathematics & Information Theory
Euclidean Division Theorem
For any integer a and positive integer modulus m > 0, there exists a unique pair of integers q (quotient) and r (remainder) such that:
[0, m - 1]:•
23 mod 5 = 3 (since 23 = 4 × 5 + 3)•
-41 mod 9 = 4 (since -41 = -5 × 9 + 4, not -5!)•
-145 mod 23 = 16 (since -145 = -7 × 23 + 16, with 16 ∈ [0, 22]).
Modular Congruence & Multiplicative Inverses
a ≡ b (mod m) asserts that m divides (a - b) evenly. The set of residue classes modulo m forms the ring ℤm = {0, 1, 2, …, m - 1}.
The multiplicative inverse a-1 mod m is an integer x ∈ ℤm satisfying the linear congruence:
Bézout's Identity & The Extended Euclidean Algorithm
If gcd(a, m) = 1, Bézout's identity states there exist integers x and y such that:
Taking this equation modulo m causes the term m · y to vanish, yielding (a · x) mod m ≡ 1. Thus, Bézout coefficient x directly supplies a-1 mod m.
Euler's Totient, Fermat's Little Theorem & Shannon Entropy
- Euler's Totient Function φ(n): Counts the number of positive integers up to n that are relatively prime to n.
- If p is prime:
φ(p) = p - 1. - If n = p × q (where p, q are distinct primes):
φ(n) = (p - 1)(q - 1).
- If p is prime:
- Fermat's Little Theorem: If p is prime and gcd(a, p) = 1, then:
ap - 1 ≡ 1 (mod p) &implies; ap ≡ a (mod p)
- Euler's Theorem: If gcd(a, n) = 1, then:
aφ(n) ≡ 1 (mod n)Crucial consequence: modular exponents can always be reduced modulo φ(n):
ak ≡ ak mod φ(n) (mod n). This forms the foundational algebra of RSA! - Claude Shannon Entropy H(X): Quantifies the average uncertainty or information density per symbol:
Shannon Entropy Formula H(X) = - ∑i=1n pi log2(pi) (unit: bits/symbol)
- Minimum Entropy: H(X) = 0 bits (occurs when 1 symbol has probability p = 1; zero uncertainty).
- Maximum Entropy for 26 Letters (A–Z): Achieved under a perfectly uniform distribution (pi = 1/26):
Hmax = log2(26) ≈ 4.7004 bits/character. - Cryptographic Significance: Ideal ciphertext has an entropy approaching Hmax (≈ 4.7 bits), indicating statistical indistinguishability from random noise. Redundant natural languages exhibit lower entropy (Indonesian ≈ 3.8 – 4.0 bits/char, English ≈ 4.1 bits/char).
Slides 03, 04, 05 3. Classical Ciphers & One-Time Pad
| Cipher Family | Classification | Encryption & Decryption Formulas | Key Space & Vulnerabilities |
|---|---|---|---|
| Caesar Cipher | Monoalphabetic | C ≡ P + k (mod 26) P ≡ C - k (mod 26) |
Only 26 possible keys. Completely broken via single-letter frequency analysis and exhaustive brute force. |
| Affine Cipher | Monoalphabetic | C ≡ aP + b (mod 26) P ≡ a-1(C - b) (mod 26) |
Key a must satisfy gcd(a, 26) = 1 (12 choices). Key b ∈ [0, 25] (26 choices). Total key space = 12 × 26 = 312. Vulnerable to frequency analysis. |
| Standard Vigenère | Polyalphabetic | Ci ≡ Pi + Ki mod m (mod 26) Pi ≡ Ci - Ki mod m (mod 26) |
Flattens unigram letter frequencies. Displays periodicity with period m. Decomposes into m independent Caesar ciphers via Kasiski & Index of Coincidence tests. |
| Full Vigenère | Polyalphabetic | Alphabet rows are randomized permutations rather than simple shifts. | Expands the tableau key space, but retains key-length periodicity m. |
| Autokey Vigenère | Polyalphabetic | Key begins with a keyword seed, then appends the plaintext itself: K = seed || P. |
Eliminates repeating keyword periodicity. However, once the short seed is guessed, the subsequent plaintext unravels in a cascade. |
| Running Key Vigenère | Polyalphabetic | Key stream is drawn from a long passage of natural text in a book. | Non-periodic, but natural language statistics in the key text can be exploited via simultaneous language analysis. |
| Homophonic Cipher | Monoalphabetic Multi-symbol | Single plaintext letters map to multiple ciphertext numbers proportional to natural frequencies (e.g. 'A' → {05, 19, 42}). | Completely flattens single-letter unigram histograms, but digram and trigram correlations reveal the plaintext structure. |
| Playfair Cipher | Polygraphic (Digram) | 5×5 matrix containing 25 letters ('J' merged with 'I'). Operates on letter pairs (digrams). | Splits identical consecutive letters with 'X'. Pads odd length with 'X'. Key space 25! ≈ 1.55 × 1025. Broken via digram frequency analysis. |
| Hill Cipher | Polygraphic (Matrix) | C ≡ K · P (mod 26) P ≡ K-1 · C (mod 26) |
Key K is an m×m matrix. Invertible iff gcd(det(K), 26) = 1. Completely broken by Known-Plaintext Attack (KPA): K = C · P⁻¹ mod 26. |
| Transposition Ciphers | Permutation | Columnar Transposition, Rail Fence, Route Cipher. | Key Invariant: Letter frequency histograms are 100% identical to the plaintext. Solved via anagramming and vowel-consonant digraph reconstruction. |
| Product Ciphers (Super-encryption) | Hybrid | Chaining substitution (e.g., Vigenère) followed by transposition (e.g., Columnar). | Early implementation of Shannon's dual principles: confusion (substitution) and diffusion (transposition). |
Playfair Cipher 5×5 Encryption Rules
- If both letters in the digram appear in the same row: replace each with the letter immediately to its right (wrapping cyclically to the start).
- If both letters appear in the same column: replace each with the letter immediately below it (wrapping cyclically to the top).
- If the letters form a rectangle: replace each with the letter in its own row, but in the column occupied by the other letter.
One-Time Pad (Vernam Cipher, Slide 05)
- Shannon's Perfect Secrecy Theorem (1949): OTP is mathematically proven to achieve unconditional security (H(M|C) = H(M), meaning observing ciphertext yields zero information about the plaintext) if and only if:
- The key is generated from an authentic physical true-random noise source.
- Key length is at least equal to message length (
len(K) ≥ len(P)). - The key is used strictly once and instantly destroyed (never reused).
- Catastrophic Two-Time Pad Vulnerability:
If the same key K is reused to encrypt two distinct messages P1 and P2:
C1 ⊕ C2 = (P1 ⊕ K) ⊕ (P2 ⊕ K) = P1 ⊕ P2The secret key cancels itself out completely! Cryptanalysts separate the combined plaintexts using crib dragging (the flaw that compromised Soviet KGB diplomatic cables in Project Venona).
Slide 06 4. Cryptanalysis & Attack Models
1. Information Availability Attack Models (Hierarchy of Attacker Access)
Based on Kerckhoffs' principle, the adversary is assumed to possess complete knowledge of the cryptographic algorithm. The security of the cryptosystem relies solely on the secrecy of the key. Attacks are classified by what data the adversary can observe or manipulate:
| Power Tier | Attack Model | Information Available to Adversary | Typical Exploitation / Vulnerable Ciphers |
|---|---|---|---|
| 1 (Weakest) | Ciphertext-Only Attack (COA) | Adversary possesses only intercepted ciphertext strings C1, C2, ..., Ck. | Caesar (25 brute-force shifts), Affine (frequency matching), Monoalphabetic substitution (letter frequency analysis). Most difficult attack scenario. |
| 2 | Known-Plaintext Attack (KPA) | Adversary possesses matched pairs of plaintexts and ciphertexts: (P1, C1), (P2, C2), ... Common when file headers (e.g., %PDF-, <html>) or standardized formal salutations (e.g., "Dengan hormat", "Subject:") are predictable. |
Hill Cipher (recovering matrix key via K = C · P⁻¹ mod 26), LFSR keystreams (Berlekamp-Massey algorithm requires 2n keystream bits to solve all feedback taps). |
| 3 | Chosen-Plaintext Attack (CPA) | Adversary can select arbitrary plaintexts and feed them into an encryption oracle to obtain corresponding ciphertexts. | Modern security standard (IND-CPA). All public-key ciphers (RSA, ElGamal) inherently face CPA because anyone can encrypt arbitrary plaintexts using the public key. |
| 4 | Adaptive Chosen-Plaintext Attack (ACPA) | Adversary can choose plaintexts iteratively/interactively, tailoring subsequent plaintexts based on analysis of previous ciphertext responses (e.g., iteratively querying an ATM PIN verification module). | Differential cryptanalysis of block ciphers, targeted differential power analysis. |
| 5 (Strongest) | Chosen-Ciphertext Attack (CCA / CCA2) | Adversary can submit arbitrary ciphertexts to a decryption oracle and obtain the resulting plaintexts (except the target challenge ciphertext in CCA2). | Textbook unpadded RSA (exploiting multiplicative malleability: c' = c · rᵉ mod n), Bleichenbacher's million-message attack on PKCS#1 v1.5 padding. |
2. Computational Security Criteria (Pak Rinaldi Slide 06)
A cryptosystem is defined as computationally secure if it satisfies either of the following two pragmatic real-world conditions:
- Economic Barrier: The financial or computational cost required to break the cipher exceeds the intrinsic economic value of the encrypted information.
- Temporal Barrier: The total computation time required to break the cipher exceeds the operational lifetime or validity window of the encrypted information (e.g., tactical battlefield orders whose value expires in 2 hours).
3. Classification by Attacker Objective
- Total Break (Key-Recovery Attack): The adversary discovers the master secret key K, allowing them to decrypt all past, present, and future communications.
- Plaintext-Recovery Attack: The adversary decrypts a specific targeted ciphertext C without learning the general secret key K.
- Distinguishing Attack: The adversary can reliably distinguish whether an output string was generated by the cipher or drawn from a uniform random bit generator (probability > 1/2).
- Forgery Attack: The adversary crafts a fraudulent ciphertext or signature that is accepted as legitimate by the receiver, without possessing the valid secret key.
- Replay Attack: The adversary intercepts a legitimate encrypted message (e.g., an authenticated fund transfer request) and transmits it again unaltered to trick the recipient into repeating the transaction. Defeated using cryptographic nonces, sequence numbers, or timestamps.
4. Classification by Communication Interaction (Passive vs. Active)
| Category | Adversary Behavior & Mechanisms | Security Service Violated | Countermeasures |
|---|---|---|---|
| Passive Attacks |
Adversary monitors transmission without modifying data. Goal is purely eavesdropping. Methods:
|
Confidentiality (Integrity is untouched; extremely difficult to detect in real time). | Strong end-to-end encryption (TLS, IPsec) and dummy traffic padding. |
| Active Attacks |
Adversary actively intervenes in the communication channel, altering data or system states. Methods:
|
Integrity, Authentication, Availability | Cryptographic Message Authentication Codes (MAC), digital signatures, mutual TLS authentication, timestamps, nonces. |
5. Side-Channel Attacks
Side-channel attacks exploit physical implementation artifacts produced by the cryptographic hardware or software during execution, bypassing the mathematical complexity of the underlying algorithm:
- Timing Attacks (Kocher 1996): Measuring minute differences in execution time caused by conditional branching or non-constant-time modular exponentiation / multiplication. Prevented by constant-time programming.
- Power Analysis: Measuring power consumption fluctuations of smart cards or crypto chips during computation:
- Simple Power Analysis (SPA): Visually distinguishing RSA square vs. multiply operations on an oscilloscope trace.
- Differential Power Analysis (DPA): Statistically correlating power consumption across thousands of encryptions to isolate individual subkey bits.
- Fault Injection Attacks: Inducing computational errors via voltage glitches, clock spikes, or laser pulses to derive secret keys from faulty outputs.
6. Classical Statistical Cryptanalysis Techniques
- Kasiski Examination: Locates repeated letter groups of length ≥ 3 in ciphertext. The distances between repetitions are integer multiples of the key length m. The greatest common divisor (GCD) of these intervals reveals candidate key lengths.
- Index of Coincidence (IC): The probability that two randomly selected letters from the text are identical:
Index of Coincidence Formula IC = ∑i=AZ [fi(fi - 1)] / [N(N - 1)]
- Natural English: ≈ 0.065 – 0.068
- Natural Indonesian: ≈ 0.074 – 0.078 (higher due to high vowel frequency like 'A')
- Uniform Random Text / Polyalphabetic: 1/26 ≈ 0.0385
- Friedman Test (Estimating Vigenère Key Length):
Friedman Key Length Estimator m ≈ [0.027 · N] / [(N - 1) · IC - 0.038 · N + 0.065]
Slide 07 5. Modern Stream Ciphers (LFSR, A5/1, RC4)
Linear Feedback Shift Registers (LFSR)
Consists of an n-bit shift register where the incoming feedback bit is a linear XOR combination of specified register taps:
- Maximal Period (m-sequence): Tmax = 2n - 1. The all-zero state (00...0) is strictly forbidden because
0 ⊕ 0 = 0traps the register in a zero loop permanently. - Condition for Maximal Period: The maximal period 2n - 1 is achieved if and only if the characteristic feedback polynomial is a primitive polynomial over Galois Field GF(2).
- Fatal Linearity Vulnerability: LFSRs must never be used alone as cryptographic stream ciphers! Due to linear algebra over GF(2), an attacker possessing only 2n bits of known keystream can completely reconstruct the tap polynomial and all internal states in polynomial time via the Berlekamp-Massey algorithm.
A5/1 Stream Cipher (GSM Cellular Standard)
- Combines 3 LFSRs of mutually coprime lengths: R1 (19 bits), R2 (22 bits), R3 (23 bits) → Total 64-bit internal state.
- Majority Clocking Rule: Introduces non-linear irregular stepping to prevent Berlekamp-Massey attacks. Clock control bits:
- R1: bit 8
- R2: bit 10
- R3: bit 10
- At each clock cycle, compute
maj(c1, c2, c3) = (c1 & c2) | (c1 & c3) | (c2 & c3). Only registers whose control bit matches the majority value will step. As a result, either 2 or 3 registers step at each cycle. - The output keystream bit is the XOR sum of the output bits of all 3 registers:
k = out(R1) ⊕ out(R2) ⊕ out(R3).
RC4 (Ronald Rivest, 1987)
A byte-oriented stream cipher with an internal state permutation array S[0…255] of 256 bytes:
// 1. Key Scheduling Algorithm (KSA)
for i = 0 to 255: S[i] = i
j = 0
for i = 0 to 255:
j = (j + S[i] + key[i mod key_len]) mod 256
swap(S[i], S[j])
// 2. Pseudo-Random Generation Algorithm (PRGA)
i = (i + 1) mod 256
j = (j + S[i]) mod 256
swap(S[i], S[j])
t = (S[i] + S[j]) mod 256
keystream_byte = S[t]
Design Weakness & Attack: The initial keystream bytes exhibit measurable statistical correlation with the secret key (exploited by Fluhrer, Mantin, and Shamir in the FMS attack against WEP Wi-Fi). Industry standard mitigation: discard the first 1024 or 3072 bytes of keystream (RC4-drop).
Slide 08 6. Block Cipher Principles & Modes of Operation
Shannon's Principles: Confusion, Diffusion & Avalanche Effect
- Confusion: Obscures the mathematical relationship between the secret key and the ciphertext → Implemented via non-linear Substitution Boxes (S-Boxes).
- Diffusion: Spreads the statistical redundancy of a single plaintext bit across many ciphertext bits → Implemented via Permutation Boxes (P-Boxes) or linear matrix mixing.
- Avalanche Effect: A benchmark of cipher quality where flipping a single bit in the plaintext or key flips approximately 50% of the ciphertext bits pseudo-randomly.
- Feistel Network vs. SPN (Substitution-Permutation Network):
- Feistel: Splitting blocks into
(L, R)halves ensures the round function F does not need to be invertible. Decryption is structurally identical, achieved for free simply by reversing the round key sequence (K16 down to K1). Used by DES, Blowfish, GOST. - SPN: Processes the entire block simultaneously through parallel substitution and linear diffusion layers. Provides faster diffusion with fewer rounds, but requires explicit inverse circuits for decryption. Used by AES.
- Feistel: Splitting blocks into
Standard Padding Schemes (PKCS#5 & PKCS#7)
Block ciphers require plaintexts to be exact multiples of the block size b (DES: 8 bytes, AES: 16 bytes). If a message falls short by k bytes, append k bytes where each byte has value k:
- 16-byte block, short by 3 bytes → append
03 03 03. - 16-byte block, short by 1 byte → append
01. - Exact Multiple Rule: If the message length is already an exact multiple of 16 bytes, a full additional 16-byte padding block filled with
10 10 ... 10(16 in hex) must be appended. This prevents un-padding ambiguity when the original data naturally ends with low byte values.
Comparative Matrix of 5 Standard Block Cipher Modes of Operation
| Mode of Operation | Mathematical Formulation | Parallel Enc / Dec | Padding Required? | Transmission Error Propagation | Key Advantage / Critical Vulnerability |
|---|---|---|---|---|---|
| ECB (Electronic Codebook) | Ci = EK(Pi) Pi = DK(Ci) |
Yes / Yes | Yes | 1-bit error in Ci corrupts only block Pi. Other blocks unaffected. | Leaks structural plaintext patterns (ECB Penguin vulnerability). Strictly forbidden for multi-block data. |
| CBC (Cipher Block Chaining) | Ci = EK(Pi ⊕ Ci-1) Pi = DK(Ci) ⊕ Ci-1 (C0 = IV) |
No / Yes | Yes | 1-bit error in Ci completely corrupts Pi, and flips the exact same bit in Pi+1. Subsequent blocks recover (self-synchronizing). | Classic industry standard. Requires a cryptographically random, unpredictable Initialization Vector (IV). |
| CFB (Cipher Feedback) | Ci = Pi ⊕ EK(Ci-1) Pi = Ci ⊕ EK(Ci-1) |
No / Yes | No | 1-bit error in Ci corrupts that bit in Pi and scrambles units while passing through the shift register. | Emulates a self-synchronizing stream cipher. Decryption requires only the encryption function EK! |
| OFB (Output Feedback) | Oi = EK(Oi-1), O0 = IV Ci = Pi ⊕ Oi Pi = Ci ⊕ Oi |
Precomputed / Precomputed | No | Zero error propagation: A 1-bit error in Ci flips only the corresponding bit in Pi. | Pure synchronous stream mode. Keystream can be precomputed before data arrival (near-zero latency). Never reuse an IV! |
| CTR (Counter Mode) | Ci = Pi ⊕ EK(Nonce ∥ i) Pi = Ci ⊕ EK(Nonce ∥ i) |
Yes / Yes | No | Zero error propagation: A 1-bit error in Ci flips only the corresponding bit in Pi. | Modern gold standard. Maximum throughput, full multi-core parallelization, random access to arbitrary blocks. Reusable nonce is catastrophic! |
Slides 09, 10, 11 7. Standard Block Cipher Implementations
DES (Data Encryption Standard, Slide 09)
- Standardized by NIST/IBM in 1977. 64-bit block size, 64-bit external key consisting of 56 effective key bits + 8 parity bits (bits 8, 16, 24, ..., 64 discarded). Operates over 16 Feistel rounds.
- Round Function F: The 32-bit right half is expanded via table E to 48 bits → XORed with the 48-bit round subkey → fed into 8 S-Boxes → 32-bit output permuted by P-Box.
- DES S-Box Addressing (6-to-4 Bit Mapping): Each S-Box takes 6 input bits
(b1, b2, b3, b4, b5, b6):- Row Index: Determined by the 2 outer bits:
(b1, b6)(values 0–3). - Column Index: Determined by the 4 inner bits:
(b2, b3, b4, b5)(values 0–15). - The table entry at (row, col) is a 4-bit output. The S-boxes provide the sole non-linear component (confusion) in DES!
- Row Index: Determined by the 2 outer bits:
- Key Schedule: Permuted Choice 1 (PC-1) discards parity bits and splits 56 bits into two 28-bit halves (C0, D0). Left circular shifts (1 bit in rounds 1, 2, 9, 16; 2 bits in other rounds) occur each round, after which PC-2 compresses the 56 bits into a 48-bit round subkey.
- Triple DES (3DES): Employs the EDE (Encrypt-Decrypt-Encrypt) pipeline:
C = EK3(DK2(EK1(P))) P = DK1(EK2(DK3(C)))The Decrypt operation in the middle ensures backward compatibility: setting
K1 = K2 = K3causes DK to invert EK, operating identically to Single DES. Effective security: 112 bits (2-key) or 168 bits (3-key). - DESX: Inexpensive brute force hardening via key whitening:
C = K3 ⊕ DESK2(P ⊕ K1).
AES (Advanced Encryption Standard / Rijndael, Slide 10)
- Designed by Joan Daemen & Vincent Rijmen; won NIST competition (2001) replacing DES.
- Fixed block size of 128 bits (16 bytes arranged in a 4×4 column-major State matrix).
- Key Length Variants:
- AES-128: 128-bit key → 10 rounds
- AES-192: 192-bit key → 12 rounds
- AES-256: 256-bit key → 14 rounds
- Four Transformations per Standard Round:
- SubBytes: Non-linear byte substitution based on multiplicative inversion in Galois Field GF(28) followed by an affine transformation → Implements Confusion.
- ShiftRows: Cyclically shifts rows of the State to the left: Row 0 shifts 0 bytes, Row 1 shifts 1 byte, Row 2 shifts 2 bytes, Row 3 shifts 3 bytes → Implements Inter-column Diffusion.
- MixColumns: Each column is multiplied by a fixed polynomial matrix over GF(28) modulo x4 + 1 → Implements Full Block Diffusion.
⚠️ Special Rule: Final Round (Round Nr)In the final round (round 10 in AES-128), the MixColumns transformation is omitted! The final round sequence is strictly:
SubBytes → ShiftRows → AddRoundKey. This design choice makes encryption and decryption symmetric and eliminates computational overhead. - AddRoundKey: Each byte of the State is XORed directly with the corresponding round subkey byte.
- Key Schedule: Expands the master key into 4(Nr + 1) 32-bit words. For word indices divisible by 4, the preceding word is processed via function g():
RotWord (left 1-byte cyclic shift) → SubWord (S-box substitution) → XOR with round constant Rcon[j].
Other Notable Block Ciphers & AES Finalists (Slide 11)
| Cipher | Designers / Year | Architecture & Parameters | Distinctive Mechanics & Security Highlights |
|---|---|---|---|
| GOST 28147-89 (Magma) | Soviet Standard (1989) | Feistel Network Block: 64 bits Key: 256 bits Rounds: 32 |
Round subkey addition modulo 232 → eight 4×4 S-boxes (nibble substitution) → circular 11-bit left shift (<<< 11). Key schedule cycles through eight 32-bit words K0..K7 three times forward (rounds 1–24) and once in reverse (rounds 25–32). Immense 256-bit key space provides extreme resistance to brute force. |
| RC5 | Ronald Rivest (1994) | Parameterized Feistel RC5-w/r/b Word: w ∈ {16, 32, 64} Rounds: r ∈ [0, 255] Key: b bytes |
Pioneered data-dependent rotations (<<<), where shift amounts are dynamically determined by low bits of register data. Key schedule expands b key bytes into 2r+2 subwords using mathematical constants Pw (odd integer of e - 2) and Qw (odd integer of φ - 1). Fast software execution with variable word width. |
| RC6 | Rivest, Robshaw, Sidney, Yin (1998) | AES Finalist Block: 128 bits Key: 128, 192, 256 bits Rounds: 20 |
Evolution of RC5 operating over four 32-bit registers (A, B, C, D). Introduces quadratic transformation f(x) = x(2x + 1) mod 2w before data-dependent rotations to ensure rapid avalanche effect and defeat linear cryptanalysis. |
| Blowfish | Bruce Schneier (1993) | Feistel Network Block: 64 bits Key: 32 – 448 bits (variable) Rounds: 16 |
Employs four key-dependent S-boxes (each 256 × 32 bits) and an 18-entry P-array, all initialized using hexadecimal expansion digits of π (nothing-up-my-sleeve numbers) and transformed via iterative self-encryption. Zero known effective attacks; extremely fast on 32-bit CPUs. |
| IDEA | Lai & Massey (1990) | Block: 64 bits Key: 128 bits Rounds: 8.5 |
Combines three algebraically incompatible group operations: bitwise XOR (⊕), addition mod 216 (+), and multiplication mod 216 + 1 (⊙). Eliminates S-boxes completely while achieving high non-linearity. Used in early PGP 2.0. |
The AES Selection Competition (NIST 1997–2000 Finalists)
NIST evaluated five finalists to replace DES under strict criteria: mathematical security, computational efficiency in software and hardware, memory footprint, and algorithmic simplicity:
- 1. Rijndael (Selected as AES): Joan Daemen & Vincent Rijmen (Belgium). 128-bit SPN structure. Optimal performance balance across both 32-bit modern workstations and constrained 8-bit smart cards. Parallelizable and clean algebraic design.
- 2. Serpent (Runner-up): Ross Anderson, Eli Biham, Lars Knudsen. 32 rounds SPN using bit-slice implementation (all operations computed via bitwise boolean logic). Highest security margin of all candidates, but slower in general software.
- 3. Twofish: Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, Niels Ferguson. 16-round Feistel network with key-dependent S-boxes, pre-whitening, and post-whitening. Fast across all platforms.
- 4. MARS: IBM Cryptography Group. 32-round heterogeneous structure: unkeyed mixing rounds flanking a keyed cryptographic core utilizing type-3 Feistel with multiplication and data-dependent rotations. Highly complex design.
- 5. RC6: RSA Laboratories. 20-round Feistel structure leveraging data-dependent rotations and integer multiplication. Outstanding speed on 32-bit processors with native multiplier units.
Slides 13, 14, 15 8. Public-Key Cryptography: RSA, Diffie-Hellman & ElGamal
RSA Cryptosystem (Rivest, Shamir, Adleman 1977, Slide 13)
- Security Hardness: The computational intractability of the Integer Factorization Problem: given composite
n = p × q, factoring n into primes p and q requires sub-exponential time (General Number Field Sieve). - Key Generation:
- Select two large secret prime numbers p and q.
- Compute public modulus
n = p · q. - Compute Euler's totient
φ(n) = (p - 1)(q - 1). - Select public exponent e such that
1 < e < φ(n)and gcd(e, φ(n)) = 1 (standard choice: 65537). - Compute private exponent
d ≡ e⁻¹ (mod φ(n))using the Extended Euclidean Algorithm. - Public Key:
(e, n)• Private Key:(d, n).
- Encryption & Decryption Formulas:
RSA Core Equations Encryption: C ≡ Me (mod n) Decryption: M ≡ Cd (mod n)
- Textbook RSA Flaws & OAEP Padding:
- Multiplicative Homomorphism (Malleability):
(M1 · M2)e ≡ M1e · M2e ≡ C1 · C2 (mod n). An adversary can forge valid ciphertexts corresponding to predictable plaintext alterations. - Wiener's Attack: If private exponent
d < (1/3) n1/4, d can be efficiently recovered via continued fraction expansion. - Industry Standard: OAEP (Optimal Asymmetric Encryption Padding, PKCS#1 v2) incorporates randomized Feistel transforms with cryptographic hash functions (MGF1) to eliminate malleability and ensure IND-CCA2 security.
- Multiplicative Homomorphism (Malleability):
Diffie-Hellman Key Exchange (1976, Slide 15)
- The world's first public-key protocol, solving symmetric key distribution without prior shared secrets.
- Security Hardness: The Discrete Logarithm Problem (DLP) in multiplicative group ℤp*: given g, p, and
A = ga mod p, finding exponent a is computationally infeasible. - Protocol Steps:
- Public parameters: large prime p and primitive root (generator) g.
- Alice picks private secret
a ∈ [2, p - 2], computes public valueA ≡ ga (mod p), and sends A to Bob. - Bob picks private secret
b ∈ [2, p - 2], computes public valueB ≡ gb (mod p), and sends B to Alice. - Alice computes:
K ≡ Ba ≡ (gb)a ≡ gab (mod p). - Bob computes:
K ≡ Ab ≡ (ga)b ≡ gab (mod p). Both now hold identical shared secret key K!
- Man-in-the-Middle (MitM) Vulnerability: Diffie-Hellman offers zero identity authentication. An active adversary (Mallory) can intercept A and B, substitute them with her own public value, and establish two separate shared keys (KAM with Alice and KMB with Bob). Mitigation: sign public DH exchanges using digital certificates (X.509/TLS).
ElGamal Cryptosystem (Taher ElGamal 1985, Slide 14)
- Primitive Root Definition: Integer g is a primitive root of prime p if its powers
{g¹, g², ..., g^(p-1) mod p}generate all non-zero residue classes {1, 2, ..., p - 1}. - Key Generation:
- Select prime p and primitive root g.
- Choose private key
x ∈ [1, p - 2]. - Compute public key:
y ≡ gx (mod p). - Public Key:
(y, p, g)• Private Key:x.
- Encryption (by Sender for Plaintext m):
Select ephemeral random key
k ∈ [1, p - 2]coprime to p - 1:ElGamal Ciphertext Pair c1 ≡ gk (mod p) c2 ≡ m · yk (mod p)Ciphertext is transmitted as the pair: (c1, c2).2× Ciphertext ExpansionElGamal ciphertext is always exactly twice the size of the plaintext because it transmits two separate group elements (c1, c2), each of size equal to modulus p. - Decryption (by Private Key Holder x):
Plaintext Recovery Shared Mask: S ≡ c1x ≡ (gk)x ≡ gxk (mod p)
Original Message: m ≡ c2 · S-1 (mod p) - Catastrophic Ephemeral Key Reuse:
If a sender reuses the same ephemeral key k for two messages m1 and m2, then
c2,1 / c2,2 ≡ m1 / m2 (mod p). The ratio of the plaintexts is revealed instantly without solving DLP!
Slide 16 9. Knapsack Cryptosystem (Merkle-Hellman)
The General Subset-Sum Problem
Given integer weights W = {w1, w2, ..., wn} and total capacity C, find a binary vector b = (b1, ..., bn) ∈ {0, 1}n such that:
For arbitrary weight sequences, this problem is proven to be NP-complete with no known polynomial-time solution.
Superincreasing Knapsack (The Easy Private Key)
A sequence S is superincreasing if each element is strictly greater than the sum of all preceding elements:
Subset-sum on a superincreasing sequence is solved in linear time O(n) using a Greedy algorithm from the largest weight (sn) down to the smallest (s1): if C ≥ si, set bi = 1 and decrement C = C - si; otherwise set bi = 0.
Merkle-Hellman Trapdoor Construction
- Key Generation:
- Choose a secret superincreasing sequence
S = (s1, s2, ..., sn). - Choose secret modulus m such that
m > ∑ si. - Choose secret multiplier w such that gcd(w, m) = 1.
- Private Key:
(S, m, w). - Public Key: Disguised non-superincreasing sequence
P = (p1, ..., pn)where:pi = (si · w) mod m
- Choose a secret superincreasing sequence
- Encryption: Encrypt binary block
b = (b1, ..., bn):C = ∑i=1n bi · pi - Decryption: Multiply ciphertext C by modular inverse
w⁻¹ mod m:C' ≡ C · w-1 (mod m) ≡ ∑ bi (si · w) w-1 ≡ ∑i=1n bi · siBecausem > ∑ siwas guaranteed, the sum∑ bi sinever wraps around modulo m! The congruence holds in regular integers, enabling instant greedy recovery in O(n) time. - Cryptanalytic Status: Broken completely by Adi Shamir (1982) using Lenstra-Lenstra-Lovász (LLL) lattice basis reduction in polynomial time without recovering the private key.
Slides 17, 18 10. Abstract Algebra & Elliptic Curve Cryptography (ECC)
Abstract Algebraic Structures for Cryptography (Slide 17)
- Group 〈G, *〉: A set equipped with a binary operation satisfying:
- Closure: ∀ a, b ∈ G,
a * b ∈ G. - Associativity:
(a * b) * c = a * (b * c). - Identity Element: There exists e such that
a * e = e * a = a. - Inverses: For every a, there exists a-1 such that
a * a-1 = e. - (Abelian Group): If commutative
a * b = b * a.
- Closure: ∀ a, b ∈ G,
- Ring 〈R, +, ·〉: Forms an abelian group under addition (+), an associative monoid under multiplication (·), with multiplication distributing over addition.
- Field 〈F, +, ·〉: A commutative ring where all non-zero elements form an abelian group under multiplication. Examples: ℝ, ℚ, and Galois Fields GF(pm).
- Galois Fields:
- GF(p): Prime order field {0, 1, ..., p - 1} with standard arithmetic modulo prime p.
- GF(2m) / GF(28): Binary polynomials of degree < m. Coefficients are in {0, 1}. Addition is bitwise XOR without carry. Multiplication is polynomial multiplication reduced modulo an irreducible polynomial m(x). Used in AES SubBytes and MixColumns.
Weierstrass Elliptic Curves (Slide 18)
Standard Weierstrass form over field GF(p) (where prime p > 3):
- Non-singularity (Smooth Curve Condition): The curve must contain no self-intersections or cusps. This holds if and only if the discriminant is non-zero:
4a3 + 27b2 ≠ 0 (mod p)
- Point at Infinity (𝒪): The group identity element situated at the vertical extremes of the y-axis:
P + 𝒪 = P. - Point Negation (Inverse): Reflection across the x-axis:
-P(x, y) = (x, -y mod p) = (x, p - y)
- Vertical Tangent: If yP = 0, the tangent line is vertical, yielding: 2P = 𝒪.
Point Addition & Doubling Formulas over GF(p)
Given points P(xP, yP) and Q(xQ, yQ) on curve y² ≡ x³ + ax + b (mod p):
If P = Q (Point Doubling 2P): m ≡ (3xP2 + a) · (2yP)-1 (mod p)
yR ≡ [m(xP - xR) - yP] (mod p)
ECDLP, Key Efficiency & Protocols
- Scalar Multiplication Q = kP: Adding point P to itself k times. Evaluated in logarithmic time O(log k) via the Double-and-Add algorithm.
- ECDLP (Elliptic Curve Discrete Logarithm Problem): Given P and
Q = kP, finding scalar k is computationally infeasible. Because elliptic curve points lack integer multiplicative order, sub-exponential Index Calculus attacks cannot be mounted on general curves! The best known attack is Pollard's rho with fully exponentialO(√n)complexity. - Key Size Efficiency Comparison:
Symmetric Security Level RSA Key Size ECC Key Size Efficiency Ratio 80 bits (Legacy) 1024 bits 160 bits 6.4 × smaller 128 bits (Modern Standard) 3072 bits 256 bits 12 × smaller 256 bits (Top Secret) 15360 bits 521 bits 29.5 × smaller - ECDH Protocol: Alice sends
aB; Bob sendsbB. Shared secret point isK = abB. - EC-ElGamal: Message encoded as curve point PM. Ciphertext pair:
(k B, PM + k PB).
Slides 19, 20 11. Steganography, Steganalysis & NoStega
Comparative Triad: Cryptography vs. Steganography vs. Digital Watermarking
| Dimension | Cryptography | Steganography | Digital Watermarking |
|---|---|---|---|
| Primary Goal | Obscure message content to render it unintelligible. | Conceal the very existence of communication from detection. | Assert copyright ownership and verify carrier media integrity. |
| Carrier (Cover) Status | Irrelevant / no cover medium. | Disposable envelope discarded after secret extraction. | The primary high-value asset (copyrighted artwork, medical scans). |
| Visibility | Ciphertext is visibly scrambled and suspicious to eavesdroppers. | Strictly imperceptible; raises zero suspicion. | Can be visibly noticeable or imperceptible. |
Simmons' Prisoners Problem (1983)
Alice and Bob are incarcerated in separate prison cells attempting to coordinate an escape plan. All communications between them are monitored by a warden named Wendy. If Wendy detects encrypted text or any suspicious covert signal, she cuts off communication immediately and places them in solitary confinement. Alice and Bob must employ steganography to conceal their escape plans inside mundane, innocent letters without triggering Wendy's suspicion.
Spatial Steganography: LSB & BPCS (Slide 19)
- Spatial Least Significant Bit (LSB) Insertion:
- Substitutes the 0-th bit (weight 2⁰ = 1) of RGB color channel bytes with secret data bits.
- Shifts color intensity by at most ±1 level out of 256 levels (well below the human visual Just Noticeable Difference threshold).
- Capacity in 24-bit RGB images: 3 bits per pixel. A 1000 × 1000 pixel image holds:
(1,000,000 × 3 bits) / 8 = 375,000 bytes ≈ 375 kB payload. - Fragility: Highly vulnerable to lossy compression (JPEG transforms), image resizing, and spatial filtering which obliterate high-frequency LSB noise.
- Bit-Plane Complexity Segmentation (BPCS, Kawaguchi 1997):
- Decomposes an 8-bit image into 8 independent binary bit planes: from Bit-Plane 7 (MSB) containing shape outlines, down to Bit-Plane 0 (LSB) containing noise.
- Divides each bit-plane into 8 × 8 bit blocks.
- Block Complexity Measure (α): Calculated as the total number of adjacent black-and-white transitions (horizontal and vertical borders k):
BPCS Complexity Formula α = k / kmax where kmax = 112 transitionsA checkerboard pattern has k = 112 (α = 1.0). A uniform solid color has k = 0 (α = 0.0).
- Threshold Complexity (α0 ≈ 0.3):
- Blocks with
α ≥ α0are classified as complex (noisy) blocks and can be directly replaced with secret data blocks without visual distortion. - Blocks with
α < α0are classified as informative (simple) blocks and must not be modified.
- Blocks with
- Block Conjugation: If a secret payload block happens to be simple (α < α0), it is XORed with a standardized checkerboard pattern Wc:
P* = P ⊕ Wc &implies; α(P*) = 1 - α(P) ≥ α0The conjugated block becomes complex and safe to embed! Conjugation states are recorded in a conjugation map stored in the image header.
- Recursion Prevention: A 1-bit header flag at a fixed location prevents infinite recursive conjugation of meta-maps.
- High Embedding Capacity: Reaches 30% – 50% of the total image file size with zero visible artifacts!
Steganalysis & NoStega (Slide 20)
- Steganalysis: Forensic discipline tasked with detecting whether a suspect file hosts embedded secret payload (binary decision: 1 or 0):
- Targeted Steganalysis: Tailored specifically to exploit known statistical fingerprints of a particular embedding algorithm (e.g. specialized spatial LSB detectors). Highly sensitive, but brittle against modified algorithms.
- Blind Steganalysis: Universal anomaly detectors utilizing statistical feature vectors and machine learning to flag departures from natural image distributions, capable of catching unknown algorithms.
- Standard Cryptanalytic Attacks:
- Visual Attack (Enhanced LSB): Isolates bit-plane 0 and amplifies its contrast (0 → black, 1 → white). Embedded texts or raster images reveal human-readable silhouettes over flat background areas.
- Statistical Attacks: Chi-Square test, Pairs of Values (PoVs) analysis, and Sample Pair Analysis (SPA) detecting unnatural pairing of adjacent even/odd byte frequencies caused by LSB overwrites.
- NoStega (Noiseless Steganography, Abdelrahman Desoky 2012):
- A modern steganographic paradigm that eliminates the use of pre-existing carrier covers entirely! Because no cover is modified, no noise distortion or statistical anomalies are introduced for steganalysts to detect.
- GraphStega: Converts secret bit streams into coordinate plot points in authentic scientific, economic, or medical charts (e.g., Excel plots of disease outbreaks).
- ChessStega: Encodes secret bits into sequences of legitimate chess moves (PGN notation) conforming 100% to FIDE tournament rules.
Slide 21 12. Digital Watermarking
Digital Watermarking Taxonomy (Slide 21)
- By Human Visual Perception:
- Visible Watermark: Visually apparent to the human eye without computational extraction (e.g., TV network logos in broadcast corners, transparent "PREVIEW" overlays on stock photography).
- Invisible Watermark: Perceptually imperceptible; embedded within media bit structures.
- By Robustness Level:
- Robust Watermark: Survives severe signal processing attacks including lossy compression (JPEG), cropping, scaling, filtering, and rotation. Mandatory for copyright protection and proof of ownership.
- Fragile Watermark: Deliberately sensitive; destroyed or altered if the media is modified by as little as 1 pixel. Used for tamper detection and data integrity verification in medical imaging (X-rays) and court evidence.
- Semi-fragile Watermark: Tolerates benign compression, but degrades under malicious semantic manipulations (e.g., altering license plate numbers in surveillance footage).
- By Extraction Input Requirements:
- Blind (Public) Watermarking: Extraction does not require the original un-watermarked media. Essential for decentralized internet verification.
- Non-blind (Private) Watermarking: Extraction requires the original un-watermarked media as a reference baseline. Highly resilient in legal copyright disputes.
Fragile vs. Robust Watermarking Mechanics
| Category | Representative Algorithm | Domain & Embedding Strategy | Attack Response & Typical Use Case |
|---|---|---|---|
| Fragile Watermarking | Wong's Algorithm (1997) | Spatial Domain (LSB): The watermark logo is resized to match the host image dimensions and embedded directly into the LSBs across all pixels. | Tamper Localization: Any manipulation (deletion, insertion, localized editing) destroys the embedded LSB watermark in the modified blocks, revealing precisely where and how the image was altered. Used for forensic court evidence and medical scans. |
| Robust Watermarking | Wang's Algorithm (1998) / DCT-based | Frequency Domain (DCT): Host image is partitioned into 8×8 blocks, transformed via Discrete Cosine Transform (DCT). Watermark bits modulate the low-to-mid frequency DCT coefficients. | High Survivability: High-frequency coefficients are wiped out by JPEG compression, but low-to-mid frequencies survive lossy compression, cropping, resizing, and brightness adjustments. Used for copyright proof and piracy tracing. |
Primary Application Domains (Slide 21)
- Owner Identification & Proof of Ownership: Authors embed indelible identifying signals to defeat copyright infringement claims in court.
- Transaction Tracking (Digital Fingerprinting / Traitor Tracing): Each legitimately purchased copy of media is tagged with a unique customer ID. If an unauthorized leak appears on torrent networks, the source account is instantly pinpointed.
- Content Authentication & Tamper Detection: Verifies that surveillance videos or medical scans have not been altered or doctored.
- Copy Control / Piracy Control: Hardware players (e.g., Blu-ray, smart TVs) detect watermark copy-control flags to refuse playback or duplication of pirated streams.
- Broadcast Monitoring: Commercial sponsors embed inaudible/invisible watermarks in broadcast ads, enabling automated monitoring systems to verify contracted airtime compliance.
Real-World Case Study: Video Forensic Watermarking & DRM in Netflix
Modern streaming services like Netflix deploy a multi-layered content protection architecture combining DRM and invisible forensic watermarking:
- Digital Rights Management (DRM): Encrypts the video stream and controls playback licensing via hardware-backed decryption modules:
- Google Widevine (Chrome, Android, Android TV)
- Microsoft PlayReady (Windows, Edge, Xbox)
- Apple FairPlay (Safari, iOS, macOS, Apple TV)
- The Camcording Problem: DRM prevents direct software screen capture, but cannot stop an adversary from recording the physical screen using an external 4K smartphone or camcorder in a theater or living room.
- Dynamic Forensic Session Watermarking: Netflix embeds an imperceptible, unique session watermark (encoding subscriber account ID, server timestamp, and IP block) dynamically into the video stream during playback. When a camcorded pirated copy surfaces on the dark web or torrent sites, Netflix extracts the session watermark to identify the exact subscribing account and revoke access immediately.
Interactive Lab 13. Interactive Cryptography Lab & Real-Time Solvers 8 Real-Time Tools
Test concepts and run live cryptographic calculations directly in your browser. Click any (Example) preset link to auto-load realistic parameters matching Pak Rinaldi's exam questions.
a⁻¹ mod m.
(Example 1: 7⁻¹ mod 26)
(Example 2: 19⁻¹ mod 84)
bᵉ mod m via step-by-step Square-and-Multiply.
(Example 1: 5⁷ mod 187)
(Example 2: 7⁵⁶⁰ mod 561)
K⁻¹ mod 26, and process digrams.
(Example 1)
(Example 2)
n, φ(n), find private exponent d = e⁻¹ mod φ(n), and test message.
(Exam Example: p=11, q=17)
pᵢ = sᵢ·w mod m, encrypt, and greedy decode.
(Exam Example: S=[2,3,7,14,30])
2P or Point Addition P + Q on curve y² = x³ + ax + b (mod p).
(Exam Example: 2P on GF(11))
Exam Problem Bank 14. Official Midterm Practice Set (Pak Rinaldi Munir) + Complete Solutions 13 Fully Solved Problems
This section incorporates the complete set of official practice problems provided by Prof. Rinaldi Munir (STEI ITB) for the IF4020 Cryptography midterm exam, fully translated and augmented with step-by-step mathematical proofs.
Problem 1: 2×4 Encrypted Image Shannon Entropy Calculation (Official Practice Problem 1)
Problem Statement:
A 2×4 pixel image is encrypted, resulting in the following pixel intensity values (ranging from 0 to 3):
1 0 0 3
2 3 1 3
Calculate the Shannon entropy of this encrypted image!
Step-by-Step Solution:
1. Total Pixels: N = 2 × 4 = 8 pixels.
2. Alphabet of Symbols: Intensities ∈ {0, 1, 2, 3} (n = 4 possible symbols).
3. Empirical Probabilities:
- Count of '0': 2 → p(0) = 2/8 = 0.25
- Count of '1': 2 → p(1) = 2/8 = 0.25
- Count of '2': 1 → p(2) = 1/8 = 0.125
- Count of '3': 3 → p(3) = 3/8 = 0.375
(Sum: 0.25 + 0.25 + 0.125 + 0.375 = 1.0 ✓)
4. Shannon Entropy Formula:
H(X) = - ∑ pi log2(pi)
- p(0) log2(p(0)) = 0.25 × (-2) = -0.5
- p(1) log2(p(1)) = 0.25 × (-2) = -0.5
- p(2) log2(p(2)) = 0.125 × (-3) = -0.375
- p(3) log2(p(3)) = 0.375 × log2(0.375) ≈ 0.375 × (-1.415037) ≈ -0.530639
5. Summing Terms:
H(X) = - [-0.5 - 0.5 - 0.375 - 0.530639] = - [-1.905639] ≈ 1.906 bits.
Interpretation: The theoretical maximum entropy for 4 symbols is log2(4) = 2.0 bits. The encrypted image entropy of 1.906 bits is very close to maximum uncertainty, indicating high statistical randomness.
Problem 2: Hexadecimal Vigenère Cipher Modulo 16 (Official Practice Problem 2)
Problem Statement:
A Vigenère Cipher is modified such that all plaintext, ciphertext, and key characters are hexadecimal digits (0..9, A..F).
(a) If Pi is the i-th plaintext digit, Ci is the i-th ciphertext digit, and Ki is the i-th key digit, state the general encryption and decryption equations:
E(Pi, Ki) = Ci = __________________
D(Ci, Ki) = Pi = __________________
(b) For plaintext P = 3AE60A3 and repeating key K = 17E, determine the resulting ciphertext C.
Step-by-Step Solution:
(a) General Modular Equations (Modulo 16):
- Encryption: Ci = (Pi + Ki) mod 16
- Decryption: Pi = (Ci - Ki) mod 16
(b) Encryption of P = 3AE60A3 with K = 17E:
Align the repeating key stream:
Plaintext: 3 A E 6 0 A 3
Keystream: 1 7 E 1 7 E 1
Convert hex characters to decimal values (A=10, B=11, C=12, D=13, E=14, F=15):
1. Digit 1: (3 + 1) mod 16 = 4 → 4
2. Digit 2: (A + 7) mod 16 = (10 + 7) mod 16 = 17 mod 16 = 1 → 1
3. Digit 3: (E + E) mod 16 = (14 + 14) mod 16 = 28 mod 16 = 12 → C
4. Digit 4: (6 + 1) mod 16 = 7 mod 16 = 7 → 7
5. Digit 5: (0 + 7) mod 16 = 7 mod 16 = 7 → 7
6. Digit 6: (A + E) mod 16 = (10 + 14) mod 16 = 24 mod 16 = 8 → 8
7. Digit 7: (3 + 1) mod 16 = 4 mod 16 = 4 → 4
Final Ciphertext: C = 41C7784.
Problem 3: Super-Encryption: Columnar Transposition + Playfair Cipher (Official Practice Problem 3)
Problem Statement:
A 35-character secret message (in Indonesian) is encrypted using a Product Cipher (Super-encryption):
1. The message is first encrypted using a Columnar Transposition cipher with column size (key) = 7.
2. The resulting intermediate ciphertext is then encrypted using a Playfair Cipher with the key phrase: "SAMUDERA PASIFIK YANG LUAS BANGET" (spaces excluded).
The final intercepted ciphertext is:
MYRSSYYIGKDSMSMRMYRGAIOADKRUGURUIMUM
Decrypt this ciphertext to recover the original plaintext message!
Step-by-Step Solution:
Phase 1: Inverting the Playfair Cipher
Construct the 5×5 Playfair grid from the key phrase (drop duplicate letters; merge J with I):
Unique letters: S - A - M - U - D - E - R - P - I - F - K - Y - N - G - L - B - T - C - H - O - Q - V - W - X - Z.
S A M U D
E R P I F
K Y N G L
B T C H O
Q V W X Z
Split ciphertext into 18 digrams and decrypt each using reverse Playfair rules:
MY RS SY YI GK DS MS MR MY RG AI OA DK RU GU RU IM UM
- MY → AN • RS → EA • SY → AK • YI → GR • GK → NL
- DS → UD • MS → AD • MR → AP • MY → AN • RG → IY
- AI → UR • OA → TD • DK → SL • RU → IA • GU → IX
- RU → IA • IM → PU • UM → MA
Decrypted intermediate text: AN EA AK GR NL UD AD AP AN IY UR TD SL IA IX IA PU MA.
Notice digram IX IA: 'X' was inserted as a padding letter to separate identical letters; removing 'X' restores original 35 characters: ANEAAKGRNLUDADAPAN IYURTDSLIAIAPUMA.
Phase 2: Inverting the Columnar Transposition
Total length = 35 characters. Column count (key) = 7. Thus, row count = 35 / 7 = 5.
During encryption, the message was written into 5 columns and read by columns. To invert, write the 35 letters into a 7×5 grid:
A N E A A
K G R N L
U D A D A
P A N I Y
U R T D S
L I A I I
A P U M A
Read the columns from top to bottom (Col 1 to 5):
Col 1: A K U P U L A → AKUPULA
Col 2: N G D A R I P → NG DARI P
Col 3: E R A N T A U → ERANTAU
Col 4: A N D I D I M → AN DI DI M
Col 5: A L A Y S I A → ALAYSIA
👉 Recovered Plaintext: "AKU PULANG DARI PERANTAUAN DI MALAYSIA"
(Translation: "I am returning home from working abroad in Malaysia").
Problem 4: RSA Decryption via Factorization (Official Practice Problem 4)
Problem Statement:
An RSA public key is given as (e, n) = (5, 221). An adversary intercepts the ciphertext c = 153.
Decrypt this ciphertext to recover the original plaintext message m.
Step-by-Step Solution:
1. Factor the Modulus n:
We factor n = 221 into primes: 221 = 17 × 13.
Thus, p = 17 and q = 13.
2. Compute Euler's Totient φ(n):
φ(n) = (p - 1)(q - 1) = (17 - 1)(13 - 1) = 16 × 12 = 192.
3. Find Private Key Exponent d:
We solve e · d ≡ 1 (mod φ(n)) &implies; 5d ≡ 1 (mod 192).
Using the linear Diophantine form: d = (1 + 192k) / 5.
- For k = 1: (1 + 192) / 5 = 193 / 5 (not integer)
- For k = 2: (1 + 384) / 5 = 385 / 5 = 77.
Thus, private exponent d = 77.
4. Decrypt Ciphertext c = 153:
m ≡ cd (mod n) &implies; m ≡ 15377 (mod 221).
Using modular exponentiation by repeated squaring:
- 153 mod 221 = -68 mod 221
- 1532 = 23409 = 105 × 221 + 204 ≡ -17 mod 221
- 1534 ≡ (-17)2 = 289 = 221 + 68 ≡ 68 mod 221
Evaluating 15377 mod 221 yields: m = 17.
👉 Original Plaintext: m = 17.
Problem 5: Diffie-Hellman + Caesar Super-Encryption (Official Practice Problem 5)
Problem Statement:
(a) Alice and Bob agree to share a symmetric key using Diffie-Hellman with public parameters g = 17 and p = 37. Alice selects private key a = 7, and Bob selects private key b = 9. Determine the shared encryption key K established by Alice and Bob.
(b) If this shared key is used as the shift key for a classical Caesar Cipher, find the ciphertext produced for plaintext: "ADAAPADENGANMU".
Step-by-Step Solution:
(a) Diffie-Hellman Key Computation:
1. Alice computes her public key: A = ga mod p = 177 mod 37.
172 = 289 = 7 × 37 + 30 ≡ -7 mod 37.
174 ≡ (-7)2 = 49 ≡ 12 mod 37.
177 = 174 × 172 × 17 ≡ 12 × (-7) × 17 = -84 × 17 ≡ (-10) × 17 = -170 = -5 × 37 + 15 ≡ 15 (mod 37).
Alice sends A = 15 to Bob.
2. Bob computes his public key: B = gb mod p = 179 mod 37.
178 ≡ 122 = 144 = 3 × 37 + 33 ≡ -4 mod 37.
179 = 178 × 17 ≡ (-4) × 17 = -68 = -2 × 37 + 6 ≡ 6 (mod 37).
Bob sends B = 6 to Alice.
3. Shared secret computation:
- Alice computes: K = Ba mod p = 67 mod 37 = 279936 mod 37 = 31.
- Bob computes: K = Ab mod p = 159 mod 37 = 31.
👉 Shared symmetric key: K = 31.
(b) Caesar Encryption with Shift K = 31:
In alphabet arithmetic (modulo 26): k = 31 mod 26 = 5.
Each letter shifts by +5 positions (A → F, D → I, P → U, etc.):
Plaintext: A D A A P A D E N G A N M U
Shift +5: F I F F U F I J S L F S R Z
👉 Ciphertext: "FIFFUFIJSLFSRZ".
Problem 6: Merkle-Hellman Knapsack Cryptosystem (Official Practice Problem 6)
Problem Statement:
An 18-bit binary message '110011 010101 001001' is encrypted using the Merkle-Hellman Knapsack cryptosystem.
The private superincreasing sequence is S = {3, 5, 15, 25, 54, 110}, with parameters multiplier w = 10 (labeled n in PDF) and modulus m = 239.
(a) Derive the public key sequence.
(b) Calculate the ciphertext resulting from the encryption of the 18-bit message.
(c) Compute the modular inverse of multiplier 10 mod 239.
(d) Decrypt the ciphertext step-by-step to recover the original binary plaintext.
Step-by-Step Solution:
(a) Public Key Derivation (pi = (si · 10) mod 239):
- p1 = (3 × 10) mod 239 = 30
- p2 = (5 × 10) mod 239 = 50
- p3 = (15 × 10) mod 239 = 150
- p4 = (25 × 10) mod 239 = 250 mod 239 = 11
- p5 = (54 × 10) mod 239 = 540 mod 239 = 62
- p6 = (110 × 10) mod 239 = 1100 mod 239 = 144
👉 Public Key: P = {30, 50, 150, 11, 62, 144}.
(b) Encryption of 18-Bit Message (3 blocks of 6 bits):
- Block 1 (110011): 1(30) + 1(50) + 0(150) + 0(11) + 1(62) + 1(144) = 286
- Block 2 (010101): 0(30) + 1(50) + 0(150) + 1(11) + 0(62) + 1(144) = 205
- Block 3 (001001): 0(30) + 0(50) + 1(150) + 0(11) + 0(62) + 1(144) = 294
👉 Resulting Ciphertext: C = (286, 205, 294).
(c) Multiplier Modular Inverse:
We seek 10⁻¹ mod 239. Since 240 = 239 + 1, we observe: 10 × 24 = 240 ≡ 1 (mod 239).
👉 10⁻¹ mod 239 = 24.
(d) Decryption via Greedy Algorithm:
Transform each ciphertext element: C' = (C × 24) mod 239:
- Block 1: C' = (286 × 24) mod 239 = 6864 mod 239 = 172
Greedy match against {3, 5, 15, 25, 54, 110}:
172 ≥ 110 → 1 (rem 62); 62 ≥ 54 → 1 (rem 8); 8 < 25 → 0; 8 < 15 → 0; 8 ≥ 5 → 1 (rem 3); 3 ≥ 3 → 1 → 110011.
- Block 2: C' = (205 × 24) mod 239 = 4920 mod 239 = 140
140 ≥ 110 → 1 (rem 30); 30 < 54 → 0; 30 ≥ 25 → 1 (rem 5); 5 < 15 → 0; 5 ≥ 5 → 1 (rem 0); 0 < 3 → 0 → 010101.
- Block 3: C' = (294 × 24) mod 239 = 7056 mod 239 = 125
125 ≥ 110 → 1 (rem 15); 15 < 54 → 0; 15 < 25 → 0; 15 ≥ 15 → 1 (rem 0); 0 < 5 → 0; 0 < 3 → 0 → 001001.
👉 Recovered Plaintext: 110011 010101 001001 ✓ (100% matched!).
Problem 7: Affine Cipher Cryptanalysis via English Letter Frequencies (Official Practice Problem 7)
Problem Statement:
Break an Affine Cipher given the following frequency analysis hints from an English ciphertext:
- The most frequent letter in the ciphertext is 'V'.
- The least frequent letter in the ciphertext is 'Y'.
Derive the encryption and decryption formulas, then decrypt the frequent English trigram ciphertext: "NAG".
(Character encoding: A = 0, B = 1, ..., Z = 25).
Step-by-Step Solution:
1. Frequency Mapping to English Alphabet:
- Most frequent letter in English is 'E' (value 4) → maps to 'V' (value 21).
- Least frequent letter in English is 'Z' (value 25) → maps to 'Y' (value 24).
2. Setup System of Modular Congruences (C ≡ mP + b mod 26):
(1) 25m + b ≡ 24 (mod 26)
(2) 4m + b ≡ 21 (mod 26)
3. Subtract Equation (2) from Equation (1):
(25m - 4m) ≡ (24 - 21) (mod 26) &implies; 21m ≡ 3 (mod 26).
Find 21⁻¹ mod 26: 21 × 5 = 105 = 4 × 26 + 1 ≡ 1, so 21⁻¹ ≡ 5.
m ≡ 3 × 5 = 15 (mod 26).
4. Solve for Key b:
Substitute m = 15 into (2): 4(15) + b ≡ 21 (mod 26) &implies; 60 + b ≡ 21 (mod 26).
60 mod 26 = 8 → 8 + b ≡ 21 &implies; b = 21 - 8 = 13.
Encryption Equation: C ≡ 15P + 13 (mod 26).
5. Derive Decryption Formula:
Find 15⁻¹ mod 26: 15 × 7 = 105 ≡ 1 (mod 26), so 15⁻¹ ≡ 7.
P ≡ 7(C - 13) (mod 26).
6. Decrypt Trigram "NAG":
- 'N' (C = 13): P ≡ 7(13 - 13) = 0 → Letter 'A'
- 'A' (C = 0): P ≡ 7(0 - 13) = -91 mod 26 = 13 → Letter 'N'
- 'G' (C = 6): P ≡ 7(6 - 13) = -49 mod 26 = 3 → Letter 'D'
👉 Plaintext Trigram: "AND" (the most common English trigram!).
Problem 8: Diffie-Hellman with Active Man-in-the-Middle Attack (Official Practice Problem 8)
Problem Statement:
Alice and Bob agree on Diffie-Hellman public parameters g = 10 and p = 71. Alice picks private key a = 10, and Bob picks b = 12.
(a) Case 1 (Benign): No attack occurs. Calculate the shared symmetric encryption key K established by Alice and Bob.
(b) Case 2 (Active Attack): Mallory intercepts the communication and executes an active Man-in-the-Middle (MitM) attack using her own private exponent m = 15. Determine the separate session keys K1 (established with Alice) and K2 (established with Bob) recovered by Mallory.
Step-by-Step Solution:
(a) Case 1 (Legitimate Exchange):
- Alice's public key: A = 1010 mod 71 = 30
- Bob's public key: B = 1012 mod 71 = 18
- Alice receives B and computes: K = Ba mod 71 = 1810 mod 71 = 37
- Bob receives A and computes: K = Ab mod 71 = 3012 mod 71 = 37
👉 Shared Secret Key: K = 37.
(b) Case 2 (Mallory's Active Interception):
Mallory intercepts transmission and injects her own public key: M = gm mod p = 1015 mod 71 = 37.
- Alice receives M (believing it came from Bob) and computes:
K1 = Ma mod 71 = 3710 mod 71 = 30.
- Bob receives M (believing it came from Alice) and computes:
K2 = Mb mod 71 = 3712 mod 71 = 32.
Mallory computes both shared keys using her private exponent m = 15:
- Key with Alice: K1 = Am mod 71 = 3015 mod 71 = 30.
- Key with Bob: K2 = Bm mod 71 = 1815 mod 71 = 32.
👉 Resulting compromised session keys:
- K1 = 30 (between Alice and Mallory)
- K2 = 32 (between Bob and Mallory).
Problem 9: 3-Bit Block Cipher CBC Mode Encryption (Official Practice Problem 9)
Problem Statement:
Consider a toy block cipher where block size = key size = 3 bits. Each 3-bit block is encrypted under key k using the mapping:
Ek(b1b2b3) = (b2b1b3) ⊕ k
(i.e., swap the first two bits, then bitwise XOR with key k).
Determine the ciphertext resulting from encrypting plaintext m = 100100100 using key k = 110 in CBC mode with Initialization Vector IV = 111.
Step-by-Step Solution:
Split plaintext into three 3-bit blocks: P1 = 100, P2 = 100, P3 = 100.
CBC Encryption Rule: Ci = Ek(Pi ⊕ Ci-1), where C0 = IV = 111.
Block 1:
- XOR with IV: P1 ⊕ C0 = 100 ⊕ 111 = 011.
- Swap first two bits: 011 → 101.
- XOR with key k: 101 ⊕ 110 = 011.
→ C1 = 011.
Block 2:
- XOR with C1: P2 ⊕ C1 = 100 ⊕ 011 = 111.
- Swap first two bits: 111 → 111.
- XOR with key k: 111 ⊕ 110 = 001.
→ C2 = 001.
Block 3:
- XOR with C2: P3 ⊕ C2 = 100 ⊕ 001 = 101.
- Swap first two bits: 101 → 011.
- XOR with key k: 011 ⊕ 110 = 101.
→ C3 = 101.
👉 Final Ciphertext: C = 011 001 101.
Problem 10: 4-Bit LFSR Keystream Generation with Non-Primitive Polynomial (Official Practice Problem 10)
Problem Statement:
A 4-bit LFSR is defined with feedback function: b4 = b1 ⊕ b2 ⊕ b3 ⊕ b4.
If the register is initialized with seed '1010' (where b1 is the output bit), generate the resulting keystream for the first 15 bits.
Step-by-Step Solution:
Register layout: [b4, b3, b2, b1]. At each step, output bit is b1, and new feedback bit bnew = b1 ⊕ b2 ⊕ b3 ⊕ b4 enters at b4 as the register shifts right:
- Step 0: State: 1010 → Output b1 = 0. Feedback: 1⊕0⊕1⊕0 = 0.
- Step 1: State: 0101 → Output b1 = 1. Feedback: 0⊕1⊕0⊕1 = 0.
- Step 2: State: 0010 → Output b1 = 0. Feedback: 0⊕0⊕1⊕0 = 1.
- Step 3: State: 1001 → Output b1 = 1. Feedback: 1⊕0⊕0⊕1 = 0.
- Step 4: State: 0100 → Output b1 = 0. Feedback: 0⊕1⊕0⊕0 = 1.
- Step 5: State: 1010 → Cycle completes! State repeats every 5 steps.
Generating 15 consecutive bits:
Bits 1–5: 0 1 0 1 0
Bits 6–10: 0 1 0 1 0
Bits 11–15: 0 1 0 1 0
👉 15-Bit Keystream: 01010 01010 01010.
Key Insight: The period is only 5 bits (far below the maximal period 2⁴ - 1 = 15) because the feedback polynomial x⁴ + x³ + x² + x + 1 is not primitive over GF(2)!
Problem 11: DES Modes of Operation Transmission Error Propagation Grid (Official Practice Problem 11)
Problem Statement:
Consider 6 plaintext blocks P1, ..., P6 encrypted under DES into ciphertext blocks C1, ..., C6 across five modes: ECB, CBC, OFB, CFB, and Counter (CTR).
(a) Encryption Error: Suppose a 1-bit error occurs in plaintext blocks P2 and P3 during encryption. Mark which resulting ciphertext blocks change.
(b) Decryption Error: Suppose a 1-bit transmission error occurs in ciphertext blocks C2 and C3 before decryption. Mark which recovered plaintext blocks change.
Step-by-Step Solution & Answer Grids:
(a) Encryption Error in P2 and P3:
- ECB: C2, C3 change (independent block mapping).
- CBC: C2, C3, C4, C5, C6 change! Because in CBC, Ci = E(Pi ⊕ Ci-1), corrupted ciphertexts feed forward indefinitely into all subsequent blocks.
- OFB: C2, C3 change (keystream is generated independent of plaintext).
- CFB: C2, C3, C4, C5, C6 change (corrupted ciphertext feeds into the shift register).
- Counter: C2, C3 change (pure parallel stream mode).
| Mode | C1 | C2 | C3 | C4 | C5 | C6 |
|---|---|---|---|---|---|---|
| ECB | ✓ | ✓ | ||||
| CBC | ✓ | ✓ | ✓ | ✓ | ✓ | |
| OFB | ✓ | ✓ | ||||
| CFB | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Counter | ✓ | ✓ |
(b) Decryption Error in C2 and C3:
- ECB: P2, P3 change.
- CBC: P2, P3, P4 change! (Error in C2 garbles P2 and flips 1 bit in P3; error in C3 garbles P3 and flips 1 bit in P4. Block P5 self-synchronizes and recovers cleanly!).
- OFB: P2, P3 change (0-bit error propagation).
- CFB: P2, P3, P4 change.
- Counter: P2, P3 change (0-bit error propagation).
| Mode | P1 | P2 | P3 | P4 | P5 | P6 |
|---|---|---|---|---|---|---|
| ECB | ✓ | ✓ | ||||
| CBC | ✓ | ✓ | ✓ | |||
| OFB | ✓ | ✓ | ||||
| CFB | ✓ | ✓ | ✓ | |||
| Counter | ✓ | ✓ |
Problem 12: Elliptic Curve Cryptography Point Doubling 2P on GF(11)
Problem Statement:
Given elliptic curve y² ≡ x³ + x + 6 (mod 11), and point P = (2, 7).
(a) Verify that P lies on the curve.
(b) Calculate the coordinates of point doubling 2P over GF(11).
Step-by-Step Solution:
1. Verification of P(2, 7):
LHS = 7² = 49 ≡ 5 (mod 11).
RHS = 2³ + 2 + 6 = 8 + 2 + 6 = 16 ≡ 5 (mod 11).
LHS ≡ RHS ≡ 5 (mod 11) ✓. Point P is valid.
2. Tangent Slope m for Point Doubling 2P:
m ≡ (3x₁² + a) · (2y₁)⁻¹ (mod 11)
- Numerator: 3(2²) + 1 = 12 + 1 = 13 ≡ 2 (mod 11).
- Denominator: 2(7) = 14 ≡ 3 (mod 11).
- 3⁻¹ mod 11 = 4 (since 3 × 4 = 12 ≡ 1).
Slope: m ≡ 2 × 4 = 8 (mod 11).
3. Coordinates of 2P = (x₃, y₃):
- x₃ ≡ (m² - 2x₁) mod 11 = (64 - 4) mod 11 = 60 mod 11 = 5.
- y₃ ≡ [m(x₁ - x₃) - y₁] mod 11 = [8(2 - 5) - 7] = -24 - 7 = -31 mod 11 = 2.
👉 Resulting Point: 2P = (5, 2).
Problem 13: BPCS Steganography Complexity Derivation & Checkerboard Conjugation
Problem Statement:
In the BPCS steganography algorithm, an 8×8 bit image block contains total border transitions k = 25. Given kmax = 112 and threshold α0 = 0.3:
(a) Determine whether this block is classified as informative or complex.
(b) Should this block be embedded directly, or does it require conjugation? Calculate the resulting complexity α after conjugation.
Step-by-Step Solution:
1. Initial Complexity:
α = k / kmax = 25 / 112 ≈ 0.2232.
2. Threshold Evaluation:
Since α = 0.2232 < α0 (0.3), the block is classified as an informative (simple) block. It must not be embedded directly because human visual perception is extremely sensitive to changes in flat regions.
3. Conjugation Transformation:
The block is XORed with a standardized checkerboard pattern Wc. The resulting complexity inverts:
α(P*) = 1 - α(P) = 1 - (25 / 112) = 87 / 112 ≈ 0.7768.
Because 0.7768 ≥ 0.3, the block is now complex and safe to embed, with its conjugation flag recorded in the conjugation map.
Flashcards 15. Active Recall Exam Flashcards (25 High-Yield Cards) Fast Exam Drill
Use this active recall flashcard deck to drill high-frequency concepts, attack vectors, and mathematical conditions. Click the card or press Space to flip, and use arrow keys ← / → to navigate.
Cheat-Sheet 16. Master Cram Matrix & Formula Quick-Sheet Comprehensive Summary
Integrated quick-reference matrix summarizing key technical parameters, algebraic foundations, block/key dimensions, and critical attack vectors across the complete IF4020 pre-midterm curriculum.
| Family | Cipher / Protocol | Key & Block Dimensions | Mathematical Foundation / Structure | Critical Vulnerability / Primary Attack |
|---|---|---|---|---|
| Classical Mono | Affine Cipher | a ∈ {12 values}, b ∈ [0, 25] | C ≡ aP + b (mod 26), condition: gcd(a, 26) = 1 | Unigram frequency analysis • Small key space (312 keys). |
| Classical Poly | Vigenère Cipher | Keyword length m | Ci ≡ Pi + Ki mod m (mod 26) | Kasiski examination • Index of Coincidence (IC) • Friedman test. |
| Classical Matrix | Hill Cipher | Matrix m×m over ℤ₂₆ | C ≡ KP (mod 26), condition: gcd(det(K), 26) = 1 | Known-Plaintext Attack (KPA): K = C · P⁻¹ mod 26. |
| Unconditional | One-Time Pad (Vernam) | Key length ≥ plaintext | C = P ⊕ K, Shannon's Perfect Secrecy Theorem | Two-Time Pad: C₁ ⊕ C₂ = P₁ ⊕ P₂ (Project Venona). |
| Modern Stream | LFSR | Register of n bits | Primitive polynomial over GF(2), max period 2ⁿ - 1 |
Berlekamp-Massey: Linearity broken using 2n keystream bits. |
| Modern Stream | A5/1 (GSM) | R1(19) + R2(22) + R3(23) = 64 bits | Irregular majority clocking rule: maj(c1, c2, c3) |
Time-Memory Trade-off (TMTO) • Small 64-bit state space. |
| Modern Stream | RC4 | 1 – 256 bytes | 256-byte S-box array: KSA (key schedule) + PRGA (keystream) | Initial byte bias (FMS attack on WEP) → Mandatory RC4-drop. |
| Standard Block | DES (1977) | 64-bit block • 56-bit key (+8 parity) | 16 Feistel rounds, 8 S-Boxes (6-to-4 bits), expansion 32 → 48 bits | Exhaustive Brute Force (2⁵⁶ too small) • Linear Cryptanalysis. |
| Standard Block | 3DES (EDE) | 64-bit block • 112 / 168-bit key | EDE: C = EK3(DK2(EK1(P))) |
Backward compatible if K1=K2=K3 • Sweet32 64-bit collision attack. |
| Standard Block | AES (Rijndael, 2001) | 128-bit block • 128/192/256-bit key | SPN 10/12/14 rounds: SubBytes, ShiftRows, MixColumns, AddRoundKey | MixColumns omitted in last round • Structurally resilient to theoretical attacks. |
| Other Block | IDEA (1990) | 64-bit block • 128-bit key | Combines XOR, addition mod 2¹⁶, and multiplication mod 2¹⁶+1 | Uses zero S-Boxes • Featured in PGP 2.0. |
| Public-Key | RSA (1977) | 2048 – 4096-bit modulus | Prime factoring n = p·q, ed ≡ 1 mod φ(n) |
Multiplicative homomorphism / CCA • Wiener • Requires OAEP padding. |
| Public-Key | Diffie-Hellman (1976) | 2048 – 4096-bit modulus | Discrete Logarithm Problem (DLP) in ℤp* | Unauthenticated → Vulnerable to Man-in-the-Middle (MitM). |
| Public-Key | ElGamal (1985) | 2048 – 4096-bit modulus | DLP in ℤp* • c = (gᵏ mod p, m·yᵏ mod p) |
2× ciphertext expansion • Ephemeral key reuse leaks plaintext ratio. |
| Public-Key | Merkle-Hellman Knapsack | n-bit weight vector | Subset-Sum NP-complete disguised from superincreasing O(n) | Completely broken by Adi Shamir (1982) via LLL lattice reduction. |
| Public-Key | ECC (Elliptic Curve) | 256-bit key (matches 3072-bit RSA) | ECDLP on Weierstrass curve y² = x³ + ax + b (mod p) |
No sub-exponential attacks exist (Index Calculus cannot run on general curves). |
| Steganography | BPCS (1997) | Complexity threshold α₀ ≈ 0.3 | 8 bit-planes, complexity α = k/112, checkerboard XOR conjugation | High 30%–50% capacity with zero visual artifacts • Conjugation map in header. |
| Steganography | NoStega (2012) | Zero cover carrier file | GraphStega (business/scientific charts), ChessStega (FIDE-valid chess moves) | Eliminates carrier distortion and anomaly detection entirely. |
| Watermarking | Digital Watermarking | Robust vs Fragile vs Semi-fragile | Protects and authenticates the carrier medium itself as the primary asset | Robust for copyright assertion • Fragile for tamper detection (medical/court). |