Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 9
Encryption Types
Stream Ciphers Block Ciphers
Encryption Modes
ECB - Electronic Codebook CBC - Cipher Block Chaining CFB - Cipher Feedback OFB - Output Feedback
Stream Ciphers
One unit of the data stream is encrypted at a time. Most often the unit is a byte. Some comm systems it is one bit.
Keystream Generator Keystream Generator
Keystream
Ki Ciphertext
Keystream Ki
Pi
Plaintext
Ci
Plaintext
Pi
Block Ciphers
Block ciphers encrypt a block of data at a time Usually the blocks are 64 bits or 8 bytes or 128 bits (16 bytes)
Computationally efficient Requires padding at the end of a message
B1 ... Bi ... Bn Padding
Ek
Ek
Ek
Dk
Dk
Dk
Ci-1
Ci
Ci+1
Pi-1
Pi
Pi+1
Depositers Name
Acc't #
Through many intercepted tansmissions you learn that blocks 2, 3, and 4 never change. Block 1 always changes. By making your own deposits you know where your name is, your acc't # is and the amount is. Then you substitute your info where it is supposed to go.
Decryption
P0 = IV Dk(C0) Pi = Ci-1 Dk(Ci) Ci-1 Ci Ci+1
Ci-2
Ek
Ek
Ek
Ek
Dk Pi-1
Dk Pi
Dk Pi+1
Pn-2
Pn-1
Pn (j-bits long)
Ek
Ek
Ek
Select left j bits
Cn (j-bits long)
Cn-2
Cn-1
Decryption
P0 = Ek(IV) C0 Pi = Ci Ek(Ci-1) Pi Pi+1 Ci-1 Ci Ci+1
P0
Pi-1
IV
Ek
Ci-2
Ek
Ek
Ek
Ek
C0
Ci-1
Ci+1
Pi
Pi+1
Decryption
P0 = Ek(IV) C0 Pi = Ci Ek(Si-1) Pi Pi+1 Ek Ek
Note: The plaintext is never encrypted. IV and succesive encryptions act as an onetime pad generator. The IV does not have to remain secret
P0
IV Ek Ci-2
Pi-1 Ek
C0
Ci-1
Ci+1