Flashcards: Affine and Stream Ciphers — 96 cards

All cards

1Question

What is cryptology?

Answer

The general field including cryptography and cryptanalysis.

2Question

What does cryptography secure communication against?

Answer

An adversary.

3Question

What does cryptanalysis study?

Answer

How to break cryptosystems.

4Question

What key types do symmetric algorithms use?

Answer

One shared secret key for encryption and decryption.

5Question

What key types do asymmetric algorithms use?

Answer

A private key and a public key.

6Question

What do cryptographic protocols use as building blocks?

Answer

Cryptographic algorithms.

7Question

In a symmetric cryptosystem, how does Bob recover plaintext?

Answer

By decrypting ciphertext with the same key used for encryption.

8Question

What is plaintext?

Answer

The original readable message before encryption.

9Question

What distinguishes a brute-force attack from an analytical attack?

Answer

A brute-force attack tests all keys treating the cipher as a black box, while an analytical attack exploits the cipher's internal structure.

10Question

How does a brute-force attack verify each key?

Answer

By decrypting ciphertext and checking if it matches known plaintext.

11Question

What is the size of the substitution cipher's key space?

Answer

The substitution cipher's key space is 26! (factorial).

12Question

Approximately how many possible keys does the substitution cipher have?

Answer

About 2^88 possible keys.

13Question

What methods does letter-frequency analysis use to break substitution ciphers?

Answer

It examines single-letter frequencies, repeated symbol groups, and frequent short words with separators.

14Question

What does Kerckhoffs’ Principle state about cryptosystem security?

Answer

A cryptosystem should remain secure even if all system details except the secret key are known.

15Question

Who formulated Kerckhoffs’ Principle and when?

Answer

Auguste Kerckhoffs in 1883.

16Question

What are the recommended symmetric key lengths for long-term security with quantum resistance?

Answer

256 bits for several decades even with known quantum algorithms.

17Question

When does the relation a ≡ r mod m hold for integers a, r, m?

Answer

When m divides a minus r.

18Question

How can every integer a be expressed using integers q, m, and r?

Answer

As a = q·m + r with 0 ≤ r < m.

19Question

What is the integer ring Z_m?

Answer

The set {0, 1, ..., m − 1} with addition and multiplication modulo m.

20Question

When does an element a in Z_m have a multiplicative inverse?

Answer

If and only if gcd(a, m) = 1.

21Question

What is the encryption formula of the shift cipher in Z_26?

Answer

e_k(x) ≡ x + k mod 26.

22Question

What is the decryption formula of the affine cipher in Z_26?

Answer

x ≡ a⁻¹ · (y − b) mod 26.

23Question

What condition must a satisfy in the affine cipher for decryption?

Answer

gcd(a, 26) = 1.

24Question

Why does the affine cipher have 312 possible keys?

Answer

Because it has 12 valid a values and 26 b values.

25Question

How does the affine cipher encrypt a value x?

Answer

By computing y≡a⋅x+b(mod26)y \equiv a \cdot x + b \pmod{26} with key k=(a,b).

26Question

What condition must the multiplier a satisfy in the affine cipher?

Answer

gcd⁡(a,26)=1\gcd(a,26)=1 must hold for a.

27Question

Which values are valid multipliers a modulo 26 in the affine cipher?

Answer

1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, and 25.

28Question

How do you find the multiplicative inverse of a modulo 26?

Answer

Test values until a⋅a−1≡1(mod26)a \cdot a^{-1} \equiv 1 \pmod{26}.

29Question

What is the multiplicative inverse of 3 modulo 26 in the affine cipher?

Answer

The inverse of 3 is 9.

30Question

What is the size of the key space for the affine cipher?

Answer

The key space has 312 keys.

31Question

Why is the affine cipher vulnerable to exhaustive search?

Answer

Because its key space is small and letter mapping is fixed.

32Question

What ciphertext results from encrypting ATTACK with key (9,13)?

Answer

The ciphertext is nccnfz.

33Question

What do cryptography, IT security, and cybersecurity protect against?

Answer

Malicious human actors.

34Question

What are the traditional basic security goals known as the CIA triad?

Answer

Confidentiality, integrity, and availability.

35Question

What is the first step in a systematic IT-security approach?

Answer

Defining assets and security needs.

36Question

What does Kerckhoffs’ Principle state about cryptographic system design?

Answer

It should not require secrecy and compromising it should not inconvenience correspondents.

37Question

What does provable security require besides an algorithmic description?

Answer

A precise security model and a mathematical proof under a hardness assumption.

