LECTURE NOTE 3 Flashcards

(99 cards)

1
Q

what is the handshake protocol

A

broswer and web server, establish a shared secret key using public-key crytography (either the RSA or the Diffie-Hellman key exchange )

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

How does file encryption work in practice?

A

Files are symmetrically encrypted with a secret key; the key is stored encrypted or in secure hardware, and a password unlocks the key for decryption

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

Structured approach to identifying and assessing potential threats and
vulnerabilities within a cryptographic system

A

threat model

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

What is the main threat model element in cryptography?

A

Identifying adversaries, their motives, capabilities, knowledge, attack vectors, and countermeasures.

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

The security of a cryptosystem depends
on the strength of the algorithm and the secrecy of the key

A

Kerckhoff’s Principle (1883):

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

What are the two main types of modern cryptography?

A

symmetric crytography and public key (asymmetric) crytography

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

Conventional encryption, secret-key encryption, single-key encryption are other names for

A

symmetric encryption

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

What are the two requirements for secure symmetric encryption?

A

A strong encryption algorithm and secure key distribution.

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

What are the five ingredients of symmetric encryption?

A

Plaintext, encryption algorithm, secret key, ciphertext, decryption algorithm.

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

What is the most widely used type of encryption before public-key cryptography?

A

Symmetric (secret-key) encryption.

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

What is the simplified model of symmetric encryption?

A

Encrypt plaintext with a secret key to get ciphertext; decrypt ciphertext with the same key to get plaintext.

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

What is the main difference between symmetric and public key cryptography?

A

Symmetric uses the same key for encryption and decryption; public key uses different keys.

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

Encrypts data one bit or byte at a time using a pseudorandom keystream and bitwise operations like XOR

A

stream cipher

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

What is a keystream in a stream cipher?

A

A pseudorandom sequence generated from a key, combined with plaintext to encrypt each character

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

What is an example of a stream cipher?

A

one - time pad

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

How is a keystream generated in a stream cipher?

A

A shared key is input to a bit-stream generator algorithm, which produces the keystream for encryption

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

What is a block cipher?

A

Encrypts a fixed-size block of plaintext to produce a block of ciphertext of the same size

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

What happens if you have a partial block in block cipher encryption?

A

Padding is used to fill the block

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

How do block ciphers handle messages longer than one block?

A

They use modes of operation to apply encryption to larger plaintexts.

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

What are typical block sizes in block ciphers?

A

64 or 128 bits

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

What are key design parameters for a block cipher?

A

Block size and key size; the key is usually a k-bit binary string, with keyspace size
2^K

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

who introduced the concepts of confusion and diffusion in cryptography

A

claude shannon

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

How is confusion achieved in encryption?

A

By applying complex substitution algorithms

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

what is confusion in block cipher

A

