Transposition Techniques
Transposition Techniques
Let us see how we can encrypt the message “She is listening” using the 6-character
keyword “PASCAL”. The initial key stream is (15, 0, 18, 2, 0, 11). The key stream is
the repetition of this initial key stream (as many times as needed).
TRANSPOSITION CIPHERS
A transposition cipher does not substitute one symbol for another, instead it changes
the location of the symbols.
Simple transposition ciphers, which were used in the past, are keyless.
1. A good example of a keyless cipher using the first method is the rail fence
cipher. The cipher text is created reading the pattern row by row. For example,
to send the message “Meet me at the park” to Bob, Alice writes
2. Alice and Bob can agree on the number of columns and use the second method.
Alice writes the same plaintext, row by row, in a table of four columns.
She then creates the cipher text “MMTAEEHREAEKTTP”.
The keyless ciphers permute the characters by using writing plaintext in one way
and reading it in another way The permutation is done on the whole plaintext to
create the whole cipher text. Another method is to divide the plaintext into
groups of predetermined size, called blocks, and then use a key to permute the
characters in each block separately.
The key used for encryption and decryption is a permutation key, which shows
how the character are permuted.
Steganography
Rotor Machines
The basic principle of the rotor machine is illustrated in figure. The machine
consists of a set of independently rotating cylinders through which electrical
pulse can flow.
Each cylinder has 26 input and 26 output pins, with internal wiring that
connect each input pin to unique output pin.
If we associate each input and output pin with a letter of the alphabet, then a
single cylinder defines a monoalphabetic sub stitution.
If we use multiple cylinders then we will obtain polyalphabetic substitution.
Block Cipher Principles
• A stream cipher is one that encrypts a data stream one bit or one byte at a
time. Example of stream cipher is the autokeyes, vigenere cipher and vernam
cipher.
• arbitrary reversible substitution cipher for a large block size is not practical
Since DES is based on the Feistel Cipher, all that is required to specify DES is −
Round function
Key schedule
The initial and final permutations are straight Permutation boxes (P-boxes)
that are inverses of each other. They have no cryptography significance in
DES.
Round Function
The heart of this cipher is the DES function, f. The DES function applies a 48-
bit key to the rightmost 32 bits to produce a 32-bit output.
uses two 32-bit L & R halvesas for any Feistel cipher can describe as:
o Li= Ri–1
takes 32-bit R half and 48-bit subkey and expands R to 48-bits using
Expansion Permutation E and adds to subkey.
Initial Permutation IP
Substitution Boxes S
• Each S-Box maps 6 to 4 bits
3. at each round
– 3.1. Left shift each half (28bits) separately either 1 or 2 places based on
the left shift schedule.
– 3.2. Combine two halfs to 56 bits, permuting them for use in function f
The DES satisfies both the desired properties of block cipher. These two properties
make cipher very strong.
Avalanche effect − A small change in plaintext results in the very great change
in the cipher text.
During the last few years, cryptanalysis have found some weaknesses in DES when
key selected are weak keys. These keys shall be avoided.
DES has proved to be a very well designed block cipher. There have been no
significant cryptanalytic attacks on DES other than exhaustive key search.
Strength of DES
1. Key Size
2. Timing Attacks
Specifically use fact that calculations can take varying times depending on the
value of the inputs to it.
3. Analytic Attacks
o differential cryptanalysis
o linear cryptanalysis
Differential Cryptanalysis
• design of S-P networks has output of function f influenced by both input & key
• hence cannot trace values back through cipher without knowing values of the
key
Linear Cryptanalysis
• can attack DES with 247 known plaintexts, still in practise infeasible
• number of rounds
• function f:
• key schedule
Modes of Operation
• need way to use in practice, given usually have arbitrary amount of information
to encrypt
• four were defined for DES in ANSI standard ANSI X3.106-1983 Modes of Use
Ci = DESK1 (Pi)
o C-1 = IV
• thus a change in the message affects all ciphertext blocks after the change as
well as the original block
– however if IV is sent in the clear, an attacker can change bits of the first
block, and change IV to compensate
Ci = Pi XOR DESK1(Ci-1)
C-1 = IV
• note that the block cipher is used in encryption mode at both ends
Ci = Pi XOR Oi
Oi = DESK1(Oi-1)
O-1 = IV
• uses: stream encryption over noisy channels
• sender and receiver must remain in sync, and some recovery method is needed
to ensure this occurs
• subsequent research has shown that only OFB-64 should ever be used
Counter (CTR)
• similar to OFB but encrypts counter value rather than any feedback value
• must have a different key & counter value for every plaintext block (never
reused)
Ci = Pi XOR Oi
Oi = DESK1(i)
• efficiency
– in advance of need