And a 64bit Key, that will be used to both encrypt and decrypt:. Resulting in a Ciphertext:. In general, a bit key is used as input for DES, of which only bits are used. The first step is to permute the key using the PC-1 table above. This is, the first bit of our bit permutation key will be the 57th bit of our original key, and so on.
For example, our input key: Would become:. Next we divide the key in two parts, left C 0 and right D 0. With C 0 and D 0 defined, we now create sixteen blocks. Each pair of blocks C n and D n is formed from the previous pair C n-1 and D n-1 , respectively, for n between 1 and 16, using a left shift scheme as follows:.
To do a left shift we move each bit one place to the left, except for the first bit which goes to the end of the block. We will now form the final 16 keys by applying another permutation PC-2 table to each of the the 16 C n D n keys we obtained from the previous step. The first thing we need to do is to apply an initial permutation IP to each block of 64 bits, according to the table:. For example, the first bit block from our message Would become:.
We will now iterate through 16 cycles, each using one of the 16 bit keys we computed previously. 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. 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. Physical layer.
Data Link layer. Network layer. Transport layer. Application layer. Network Security. Computer Network Quizes. Table of Contents. Save Article. 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!
Social Engineering - Exploiting the Mind Article. View Course. Recommended Programs Cyber Security Expert. Next Article. The most important is that it allows single bits of input data to affect the output of two other bits, causing an avalanche effect. It also makes the right half bits, so that it is the same size as the subkey for the next step.
The other effect of the expansion permutation is that it makes the output longer than the input. This allows it to be compressed in the substitution operation. The bits are rearranged according to the following table. Some of the individual bits are in the table twice, which is how the block expanded from 32 to 48 bits:.
Since the first cell says 32, we take our right block and select the number from the 32nd position, just like we did in the other examples of permutation listed above:. We then take the numbers from the first position, the second position and so on, right up until we get to the bottom right corner of the block.
Since there is a 1 in this cell, the last digit will also be the number that appears in the first position of our block. The block is modified by the subkey using the XOR cipher. The XOR cipher is an addition cipher that follows a simple process, especially when compared to the other elements we have already discussed. Each digit would be added to the one below it.
According to the three rules shown above, this gives a result of:. To complete the key mixing step, we take the right side of our block that we just expanded to 48 bits, and the first round key. We then perform the XOR addition:. Substitution adds confusion to data.
DES uses eight separate tables or S-boxes, a different one for each 6 bits of data. The following table shows the eight S-boxes of DES:. The eight separate S-boxes are used to translate each 6-bit input into a 4-bit output. The first step in the process is to take the digits at the beginning and end of a 6-bit segment, then convert that binary value to decimal. Since the first number and last number are both 1 , this gives us a value of We then convert 11 from binary to decimal, which gives us 3.
These are just equivalent values, written in different ways. Think of it as converting computer language to human language.
You can check out the conversion for yourself with an online calculator if you want. Our first number, 3 , tells us to look in the third row, while our second number, 13 tells us to look in the 13th column.
The value in the third row of the 13th column is 0. Now that we have looked up our number in the table, we convert it back to four digit binary. Zero is normally written as 0 in binary, but is the same, and this is the format that is most suitable for our purposes.
Following this process, the S-box converts our first 6-bit section of data into a different 4-bit value It seems convoluted, but this technique helps to further obscure the relationship between the ciphertext and the plaintext that it is linked to. The next 6-bit section of data then goes through the same process, but instead it uses the S2 box shown above. The third section uses the S3 table and so on, up until the final section undergoes the substitution through the S8 table. The last stage of the F function is another permutation, using the following table:.
Now that the permutation has been completed, we have finished with the four steps of the F function in this round. In mathematical notation, this value is known as f R 0, K 1. Remember how we split the block in half just before we began the steps of the F function? We set aside the left side of the block L0 , while the right side underwent each of these processes. We take the right side that we have just processed f R 0, K 1 and add it to the old left side L 0 using the XOR cipher.
This gives us R 1 , the result of our first round:. L 0 : XOR result R 1 : The data goes though the four steps of the F function, followed by the XOR, another 15 times, for a total of 16 rounds. In the second round, we take the original, untouched version of the right side of the block R0 and make it the new left side L1.
Meanwhile, we take the result of our first round and send it through the F function. Everything happens the same as last time, however this time the subkey for round two is used instead.
This gives us the result of the second round, R This step can seem a bit confusing, but under the Feistel scheme, the old right side becomes the new left, while the result of the operation becomes the new right side. The following diagram gives you a visual representation of what is happening.
0コメント