1/76
Looks like no tags are added yet.
What is cryptanalysis
Science behind breaking or analyzing cryptography
What is the work factor
The computational effort needed to break a cryptosystem
What is the correctness requirement of encryption?
decrypted ciphertext identical to plaintext
I.e, D(Kd, E(Ke, P)) = P
What is a keyless cryptosystem?
no key involved with encryption and decryption
Which key does sender use in an asymmetric cryptosystem to maintain confidentiality?
Encrypt with receiver's public key
decrypt with receiver's private key
What is the confidentiality security property for?
Preventing unauthorized reading by attackers
What is the integrity security property for?
Detecting unauthorized modification
What is the authentication security property for?
Verifying message coming from right place
What is the availability property for?
Ensuring users have access to info
What is the replay protection property for?
Preventing reuse of previously valid messages
What is the non repudiation property?
can trace message or data back to its sender
What is alphabet substitution
each letter represented as a number,
each letter is replaced by another letter based on a position shift determined by key k
I.e - Ci = Pi + k mod 26 —> a=1, c=a+2
What are transposition ciphers?
rearranges character positions in plaintext by some rearrangement rule, usually defined by the key
What is the caesar cipher?
substitution cipher that shifts characters a certain number of positions in the alphabet (alphabet substitution)
What are the properties of a caesar cipher?
plaintext letter always maps to the same ciphertext letter
only 26 keys
Subject to exhaustive search and frequency analysis
How can caesar cipher be broken with frequency analysis
If text long enough, compare frequency of letters in ciphertext with how common letters are used in the english language
can infer which substitutions were made
(i.e if i in ciphertext has highest frequency in ciphertext, and e has highest frequency in alphabet, then maybe i was replaced with e)
How can caesar cipher be broken with exhaustive search?
only 26 keys —> check every single shift for a coherent word
What is a vignere cipher?
Use a word as a key —> wraps entire length of plaintext; each letter of keyword represents positional shift for plaintext character
What is the vignere cipher equation?
Ci = (Pi + Ki) mod 26
Pi = (Ci - Ki) mod 26
i = letter position, K = key word, each letter of the P/C lines up with a letter of K
What is a property of vignere cipher?
A letter of plaintext can map to different letters of ciphertext, based on the keyword letters
What is a one time pad?
cipher uses random key as long as message.
Each key is used once and kept secret
Why is reusing a key in XOR ciphers dangerous?
keys cancel out in XOR operations —> can reveal relationship between two plaintexts if you know their ciphertexts
What is a columnar transposition?
transposition cipher where write a plaintext row by row into k number of columns, and the ciphertext is the text read column by column.
What is a rail-fence cipher?
Similar to columnar cipher, —> plaintext is arranged across k number of rows, and each row is concatenated with each other to form the cipher text
How are transposition ciphers broken?
it preserves frequencies —> do frequency analysis
What are product ciphers?
When different ciphers are chained together, but this does not always automatically improve security
What is the caesar statistical correlation formula?
An equation which gives a correlation score for a key, based on the ciphertext frequencies compared with the english letter frequencies
Where
score = Sum of [f(c)p((c-i) mod 26)]
f(c) is frequency of ciphertext character c
p(x) , frequency of english character x)
So each p(i) is calculated for the 26 keys, and the highest score is considered
What is confusion?
When we hide the relationship between plaintext, key, and ciphertext
What is diffusion?
When a change in plaintext spreads across a large area of ciphertext
What are Shannon's design criteria?
Security matches the sensitivity of the information
Key selection and algorithm used is practical
Implementation is not unnecessarily complicated
Error propagation is limited
Ciphertext should not expand compared to plaintext after encryption
What are stream ciphers?
Symmetric encryption done by processing plaintext bit-by bit with a keystream
How do stream ciphers work?
Both sender and receiver generate matching keystreams, plaintext is encrypted with keystream by some operation (XOR) and then is decrypted with an (XOR) with the same keystream
What is a keystream?
sequence used to be processed with the plaintext, through some operation like XOR
What is a block cipher?
Block ciphers encrypt plaintext block by block
What is a ciphertext-only attack model
When an attacker has only ciphertext and not the plaintext
Example: frequency analysis of caesar ciphetext
What is known-plaintext attack?
When an attacker knows a plaintext and ciphertext pair, so you can make inferences on the relationship
What is a probable-plaintext attack?
When an attacker knows a partial portion of plaintext, and can guess the plaintext
What is chosen plaintext attack?
Attacker chooses what data the encryption device encrypts and observes the ciphertext output.
What is a chosen ciphertext attack?
The attacker has the ability to decrypt chosen portions of the ciphertext message and use the decrypted portion of the message to discover the key.
What is the DES cipher?
A symmetric block cipher using feistal rounds to encrypt a plaintext
What are the DES specifications?
Block size: 64 bit
Effective key size: 56 bits
Entire key size: 56 bits + 8 parity bits
Rounds: 16
Round subkey size: 48 bits
What are the parity bits in DES?
8 bits of the 64 bit DES key, which detect errors in the representation of the key
DES encryption procedure
1. Initial permutation of the plaintext bit
2. Divide the result into two left and right 32-bit halves
3. Perform 16 Feistel rounds with the specific subkeys
4. Combine final halves in reverse order
5. Apply inverse initial permutation
What is the initial permutation in DES?
A fixed rearrangement of the plaintext bits where first bit of output is a certain bit of plaintext, etc
What happens during a feistal round?
The left and right halves of the 64 bit input is rearranged, where
The new left half is the previous right half
The new right half is the old left half, XOR with the result of the round function that takes the old right half and the round subkey.

