Vitc Bcse309l m2 l2 S Des
Vitc Bcse309l m2 l2 S Des
Vitc Bcse309l m2 l2 S Des
S-DES, that is, Simplified DES, has similar properties and structure to DES with much
smaller parameters.
Figure C.1 illustrates the overall structure of the simplified DES, which we will refer to as
SDES.
1
• A complex function labeled fK, which involves both permutation and substitution
operations and depends ona key input;
• A simple permutation function that switches (SW) the two halves of the data;
• The function fK again;
• A permutation function that is the inverse of the initial permutation (IP–1).
IP −1 o f K 2 o SW o f K1 o IP
where
NOTE:
Definition: If f and g are two functions, then the function F with the equation y = F(x) = g[f(x)] is
called the composition of f and g and is denoted as F = g o f .
• S-DES depends on the use of a 10-bit key shared between sender and receiver.
• From this key, two 8-bit sub keys are produced for use in particular stages of the
encryption and decryption algorithm as shown in figure C.2
2
Figure C.2: Key Generation for SDES
• The 10-bit key is designated as (k1, k2, k3, k4, k5, k6, k7, k8, k9, k10).
P10 (k1, k2, k3, k4, k5, k6, k7, k8, k9, k10) = (k3, k5, k2, k7, k4, k10, k1, k9, k8, k6)
NOTE: Refer the example below this explanation to understand S-DES properly.
• Now perform a circular left shift (LS-1), or rotation, separately on the first five bits and
the second five bits.
• Next apply P8, which picks out and permutes 8 of the 10 bits according to the following
rule:
3
• The result is sub key 1 (K1).
• Further, on each of the 5-bit strings produced by the two LS-1 functions, a circular left
shift of 2 bit positions is performed.
SDES Encryption:
Encryption involves the sequential application of five functions as shown in figure C.3:
• Initial Permutations:
The input to the algorithm is 8-bit block of plaintext, which are first permuted using the IP
function:
This retains all 8 bits of the plaintext but mixes them up.
• The Function fK
The most complex component of S-DES is the function fK, which consists of a combination
of permutation and substitution functions.
Let L and R be the leftmost 4 bits and rightmost 4 bits of the 8-bit input to fK.
4
The mapping F can be described as follows:
o The input is a 4-bit number, R, the rightmost 4 bits of the 8-bit input to fK.
o The 8-bit sub key K1 = (k11, k12, k13, k14, k15, k16, k17, k18) is added to this value
using exclusive-OR, producing new 8-bit output.
o The first 4 bits are fed into the S-box S0 to produce a 2- bit output, and the remaining
4 bits are fed into S1 to produce another 2-bit output.
o The S-boxes operate as follows. The first and fourth input bits are treated as a 2-bit
number that specify a row of the S-box, and the second and third input bits specify a
column of the S-box. The entry in that row and column, in base 2, is the 2-bit output.
The function fK 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 fK operates on a different 4
bits.
In this second instance, the E/P, S0, S1, and P4 functions are the same. The only difference is
that the key input is K2.
• Final Permutations
At the end of the algorithm, the following inverse permutation is used on the 8-bits at hand:
NOTE: It is advisable to write P10, P8, IP and IP-1 values as shown here. However, if
you forget those values, do not write wrong ones. Just mention which operation is
performed.
5
Figure: SDES Encryption details
6
NOTE:
P0,0, P0,1, P0,2 and P0,3 are fed into the S-box S0 to produce a 2- bit output,
The remaining 4 bits (P1,0, P1,1, P1,2 and P1,3) are fed into S1 to produce another 2-bit output.
The first and fourth input bits are treated as a 2-bit number that specify a row of the S-box,
and the second and third input bits specify a column of the S-box. The entry in that row and
column, in base 2, is the 2-bit output.
GIVEN:
7
Plain Text- 10111101
Key- 1010000010
METHOD:
2) Applying Circular left shift by 1 bit on two 5 bits part, we get: 0000111000
Now for:
fk1 (01111110) = [(0111) XOR (F(1110, K1)), (1110)]
= [(0111) XOR 1101), (1110)]
= [(1100), (1110)]
8
3) Applying SW we get: 1110 1100
= [(1110), (1100)]
CT= 01110101
Practice Problems
1) Let the 8 - bits plain text be 10010111 and the 10 - bits key be
1010000010. Compute the cipher text using the Simplified - DES
algorithm.
2) Let the 8 - bits plain text be 00101000 and the 10 - bits key be
1100011110. Compute the cipher text using the Simplified - DES
algorithm.