Previous | Table of Contents | Next |
These subkeys must all be calculated before encryption or decryption.
To encrypt a 1024-byte block X:
The functions fr(B,C,D) are similar to those used in MD5:
Decryption is the reverse process.
Generating the subkeys is a large task. Here is how the permutation array, P, could be generated from an 80-bit key, K.
The S-array of 2048 32-bit words could be generated in a similar manner, either from the same 80-bit key or from another key. The authors caution that these details should be viewed as motivational; there may very well be alternative schemes which are both more efficient and offer improved security [810].
Crab was proposed as a testbed of new ideas and not as a working algorithm. It uses many of the same techniques as MD5. Biham has argued that a very large block size makes an algorithm easier to cryptanalyze [160]. On the other hand, Crab may make efficient use of a very large key. In such a case, easier to cryptanalyze might not mean much.
This is a 64-bit block algorithm from Japan [769]. SXAL8 is the basic algorithm; MBAL is an expanded version with a variable block length. Since MBAL does some clever things internally, the authors claim that they can get adequate security with only a few rounds. With a block length of 1024 bytes, MBAL is about 70 times faster than DES. Unfortunately, [1174] shows that MBAL is susceptible to differential cryptanalysis, and [865] shows that it is susceptible to linear cryptanalysis.
RC5 is a block cipher with a variety of parameters: block size, key size, and number of rounds. It was invented by Ron Rivest and analyzed by RSA Laboratories [1324,1325].
There are three operations: XOR, addition, and rotations. Rotations are constant-time operations on most processors and variable rotations are a nonlinear function. These rotations, which depend on both the key and the data, are the interesting operation.
RC5 has a variable-length block, but this example will focus on a 64-bit data block. Encryption uses 2r + 2 key-dependent 32-bit wordsS0, S1, S2,..., S2r + 1where r is the number of rounds. Well generate those words later. To encrypt, first divide the plaintext block into two 32-bit words: A and B. (RC5 assumes a little-endian convention for packing bytes into words: The first byte goes into the low-order bit positions of register A, etc.) Then:
The output is in the registers A and B.
Decryption is just as easy. Divide the plaintext block into two words, A and B, and then:
The symbol >>> is a right circular shift. Of course, all addition and subtraction are mod 232.
Creating the array of keys is more complicated, but also straightforward. First, copy the bytes of the key into an array, L, of c 32-bit words, padding the final word with zeros if necessary. Then, initialize an array, S, using a linear congruential generator mod 232:
P = 0xb7e15163 and Q = 0x9e3779b9; these constants are based on the binary representation of e and phi.
Finally, mix L into S:
Previous | Table of Contents | Next |