SQUARE is a symmetric block cryptographic algorithm in cryptography developed in 1997 by Vincent Rayman , Joan Dimen and Lars Knudsen .
| Square | |
|---|---|
| Creator | Vincent Rayman , Yoan Dimen Lars Knudsen |
| Created by | 1997 |
| Published | 1997 |
| Key size | 128 bit |
| Block size | 128 bit |
| Number of rounds | 8 |
| Type of | Wildcard network |
Considered the forerunner of the AES algorithm. The structure of the algorithm was chosen by the authors for the possibility of obtaining an effective implementation on a wide range of processors, as well as for cryptographic resistance to differential and linear cryptanalysis.
Content
- 1 Description of the algorithm
- 1.1 Transformations in the encryption round
- 1.1.1 Linear Transformation
- 1.1.2 Nonlinear Transformation
- 1.1.3 Byte Shift
- 1.1.4 Addition with a round key
- 1.2 Procedure for obtaining keys
- 1.1 Transformations in the encryption round
- 2 Encryption
- 3 Decryption
- 4 Security
- 4.1 The study of cryptographic stability by the creators of the algorithm
- 4.1.1 Description of the Square attack
- 4.1 The study of cryptographic stability by the creators of the algorithm
- 5 Cipher Features
- 6 See also
- 7 notes
- 8 Literature
- 9 References
Algorithm Description
The SQUARE algorithm uses a 128-bit key; data is encrypted with 128-bit blocks; however, the modular approach to building a cipher makes it easy to expand the key length and the length of the data block to large sizes. One round of SQUARE consists of four separate transformations. Data is represented by a 4x4 byte square. The main components of this cipher are five different reversible transformations that affect an array of size bytes . [one]
Transformations in the Encryption Round
Linear conversion 
Linear conversion affects every row in the data square. It is represented by the formula where:
- Is the value of the byte in th row and -th column in the squared data;
- - new byte value in a square;
- - set of constants;
- multiplications are performed in the Galois field ;
Important that the field has characteristic 2, that is, the addition operation corresponds to bitwise . Each -th row squared can be represented as a polynomial . Then, determining the coefficients like a polynomial transformation can be represented as a product of polynomials: , here - the new value of the row of the square, presented in the form of a polynomial, and . Inverse transformation matches polynomial defined by the formula . [2]
Nonlinear transformation
This conversion is a table replacement . Table for replacement:
| B1 | CE | C3 | 95 | 5A | AD | E7 | 02 | 4D | 44 | Fb | 91 | 0C | 87 | A1 | fifty |
| CB | 67 | 54 | DD | 46 | 8F | E1 | 4E | F0 | Fd | FC | EB | F9 | C4 | 1A | 6E |
| 5E | F5 | CC | 8D | 1C | 56 | 43 | FE | 07 | 61 | F8 | 75 | 59 | Ff | 03 | 22 |
| 8A | D1 | 13 | Ee | 88 | 00 | 0E | 34 | fifteen | 80 | 94 | E3 | ED | B5 | 53 | 23 |
| 4B | 47 | 17 | A7 | 90 | 35 | Ab | D8 | B8 | Df | 4F | 57 | 9A | 92 | DB | 1B |
| 3C | C8 | 99 | 04 | 8E | E0 | D7 | 7D | 85 | BB | 40 | 2C | 3A | 45 | F1 | 42 |
| 65 | twenty | 41 | eighteen | 72 | 25 | 93 | 70 | 36 | 05 | F2 | 0B | A3 | 79 | EC | 08 |
| 27 | 31 | 32 | B6 | 7C | B0 | 0A | 73 | 5B | 7B | B7 | 81 | D2 | 0D | 6A | 26 |
| 9E | 58 | 9C | 83 | 74 | B3 | AC | thirty | 7A | 69 | 77 | 0F | Ae | 21 | DE | D0 |
| 2E | 97 | 10 | A4 | 98 | A8 | D4 | 68 | 2D | 62 | 29th | 6D | 16 | 49 | 76 | C7 |
| E8 | C1 | 96 | 37 | E5 | CA | F4 | E9 | 63 | 12 | C2 | A6 | fourteen | BC | D3 | 28 |
| AF | 2F | E6 | 24 | 52 | C6 | A0 | 09 | Bd | 8C | CF | 5D | eleven | 5F | 01 | C5 |
| 9F | 3D | A2 | 9B | C9 | 3B | BE | 51 | 19 | 1F | 3F | 5C | B2 | Ef | 4A | CD |
| Bf | BA | 6F | 64 | D9 | F3 | 3E | B4 | AA | DC | D5 | 06 | C0 | 7E | F6 | 66 |
| 6C | 84 | 71 | 38 | B9 | 1D | 7F | 9D | 48 | 8B | 2A | DA | A5 | 33 | 82 | 39 |
| D6 | 78 | 86 | FA | E4 | 2B | A9 | 1E | 89 | 60 | 6B | EA | 55 | 4C | F7 | E2 |
that is, 0 will be replaced by B1, 1 by CE, and so on. [one]
Byte swap
Byte permutation transposes the byte square, i.e. .
Round Key Addition
This operation is a bitwise addition of 128 bits of data with a round key, where:
- and - value of 128 data bits before and after conversion;
- - round key . [2]
The procedure for obtaining keys
For encryption, you need to get 8 128-bit round keys, as well as a key for the preliminary round from the encryption key of the algorithm.
The procedure for obtaining the key is described by the conversion running on a key represented, like a data block, a 4x4 byte square. Conversion described by the following operations:
- ;
- ;
- ;
- ;
Where:
- - key string byte square round;
- Is a constant for round calculated by the formula , ;
- {\ displaystyle {rotl ()}} - operation of cyclic shift of a byte string by one byte to the left: ;
The source key of the encryption algorithm is used as the key for the preliminary round. [2]
Encryption
Denote one round of encryption as . Also, eight rounds of conversion are preceded by key addition and : . [2]
Decryption
The decryption algorithm is similar to the encryption algorithm, but instead of transformations and reverse conversions are used and , wherein Is a reverse table replacement, and Is a multiplication of a line by a polynomial such that , also in the preliminary round the transformation is used instead . The encryption formula shows that
- ,
Where . As , and, moreover, since we get . Now one round for decryption can be defined as , and the full formula for decryption is written as:
- . [2]
Security
The study of cryptographic stability by the creators of the algorithm
The algorithm is highly resistant to linear and differential cryptanalysis thanks to transformations and which reduce the maximum probability of the appearance of differential traces and the maximum correlation of linear traces in 4 rounds of transformations. The first SQUARE cryptanalysis was carried out by its authors using integrated cryptanalysis , which later became known as Square attack. [2]
Square Attack Description
First of all, we’ll introduce some definitions,
Definition 1: Let -set - a set of 256 16-byte states, each of which differs from the others in some bytes, which we will call active, and coincide in some bytes, which we will call passive. Further, Is a set of indexes of active bytes. [3] We have:
- .
Definition 2: If applying an exclusive “or” operation to all bytes at the same position in -set gives 0, then this position is called balanced - a lot. [3]
Applying transformations and to - gives a lot -set with the same . Conversion application gives -set in which active bytes are transposed (relative to active bytes in the original -Many). Also, application to - many will not necessarily return -set, however, since each output byte is a linear combination of four input bytes in the same line, then, submitting a line with only one active byte, the output will receive a line consisting of only active bytes. [2] Consider - a set in which only one byte is active and follow how the position of the active byte changes over three rounds (here the preliminary round is combined with the first: which ultimately is written as ) Since the first round does not contain , then by the beginning of the second round remains one active byte. In the second round converts to a string of active bytes that converts to a column of active bytes. in the third round translates the result into -set consisting of only active bytes. The byte values at the output of the third round run through all possible values, therefore, are balanced by the set , we have
- {\ displaystyle {\ underset {b = \ theta (a), a \ in \ Lambda} {\ bigoplus}} b_ {i, j} = {\ underset {a \ in \ Lambda} {\ bigoplus}} {\ underset {k} {\ bigoplus}} c_ {jk} a_ {i, k} = {\ underset {l} {\ bigoplus}} c_ {l} {\ underset {a \ in \ Lambda} {\ bigoplus}} a_ {i, l + j} = {\ underset {l} {\ bigoplus}} c_ {l} 0 = 0,}
means bytes on an output in the fourth round balanced by - a lot. This equilibrium is violated by subsequent application. . The output bytes of the fourth round can be expressed using a function of the intermediate state : . Assuming value , value for all elements -set can be computed from ciphertexts. If the value of this byte is unbalanced by , then the expected key value is false. This cryptanalysis method allowed to crack a 6-round version of the cipher using plaintext blocks and their corresponding ciphertext blocks and execution encryption operations. [2]
In 2010, a boomerang-based attack on bound keys was introduced. Previously, a similar attack was applied to the KASUMI , COCONUT98 , IDEA, and AES-192/256 ciphers. This was the first attack on a full-round square. [4] In 2011, a full-round version of SQUARE was cryptanalyzed using a full bipartite graph . This type of attack allowed to crack the cipher using one key, plaintext and holding encryption operations. [5]
Cipher Features
The SQUARE cipher was created in accordance with the strategy of a wide trace - each round of the cipher consists of several transformations, non-linear permutation and composition of linear transformations - which gave the cipher high cryptographic strength against linear and differential cryptanalysis, the components of the algorithm and their interaction were also selected based on the possibility of quick implementation on a wide range of processors. [6] The implementation of the algorithm in the C language had an encryption speed of 2.63 MB / s, running on a Pentium processor with a frequency of 100 MHz, and the implementation in the assembler language increased the encryption speed by half. This algorithm was developed and became the basis of the new American standard - the Rijndael cipher, which was developed by a team of SQUARE authors. By the way, at the AES contest, experts noted that "the Rijndael algorithm is based on an unconventional paradigm, so it may contain hidden vulnerabilities" [1] . For this reason, SQUARE itself is rarely used now, inferior in popularity to its descendant - Rijndael. Also a descendant of the cipher is the South Korean algorithm CRYPTON , a participant in the AES contest.
See also
- Rijndael
Notes
- ↑ 1 2 3 Panasenko, 2009 .
- ↑ 1 2 3 4 5 6 7 8 The Block Cipher SQUARE, 1997 .
- ↑ 1 2 Impossible di ff erential and square attacks: Cryptanalytic link and application to Skipjack, 2001 .
- ↑ Koo, Yeom, Song, 2010 .
- ↑ Biclique Cryptanalisis of the Block Cipher SQUARE, 2011 .
- ↑ The Block Cipher Square Algorithm
Literature
- J. Daemen, L. Knudsen, V. Rijmen. The Block Cipher SQUARE . - 1997.
- B. Koo, Y. Yeom, J. Song. Related-Key Boomerang Attack on Block Cipher SQUARE . - 2010.
- H. Mala. Biclique Cryptanalisis of the Block Cipher SQUARE . - 2011.
- G. Piret, J.-J. Quisquater. Impossible di ff erential and square attacks: Cryptanalytic link and application to Skipjack . - 2001.
- Panasenko S.P. Encryption Algorithms. Special Reference - SPb. : BHV-SPb , 2009 .-- 576 p. - ISBN 978-5-9775-0319-8
Links
- The Block Cipher Square Algorithm , Joan Daemen, Lars R. Knudsen and and Vincent Rijmen, Dr. Dobb's Journal , October 01, 1997.