Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 3 1. TRANSPOSITION CIPHERS 2 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging.

Similar presentations


Presentation on theme: "Lecture 3 1. TRANSPOSITION CIPHERS 2 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging."— Presentation transcript:

1 Lecture 3 1

2 TRANSPOSITION CIPHERS 2

3 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging the letter order without altering the actual letters used can recognise these since have the same frequency distribution as the original text 3

4 Rail Fence cipher write message letters out diagonally over a number of rows then read off cipher row by row eg. write message out as: m e m a t r h t g p r y e t e f e t e o a a t giving ciphertext MEMATRHTGPRYETEFETEOAAT 4

5 Decryption of Rail Fence Divide the statement by 2 If odd number let the first part is more than 1 Put he first part above And the second part below Read the statement as diagonal 5

6 Reverse cipher Write the message backwards Ex: Plain: I came I saw I conq uered Cipher: d ereu q noci w asie maci 6

7 Decryption of Reverse cipher Write the cipher message backwards 7

8 Row Transposition Ciphers a more complex transposition write letters of message out in rows over a specified number of columns (key length) Then reorder the columns according to some key before reading off the rows Key : 41532 Plain text : the simplest possible transpositions. 8

9 Row Transposition Ciphers Make the statement in 5 columns: “the simplest possible transpositions” 9 12345 THESI MPLES TPOSS IBLET RANSP OSITI ONSXX

10 Row Transposition Ciphers 10 12345 THESI MPLES TPOSS IBLET RANSP OSITI ONSXX 41532 STIEH EMSLP STSOP EITLB SRPNA TOIIS XOXSN

11 Row Transposition Ciphers Make the statement in 5 columns: 11 Key: 41532 Cipher: STIEH EMSLP STSOP EITLB SRPNA TOIIS XOXSN 41532 STIEH EMSLP STSOP EITLB SRPNA TOIIS XOXSN

12 The same plain with another key 12345 THESI MPLES TPOSS IBLET RANSP OSITI ONSXX 12 15342 TIESH MSLEP TSOSP ITLEB RPNSA OIITS OXSXN The key : 15342 The cipher is :TIESH MSLEP TSOSP ITLEB RPNSA OIITS OXSXN

13 Row transposition : Example 1 Plain text : " laser beams can be modulated to carry more intelligence than radio” Key is: 6 3 4 1 2 5 7 13

14 Row transposition : Example 1 " laser beams can be modulated to carry more intelligence than radio” 14 7654321 EBRESAL BNACSMA ALUDOME ACOTDET EROMYRR ILLETNI HTECNEG OIDARNA

15 Row transposition : Example 1 KEY : 6 3 4 1 2 5 7 15 7654321 EBRESAL BNACSMA ALUDOME ACOTDET EROMYRR ILLETNI HTECNEG OIDARNA 7521436 ERALESB BAMACSN AUMEDOL AOETTDC EORRMYR ILNIETL HEEGCNT ODNAARI

16 Row transposition : Example 1 Solution is : “bselare nscamab lodemua cdtteoa rymrroe lteinli tncg eeh iraando” 16 7521436 ERALESB BAMACSN AUMEDOL AOETTDC EORRMYR ILNIETL HEEGCNT ODNAARI

17 Another Example: 2 Let key : COMPUTER PLAIN: “a convenient way to express the permutation “ 17

18 Another Example Let key : COMPUTER Key will be: 18 COMPUTER 14358726

19 Another Example 19 Key: 14358726 Plain: a convenient way to the permutation Cipher: ANOVINCE EW TAOTNY TPEEUMHR TITOXXAN 12345678 ACONVENI ENTWAYTO THEPERMU TATIONXX 14358726 ANOVINCE EWTAOTNY TPEEUMHR TITOXXAN

20 Row Transposition Ciphers a more complex transposition write letters of message out in rows over a specified number of columns then reorder the columns according to some key before reading off the rows Key: 3 4 2 1 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ 20

21 Decryption of a Row Transposition cipher consists of: writing the message out in rows reading off the message by reordering columns 21

22 CIPHER TEXT : LHEL VOEE BRYOXDYX THE solution : hello every body 22 4213 LEHL EEOV OYRB XYDX

23 Decryption of a Row Transposition cipher example: Cipher text = OANTTOSRGINCHRPE Key: IVAN 23

24 The solution is : not a strong cipher 24

