1 / 9

Modes of Operation

Modes of Operation. CS 795. Electronic Code Book (ECB). Each block of the message is encrypted with the same secret key Problems: If two identical blocks are in the same message, cipher text would be identical. Cipher blocks can be rearranged to alter the message. Cipher Block Chaining (CBC).

Download Presentation

Modes of Operation

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. Modes of Operation CS 795

  2. Electronic Code Book (ECB) • Each block of the message is encrypted with the same secret key • Problems: If two identical blocks are in the same message, cipher text would be identical. • Cipher blocks can be rearranged to alter the message

  3. Cipher Block Chaining (CBC) • This over comes the repeated message block problem. • Initially, a random initialization vector IV is Modulo-2 ORed with the 1st message block and then encrypted with secret key. • The encrypted output of block 1 is then used in place of IV in step 1; and so on. • CBC Threat 1: Modifying Ciphertext Blocks: (i) Modifying cn would have predictable effect on mn+1, and so on. • CBC Threat 2: Rearranging Ciphertext blocks: By rearranging the ciphertext, the message can be changed.

  4. Output Feedback Mode (OFB) • Stream cipher • Mod-2 OR the message with the one-time pad generated by OFB • Generate a random number IV, encrypt it with secret key; call it b0; use any part of b0 and mod-2 OR with the message to get ciphertext. • For next block of message, use b0 instead of IV; and so on. • Problems: If the plaintext and ciphertext are known by a bad guy, he can modify the plaintext into anything he wants by simply OR-ing the ciphertext with the known plaintext, and OR-ing the result with whatever message he wants to transmit.

  5. Cipher Feedback Mode (CFB) • Similar to OFB---k bits are generated and ORed with the message block. • But the input to the next block is the cipher output of the current block. • Less subject to tampering than CBC or OFB.

  6. Counter Mode (CTR) • Similar to OFB • A one-time pad is generated and modulo-2 ORed with the data • But the random bits are generated by incrementing the IV and encrypting it with the secret key

  7. Comparison

  8. Generating MACs • (i) Ensuring privacy and integrity together: Use CBC where the ciphertext of the last block is also used as the MAC; preferable to use two different keys for CBC for privacy and integrity separately.

  9. Multiple Encryption 3DES • Two keys are used: K1 and K2 m  Encrypt with K1  Decrypt with K2  Encrypt with K1  ciphertext

More Related