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.
To repeat, each of the functions S1, S2, Let that number be i. The middle 4 bits 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. It is a number in the range 0 to 15 and is uniquely represented by a 4 bit block. That block is the output S 1 B of S 1 for the input B.
This is row 1. The middle four bits are "". This is the binary equivalent of decimal 13, so the column is column number In row 1, column 13 appears 5.
This determines the output; 5 is binary , so that the output is The tables defining the functions S 1 , S 8 B 8 The permutation P is defined in the following table. P yields a bit output from a bit input by permuting the bits of the input block. At the end of the sixteenth round we have the blocks L 16 and R We then reverse the order of the two blocks into the bit block R 16 L 16 and apply a final permutation IP -1 as defined by the following table: IP -1 40 8 48 16 56 24 64 32 39 7 47 15 55 23 63 31 38 6 46 14 54 22 62 30 37 5 45 13 53 21 61 29 36 4 44 12 52 20 60 28 35 3 43 11 51 19 59 27 34 2 42 10 50 18 58 26 33 1 41 9 49 17 57 25 That is, the output of the algorithm has bit 40 of the preoutput block as its first bit, bit 8 as its second bit, and so on, until bit 25 of the preoutput block is the last bit of the output.
Decryption is simply the inverse of encryption, follwing the same steps as above, but reversing the order in which the subkeys are applied. Hellman wrote: "Whit Diffie and I have become concerned that the proposed data encryption standard, while probably secure against commercial assault, may be extremely vulnerable to attack by an intelligence organization" letter to NBS, October 22, Diffie and Hellman then outlined a "brute force" attack on DES.
Fast forward to On July 17, , they announced they had cracked a bit key in 56 hours. The computer, called Deep Crack, uses 27 boards each containing 64 chips, and is capable of testing 90 billion keys a second. Despite this, as recently as June 8, , Robert Litt, principal associate deputy attorney general at the Department of Justice, denied it was possible for the FBI to crack DES: "Let me put the technical problem in context: It took 14, Pentium computers working for four months to decrypt a single message.
Given a plaintext message, the first key is used to DES- encrypt the message. The second key is used to DES-decrypt the encrypted message. Since the second key is not the right key, this decryption just scrambles the data further. The twice-scrambled message is then encrypted again with the first key to yield the final ciphertext.
This three-step procedure is called triple-DES. Triple-DES can also be done with three separate keys instead of only two. Department of Commerce, Washington D.
January Carl H. Meyer and Stephen M. Davies and W. Miles E. Smid and Dennis K. Simmons, ed. Douglas R. Alfred J. Menezes, Paul C. 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. Improve Article.
Like Article. String hextoBin String input. String binToHex String input. String permutation int [] sequence, String input. String xor String a, String b. String leftCircularShift String input, int numBits. String[] getKeys String key. String sBox String input. String round String input, String key, int num. String encrypt String plainText, String key. String decrypt String plainText, String key. Hexadecimal to binary conversion.
0コメント