It hides the relationship between the ciphertext and the key, making it hard to deduce the key from ciphertext

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is diffusion in a block cipher?
It spreads the influence of each plaintext bit over many ciphertext bits, hiding patterns in the plaintext
26
How is diffusion achieved in encryption?
By applying permutation (transposition) to the data
27
Why are both confusion and diffusion needed in block ciphers?
Neither alone is enough for security; strong ciphers combine both to build product ciphers
28
What is a product cipher?
A block cipher built by applying multiple rounds of operations (confusion and diffusion) to data
29
What is the main advantage of product ciphers?
Excellent diffusion: changing one bit of plaintext changes about half the output bits
30
How are new ciphers built from old ones (composition)?
By combining two ciphers, using one cipher’s output as input to the next, with a combined key for both
31
What is the key structure in a composed cipher?
The key is a pair (k", k'), one for each component cipher.
32
How is encryption done in a composed cipher?
Encrypt with the first cipher, then encrypt the result with the second cipher: E''k"(E'k'(m))
33
How is decryption done in a composed cipher?
Decrypt with the second cipher, then decrypt the result with the first cipher: D(k", k')(c) = D'k'(D"k"(c))
34
Why are subkeys important in product ciphers?
Each round or component uses a different subkey, often generated from a master key
35
What is a chaining mode in block cipher encryption?
a method for applying a block cipher to a sequence of blocks; describes how blocks are linked together for encryption
36
What is ECB (Electronic Code Book) mode?
Each block of plaintext is encrypted separately with the same key.
37
How can chaining modes improve security over ECB?
By making each block’s encryption depend on previous blocks or subkeys, rather than encrypting each block independently.
38
A design model for block ciphers that uses multiple rounds, splitting input into two halves and processing them with non-invertible components.
What is the Feistel structure/network?
39
What is a key feature of the Feistel structure?
The same algorithm is used for both encryption and decryption, except subkeys are applied in reverse order during decryption.
40
What is the role of the round function in Feistel ciphers?
The round function processes one half using a subkey, introducing confusion and diffusion; it does not need to be invertible.
40
How does the Feistel encryption process work?
Plaintext is split into left (L) and right (R) halves; in each round, one half is processed by a function using a subkey and XORed with the other half; halves are swapped at the end of each round except the last.
41
What is the importance of swapping L and R at the end of Feistel encryption?
It allows decryption to use the same algorithm as encryption, just reversing the subkey order.
42
How does Feistel decryption differ from encryption?
Subkeys are used in reverse order compared to encryption.
43
What design features affect the security of a Feistel cipher?
Block size, key size, number of rounds, complexity of subkey generation, and complexity of the round function.
44
What does DES stand for?
Data Encryption Standard – a famous way to scramble (encrypt) messages using a secret key
45
How big is a DES data block?
64 bits
46
how long is the DES key
56 bits long
47
How many rounds does DES use to encrypt data?
16 rounds, each doing the same mixing steps
48
What is the main mixing step in DES called?
the f-function, which uses S-boxes to mix things up
49
What is an S-box in DES?
A mini-mixer that takes 6 bits and spits out 4 bits, making the code extra tricky
50
What is the size of each half in the Feistel structure?
32 bits
51
Does DES use the same key for both locking and unlocking?
yes- DES is symmetric: the same key locks (encrypts) and unlocks (decrypts)
52
How does an S-box in DES transform its input?
It takes a 6-bit input, uses the outer 2 bits to select a row and the middle 4 bits to select a column in a lookup table, then outputs the 4-bit value found at that position.
53
DES STEPS
1. exapanision E 2. XOR with round key 3. S-ox substitution 4. permustion. The DES function applies a 48-bit key to the rightmost 32-bit to produce a 32-bit output. 39 / 106
54
A desirable property where a small change in the plaintext or key causes a significant and unpredictable change in the ciphertext.
the avalanche effect
55
How do S-boxes and permutations contribute to the Avalanche Effect in DES?
S-boxes ensure that a single-bit input change results in at least two bits changing in their output, and permutations distribute these changes throughout the block.
56
A property where each bit of the ciphertext depends on many bits of the plaintext, making changes to the plaintext have a widespread impact on the ciphertext
completeness in block ciphers
57
What is the purpose of a key schedule in a block cipher like DES?
To generate multiple subkeys for each round of the encryption process from a single master key.
58
What is the effective key length of DES?
56 bits, even though it’s often provided as a 64-bit key.
59
Why is the DES key effectively 56 bits, not 64?
Eight of the 64 bits are ignored; they can be used for parity checks but are not part of the encryption algorithm itself.
60
How many bits of the key are used in each DES round (subkey)?
48 bits
61
What is a weak key in DES?
A specific key that makes the DES cipher behave in an undesirable way, such as encrypting twice returning the original plaintext.
62
How many "weak keys" does DES have?
DES has 4 weak keys (plus 12 semi-weak keys and 48 "possibly weak" keys).
63
What happens when DES uses a weak key?
All 16 subkeys become identical, causing encryption to act identically to decryption (encrypting twice with the same weak key returns the original plaintext).
64
Keys that produce only two different subkeys (instead of 16), and come in pairs where one key will decrypt what the other encrypts.
What are semi-weak keys?
65
Why should weak and semi-weak keys be avoided?
They make the encryption much less secure and predictable, allowing easier attacks if the key is known or guessed.
66
Decryption for DES
using subkeys in reverse order
67
initial and final permutations in DES
hese are just fixed shuffles of the bits at the very beginning and very end. They were added to help load data into older computer hardware and do not serve any security purpose . They are simply inverse operations of each other.
68
The biggest weakness of DES
keysize (56 bits)
69
des vey strong against:
differential and linear cryptanalysis
70
Double DES
Lock it with one code, then lock it again with another code.
71
Lock with one code, unlock a little with a second code, then lock again with a third code.
triple DES
72
Lock with one code, unlock a little with a second code, then lock again with a third code.
2^56 possible keys
73
what is the meet-in-the-middle attack?
A shortcut attack on double DES that tries all keys from the front and back, meeting in the middle, making double DES not much more secure than single DES
74
How many operations does a brute force attack on double DES require?
2¹¹² operations (but meet-in-the-middle attack only needs about 2⁵⁷).
75
How many operations does a brute force attack on triple DES with 3 keys require?
2^168
76
What does AES stand for?
Advanced Encryption Standard.
77
the block size of AES?
128 bits (16 bytes)
78
What key sizes does AES support?
128, 192, 256 bits
79
How many rounds does AES use?
10 rounds for 128-bit key, 12 rounds for 192-bit key, 14 rounds for 256-bit key.
80
What are the main steps in each AES round?
SubBytes (S-box), ShiftRows, MixColumns, AddRoundKey.
81
Is AES a Feistel cipher?
No, AES is a substitution-permutation network, not a Feistel cipher.
82
What is the “state” in AES?
A 4x4 array of bytes (16 bytes, 128 bits) that gets scrambled in each round.
83
What is the Byte Substitution layer in AES?
Each byte is replaced using a secret S-box table, adding confusion.
84
What happens in the ShiftRows step?
Each row of the byte matrix is shifted left by a different amount.
85
What does the MixColumns step do?
Each column of the matrix is mixed using special math (Galois Field), spreading the influence of each byte.
86
How are round keys made in AES?
they are generated from the original key using a key schedule, which mixes and rotates bytes and uses the S-box.
87
What is the AddRoundKey step?
The current state is combined with a round key using XOR.
88
Is AES decryption just running the encryption steps backward?
No, you must use special “inverse” steps for each layer, because AES is not a Feistel cipher.
89
What makes AES secure against brute-force attacks?
its long keys (128, 192, or 256 bits) make guessing every key impossible with today’s computers.
90
What is a side-channel attack?
An attack that uses information from how a computer runs (like timing or power use) instead of breaking the math.
91
What is the difference between ECB and CBC modes?
ECB scrambles each block separately (not very secure); CBC mixes each block with the last one before scrambling (more secure).
92
What does the AddRoundKey step do in decryption?
it uses XOR, which undoes itself, making it easy to reverse.
93
What is ECB mode?
Electronic Codebook mode encrypts each block independently; same plaintext blocks give same ciphertext blocks.
94
What is the main weakness of ECB mode?
does not hide patterns - identical plaintext blocks create identical ciphertext blocks.
95
How does CBC mode work?
Each plaintext block is mixed with the previous ciphertext block before encryption; uses an IV for the first block.
96
Why is CBC mode more secure than ECB?
Because identical plaintext blocks produce different ciphertext blocks (thanks to chaining).
97
What is CTR mode?
Counter mode uses a counter value for each block, encrypts the counter, and mixes it with the plaintext; acts like a stream cipher.
98
What is an IV (Initialization Vector) in CBC mode?
A random value used to start the chaining process for the first block; it doesn’t have to be secret, but must be unique.