KRYPTOG Logs
ECB and CTR allow parallel encryption; all modes except ECB need an IV; ECB and CBC need padding while OFB and CTR don't.
Property
ECB
CBC
OFB
CTR
IV needed
No
Yes
Yes
Yes
Parallel encryption
Yes
No
No
Yes
Parallel decryption
Yes
Yes
No
Yes
Padding needed
Yes
Yes
No...
Q Summarize the key differences between stream ciphers and block ciphers.
Stream ciphers encrypt bit by bit with a keystream (fast, no padding, no integrity), while block ciphers encrypt fixed-size blocks (more versatile, can provide integrity via MAC).
Property
Stream Cipher
Block Cipher
Unit of encryption
Bit/byte
Fixed-size block (e.g., 128 b...
Q What is the key length of AES-128 in bytes?
AES-128 uses a 128-bit key, which is 16 bytes.
Quick conversion: 128 bits ÷ 8 bits/byte = 16 bytes.
All AES variants:
Variant
Key bits
Key bytes
Block bits
Block bytes
AES-128
128
16
128
16
AES-192
192
24
128
16
AES-256
256
32
128
16
Note: The block size is always 1...
Q True or false: Steganography is a type of encryption.
False — steganography hides the existence of a message, while encryption hides its content. They are fundamentally different techniques.
Technique
Hides...
Example
Encryption
The content of the message
AES-encrypted file (obviously encrypted, but unreadable)
Steganograph...
Q How many bits are needed to distinguish between $n$ equally likely characters?
Exactly $\log_2(n)$ bits are needed to distinguish between $n$ equally likely characters.
$$\text{bits} = \log_2(n)$$
$n$ (characters)
Bits needed
2
1
4
2
8
3
16
4
26 (alphabet)
4.7
256 (byte)
8
This follows directly from the entropy formula: when all characte...
Q For 1000 participants, how many keys are needed in symmetric vs. asymmetric systems?
Symmetric needs 499,500 keys; asymmetric needs only 1000 key pairs.
Symmetric:
$$\frac{n(n-1)}{2} = \frac{1000 \times 999}{2} = 499{,}500 \text{ keys}$$
Asymmetric:
$$n = 1{,}000 \text{ key pairs}$$
The scaling problem visualized:
Participants
Symmetric Keys
Asymmetric Key Pai...
Q What are the key parameters of DES and why is it considered insecure today?
DES uses a 56-bit key with 64-bit blocks over 16 Feistel rounds — it's insecure because 2^56 keys can be brute-forced in hours with modern hardware.
DES parameters:
Parameter
Value
Block size
64 bits
Key length
56 bits (64 bits input, 8 are parity)
Rounds
16
Structur...
Q When applying both encryption and MAC to a message, what is the recommended order of operations?
The classic approach is: compute the MAC (or signature) over the plaintext first, then encrypt everything — known as MAC-then-Encrypt or "authenticate then encrypt."
* The MAC covers the plaintext; the body is then encrypted, with the tag carried in the trailer. *
Message struct...
Q Walk through the double-and-add algorithm step by step: compute $13 \cdot P$ on an elliptic curve.
Convert 13 to binary: $(1101)_2$. Start with P, then for each remaining bit left-to-right: always DOUBLE, and additionally ADD P for each "1" bit. Trace: $P \to 3P \to 6P \to 13P$ (the bits after the leading 1 are 1, 0, 1 → double-add, double, double-add).
* Scanning the bits of...
Q How does the Square-and-Multiply (SAM) algorithm work for efficient modular exponentiation?
SAM computes $a^m \mod N$ by converting the exponent to binary, then processing each bit: square for every bit, additionally multiply for each "1" bit — reducing mod N at every step.
* Square-and-Multiply computing 5²² mod 11: walk the exponent's bits (10110) left to right, squa...