CYB210:CH-4,5,6,7,8,

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/81

encourage image

There's no tags or description

Looks like no tags are added yet.

82 Terms

1
New cards

What does a block cipher operate on?

Fixed-size blocks of data (e.g., 128-bit for AES)

2
New cards

Encryption formula for block ciphers?

C = E(K, P)

3
New cards

Decryption formula?

P = D(K, C)

4
New cards

Examples of block cipher algorithms?

AES/Rijndael, DES, Blowfish.

5
New cards

What is a pseudorandom permutation (PRP)

A block cipher that looks random unless you know the key.

6
New cards

AES block size?

128 bits.

7
New cards

DES block size?

64 bits.

8
New cards

Why is a small block size dangerous?

Vulnerable to codebook attacks due to limited output space.

9
New cards

How many ciphertexts exist for a 16-bit block?

2¹⁶ = 65,536.

10
New cards

What is a round?

A repeated sequence of substitution/permutation operations

11
New cards

What generates round keys?

Key Schedule

12
New cards

What attack happens if all rounds use identical round keys?

Slide attack.

13
New cards

What does an S-Box do?

Substitution (changes bits completely).

14
New cards

What does a P-Box do?

Permutation (reorders bits).

15
New cards

What is the goal of SPN?

Confusion + diffusion.

16
New cards

Which AES mode repeats patterns & is weak?

ECB

17
New cards

Which AES mode chains blocks using XOR of previous ciphertext?

CBC

18
New cards

Which mode makes AES behave like a stream cipher?

CTR mode.

19
New cards

What prevents identical plaintext blocks in CBC?

IV (Initial Value).

20
New cards

How do stream ciphers encrypt?

XOR plaintext with keystream.

21
New cards

What generates the keystream?

Stream cipher algorithm using key + nonce.

22
New cards

Are stream ciphers symmetric or asymmetric?

Symmetric.

23
New cards

Example of insecure historical stream cipher?

A5/1, RC4 (broken).

24
New cards

Example of secure modern stream cipher?

Salsa20, Grain-128a.

25
New cards

Which key/nonce combos are safe to reuse?

  • Same key + different nonce - safe

  • Different key + same nonce -safe

  • Different key + different nonce -safe

NEVER: same key + same nonce (OTP-like reuse vulnerability)

26
New cards

What is an LFSR?

Linear feedback shift register.

27
New cards

Maximal LFSR period?

2ⁿ − 1.

28
New cards

What makes an LFSR maximal?

Primitive polynomial.

29
New cards

Why are LFSRs cryptographically weak?

Linear → predictable once state is known.

30
New cards

Stateful vs Counter-based — difference?

  • Stateful - evolving internal state (RC4)

    • Counter - uses key + nonce + counter, no secret internal state (Salsa20)


31
New cards

What is RC4’s key scheduling algorithm called?

KSA

32
New cards

Why is RC4 broken in WEP?

  • 24-bit nonce too small

  • Biases in output

    • Key recovery possible.


33
New cards

What does a hash function output?

Fixed-length digest.

34
New cards

Is hashing reversible?

No — one-way only.

35
New cards

What CIA property does hashing support most?

Integrity

36
New cards

What is preimage resistance?

Hard to find a message that maps to a given hash.

37
New cards

Second-preimage resistance?

Hard to find M₂ with same hash as M₁.

38
New cards

Collision resistance?

Hard to find any two messages hashing to same value.

39
New cards

What phenomenon helps explain collision attacks?

Birthday paradox.

40
New cards

Approx how many inputs needed for 50% collision chance in 256-bit hash?

2¹²⁸ (square root).

41
New cards

What attack uses time-based hashing behavior?

Timing attack

42
New cards

SHA-256 block size?

512 bits.

43
New cards

SHA-512 block size?

1024 bits

44
New cards

What construction does SHA-2 use?

Merkle-Damgård compression.

45
New cards

What construction does SHA-3 use?

Sponge function (Keccak).

46
New cards

What is the purpose of a MAC?

A MAC provides message integrity and authentication by generating a tag using a secret key.

47
New cards

What is the formula for a MAC tag?

T = MAC(K, M)

48
New cards

How does keyed hashing differ from normal hashing?

Hashing is public; keyed hashing uses a secret key to authenticate the message.

49
New cards

What security property must MACs provide?

Unforgeability — an attacker cannot create a valid tag without the key.

50
New cards

What is a known-message attack on MACs?

Attacker passively collects messages + tags.

51
New cards

What is a chosen-message attack?

Attacker chooses messages to obtain valid tags — more powerful.

52
New cards

What is a replay attack?

Re-sending a valid message + tag because MACs lack counters.

53
New cards

How are replay attacks mitigated?

Using numbering or counters/out-of-order protection.

54
New cards

What is a PRF?

PRF(K, M) outputs a pseudorandom value; used in protocols and key derivation.

55
New cards

What is secret-prefix MAC construction?

Hash(K || M) — insecure due to length-extension.

56
New cards

What attack breaks secret-prefix MAC?

Length-extension attack (SHA-256/SHA-512)

57
New cards

What fixes different key lengths in hashing?

Using Hash(L || K || M)

58
New cards

What is secret-suffix MAC construction

Hash(M || K) — protects against length extension.

59
New cards

What is HMAC?

A secure MAC using: Hash((K ⊕ opad) || Hash((K ⊕ ipad) || M)).

60
New cards

Why is HMAC secure?

Double hashing prevents length-extension attacks.

61
New cards

What is CMAC?

Cipher-based MAC using block ciphers like AES

62
New cards

What special keys does CMAC use

K1 and K2 derived from main key K

63
New cards

Does CMAC use an IV?

No — CMAC is deterministic.

64
New cards

What is Poly1305?

A dedicated MAC using universal hashing, extremely fast.

65
New cards

What version of TLS uses Poly1305?

TLS 1.3 (and sometimes 1.2)

66
New cards

What is a timing attack on MACs?

Observing faster/slower responses when bytes match to leak information.

67
New cards

How do you prevent timing attacks?

Use constant-time comparisons.

68
New cards

What does Authenticated Encryption (AE) provide?

Confidentiality + integrity + authentication.

69
New cards

What is AE(K, P)?

(C, T) — ciphertext and authentication tag.

70
New cards

What is the decrypt function AD(K, C, T)?

Returns plaintext P if tag is valid.

71
New cards

What is Encrypt-and-MAC?

Encrypt plaintext & MAC plaintext separately — weakest (leaks info).

72
New cards

What is MAC-then-Encrypt?

MAC plaintext, then encrypt both. Used in TLS ≤ 1.2.

73
New cards

What is Encrypt-then-MAC?

Authenticate ciphertext → strongest method. Used in IPSec

74
New cards

What is an Authenticated Cipher?

Cipher that outputs ciphertext + tag (e.g., AES-GCM)

75
New cards

What is AEAD

Authenticated Encryption with Associated Data.

76
New cards

What is Associated Data (A)?

Non-encrypted data that must be authenticated (headers)

77
New cards

What does AEAD(K, P, A) output?

(C,A,T)

78
New cards

What is the security requirement for AEAD?

Misuse-resistance: should not break completely from nonce reuse

79
New cards

What authenticated cipher is NIST standard?

AES-GCM

80
New cards

What protocol suites use AES-GCM

IPSec, SSH, TLS 1.2 & 1.3

81
New cards

What is a major weakness of AES-GCM

Fragile with repeated nonces - allows tag forgery.

82
New cards

What is OCB mode?

Fast authenticated cipher; simpler than GCM but previously patented.