25 Product Ciphers ciphers using substitutions or transpositions are not secure because of language characteristics hence consider using several ciphers in succession to make harder: ◦ two substitutions make a more complex substitution ◦ two transpositions make more complex transposition ◦ but a substitution followed by a transposition makes a new much harder cipher this is bridge from classical to modern ciphers 25

26 Product Ciphers before modern ciphers, rotor machines were most common product cipher were widely used in WW2 ◦ German Enigma implemented a very complex, varying substitution cipher used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted with 3 cylinders have 26 3 =17576 alphabets 26

27 Block Ciphers Dr. Nermin Hamza 27

28 Modern Cryptographic Techniques Modern cipher system : ◦ Symmetric ◦ Asymmetric Symmetric cryptography: ◦ Stream cipher ◦ Block cipher 28

29 Modern Cryptographic Techniques 29

30 Stream cipher Stream ciphers: where plaintext bits are combined with a pseudorandom cipher bit stream (key stream), typically by an exclusive-or (xor) operation. In a stream cipher, the plaintext digits are encrypted one at a time, and the transformation of successive digits varies during the encryption. 30

31 Stream cipher 31 Stream ciphers:- process messages a bit or byte at a time when en/decrypting

32 Stream cipher 32 2 types: ◦ Synchronous stream ◦ Asynchronous stream Synchronous stream ciphers where the key stream depends only on the key, Asynchronous stream ones where the key stream also depends on the ciphertext.

33 Stream cipher 33

34 Stream cipher 34 Definition Stream Cipher Encryption and Decryption The plaintext, the ciphertext and the key stream consist of individual bits, i.e., xi,yi, si ∈ {0,1}. Encryption: y i = e si (x i ) ≡ x i +s i mod 2. Decryption: x i = d si (y i ) ≡ y i +s i mod 2.

35 Modern Block Ciphers look at modern block ciphers one of the most widely used types of cryptographic algorithms provide secrecy /authentication services focus on DES (Data Encryption Standard) to illustrate block cipher design principles 35

36 Block cipher 36 Block cipher scheme :encrypts one block of data at a time using the same key on each block. In general, the same plaintext block will always be encrypted to the same cipher text if using the same key in a block cipher whereas the same plaintext will be encrypted to different cipher text in a stream cipher.

37 Block cipher block ciphers: process messages in blocks, each of which is then en/decrypted like a substitution on very big characters ◦ 64-bits or more 37

38 Block modes Electronic Codebook (ECB) mode Cipher Block Chaining (CBC) mode Cipher Feedback (CFB) Output Feedback (OFB) mode 38

39 Block modes Electronic Codebook (ECB) mode: The simplicity of the encryption modes is the electronic codebook (ECB) mode, in which the message is split into blocks and each is encrypted separately 39

40 Block modes 40

41 Block modes Cipher Block Chaining (CBC) mode In the cipher-block chaining (CBC) mode, each block of the plaintext is XORed with the previous cipher text block before being encrypted. This way, each cipher text block is dependent on all plaintext blocks up to that point. 41

42 Block modes 42

43 Block modes 43

44 Block modes Cipher Block Chaining (CBC) mode 44

45 Block modes Cipher Feedback (CFB) Cipher feedback mode converts the block cipher into a stream cipher: they generate key-stream blocks, which then are XORed with the plaintext blocks to get the cipher-text. Just as with other stream ciphers, flipping a bit in the cipher-text produces a flipped bit in the plaintext at the same location. With cipher feedback, a key-stream block is computed by encrypting the previous cipher-text block. 45

46 Block modes 46

47 Block modes 47

48 Block modes Cipher Feedback (CFB) 48

49 Block modes Output Feedback (OFB) mode OFB is similar to CFB but with small differences, where the Output feedback generates the next key-stream block by encrypting the last one. 49

50 Block modes 50

51 Block modes 51

52 Block modes Output Feedback (OFB) mode 52

53 Block vs Stream Ciphers many current ciphers are block ciphers broader range of applications 53

54 Block vs Stream Ciphers Block ciphers work a on block / word at a time, which is some number of bits. All of these bits have to be available before the block can be processed. Stream ciphers work on a bit or byte of the message at a time, hence process it as a “stream”. Block ciphers are currently better analysed, and seem to have a broader range of applications, hence focus on them. 54

55 Write a program for encrypt or / Decryption using Row transposition 55


Download ppt "Lecture 3 1. TRANSPOSITION CIPHERS 2 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging."

Similar presentations


Ads by Google