P2L6 Symmetric Encryption Flashcards
‘confusion’ block cipher primitive
encryption operation where relationship between key and ciphertext obscured, achieved with substitution
‘diffusion’ block cipher primitive
encryption operation where influence of one plaintext bit is spread over many ciphertext bits with goal of hiding statistical properties of the plaintext, achieved with permutations
what are block cipher ‘rounds’
cycle in which cipher combines substitution and permutation
decryption process for DES
use encryption subkeys in reverse order
each round of DES takes what as input?
ciphertext of previous round. The input is divided in left and right halves.
each round of DES outputs what?
Output left half is right half of the input. Right half of output is result of XOR-ing left half of input with and output of the mangler function
how long is key in DES?
64 bits (but actual value of key is 56 bits because each byte of data contains a ‘parity’ bit)
what is different in each round of DES?
the per round key
What is the input at round one of decryption process? Why?
Input is R then L because of swap performed at last stage of encryption process.
Steps of mangler function in DES
- Takes right half of input
- expands 32 bits of data into 48 bits
- XORs this data with the per round key
- 48 bit value subtituted into 32 bit value (via s box)
- permutation is applied to the result
Sbox quiz
S-box
Substitutes 6 bit value into 4 bit value using a predefined table. (there are 8 tables in DES). Outer 2 bits used to index into table rows. Middle 4 bits index into columns of table. Value of table entry is output of the 4 bit value.
security problem with DES
key space too small 2^56
sbox design criteria kept secret
Triple DES
Running DES 3 times.
Advatage of being able to support multiple key lengths.
k1 != k2 != k3 means you have key length of 168
k1 == k2 && k2 != k3 means key length of 112
k1 == k2 == k3 means key length of 56
Ability to communicate with single DES by using single key
AES key length
128, 192, or 256
AES data processing blocks
128 bits
Electronic Code Book (ECB)
Simplest way to encrypt large messages. Original mesage broken into fixed size blocks (last block padded) and each lock encrypted using same key.
ECB problems
- can be broken with cryptanalysis because two plaintext blocks can output the same cipher text blocks
- message integrity: an attacker can rearrange the blocks or substitute a block. This is because cipertext blocks created independently of one another.
Solution to ECB problems
cipher block chaining
Output of one cipher linked to the output of a previous cipher block
NOTE: initialization vector must be know to both recipient and sender
CBC Residue
Last block of CBC chain, sent with plaintext to the receiver.
An attacker who wishes to compromise message integrity will not know key and therefore resend with original CBC residue after altering message. The recipient will compute a different CBC residue, however, and will know that there was loss of integrity.
CBC confidentiality AND integrity solution
Use two keys. One for encryption, and the other for producing the CBC residue
OR
hash message, append it to the message, and then encrypt the whole entity