[go: up one dir, main page]

0% found this document useful (0 votes)
227 views16 pages

TRANSPOS

The document discusses different types of transposition ciphers and their components. It begins by explaining keyless and keyed transposition ciphers. It then describes the rail fence cipher as a type of keyless transposition cipher and provides an example. The document goes on to explain keyed transposition ciphers using blocks and a predetermined key. Finally, it discusses modern block ciphers that operate on bits rather than symbols and outlines some of their main components like P-boxes, S-boxes, and the use of XOR operations.

Uploaded by

rajeev_jha_16
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
227 views16 pages

TRANSPOS

The document discusses different types of transposition ciphers and their components. It begins by explaining keyless and keyed transposition ciphers. It then describes the rail fence cipher as a type of keyless transposition cipher and provides an example. The document goes on to explain keyed transposition ciphers using blocks and a predetermined key. Finally, it discusses modern block ciphers that operate on bits rather than symbols and outlines some of their main components like P-boxes, S-boxes, and the use of XOR operations.

Uploaded by

rajeev_jha_16
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Transposition cipher

Doesn t change one symbol for another, rather change the locations of the symbols. Broadly 2 types are available: keyless transposition and keyed transposition. Keyless transposition: used in past. There are 2 methods to do the permutations of characters(i) Write the text row by row and transmit the same column by column (ii) Write text in column by column and transmit row by row.

Rail Fence Cipher


One type of keyless transposition cipher. The plaintext is divided into 2 lines of zigzag pattern ( column by column ) Cipher text is created by reading the pattern row by row, ex: encrypt the text meet me at toga park
M E E T M E A T T O G A P A R K

Transposition cipher(cntd)
The encrypted text would be : MEMATGPRETETOAAK However the cryptanalysis is easy once known that rail fence cipher is used. Keyed transposition cipher: PT is divided into groups of predetermined size, called blocks. A key is used to permute the characters in each block. Ex. Encrypt the message enemy attacks tonight use the following key

Keyed transposition cipher


Key to use
3 1 1 2 4 3 5 4 2 5

The key says 3dr character comes to 1st place, 1st goes to 2nd place etc. the decryption key is just the two rows of same key read reversed. We require 5 letters of PT in every block. To make that one Z is added to the last word as below: we rewrite PT as: ENEMY ATTAC KSON IGHTZ

Keyed transposition(cntd)
The resultant CT would be : EEMYN TAACT TKONS HITZ However, more recent transposition cipher makes a harder scrambling of text. Following steps are used: (i) text written in a table row by row (ii) permutation done recording column by column (iii) new table read column by column

PT : ENEMY ATTACKS TO NIHGTS E A K I N T S G E T T H M A O T Y C N Z

E T T H

E A K I

M A O T

Y C N Z

N T S G

CT: ETTHEAKIMAOTYCNZNTSG

USE OF MATRICES
Here PT and CT are l m matrices representing the numerical values of the characters. The key is a square matrix of size m m Encryption is done by multiplying the PT matrix with the key matrix. Decryption is done by multiplying the CT matrix by the inverse key matrix However, cryptanalysis is possible by statistical method, as letter frequencies don t change. Brute force attempt may be done looking into the CT length. The block size is usually a divisor of total CT length. Viz if CT length is 20, then 20= 1X2X2X5. Now analyzer can presume a length from this. Viz he takes it as 5. so a 5!=120 possible combinations may all b e tried out , of which say 1st one is ( 1 2 3 4 5 )

Double transposition
Makes cryptanalysis far more difficult. Here the encryption/decryption algorithms are used twice. Same or different key may be used. A middle text is written out The same procedure is repeated for the middle text as that of plain text.

Steps for double transposition


Write the PT into equal size blocks Write blocks row by row Permute columns Read column by column MIDDLE TEXT OBTAINED Write row by row Permute columns Read column by column- CT results. Reverse the process for Decryption

Unit-III
Modern block cipher: only bits are used , no symbols, no characters. A symmetric key modern block cipher encrypts an n-bit block of PT or decrypts n-bit block of CT. A key of k-bit is used. If message length > n, it is broken down into blocks. If length < n, it is padded with extra bits. N is usually taken as 64,128,256,or 512.

Characteristics of modern block cipher


Theses are keyed substitution cipher Not normally designed as a single unit Required properties are confusion ad diffusion Main components are: (i) transposition units (ii) substitution units (iii) some other units

Components of modern block cipher


(a)P-boxes(permutation boxes): parallels the traditional transposition cipher for characters. 3 types of p-boxes available: (i) Straight p-box: no. of i/p equals no. of o/p (ii) Expansion p-box: no. of o/p > no. of i/p (iii) Compression p-box: no. of o/p < no. of i/p

(b) S- boxes(substitution boxes)


A miniature substitution cipher Can have different no. of i/p & o/p viz may be n i/p & m o/p where m may not be equal to n. Thus it is a m x n substitution unit which may be keyed or keyless Modern block cipher uses keyless s-boxes. o/p of s-box is predetermined. Broadly 2 types : linear & non linear s-boxes Linear s-box : superposition principle applicable for o/p. Otherwise non-linear s-box. May or may not be invertible.

(c ) Ex-OR
Most important component of modern block cipher, since addition/subtraction are done in GF(2n) field, which is XOR realizable. Properties of XOR are : (i) Clouser: for 2 n-bit words, XOR results an n-bit word. (ii) Associativity: more than 1 XOR can be performed in any order (iii)Commutativity: swapping of XOR operations don t change result. (iv) identity element: an n-bit word of all zero is an identity element .viz: P XOR (0000)=P (v) existence of inverse: XOR of a word with itself results identity element. So self inverse. Viz P XOR P=0

(d) Circular shift


Important component of a MBC. Shifts every bit of the n-bit word by kpositions removing leftmost k-bits therefore. Theses are made rightmost bits. Thus hides the pattern of original word Note if k>n then shifting is done by k mod n bits. Repeated shifting is usually avoided for a single word.

Other components(MBC)
(e)complement: a urinary operation that flips every bit (f) Swap: a special case of circular shift with k=n/2. Valid if n is an even number. Self invertible ( left shift n/2 = right shift n/2) (g) invertibility: for key fixed the operations of encryption and decryptions are to invertible. XOR helps here. Viz if Y = X XOR K, then X= Y XOR K. (h) split & combine: split normally splits n-bit word in middle creating equal length words. Combine concatenates the n-bit words.

You might also like