Simplified Data Encryption Standard (S-DES)
Simplified Data Encryption Standard (S-DES)
The S-DES is a block cipher that converts a plaintext block into ciphertext.
The block size of the S-DES algorithm is 8 bits. Like DES, it is a symmetric
key cipher. It uses the same key for both encryption and decryption
operations. The key size of the S-DES algorithm is 10 bits. The S-DES
algorithm’s encryption and decryption consists of 2 rounds; thus, it uses
two different subkeys. Fig. 1 depicts the structure of the S-DES algorithm’s
encryption, decryption, and key expansion processes.
• It is a block cipher.
• It has an 8-bit block size of plaintext or ciphertext.
• It uses a 10-bit key size for encryption and decryption.
• It is a symmetric cipher.
• It has Two Rounds.
Page 1 of 12
Figure 1: The S-DES Algorithm Structure.
The output of the Initial Permutation (IP) of the input 8-bit plaintext
is obtained according to Table 1. The numbers in Table 1 represent
the placement indexes of the input plaintext bits (the first bit’s index
is 1). This permutation retains all the 8 bits of the plaintext but mixes
them up.
Page 2 of 12
Table 1: The Initial Permutation (IP).
IP
Input 1 2 3 4 5 6 7 8
Output 2 6 3 1 4 8 5 7
2- THE f K FUNCTION:
Before applying the output of the IP to the fK function, the 8 bits are
split into two halves (L and R), each of which is a 4-bit block. Fig. 2
depicts the steps involved in the fK function.
Page 3 of 12
L R
Page 4 of 12
A. EXPANDED PERMUTATION (EP):
It takes a 4-bit input and converts it into an 8-bit output using the
bits’ placement indexes, as depicted in Table 2.
Table 2: The Expanded Permutation (EP).
EP
Input 1 2 3 4 - - - -
Output 4 1 2 3 2 3 4 1
The output of the EP is XORed with the first subkey K1 and the
output of the XOR operation will be split into two halves each of
which consists of 4 bits. The two 4-bit halves are input to the S-
Boxes, S0 and S1, respectively.
B. S-BOXES (S 0 AND S 1 ):
Row Column 0 1 2 3
0 1 0 3 2
1 3 2 1 0
2 0 2 1 3
3 3 1 3 2
Page 5 of 12
Table 4: The S-Box S1
Row Column 0 1 2 3
0 0 1 2 3
1 2 0 1 3
2 3 0 1 0
3 2 1 0 3
The two 2-bit outputs of the S-Boxes are then combined to form a
4-bit block, as shown in Fig. 2. This 4-bit block forms the input to
the permutation P4.
P4
Input 1 2 3 4
Output 2 4 3 1
The output of the F mapping is then XORed with the left half input to
the fK function L. The 4-bit output of this XOR operation is then
combined with the right half input to the fK function R to form the 8-
bit output of the fK function, as shown in Fig. 2.
Page 6 of 12
The two halves output of the SW function is fed once again to another
instance of the fK function, as depicted in Fig. 1. However, this second fK
function uses the subkey K2. The 8-bit input to the second fK function
undergoes the same steps described above.
The output of the second fK function is then fed into the Inverse Initial
Permutation (IP-1) function.
IP-1
Input 1 2 3 4 5 6 7 8
Output 4 1 3 5 7 2 8 6
Finally, the 8-bit output block of the IP-1 function is the ciphertext
obtained for the corresponding 8-bit input plaintext block.
This section demonstrates the steps involved in the S-DES algorithm’s key
expansion (generation) process, as depicted in Fig. 3. According to Fig. 3,
three functions are used to achieve the key expansion of the S-DES
algorithm as follows:
Page 7 of 12
Figure 3: The key expansion (generation) process of the S-DES algorithm
Page 8 of 12
into two halves (5 bits each), as shown in Fig. 3, and sent to the left
shift (LS) operations.
Table 7: The Permutation P10
P10
Input 1 2 3 4 5 6 7 8 9 10
Output 3 5 2 7 4 10 1 9 8 6
Each half of the two 5-bit halves output of the P10 operation
undergoes a one-bit left circular shift that is achieved by the LS1
function, as shown in Fig. 3. The output of LS1 is again two 5-bit
blocks.
To generate the 8-bit subkey K1, the two 5-bit output blocks of LS1
are combined before going directly to the permutation P8 function,
as shown in Fig. 3.
However, to generate the 8-bit subkey K2, each block of the two 5-bit
output blocks of LS1 undergoes another two-bit left circular shift
that is done by the LS2 function, as shown in Fig. 3. Next, the two 5-
bit output blocks of LS2 are combined before going to the
permutation P8 function, as shown in Fig. 3.
P8
Input 1 2 3 4 5 6 7 8 9 10
Output 6 3 7 4 8 5 10 9 - -
Page 9 of 12
THE S-DES ALGORITHM DECRYPTION:
The steps of the S-DES algorithm decryption are the same as the steps
involved in the encryption and are performed in the same order.
3. After the IP, we get an 8-bit block of text which we divide into 2
halves of 4 bits each.
L = {0 1 0 1} and R = {1 1 0 1}
5. We perform the XOR operation using the first key K1 with the output
of EP. Since K1 is {1 0 1 0 0 1 0 0}, so:
{1 0 1 0 0 1 0 0} ⊕ {1 1 1 0 1 0 1} = {0 1 0 0 1 1 1 1}
After the XOR operation with K1, the output is {0 1 0 0 1 1 1 1}
7. The 4-bit output of the S-Boxes goes to the permutation P4. Using
the P4 function, as shown in Table 5, the output of P4 is {1 1 1 1}
8. Next, we XOR the P4 output with the left half output of IP.
{0 1 0 1} ⊕ {1 1 1 1} = {1 0 1 0}
After the XOR operation with the left nibble output of the IP function,
the output is {1 0 1 0}
9. We combine both halves i.e. the right half output of the IP function
and the output of the last step. So, after combining {1 1 0 1} and
Page 11 of 12
{1 0 1 0}, the output of the first fK function will be
{1 0 1 0 1 1 0 1}.
10. Now, divide the output into two halves of 4 bits each and perform
the swap function (SW) to get the output of {1 1 0 1 1 0 1 0}
11. Using the output of the last step, we next perform the second round’s
fK function, as shown in Fig. 2, but this time we use the second
subkey K2.
The output of each step is as follows:
• After EP, the output is {0 1 0 1 0 1 0 1}
• After the XOR operation with K2, the output is {0 0 0 1 0 1 1 0}
• After doing the second S-Boxes S0 and S1, the output is {1 1 1 1}
• After P4, the output is {1 1 1 1}
• After the XOR operation with the left nibble input to the second fK
function, the output is {0 0 1 0}
• After doing the second fK function, the output is
{0 0 1 0 1 0 1 0}
Page 12 of 12