Modes of Operation Block Ciphers

Modes of Operation Block Ciphers

Modes of Operation Murat Kantarcioglu Block Ciphers • Block length is fixed ( n-bit) • How to encrypt large messages? – Partition into n-bit blocks – Choose mode of operation • Electronic Codebook (ECB), • Cipher-Block Chaining (CBC), • Cipher Feedback (CFB), • Output Feedback (OFB), • Counter (CTR) • Padding schemes 1 Evaluation criteria • Identical messages – under which conditions ciphertext of two identical messages are the same • Chaining dependencies – how adjacent plaintext blocks affect encryption of a plaintext block • Error propagation – resistance to channel noise • Efficiency – preprocessing – parallelization: random access Notation • Message x consists of plaintext blocks of size n – x = x 1 || x 2 || … || xt • Ciphertext of plaintext block xi denoted as ci • Chaining requires an initialization vector that first plaintext block x1 will depend on. Initialization vector denoted as IV . – IV should be selected randomly for each message ( x) 2 Electronic Codebook (ECB) Plaintext Plaintext Block Cipher Block Cipher Key Encryption Key Encryption Ciphertext Ciphertext • Each block encrypted independently • Identical plaintexts encrypted similarly • No chaining, no error propagation Electronic Codebook (ECB) • Does not hide data patterns, unsuitable for long messages – Wiki example: pixel map using ECB • Susceptible to replay attacks – Example: a wired transfer transaction can be replayed by re- sending the original message) 3 Cipher-Block Chaining (CBC) Plaintext Plaintext Initialization Vector (IV) Block Cipher Block Cipher Key Key Encryption Encryption Ciphertext Ciphertext • Allows random access to ciphertext • Decryption is parallelizable – Plaintext block xj requires ciphertext blocks cj and c j-1 Cipher-Block Chaining (CBC) • Identical messages: changing IV or the first plaintext block results in different ciphertext • Chaining: Ciphertext block cj depends on xj and all preceding plaintext blocks (dependency contained in c j-1) • Error propagation: Single bit error on cj may flip the corresponding bit on x j+1 , but changes xj significantly. • IV need not be secret, but its integrity should be protected 4 Cipher Feedback (CFB) Initialization Vector (IV) Block Cipher Block Cipher Key Encryption Key Encryption Plaintext Plaintext Ciphertext Ciphertext • Allows random access to ciphertext • Decryption is parallelizable – Plaintext block xj requires ciphertext blocks cj and c j-1 Cipher Feedback (CFB) • Identical messages: as in CBC • Chaining: Similar to CBC • Error propagation: Single bit error on cj may flip the corresponding bit on xj, but changes x j+1 significantly. • IV need not be secret (XORed with x 1) 5 Output Feedback (OFB) Initialization Vector (IV) Block Cipher Block Cipher Key Encryption Key Encryption Plaintext Plaintext Ciphertext Ciphertext • Preprocessing possible (keep enc/decrypting previous output block) • No random access, not parallelizable Output Feedback (OFB) • Identical messages: same as CBC • No chaining dependencies • Error propagation: Single bit error on cj may only affect the corresponding bit of xj • IV need not be secret, but should be changed if a previously used key is to be used again 6 Counter (CTR) Nonce Counter Nonce Counter Nonce Counter c43acb23… 00000000 c43acb23… 00000001 c43acb23… 00000002 Block Cipher Block Cipher Block Cipher Key Key Encryption Encryption Key Encryption Plaintext Plaintext Plaintext Ciphertext Ciphertext Ciphertext • Preprocessing possible (inc/decrement and enc/decrypt counter) • Allows random access Counter (CTR) • Both encryption & decryption are parallelizable – Encrypted counter is sufficient to enc/decrypt • Identical messages: changing nonce results in different ciphertext • No chaining dependencies • No error propagation • Nonce should be random, and should be changed if a previously used key is to be used again 7 Summary • Choice of encryption mode affects – Encryption/decryption speed – Security against active adversaries (bit flips) – Security against passive adversaries (ECB) – Error propagation 8.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us