1 / 15

Encryption Types & Modes Chapter 9

Encryption Types & Modes 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.

minty
Download Presentation

Encryption Types & Modes Chapter 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Encryption Types & ModesChapter 9 Encryption Types • Stream Ciphers • Block Ciphers Encryption Modes • ECB - Electronic Codebook • CBC - Cipher Block Chaining • CFB - Cipher Feedback • OFB - Output Feedback

  2. 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 Ki Ki Keystream Keystream Plaintext Plaintext Ciphertext Pi Pi Å Å Ci

  3. 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 Padding ... Bn

  4. Electronic Codebook Mode (ECB) 64 bit (8 byte) blocks Ci-1 Ci Ci+1 Pi-1 Pi Pi+1 Ek Ek Dk Dk Ek Dk Ci-1 Ci Ci+1 Pi-1 Pi Pi+1 Ciphertext = (C0C1 ... Cn)

  5. Block Replay (ECB) 1 2 3 4 5 6 7 8 9 10 11 12 13 TS Sending Bank Receiving Bank Depositers Name Acc't # Amount 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.

  6. Cipher Block Chaining Mode (CBC) Encryption Decryption P0 = IVÅ Dk(C0) C0 = Ek(P0Å IV) Pi = Ci-1Å Dk(Ci) Ci = Ek(PiÅ Ci-1) Ci+1 Ci Ci-1 P0 Pi-1 Pi Pi+1 Ci-2 Å Å Å Å IV Ek Ek Ek Dk Dk Ek Dk Å Å Ci-2 Å Ci-1 Ci Ci+1 Pi Pi+1 C0 Pi-1 Ciphertext = (IV C0C1 ... Cn)

  7. CBC – Last Block(without padding) Pn-2 Pn-1 Pn(j-bits long) Å Å Ek Ek Ek Select left j bits Å Cn-2 Cn-1 Cn(j-bits long)

  8. CBC – Initialization Vector • Without the IV every encryption of a plaintext encrypts the same. • With the IV being a random number they are all different • The IV does not have to be random nor unique, but. • The IV need not remain secret (it is XORed with block 0) • The time stamp makes a good IV. • It need not be random, just not predictable

  9. CBC – Error Propagation • 1 bit error in the plaintext feed • Will affect that block and all others • Decryption will correct all but the flipped bit • 1 bit error in the ciphertext feed • Will affect that block • 1 bit of recovered plaintext • CBC mode is self recovering

  10. Cipher Feedback Mode (CFB) Encryption Decryption C0 = P0ÅEk(IV) P0 = Ek(IV) Å C0 Ci = PiÅEk(Ci-1) Pi = CiÅ Ek(Ci-1) Ci-1 Pi-1 Pi Pi+1 Ci Ci+1 P0 Ek Ek Ek Ek Ek Å Å Å Å Å Ci-2 Å IV Ci-1 Ci+1 Pi Pi+1 C0 Ci Ciphertext = (IV C0C1 ... Cn)

  11. CFB – Initialization Vector • CFB must use an IV • The IV does not have to be random but must be unique • The IV need not remain secret (it is XORed with block 0) • The IV must be changed with every message. • Must not be repeated during the lifetime of the key.

  12. CFB – Error Propagation • CFB mode is self recovering • An error corrupts 1 block of data

  13. Output Feedback Mode (OFB) Encryption Decryption C0 = P0ÅEk(IV) P0 = Ek(IV) Å C0 Ci = PiÅEk(Si-1) Pi = CiÅ Ek(Si-1) Pi-1 Pi Pi+1 P0 Å Å Å Å Ek Ek Ek Ek Ci-2 Note: The plaintext is never encrypted. IV and succesive encryptions act as an onetime pad generator. The IV does not have to remain secret IV Ci-1 Ci Ci+1 C0 Ciphertext = (IV C0C1 ... Cn)

  14. OFB – Error Propagation • 1 bit error in the ciphertext feed • causes a single bit error in the plaintext recovery

  15. Block Cipher ModesSummary • ECB • CBC • CFB • OFB

More Related