38Question

Who proposed the first fully homomorphic encryption scheme and when?

Answer

Gentry in 2009.

39Question

What does multiparty computation allow parties to do?

Answer

Jointly compute a function while learning only their own input and the result.

40Question

What is the minimum number of participants needed to reconstruct a secret in general secret sharing?

Answer

At least t of n participants.

41Question

How do stream ciphers encrypt plaintext bits?

Answer

By combining each plaintext bit with a key-stream bit.

42Question

What does the key stream depend on in a synchronous stream cipher?

Answer

Only on the key.

43Question

What does the key stream depend on in an asynchronous stream cipher?

Answer

On both the key and the ciphertext.

44Question

What is the formula for stream-cipher encryption in modulo-2 addition?

Answer

yi≡xi+si(mod2)y_i \equiv x_i+s_i \pmod{2}

45Question

What operation is equivalent to modulo-2 addition?

Answer

The exclusive-OR (XOR) operation.

46Question

What ASCII value results from encrypting uppercase A (1000001) with key-stream 0101100?

Answer

1101101, the ASCII value of lowercase m.

47Question

What is a key property of outputs from true random number generators?

Answer

They cannot be reproduced.

48Question

What is the chance of exactly reproducing a 100-coin-flip sequence?

Answer

1/21001/2^{100}.

49Question

What distinguishes true random from pseudorandom number generators?

Answer

True random generators produce non-reproducible outputs from physical processes, pseudorandom generators compute deterministic sequences from a seed.

50Question

How does a general pseudorandom number generator produce its sequence?

Answer

It generates recursively with s0=seeds_0=\mathrm{seed} and si+1=f(si)s_{i+1}=f(s_i).

51Question

What formula defines a linear congruential generator?

Answer

It uses si+1≡asi+b(modm)s_{i+1}\equiv a s_i+b\pmod m to generate sequences.

52Question

What makes a pseudorandom number generator cryptographically secure?

Answer

Computing subsequent or preceding bits from output bits is computationally infeasible.

53Question

What does unconditional security mean in cryptography?

Answer

A cryptosystem cannot be broken even with infinite computational resources.

54Question

What defines a one-time pad key stream?

Answer

It is generated by a true random number generator, known only to legitimate parties, and each bit is used once.

55Question

Why must a one-time pad key be as long as the plaintext?

Answer

Because it requires one true-random key bit for every plaintext bit and key material cannot be reused.

56Question

How do practical stream ciphers differ from one-time pads?

Answer

They use deterministic pseudorandom key streams from short keys aiming for computational security, not unconditional security.

57Question

What defines the degree of a linear feedback shift register?

Answer

The number of flip-flops in the register.

58Question

What is the input of a linear feedback shift register?

Answer

The XOR-sum of selected register bits.

59Question

What recurrence relation does an LFSR output sequence satisfy?

Answer

sm+i≡∑j=0m−1pjsi+j(mod2)s_{m+i}\equiv\sum_{j=0}^{m-1}p_j s_{i+j}\pmod 2 for feedback coefficients pjp_j.

60Question

Why is the maximum sequence length of an LFSR 2m−12^m-1?

Answer

Because the all-zero state is excluded and would remain stuck forever.

61Question

What is the period of an LFSR with degree 4 and coefficients $(0,0,1,1)$?

Answer

15

62Question

What period results from coefficients $(1,1,1,1)$ in a degree-4 LFSR?

Answer

5

63Question

What is the first step in a known-plaintext attack on a degree-mm LFSR?

Answer

Reconstruct the key stream from plaintext and ciphertext.

64Question

How are feedback coefficients recovered in a known-plaintext attack on an LFSR?

Answer

By forming mm linear equations and solving them using Gaussian elimination or matrix inversion.

65Question

Who developed the Salsa20 stream cipher and when?

Answer

Daniel J. Bernstein developed Salsa20 in 2005.

66Question

How many rounds does Salsa20/20 use?

Answer

Salsa20/20 uses 20 rounds.

67Question

What operation do Salsa20 and ChaCha20 use to encrypt and decrypt data?

Answer

They XOR the key stream with plaintext or ciphertext.

68Question

Why must a nonce change for every encryption session?

Answer

To avoid reusing the same key stream under the same key.

69Question

What size are the key-stream blocks generated by Salsa20 and ChaCha20?

Answer

They generate 512-bit key-stream blocks.

70Question

Who designed the Trivium stream cipher and what key size does it use?

Answer

Christophe De Cannière and Bart Preneel designed Trivium using an 80-bit key.

