FINAL EXAM Flashcards
(43 cards)
What is the difference between stream and block ciphers?
Stream cipher encrypts one element at a time.
Block Ciphers encrypts encrypt the plaintext multiple elements at time
What is confusion ?
obscures the relationship between the key and ciphertext
What is diffusion?
obscures the relationship between the plaintext and the ciphertext
Why are confusion and diffusion important when designing a block cipher? Give an example
How is confusion achieved?
through substitution , replacing elements of plaintext with elements of cipher text
Consider a block cipher with a property where if one bit of the key changes,
many bits of the ciphertext change. Is this example of confusion or diffusion? Explain
Confusion, since its obscuring the relationship between the key and cipher text
How is diffusion achieved?
through premutation, shuffling the elements up.
What makes a block cipher reversible?
Each block of plaintext must give you a distinct block of cipher text.
Example:
00 -> 11
01 -> 10
10 -> 00
11 -> 01
How many possible keys can I have in an ideal block cipher which encrypts
64-bit text blocks?
(2^64)!
What is the size of the key in a 64-bit ideal block cipher?
64 * (2^64)
How does Feistel cipher perform substitution and permutation
Substitution is applied on the left half,
permutation occurs when we swap the two half’s
What are the advantages of the Feistel cipher network?
Encryption and decryption are very smilar
Consider binary key string:
0011000110110111000000111001111011101111000010100111100101110100
What will be the first five bits after running this key through PC-1 table?
use python, don’t forget to do -1
What will be the output of S-Box 8 given input 111011
row: 11 -> 0b11 -> 3
col: 1101 -> 0b1101 -> 13
find the intercept, of row, col and then get the output, and make it into binary.
intercept: 5 -> bin(5) -> 0101
How do you do left circular shift?
Ex:
0000100011000110101001011111 1111001100111100111111110000
take first bit add it to the end
0000100011000110101001011111 => 0001000110001101010010111110
1111001100111100111111110000 => 111001100111100111111110001
Combine the two 0001000110001101010010111110 + 111001100111100111111110001
What important function do S-Boxes perform in DES encryption?
substitution
Do not need to know all of the S-Box design criteria but need to know at least a
few and describe them.
Any change to an input => results in random looking changes in the output
No output bit of any S-box should be linear
Each row should have 0-16
What is the important property of block cipher security achieved by swapping two halves
of the text block after every round
Diffusion
What is the avalanche effect? Why is it important?
Small changes in plaintext or key => significant change in the cipher text
Making attempts of guessing keys impossible
Why not double DES? What is the method of breaking double DES?
Meet-in-the-middle, the attacker creates two tables, The Encryption and Decryption. If one value within the encryption table matches with one in the decryption.
Understand why when using 3DES, it’s better to use
EDE instead of EEE?
EDE, encrypt using key1, decrypt using key2, and encrypt again using key 1
Its backwards compatible with Single DES
What is the difference between differential and linear cryptoanalysis?
Differential: Trying to derive the secret key by studying how the input plaintext affects the ciphertext
Linear: Attacker tries to find a linear function tries to find a linear function that can approximate the relationship between the plaintext key inputs, and the encryption
What key sizes and block sizes does Twofish support?
128/192/256
What is the distinguishing feature of Twofish S-Boxes? How do they compare with, say,
DES S-Boxes.
They are dynamically generated based on the key