REDOC is a symmetric block cryptographic algorithm developed by in 1990 for Cryptech and named REDOC II. All operations - substitutions , permutations, XOR are performed with bytes, which allows it to be effectively implemented programmatically. The algorithm uses key and source plaintext dependent sets of tables ( S-blocks ), using changing table functions . The algorithm distinguishes the use of masks , i.e. numbers obtained from the key table. Masks are used to select tables of a particular function for a particular round. In this case, both the mask value and the data value [1] are used .
| REDOC II | |
|---|---|
| Creator | Michael wood |
| Created by | 1990 g. |
| Published | 1990 g. |
| Key size | 70 to 17 920 bits, effective: 70 bits |
| Block size | 70 bit |
| Number of rounds | ten |
| Type of | own |
| REDOC III | |
|---|---|
| Creator | Michael wood |
| Key size | Variable, up to 2560 bytes (20,480 bits) |
| Block size | 80 bit |
| Number of rounds | ten |
| Type of | own |
Algorithm
REDOC-II is a ten-round cryptosystem (but it has been suggested that the 1- or two-round version is safe) [2] . Each round in the original version of REDOC II provides a set of manipulations with a 10 byte block. Seven bits from each byte are used for data values, and the eighth bit is a parity bit.
However, since only the first 7 bits of each byte are used for encryption , the alphabetical space for each byte is from 0 to 127. And all operations are performed modulo 128 [3] .
The key length in the original version of REDOC II is 10 bytes. The effective key size is 70 bits. It should be clarified that REDOC II can support key lengths in the range of 70 to 17 920 bits [3] .
Each round consists of six phases:
- Variable permutation phase ,
- The first phase of the XOR variable key ,
- The second phase of the XOR variable key ,
- Variable enclave phase ,
- The first phase of variable substitution ,
- The second phase of variable substitution .
During each phase, data is processed using tables [4] .
Table Views
1) 16 predefined lookup tables that are used in variable lookup phases. (Fixed)
| Example lookup table | |||||||
|---|---|---|---|---|---|---|---|
| Original | = | Sub 0 | Sub 1 | Sub 4 | Sub 10 | Sub 14 | Sub15 |
| Value | |||||||
| 0 | = | 90 | 47 | 25 | 66 | 73 | 0 |
| one | = | 46 | 89 | 51 | 13 | 36 | 52 |
| 2 | = | 66 | 87 | 103 | 31 | 107 | 44 |
| 3 | = | 21 | 20 | 116 | 7 | 43 | 83 |
| ... | = | ||||||
| 126 | = | 24 | 14 | 105 | 114 | 77 | 6 |
| 127 | = | 122 | 62 | eleven | 63 | 49 | 79 |
2) 128 predefined permutation tables used by the variable permutation phases. (Fixed)
| Example permutation table | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Original | = | one | 2 | 3 | four | five | 6 | 7 | eight | 9 | ten |
| Relocation 1 | = | one | 6 | 7 | 9 | ten | 2 | five | eight | 3 | four |
| Relocation 2 | = | ten | four | eight | 3 | one | 7 | 2 | 9 | five | 6 |
| Relocation 3 | = | one | 6 | four | 9 | eight | five | ten | 2 | 3 | 7 |
| ... | = | ||||||||||
| Relocation 86 | = | 9 | 7 | 2 | 6 | five | eight | 3 | ten | one | four |
| Relocation 87 | = | five | 3 | eight | one | 9 | 7 | ten | 2 | four | 6 |
| ... | = | ||||||||||
| Relocation 126 | = | 9 | eight | 3 | 7 | one | ten | five | 6 | 2 | four |
| Relocation 127 | = | 7 | eight | five | ten | 9 | 3 | four | 2 | one | 6 |
3) 128 predefined enclave tables used by the phases of the variable enclave. (Fixed)
| An enclave table example | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| a | b | c | d | ||||||||||||
| Entry 0: | five | 2 | 3 | 3 | five | 2 | five | four | 2 | five | four | 2 | |||
| four | 3 | one | one | 3 | five | four | 3 | one | 2 | five | one | ||||
| 2 | five | four | 2 | four | one | one | five | 3 | one | 3 | five | ||||
| one | four | five | four | one | four | 3 | 2 | five | 3 | 2 | four | ||||
| 3 | one | 2 | four | 2 | 3 | 2 | one | four | four | one | 3 | ||||
| Entry 1: | 3 | one | 2 | 3 | 2 | five | four | 2 | one | four | 2 | 3 | |||
| four | 3 | one | five | one | four | 3 | four | five | five | 3 | one | ||||
| 2 | five | four | 2 | four | 3 | five | one | four | 2 | one | five | ||||
| five | 2 | 3 | four | 3 | one | one | 3 | 2 | 3 | five | four | ||||
| one | four | five | one | five | 2 | 2 | five | 3 | one | four | 2 | ||||
| ... | |||||||||||||||
| Entry 31: | 2 | four | one | 2 | four | 3 | one | five | 3 | four | one | five | |||
| 3 | five | four | four | one | 2 | 2 | four | one | 3 | five | 2 | ||||
| five | one | 3 | 3 | five | four | four | 3 | 2 | one | four | 3 | ||||
| one | 2 | five | five | 2 | one | five | 2 | four | 2 | 3 | four | ||||
| four | 3 | 2 | one | 3 | five | 3 | one | five | five | 2 | one | ||||
4) In addition, 128 ten-byte key tables and nine mask tables are calculated for each key using the key processing algorithm. (Computable, created when encryption is initialized) [3] [4]
| Key table example | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Key 0 | = | 0 | 34 | five | 63 | 9 | 73 | 74 | 107 | 109 | 33 |
| Key 1 | = | ten | 62 | 48 | 85 | 32 | 101 | eight | 0 | 63 | 56 |
| Key 2 | = | 26 | 59 | 75 | 97 | 33 | 80 | eight | 6 | 73 | 26 |
| ... | = | ||||||||||
| Key 107 | = | 36 | 123 | 45 | ten | 55 | 59 | 109 | 45 | 98 | 24 |
| ... | = | ||||||||||
| Key 118 | = | 95 | 25 | 48 | 47 | one | 20 | 117 | 55 | nineteen | 67 |
| ... | = | ||||||||||
| Key 126 | = | 62 | 110 | 70 | 27 | 124 | 31 | 119 | 97 | 9 | 2 |
| Key 127 | = | eleven | 54 | 25 | 87 | 107 | 73 | four | 118 | 62 | 34 |
| Example mask table | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Mask 1 | = | 48 | 2 | 121 | 18 | 60 | 105 | 33 | 50 | eleven | 60 |
| Mask 2 | = | 26 | 78 | 24 | 72 | 69 | 13 | 77 | 43 | 9 | 99 |
| Mask 3 | = | 64 | 113 | 72 | 61 | 37 | 13 | 49 | 71 | 24 | 60 |
| Mask 4 | = | 104 | 62 | 69 | 87 | 18 | 31 | 102 | 101 | 32 | 125 |
Description of phases
Variable permutation phases
In each phase of the permutation variable, all ten bytes of data are added (modulo 128), and the result is subjected to XOR operation with a specific byte from the mask table. The resulting value is the number of the permutation table. All data bytes are replaced by the selected permutation [4] .
XOR Variable Key Phases
A byte is selected from the data and the corresponding byte from the mask table between which the XOR operation is performed. The resulting value is the key table number. (It is worth recalling that 7 bits from each byte are used for encryption. Therefore, the obtained key table number lies in the range from 0 to 127). All data bytes, except the selected one, undergo XOR operations with the corresponding bytes from the key table with the received number.
Such an operation is performed for all bytes from the data. [four]
Variable Substitution Phases
A byte is selected from the data and the corresponding byte from the mask table between which the XOR operation is performed. The resulting value, taken modulo 16 is the number of the lookup table. All bytes, except the selected one, are replaced by the values from the lookup table with the received number.
Such an operation is performed for all bytes from the data [4] .
Variable enclave phases
The predefined enclave table has five rows and 3 columns. Each entry contains a number from 1 to 5. There are 2 properties that the enclave table must satisfy:
- each column should be a permutation of numbers 1–5;
- each row should contain 3 different values [4] .
This is due to the fact that the table is processed line by line and as follows: Each number in the enclave table means a byte position. Three bytes that are specified using one row of the table are summed (modulo 128). The byte specified in the first column is replaced by the received amount. [3]
Each phase of the variable enclave uses 4 enclave tables as follows:
- Divides the blocks into two sub-blocks of 5 bytes each. Sub-blocks are called the left and right halves.
- XOR between two bytes from the left half and two bytes from the mask table. The resulting 2 bytes are pointers to two enclave tables.
- Processing the left half of the first enclave table specified using the received byte.
- Processing the received left half with the second enclave table specified using the received byte.
- XOR between the left and right halves.
- XOR between two bytes in the received right half and two bytes from the mask table. The resulting two bytes are pointers to two enclave tables.
- Processing the received right half with the first enclave table indicated by the received byte.
- Processing the received right half with the second enclave table indicated by the received byte.
- XOR right and left halves.
- Concatenation of the left half with the obtained value of the previous step [5] .
Reliability
Brute force is considered the most effective way to open the key; 2,160 operations will be required to achieve the goal. Almost the only effective cryptanalysis was opening one of the rounds of the algorithm by Thomas Kuzik, but it was not possible to extend the opening to further rounds. With the help of 2300 open texts , cryptanalysis of one of the rounds by Shamir and Biham was carried out, after 4 rounds 3 mask values were obtained, however, this did not bring any success and at the moment the algorithm is considered cryptographic [1] .
REDOC III
There is also a significantly simplified version of the algorithm - REDOC III , created by Michael Wood. An 80-bit block is used, the key length is variable, it can reach 20,480 bits. Permutations and substitutions are excluded, all operations on the block and key are based only on the use of XOR, due to which the encryption speed is significantly increased to the detriment of resistance to differential cryptanalysis . The algorithm is based on 256 10-byte keys generated on the basis of a private key, and two 10-byte mask blocks obtained on the basis of XOR 128 10-byte keys. For successful recovery of both masks of the REDOC III algorithm, 223 plaintexts are required. This algorithm is simple and fast. On the 33 megahertz processor 80386, it encrypts data at a speed of 2.75 Mbps [1] . The REDOC II cryptographic system is capable of encrypting 800 kbps at a clock frequency of 20 MHz. [6]
The REDOC II algorithm and its simplified version are patented in the USA [1] .
Notes
- ↑ 1 2 3 4 Schneier, B., 2002 , Section 13.5.
- ↑ MJB Robshaw, 1995 , p. 36.
- ↑ 1 2 3 4 Cusick, Wood, 1991 , p. 547.
- ↑ 1 2 3 4 5 6 Biham, Shamir, 1992 , p. nineteen.
- ↑ Biham, Shamir, 1992 , p. 20.
- ↑ Cusick, Wood, 1991 , p. 546.
Literature
- Schneier, B. Applied Cryptography. Protocols, algorithms, C source code = Applied Cryptography. Protocols, Algorithms and Source Code in C .. - M .: Triumph, 2002. - 816 p. - ISBN 5-89392-055-4 .
- Cusick T. W. , Wood M. C. The Redoc II Cryptosystem // Advances in Cryptology - CRYPTO '90 : 10th Annual International Cryptology Conference, Santa Barbara, California, USA, August 11-15, 1990, Proceedings / A. J. Menezes , S. A. Vanstone - Springer Berlin Heidelberg , 1991. - P. 546-563. - ( Lecture Notes in Computer Science ; Vol. 537) - ISBN 978-3-540-54508-8 - ISSN 0302-9743 - doi: 10.1007 / 3-540-38424-3_38
- Biham E. , Shamir A. Differential Cryptanalysis of Snefru, Khafre, REDOC-II, LOKI and Lucifer // Advances in Cryptology - CRYPTO'91 : 11th Annual International Cryptology Conference, Santa Barbara, California, USA, 1991, Proceedings / J. Feigenbaum - Springer Science + Business Media , 1992. - P. 156–171. - 484 p. - ( Lecture Notes in Computer Science ; Vol. 576) - ISBN 978-3-540-55188-1 - ISSN 0302-9743 - doi: 10.1007 / 3-540-46766-1
- MJB Robshaw. Block Ciphers. RSA Laboratories Technical Report TR-601 // 2nd ed. - 1995. - August 1.
- Ken Shirriff, Differential Cryptanalysis of REDOC-III, (PS)