Block Cipher Modes of Operation Electronic Code Book Cipher Block - - PDF document

block cipher modes of operation
SMART_READER_LITE
LIVE PREVIEW

Block Cipher Modes of Operation Electronic Code Book Cipher Block - - PDF document

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Block Cipher Modes of Operation Electronic Code Book Cipher Block Chaining Mode Cryptography Cipher Feedback Mode School of Engineering and Technology


slide-1
SLIDE 1

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Block Cipher Modes of Operation

Cryptography

School of Engineering and Technology CQUniversity Australia

Prepared by Steven Gordon on 09 Mar 2020, modes.tex, r1818

1

slide-2
SLIDE 2

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

2

slide-3
SLIDE 3

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

How Do Block Ciphers Encrypt Arbitrary Length Plaintext?

◮ Block cipher: operates on fixed length b-bit input to produce b-bit ciphertext ◮ What about encrypting plaintext longer than b bits? ◮ Naive approach: Break plaintext into b-bit blocks (padding if necessary) and apply cipher on each block independently

◮ ECB

◮ Security issues arise:

◮ Repetitions of input plaintext blocks produces repetitions of output ciphertext blocks ◮ Repetitions (patterns) in ciphertext are bad!

◮ Different modes of operation have been developed ◮ Tradeoffs between security, performance, error handling and additional features (e.g. include authentication)

3

We will not cover each mode of operation in detail, but rather present them so you are aware of some of the common modes.

slide-4
SLIDE 4

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

4

slide-5
SLIDE 5

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

ECB Summary

◮ Each block of 64 plaintext bits is encoded independently using same key ◮ Typical applications: secure transmission of single values (e.g. encryption key) ◮ Problem: with long message, repetition in plaintext may cause repetition in ciphertext

5

slide-6
SLIDE 6

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

ECB Encryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:ECB_encryption.svg, public domain

6

slide-7
SLIDE 7

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

ECB Decryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:ECB_decryption.svg, public domain

7

slide-8
SLIDE 8

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

8

slide-9
SLIDE 9

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CBC Summary

◮ Input to encryption algorithm is XOR of next 64-bits plaintext and preceding 64-bits ciphertext ◮ Typical applications: General-purpose block-oriented transmission; authentication ◮ Initialisation Vector (IV) must be known by sender/receiver, but secret from attacker

9

slide-10
SLIDE 10

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CBC Encryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CBC_encryption.svg, public domain

10

slide-11
SLIDE 11

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CBC Decryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CBC_decryption.svg, public domain

11

slide-12
SLIDE 12

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

12

slide-13
SLIDE 13

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CFB Summary

◮ Converts block cipher into stream cipher

◮ No need to pad message to integral number of blocks ◮ Operate in real-time: each character encrypted and transmitted immediately

◮ Input processed s bits at a time ◮ Preceding ciphertext used as input to cipher to produce pseudo-random output ◮ XOR output with plaintext to produce ciphertext ◮ Typical applications: General-purpose stream-oriented transmission; authentication

13

slide-14
SLIDE 14

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CFB Encryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CFB_encryption.svg, public domain

14

slide-15
SLIDE 15

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CFB Decryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CFB_decryption.svg, public domain

15

slide-16
SLIDE 16

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

16

slide-17
SLIDE 17

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

OFB Summary

◮ Converts block cipher into stream cipher ◮ Similar to CFB, except input to encryption algorithm is preceding encryption output ◮ Typical applications: stream-oriented transmission over noisy channels (e.g. satellite communications) ◮ Advantage compared to OFB: bit errors do not propagate ◮ Disadvantage: more vulnerable to message stream modification attack

17

slide-18
SLIDE 18

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

OFB Encryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:OFB_encryption.svg, public domain

18

slide-19
SLIDE 19

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

OFB Decryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:OFB_decryption.svg, public domain

19

slide-20
SLIDE 20

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

20

slide-21
SLIDE 21

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CTR Summary

◮ Converts block cipher into stream cipher ◮ Each block of plaintext XORed with encrypted counter ◮ Typical applications: General-purpose block-oriented transmission; useful for high speed requirements ◮ Efficient hardware and software implementations ◮ Simple and secure

21

slide-22
SLIDE 22

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CTR Encryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CTR_encryption_2.svg, public domain

22

slide-23
SLIDE 23

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

CTR Decryption

Credit: Wikimedia https://commons.wikimedia.org/wiki/File:CTR_decryption_2.svg, public domain

23

slide-24
SLIDE 24

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

24

slide-25
SLIDE 25

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Feedback: CBC and CFB

25

slide-26
SLIDE 26

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Feedback: OFB and CTR

26

slide-27
SLIDE 27

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Contents

Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

27

slide-28
SLIDE 28

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

Encryption for Stored Data with XTS-AES

◮ XTS-AES designed for encrypting stored data (as

  • pposed to transmitted data)

◮ Overcomes potential attack on CBC whereby one block

  • f the ciphertext is changed by the attacker, and that

change does not affect all other blocks ◮ See Stallings Chapter 6.7 for details and differences to transmitted data encryption

28

slide-29
SLIDE 29

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

XTS-AES Encryption of Single Block

29

slide-30
SLIDE 30

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

XTS-AES Decryption of Single Block

30

slide-31
SLIDE 31

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

XTS-AES Encryption

31

slide-32
SLIDE 32

Cryptography Block Cipher Modes of Operation Block Ciphers with Multiple Blocks Electronic Code Book Cipher Block Chaining Mode Cipher Feedback Mode Output Feedback Mode Counter Mode Feedback Characteristics of Modes XTS-AES

XTS-AES Decryption

32