0% found this document useful (0 votes)
34 views

PR6 - Data Encryption Standard (DES) Algorithm - OK

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

PR6 - Data Encryption Standard (DES) Algorithm - OK

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Sipna College of Engineering & Technology, Amravati.

Department of Electronics and Telecommunication Engineering

Department: - Electronics & Telecommunication Class: - IV yr


Subject: - CRYPTOGRAPHY AND NETWORK SECURITY Sem: - VII
Manual

AIM: Analysis of Data Encryption Standard (DES) algorithm.

S/W Required: Turbo C/C++

Theory : Feistel networks were first seen commercially in IBM’s Lucifer cipher designed by Horst Fiestel
and Don Coppersmith in 1973. Feistel networks gained respectability when the U.S federal government
adopted the DES (a cipher based on Lucifer.with changes made by the NSA) in 1976.many modern
symmetric block cipher are based on Feistel Networks.
In cryptography a Feistel structure cipher is a symmetric structure used in the construction of block
ciphers named after the german-born physicist and cryptographer hors feistel. a large proportion of block
ciphers use the scheme including the US Data encryption standard.
It is a design model from which many different block ciphers are derived.DES is just one example of
a feistel cipher. A cryptographic algorithm uses some algorithm for both encryption and decryption.

Encryption Process : The encryption process uses the feistel structure consisting of multiple rounds of
processing of the plaintext, each round consisting of a “substitution” step followed by a permutation step.

Feistel Structure is shown in the following illustration:


● The input block to each round is divided into two halves that can be denoted as L and R for the left
half and the right half.
● In each round, the right half of the block . R goes through unchanged but the left half L.goes through
on operation that depends on R and the encryption key,first we apply an encrypting function ‘f’ that
takes two input the key K and R encryption key. First, we apply an output f(R-K).Then we XOR the
output of the mathematical function with L.
● In the real implementation of the feistel cipher, such as DES, instead of using the whole encryption
key during each round , a-round dependent key (a-subkey) is derived from the encryption key. This
means that each round uses a different key although all these sub keys are related to the original key.
● Above substitution and permutation steps from a ‘round’. The numbers of rounds are specified by the
algorithm design.
● Once the last round is completed then the two subblocks ‘R’ and ‘L’ are concatenated in this order to
form the ciphertext block.

Decryption Process:
The process of decryption in feistel cipher is almost similar. Instead starting with a block of plaintext,
the ciphertext block is fed into the start of the feistel structure and then the process thereafter is exactly the
same as described in the given illustration.
The process is said to be almost similar. Instead of starting with a block of plaintext,the and not
exactly the same. In the case of decryption,the only difference is that the subkeys used in encryption are
used in reverse order.
The final swapping of ‘L’ and ‘R’ in the last steps of the feistel cipher is essential. If these are not
swapped then the resulting ciphertext could not be decrypted using the same algorithm.

Number of round:
E &TC/SEM-VII/C&NS/PR06 Page 1
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering
The number of rounds in a feistel cipher depends on desired security from the system. More rounds
provide a more secure system. But at the same time, more rounds mean the inefficient slow encryption and
decryption processes. Number of rounds in the systems that depend upon efficiency security trade off.

Feistel cipher Algorithm:-


● Create a list of all the plain-text characters.
● convert the plaintext is Ascii and then *-bit binary format
● divide the binary plain text string into two halves left half (L1) and right half(R1)
● Generate random binary keys (K1 and K2) of length equal to the half of the length of the plain-text
for the two rounds.
feistel rounds of encryption:
● a.generate function F1 using R1 and K1 is as follows. F1=XOR(R1,K1)
● b.Now the new left half (L2) and right half(R2) after round 1 are as follows: R2=Xor(f1,L1),L2=R1
second Round of encryption:-
● a.generate function F2 using R2 and K2 as follows. F2=xor(R2,K2)
● b.Now the new lalf half (L3) and right half(R3) after round 2 are as follows.R3=xor(F2,L2),L3=R2
● concatenation of R3 and L3 is the cipher text.
● Some algorithm is used for decryption to retrieve the plaintext from the ciphertext.
Data Encryption Standard (DES) Algorithm:
The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute
of Standards and Technology (NIST).
DES is an implementation of a Feistel Cipher. It uses a 16 round Feistel structure. The block
size is 64-bit. Though, key length is 64-bit, DES has an effective key length
of 56 bits, since 8 of the 64 bits of the key are not used by the encryption
algorithm (function as check bits only). General Structure of DES is depicted
in the following illustration −

E &TC/SEM-VII/C&NS/PR06 Page 2
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

Since DES is based on the Feistel Cipher, all that is required to specify DES
is −

● Round function
● Key schedule
● Any additional processing − Initial and final permutation

Initial and Final Permutation


The initial and final permutations are straight Permutation boxes (P-boxes)
that are inverses of each other. They have no cryptography significance in
DES. The initial and final permutations are shown as follows −

E &TC/SEM-VII/C&NS/PR06 Page 3
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

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.

E &TC/SEM-VII/C&NS/PR06 Page 4
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

● Expansion Permutation Box − Since right input is 32-bit and round key is a
48-bit, we first need to expand right input to 48 bits. Permutation logic
is graphically depicted in the following illustration −

● The graphically depicted permutation logic is generally described as


table in DES specification illustrated as shown −

E &TC/SEM-VII/C&NS/PR06 Page 5
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

● XOR (Whitener). − After the expansion permutation, DES does XOR


operation on the expanded right section and the round key. The round
key is used only in this operation.
● Substitution Boxes. − The S-boxes carry out the real mixing (confusion).
DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output. Refer
the following illustration −

● The S-box rule is illustrated below −

E &TC/SEM-VII/C&NS/PR06 Page 6
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

● There are a total of eight S-box tables. The output of all eight s-boxes is then combined in to 32 bit
section.
● Straight Permutation − The 32 bit output of S-boxes is then subjected to
the straight permutation with rule shown in the following illustration:

Key Generation
The round-key generator creates sixteen 48-bit keys out of a 56-bit cipher
key. The process of key generation is depicted in the following illustration

E &TC/SEM-VII/C&NS/PR06 Page 7
Sipna College of Engineering & Technology, Amravati.
Department of Electronics and Telecommunication Engineering

The logic for Parity drop, shifting, and Compression P-box is given in the DES description.

DES Analysis
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 ciphertext.
● Completeness − Each bit of ciphertext depends on many bits of plaintext.
During the last few years, cryptanalysis have found some weaknesses in DES when key selected are weak
keys. These keys shall be avoided.

Conclusion: 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.

E &TC/SEM-VII/C&NS/PR06 Page 8

You might also like