Block Stream (week 10) Flashcards

1
Q

What is the difference between a block cipher and a stream cipher?

A

Block cipher: Encrypts data in fixed-size blocks. | Stream cipher: Encrypts data one bit/byte at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are stream ciphers generally faster than block ciphers?

A

They process data continuously with less overhead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main weaknesses of DES encryption?

A

Small 56-bit key size; vulnerable to brute-force.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does Triple DES improve upon DES?

A

Applies DES encryption three times for added security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the primary advantage of AES over DES?

A

AES has larger keys (128, 192, or 256 bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the key differences between ECB and CBC block cipher modes?

A

ECB encrypts each block independently; CBC chains blocks together for better security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which block cipher mode introduces feedback to improve security?

A

Cipher Block Chaining (CBC).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is ECB mode considered insecure for some data types?

A

Identical plaintext blocks create identical ciphertext blocks, revealing patterns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an Initialization Vector (IV)?

A

A random value that ensures identical plaintexts produce different ciphertexts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What role does padding play in block cipher encryption?

A

Fills incomplete blocks to match the required block size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a one-time pad (OTP)?

A

An encryption method using a random key as long as the message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is OTP considered theoretically unbreakable?

A

The key is random, used only once, and kept secret.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What condition must be met for OTP to remain secure?

A

The key must be random, as long as the message, and never reused.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does XOR apply to OTP encryption?

A

XOR combines the message with the key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why does OTP require a key as long as the message?

A

To ensure randomness and eliminate ciphertext patterns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How are random number generators used in cryptography?

A

They create unpredictable keys, IVs, and salts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the difference between a TRNG and a PRNG?

A

TRNG: Uses physical processes. | PRNG: Uses algorithms.

18
Q

How does the A5/1 cipher use a frame number in GSM encryption?

A

The frame number is used to generate the keystream.

19
Q

What is the purpose of a keystream in a stream cipher?

A

Continuously XORs with plaintext for encryption.

20
Q

How is XOR used in both encryption and decryption?

A

XORing with the same keystream reverses encryption.

21
Q

What is the primary risk of reused keys in XOR encryption?

A

Reused keys reveal data patterns.

22
Q

How does modular arithmetic relate to XOR encryption?

A

XOR functions like addition modulo 2.

23
Q

How is text represented in binary for encryption?

A

Text is converted to ASCII or Unicode values.

24
Q

What is the ASCII representation for the letter ‘a’?

25
Q

How can XOR encryption result in non-printable characters?

A

XOR may produce binary values outside the printable range.

26
Q

Why is XOR preferred over AND or OR in stream ciphers?

A

XOR reveals no relationship between input and output bits.

27
Q

How does GSM encryption secure voice communication?

A

By XORing voice data with a keystream.

28
Q

What are the key steps in encrypting plaintext with XOR?

A

Convert text to binary → Generate keystream → XOR bits.

29
Q

What is the primary risk of reusing XOR keys?

A

Reused keys expose ciphertext patterns.

30
Q

Why does XOR offer a 50% probability for each bit to be 0 or 1?

A

Each XOR has an equal chance of flipping or retaining bits.

31
Q

What is the relationship between XOR and modular addition?

A

XOR is equivalent to addition modulo 2.

32
Q

How does combining XOR with a random key improve security?

A

Ensures ciphertext patterns are unpredictable.

33
Q

What is the primary vulnerability of OTP if the key is reused?

A

Attackers can compare ciphertexts and reveal patterns.

34
Q

What is the advantage of using a block cipher with CBC mode?

A

Each ciphertext block depends on the previous block.

35
Q

How does ciphertext chaining improve security?

A

Identical plaintext blocks produce different ciphertexts.

36
Q

What is the role of a hash function in password storage?

A

Transforms passwords into fixed-size values for verification.

37
Q

Why are salted hashes preferred for password protection?

A

Salting adds uniqueness to each hash.

38
Q

How does the shadow file in Linux enhance password security?

A

Stores hashed passwords with salts in a restricted file.

39
Q

What is the significance of hashing passwords multiple times?

A

Increases effort required for brute-force attacks.

40
Q

Why are rainbow tables effective against unsalted hash storage?

A

Precomputed hashes allow fast lookups for common passwords.