Skip to main content

Feistal cipher - An Introduction

Feistal ciphers are kind of a design model for block ciphers. It works be repeatedly calculating cipher-text by applying round function. The scheme is used by many block ciphers among which DES is popular one.

Feistal cipher works by iterating over text that needs to be encrypted, and divides the test into two halves. One of the half of that text is given to the round function f which applies a sub-key to it. The other part of the text is stored while the round function is being processed. After round function is completed both the halves are XORed and are swapped. This is done iteratively until the last round in which the swapping is not done.

The decryption process is almost identical to the encryption process with the only difference being the sub-key process is reversed. That means the cipher-text that we got from encryption is processed same as before but with last sub-key applied first, second last applied second and so on.  This is considered to be an advantage of Feistal cipher as the process of encryption and decryption remains structurally the same.

Following is a step-by-step representation of the algorithm:
  •   For each round:

a.       Divide the input into two halves
b.      Apply round function to right half
c.       Exclusive OR left half with right half
d.      Swap the left and right halves with each other so that left half becomes right and right becomes left

Advantages of Feistal cipher:

  •  Simplicity
  • Almost identical process of encryption and decryption

Disadvantages of Feistal cipher:
  •  Many rounds needed to increase security which results in more computational effort required


Popular posts from this blog

Simplified DES Example: Step by Step

Simplified DES or S-DES is an encryption algorithm which follows feistal cipher structure. In this tutorial, we will take an example of S-DES. Let’s get started.
We need plaintext and key to start with. For this example, let’s consider 01001000 be the 8-bit plaintext and 1110001110 be the 10-bit key.
Key Generation: The first step in S-DES process is key generation. From the 10-bit key that we give as input, it generates 2 1-bit keys called k1 and k2. Following is the process:
1.Pass the 10-bit input key into the P10 table:
3 5 2 7 4 10 1 9 8 6
This gives: 1011001110. (For example, take the 3rd bit from input key which is 1. It becomes the first bit for our new key) 2.Divide the new key into two halves and left shift each half’s bits by one. So by dividing we get 10110 and 01110. We perform left shift so the left most bit becomes the right most bit and remaining each bit is shifted to its left. This gives: 01101 and 11100. Or you can think of it as the left most bit is taken to the righ…

HCI: Research Topic Ideas

I was reading an interesting research paper (Personal Tasks at Work: An Exploration, ACM 2017) in which the writer talks about the personal tasks that we have to do at work such as scheduling appointments, paying electricity and other bills, etc. The problem at first seems to be a social science one which has nothing to do with computer science but when looked closely the problem highlights an important aspect of our daily life that has to be sorted out using technology. The paper basically discusses those tasks and categorizes them based on frequency of occurring based on a survey. So, for example out of the 93 people who participated in the survey presented in the paper, 51% reported a need for scheduling an appointment while 33% have to coordinate their personal activities. Some will say (specially management science guys) that few of the problems can be solved by proper time management but remember that the purpose of technology is to make life easier for humans. Also, not every …

Cyber Security Awareness: for Employees

The insecurity of data and information that exists on the internet and computer networks has been a major issue for a number of businesses, organizations, and institutions; which don't invest on network and internet security training and awareness programs for their employees. Ideally, most employers rush to invest in new and expensive technologies in the name of protecting their companies online, not knowing that in most cases, the safety of a company online largely depends on the cyber security awareness of the employees. Consequently, your company's protection online starts by ensuring that your employees are well equipped with basic network safety practices and policies, so that they can assist in keeping your computers and networks safe from cyber-attacks that come in form of a virus, malware, and cyber-crime.

Different Ways to Create Cyber Security Awareness to Your Employees:
The most basic network security measure that your employees need to use is a pass…