Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.

Similar presentations


Presentation on theme: "Module :MA3036NI Symmetric Encryption -3 Lecture Week 4."— Presentation transcript:

1 Module :MA3036NI Symmetric Encryption -3 Lecture Week 4

2 2 Overview..... Modern Block Ciphers Simplified DES Feistel Cipher Structure Relation between S-DES & DES

3 3 Modern Block Ciphers Will now look at modern block ciphers One of the most widely used types of cryptographic algorithms Provide secrecy and/or authentication services Most widely used Modern Block Algorithm is DES (Data Encryption Standard)

4 4 Block vs. Stream Ciphers Block ciphers process messages in blocks, each of which is then en/decrypted Typically, a block size is of 64-bits or 128-bits is used Stream ciphers process messages a bit or byte at a time when en/decrypting Many current ciphers are block ciphers

5 5 Block Cipher Principles Most symmetric block ciphers are based on a Feistel Cipher Structure(Using the concept of product cipher in block cipher) Needed since must be able to decrypt cipher text to recover messages efficiently Block ciphers look like an extremely large substitution Would need table of 2 64 entries for a 64-bit block Using idea of a product cipher

6 6 Claude Shannon and Substitution- Permutation Ciphers Feistel cipher is a practical application of a proposal by Claude Shannon. Claude Shannon introduced idea of substitution- permutation (S-P) networks (1949) – modern substitution-transposition product cipher These form the basis of modern block ciphers S-P networks are based on the two primitive cryptographic operations we have seen before: – substitution (S-box) – permutation (P-box) They provide confusion and diffusion of message

7 7 Confusion and Diffusion Cipher needs to completely obscure statistical properties of original message A one-time pad does this More practically Shannon suggested combining elements to obtain: – diffusion – dissipates statistical structure of plaintext over bulk of cipher text – confusion – makes relationship between cipher text and key as complex as possible

8 8 Simplified DES (S-DES) Developed by Prof Edward Schaefer It was developed for educational purposes, rather than to provide secure encryption Similar properties and structure to DES Referred to as S-DES

9 9 S-DES (cont) Encryption – Input:8-bit block of plaintext and a 10 bit-key – Output: 8-bit block of ciphertext Decryption – Input: 8-bit block of ciphertext and the same 10 bit-key – Output: the original 8-bit block of plaintext

10 10 S-DES (cont) Encryption involves 5 functions: 1.An initial permutation IP 2.A complex function f K containing S-P operations and depends on key K 3.A simple permutation function that switches (SW) the two halves of data 4.The function f K again 5.A permutation function IP -1

11 11 S-DES Scheme

12 12 S-DES (cont) Can be expressed as a composition of functions Or

13 13 S-DES Key Generation 10-bit key is shared between sender and receiver From this key, two 8-bit keys are produced in the following way: Or

14 14 S-DES Key Generation (cont) For example, the key 1010000010 is permuted to 1000001100 Perform a circular left shift (LS-1) separately on the first 5 bits and the second 5 bits, for example (00001 11000) Now we apply P8 We get K 1 =(10100100)

15 15 S-DES Key Generation (cont) Then we go back to the two 5-bit strings produced above and perform a circular left shift by 2 For example, the value (00001 11000) becomes (00100 00011) Then P8 is applied again to produce K 2 The result is K 2 =(01000011)

16 16 S-DES Encryption (R) Encryption involves 5 functions: 1.An initial permutation IP 2.A complex function f K containing S-P operations and depends on key K 3.A simple permutation function that switches (SW) the two halves of data 4.The function f K again 5.A permutation function IP -1

17 17 Initial and Final Permutations Input: 8-bit block of plaintext Permute using the IP function Consequently, IP -1 becomes

18 18 The Function f K Most complex part of S-DES Consists of permutation and substitution functions Let L be the leftmost 4 bits and R be the rightmost 4 bits of the 8-bit input to f K Let F be a mapping from 4-bit strings to 4-bit strings Then where SK is a sub key

19 19 The Function f K (example) Let the output of the IP stage be (10111101) and F(1101, SK)=(1110) for some key SK Then f K (10111101)=(01011101), because (1 0 1 1) (1 1 1 0)=(0 1 0 1)

20 20 Mapping F Input: 4-bit number (n 1 n 2 n 3 n 4 ) Operation Expansion/Permutation (E/P) Or

21 21 Mapping F (cont....) The 8-bit sub key K 1 (k 11,k 12,k 13,k 14,k 15,k 16, k 17,k 18 ) is added to the value using XOR The first 4 bits are fed into the S-box S0 to produce 2-bit output and the remaining 4 bits are fed into S1 to produce another 2-bit output

22 22 Mapping F (cont....) The two boxes are defined as follows:

23 23 Mapping F (cont.....) The S-boxes operate as follows: – 1 st and 4 th input bits are treated as a 2-bit number that specify a row of the S-box – 2 nd and 3 rd input bits are treated as a 2-bit number that specify a column of the S-box Now the 4-bits produced by S0 and S1 undergo another permutation

24 24 Switch Function Function f K only alters the leftmost 4 bits of the input The switch function (SW) interchanges the left and right 4 bits so that the second instance of f K operates on a different 4 bits E/P, S0, S1 and P4 functions are the same Input is K 2

25 25 Relationship between S-DES and DES DES operates on 64-bit of input A 56-bit key is used, from which 16 48-bit sub keys are calculated There is IP of 56 bits, followed by a sequence of shifts and permutations of 48 bits

26 26 Relationship between S-DES and DES (cont) Encryption Algorithm – Mapping F acts on 32 bits (n 1 n 2 … n 32 ) – After the Expansion/Permutation, the output of 48 bits is

27 27 Relationship between S-DES and DES (cont) Encryption Algorithm (cont) – This matrix is added (XOR) to a 48-bit subkey – There are 8 rows corresponding to 8 S-boxes – Each S-box has 4 rows and 16 columns – The 1 st and last bit of a row of the preceding matrix pick out a row of an S-box – The middle 4 bits pick out a column

28 28 Feistel Cipher Structure Horst Feistel devised the feistel cipher – based on concept of invertible product cipher Partitions input block into two halves – process through multiple rounds which – perform a substitution on left data half – based on round function of right half & subkey – then have permutation swapping halves Implements Shannon ’ s substitution-permutation network concept

29 29 Feistel Cipher Structure

30 30 Feistel Cipher Design Principles Block size – increasing size improves security, but slows cipher Key size – increasing size improves security, makes exhaustive key searching harder, but may slow cipher Number of rounds – increasing number improves security, but slows cipher Subkey generation – greater complexity can make analysis harder, but slows cipher Round function – greater complexity can make analysis harder, but slows cipher Fast software en/decryption & ease of analysis – are more recent concerns for practical use and testing


Download ppt "Module :MA3036NI Symmetric Encryption -3 Lecture Week 4."

Similar presentations


Ads by Google