1 of 40

Chapter 3

INTRODUCTION TO MODERN SYMMETRIC-KEY CIPHERS

PREPARED BY:-SNEHA A. PADHIAR

2 of 40

3 of 40

Block Cipher

  • A block cipher is one in which a block of plaintext is treated as a whole and used to produce a cipher text block of equal length
  • Typically, a block size of 64 or 128 bits(8 or 16 bytes) is used
  • Errors In transmitting one block generally do not affect other block
  • Each block is enciphered independently, using the same key, identical plaintext block produce identical cipher text block.
  • Ex playfair,hill cipher

4 of 40

example

  • Plaintext=227 bytes
  • Block size= 16 bytes

  • 227/16
  • 14 blocks plus 3 bytes

  • Algorithm encrypts 14 blocks and 3 bytes remain
  • So encrypting last 3 bytes data padding is used.

5 of 40

6 of 40

Stream Cipher

  • A Stream Cipher is one that encrypts a digital data stream one bit or one byte at a time.
  • Examples are autokeyed Vigenere cipher and the Vernam cipher
  • For practical reasons, the bit-stream generator must be implemented as an algorithmic procedure, so that the cryptographic bit stream can be produced by both users
  • The bit-stream generator is a key controlled algorithm and must produce a bit stream that is cryptographically strong
  • Ex ceaser cipher, one time pad, monoalphabetic cipher

7 of 40

  • Stream cipher algorithms are designed to accept a crypto key and a stream of plaintext to produce a stream of ciphertext.
  • Stream cipher is similar to a one time pad
  • A stream cipher encrypts smaller block of data, typically bits or bytes.
  • Key stream is xored with a stream of plaintext bits p1,p2,p3…. To produce the stream of ciphertext bits.
  • Ci=pi xor ki
  • Pi=ci xor ki

8 of 40

9 of 40

10 of 40

Diffusion and Confusion

  • Confusion is making the Output dependent on the key. Ideally every key bit influences every output bit.

  • Diffusion is making output dependent on previous input(Plain/cipher text). Ideally each output bit is influenced by every previous input bit.

11 of 40

12 of 40

Modern Symmetric Key ciphers

13 of 40

Modern Block Cipher

14 of 40

15 of 40

16 of 40

17 of 40

18 of 40

Components of Modern block Cipher

19 of 40

20 of 40

21 of 40

22 of 40

23 of 40

24 of 40

25 of 40

26 of 40

27 of 40

28 of 40

29 of 40

30 of 40

31 of 40

32 of 40

33 of 40

34 of 40

35 of 40

Straight P-Box (Invertible for decryption)

36 of 40

37 of 40

Modern Stream Cipher

  • In a modern stream cipher, encryption and decryption are done r bits at a time. We have a plaintext bit stream P = pn…p2 p1, a ciphertext bit stream �C = cn…c2 c1, and a key bit stream K = kn…k2 k1, in which pi , ci , and ki are r-bit words.

38 of 40

39 of 40

Synchronous Stream Cipher

40 of 40

Nonsynchronous Stream Cipher