How does des encryption work




















We will use a function f which operates over a data block of 32 bits and a key K n of 48 bits to produce a 32 bits block. For n from 1 to 16 we compute:. This is, in each iteration, we take the right 32 bits of the previous result and make them the left 32 bits of the current step. The right 32 bits in the current step are computed XORing the left 32 bits of the previous step with the result of the f function. This will result in a final block L 16 R To calculate f , we first expand each block R n-1 from 32 bits to 48 bits.

This is done by using a selection table that repeats some of the bits in R n This selection table E has a 32 bit input block R n-1 and a 48 bit output block. Let E be such that the 48 bits of its output, written as 8 blocks of 6 bits each, are obtained by selecting the bits in its inputs in order according to the following table:. In our example we can get E R 0 from R 0 as follows:. We have not yet finished calculating the function f. To this point we have expanded R n-1 from 32 bits to 48 bits, using the selection table, and XORed the result with the key K n.

We now have 48 bits, that will be used as addresses for the " S boxes ". An S box takes as input 6 bits and gives 4 bits output that will replace the 6 bits input. We have 8 groups of 6 bits B i , which will then be transformed in 8 groups of 4 bits, for a total of 32 bits.

The first and last bits of B represent in base 2 a number in the decimal range 0 to 3 binary 00 to Let that number be i. The 4 bits in the middle of B represent in base 2 a number in the decimal range 0 to 15 binary to Let that number be j. Look up in the table the number in the i -th row and j -th column.

You can find a testing procedure that will do the trick using the recurrence relation found on GitHub. There will always be room for the DES algorithm in cryptography because it was the foundation for subsequent encryption algorithms. If you understand the origins of data encryption, you will consequently have an easier time grasping the basics of current encryption methods. After having gone through and understanding what is DES, let us look into ways to improve our cybersecurity skills. Encryption is just one aspect of cybersecurity.

There is so much to learn in this vast field beginning, and the more you know, the more marketable a candidate you become when looking for a career in the field. One can never possess too much knowledge! To that end, Simplilearn offers an impressive variety of cybersecurity-related courses for your benefit. The program features a half-dozen courses that will impart the necessary foundational, intermediate and advanced security skills for you to become a cybersecurity expert.

This outstanding Certified Information Systems Security Professional CISSP course teaches you how to define a secure IT architecture, and subsequently, design, build and maintain a secure business environment using globally approved information security standards. Today, there is a growing shortage of cybersecurity professionals , so if you want a career that offers security and excellent compensation, visit Simplilearn and get started! Initial Permutation IP — As we have noted, the initial permutation IP happens only once and it happens before the first round.

It suggests how the transposition in IP should proceed, as shown in the figure. For example, it says that the IP replaces the first bit of the original plain text block with the 58th bit of the original plain text, the second bit with the 50th bit of the original plain text block, and so on. This is nothing but jugglery of bit positions of the original plain text block.

As we have noted after IP is done, the resulting bit permuted text block is divided into two half blocks. Each half-block consists of 32 bits, and each of the 16 rounds, in turn, consists of the broad level steps outlined in the figure. Step Key transformation — We have noted initial bit key is transformed into a bit key by discarding every 8th bit of the initial key.

Thus, for each a bit key is available. From this bit key, a different bit Sub Key is generated during each round using a process called key transformation. For this, the bit key is divided into two halves, each of 28 bits. These halves are circularly shifted left by one or two positions, depending on the round. For example, if the round numbers 1, 2, 9, or 16 the shift is done by only position for other rounds, the circular shift is done by two positions.

The number of key bits shifted per round is shown in the figure. After an appropriate shift, 48 of the 56 bits are selected.

For instance, after the shift, bit number 14 moves on the first position, bit number 17 moves on the second position, and so on. If we observe the table carefully, we will realize that it contains only bit positions. Bit number 18 is discarded we will not find it in the table , like 7 others, to reduce a bit key to a bit key.

Since the key transformation process involves permutation as well as a selection of a bit subset of the original bit key it is called Compression Permutation.

Because of this compression permutation technique, a different subset of key bits is used in each round. That makes DES not easy to crack.

During the expansion permutation, the RPT is expanded from 32 bits to 48 bits. Bits are permuted as well hence called expansion permutation. This happens as the bit RPT is divided into 8 blocks, with each block consisting of 4 bits.

Then, each 4-bit block of the previous step is then expanded to a corresponding 6-bit block, i. This process results in expansion as well as a permutation of the input bit while creating output. The key transformation process compresses the bit key to 48 bits.

Then the expansion permutation process expands the bit RPT to bits. Skip to content. Change Language. Related Articles.

Computer Network Fundamentals.



0コメント

  • 1000 / 1000