71Question

What are the lengths of Trivium's three shift registers?

Answer

They are 93, 84, and 111 bits long.

72Question

During Trivium initialization, how many times is the cipher clocked without output?

Answer

It is clocked 1152 times without producing output.

73Question

What are the lengths of Trivium's three nonlinear registers?

Answer

93, 84, and 111 bits.

74Question

What is the formula for updating register A in Trivium?

Answer

ai≡ci−66+ci−111+ci−110ci−109+ai−69(mod2)a_i \equiv c_{i-66}+c_{i-111}+c_{i-110}c_{i-109}+a_{i-69} \pmod 2.

75Question

What is the formula for updating register B in Trivium?

Answer

bi≡ai−66+ai−93+ai−92ai−91+bi−78(mod2)b_i \equiv a_{i-66}+a_{i-93}+a_{i-92}a_{i-91}+b_{i-78} \pmod 2.

76Question

What is the formula for updating register C in Trivium?

Answer

ci≡bi−69+bi−84+bi−83bi−82+ci−87(mod2)c_i \equiv b_{i-69}+b_{i-84}+b_{i-83}b_{i-82}+c_{i-87} \pmod 2.

77Question

How does Trivium produce its keystream bit?

Answer

si≡ai−66+ai−93+bi−69+bi−84+ci−66+ci−111(mod2)s_i \equiv a_{i-66}+a_{i-93}+b_{i-69}+b_{i-84}+c_{i-66}+c_{i-111} \pmod 2.

78Question

How is Trivium initialized with key and IV?

Answer

Load 80-bit key into register A, 80-bit IV into B, others zero, and set three rightmost bits of C to one.

79Question

How many clock cycles does Trivium's warm-up phase last?

Answer

1152 clock cycles, four times the total register length of 288 bits.

80Question

When does Trivium start producing output bits?

Answer

At cycle 1153, after the warm-up phase.

81Question

How many gate equivalents does a hardware Trivium implementation occupy?

Answer

Approximately 3500 to 5500 gate equivalents.

82Question

What encryption rate does a 16-bit-per-cycle Trivium achieve at 500 MHz?

Answer

8 Gbit/s.

83Question

What is the minimum known attack complexity on full Trivium?

Answer

At least 2802^{80} steps.

84Question

What does a true random number generator exploit?

Answer

An entropy source that behaves truly randomly.

85Question

Name one hardware phenomenon used by true random number generators.

Answer

Electronic jitter.

86Question

In which year did Gilbert Vernam develop the stream-cipher concept?

Answer

1917.

87Question

Who developed the stream-cipher concept with an electromechanical machine?

Answer

Gilbert Vernam.

88Question

Which ciphers did the eSTREAM project select for hardware applications?

Answer

Grain v1, MICKEY v2, and Trivium.

89Question

What is confusion in encryption according to Claude Shannon?

Answer

It obscures the relationship between the key and ciphertext, often via substitution.

90Question

What does diffusion do in encryption as defined by Claude Shannon?

Answer

It spreads one plaintext symbol's influence over many ciphertext symbols, often by permutation.

91Question

What block size and key size does DES use for encryption?

Answer

DES encrypts 64-bit blocks with a 56-bit keys.

92Question

How many rounds does DES perform and how are round keys derived?

Answer

DES performs 16 rounds using different round keys derived from the main key.

93Question

What are the formulas for each DES Feistel round?

Answer

Li=Ri−1L_i=R_{i-1} and Ri=Li−1⊕f(Ri−1,ki)R_i=L_{i-1}\oplus f(R_{i-1},k_i) for i=1,…,16i=1,\ldots,16.

94Question

What steps does the DES f function perform on its input?

Answer

It expands 32 bits to 48, XORs with a round key, applies eight S-boxes, then a permutation P.

95Question

What role do DES S-boxes play in the cipher?

Answer

They are the only nonlinear elements and provide the principal source of confusion.

96Question

How do the expansion and P permutation in DES contribute to encryption?

Answer

They contribute to diffusion and the avalanche effect.

Test yourself with the quiz

Test your knowledge with 60 questions on Affine and Stream Ciphers.

1. Regarding cryptology, which statement or statements are correct?

2. Cryptography and cryptanalysis are distinguished by which correct statements?

Take the quiz →

Read the study sheet

Review the complete course in the study sheet for Affine and Stream Ciphers.

See study sheet →

Similar courses

Create your own flashcards

Import your course and AI generates flashcards in 30 seconds.

Flashcard generator