What is a DES round function?
A function that takes a 32 bit right half, and 48-bit round subkey as inputs
Process:
Expansion permutation of 32-bit right half into a 48-bit intermediary
XOR result with 48-bit subkey
Divide 48-bit result into eight groups of 6 bits each
Get 4 bit result from each of the 8 S-boxes
Rearrange resulting 32 bits according to another table

What is a DES S-Box?
Each S-box takes 6 bit input to produce 4 bits.
What is an s box calculation?
Based on a table, which has row numbers and column numbers
Out of 6 bit input, first and last bit correspond to row number, and middle four bits correspond to a column number. The cell is the 4-bit binary output
How are DES subkeys generated?
The 64-bit DES key has its 8 parity bits discarded
The remaining 56 bits are permutated and divided into 28 bit halves
Each of the 16 rounds performs circular one or two bit left shifts on these halves to generate subkeys for each round
What is the difference between PC-1 and PC-2 DES permutation?
PC-1 is when the 56 bit effective key is permuted to form 28 bit halves, and subkeys are formed by performing circular left shifts according to a round schedule
PC2 is when 48 bits are selected from a 56-bit state to create each subkey
How is DES decrypted?
Same algorithm but using the subkeys in reverse order
What is ECB?
Electronic Code Book, where each block of plaintext is encrypted independently with the same key

What are properties of ECB?
With the same key, identical plaintext produces identical ciphertext blocks
Blocks of ciphertext can be rearranged and decrypted to match rearranged plaintext
Errors of encryption/decryption is not propagated to other blocks due to each block being encrypted independently
What is CBC?
Cipher block chaining, where each block of plaintext is XOR with the previous ciphertext block, and then encrypted
What is the initialization vector?
The 0th block of ciphertext, which is used in block ciphers with the first block of plaintext
What are the encryption and decryption equations for CBC?
E: Ci = Ek(Pi XOR Ci-1)
D: Pi = Dk(Ci) XOR Ci-1
What are properties of CBC?
Chaining blocks hides the repeated plaintext patterns
CBC needs a random initial vector unique to a key
IV of CBC needs to be kept protected
Corrupted bit in Ci will affect all bits in Pi, and flip one bit in Pi+1
Uses sequential encryption and decryption
What is CFB?
Cipher Feedback algorithm, where the previous ciphertext block is encrypted, then XORd with the current plaintext block to find the current ciphertext block
What are the CFB encryption and decryption equations
E: Ci = Pi XOR Ek(Ci-1)
D: Pi = Ek(Ci-1) XOR Ci
What are the properties of CFB?
Ek is used for both encryption and decryption
Encryption is sequential
Errors are propagated for several ciphertext blocks
What is OFB?
When you use an output feedback function to generate a keystream for encryption.
This function takes the encryption of the previous output feedback. Where S0 is IV
What is encryption and decryption functions of OFB
Ci = Pi XOR Si
Pi = Ci XOR Si
Where Si is the encryption output
What are OFB properties
Ek is used for both encryptoin and decryption
Keystream is independent of plaintext and ciphertext
Keystream generation is sequential
Same key and IV uses the same keystream
What is CTR?
Counter mode cipher, where unique counter blocks are encrypted to generate a keystream
What are the encryption and decryption functions for CTR?
Ci = Pi XOR Ek(Ti)
Pi = Ci XOR Ek(Ti)
Where Ti = the counter block at position i
What are the weak keys of DES?
Repeated 0101
Repeated FEFE
Repeated E0E0
Repeated 1F1F in first half, then 0E0E in second half
What is AES?
The Advanced Encryption Standard using a fixed block size of 128 bits, and key lengths of 128, 192 and 256 bits
How many rounds in AES?
AES-128 uses 9 rounds + 1
AES-192 uses 11 rounds + 1
AES-256 uses 13 rounds + 1
What happens during each round of encryption in AES?
1. SubBytes
2. ShiftRows
3. MixColumns
4. AddRoundKey
What happens during each decryption round of AES?
1. Inverse shift rows
2. Inverse sub bytes
3. Inverse add round key
4. Inverse mix column
What is the AES encryption process?
1. 128 Bit input is represented as a 4-by-4 array of bytes called the state
2. AES performs addRoundKey which XORs state with initial ronud key
3. Go through rounds
What is the AES decryption process?
1. Addroundkey where ciphertext is XORed with last 4 words of key schedule
2. Go through rounds
What is sub bytes?
AES round operation where every byte in the state is replaced with another byte in a substitution table
What is shift rows?
AES round operation where each state row is shifted cyclically, row 1 by 1 byte, row 2 by 2 bytes, so on
What is mixcolumns?
AES round operation where each column of the state is randomly transformed so its output depends on multiple inputs
Promotes diffusion
Is not done in final encryption round
What is addroundkey?
An AES operation where the state is XOR with a round key thats generated by the AES key schedule
What is the difference between AES and DES?
DES uses block size of 64 bits, AES uses block size 128
DES uses 56 bit effective key, AES uses 128,192, or 256
DES uses 16 rounds, AES uses 10, 12, or 14 depending on key size
DES uses permutations and S-boxes, while AES uses different round operations
AES is more secure and supersedes DES