1 thought on “AES algorithm principle”

  1. The AES encryption process is operated on a 4 × 4 byte matrix. This matrix is ​​also called "State". Its initial value is a clear -text block (a
    element size in the matrix is ​​the bright text block One of the BYTE). (Rijndael encryption method supports larger blocks, the number of matrix lines increases visual) When encrypted, the AES encryption cycle (except the last round) of each round of AES is encrypted:

    The bytes in the matrix are converted through an 8-bit S-BOX. This step provides an encrypted non -linear transformation ability. S-box is related to the multiplication of the multiplication on GF (28) and is known to have good non-linear characteristics. In order to avoid the simplicity of the nature of the nature of the algebra, the S-BOX combines the multiplication anti-element and a reversible imitation transformation matrix. In addition, when constructing S-BOX, it deliberately avoids the fixed point and anti-fixed point, that is, the result of replacing bytes with S-BOX will be equivalent to the result of the error arrangement. The S box in the AES algorithm is shown in Figure 2.2
    . For example, a byte is 0x19, and the S box transforms find n (1,9) = 0xd4, so it is replaced with 0xd4.

    shiftRows describes the line operation of the matrix. In this step, each line displays a bias to the left cycle. In AES (128 -bit block size), the first line remained unchanged, and every byte in the second line moved to the left. In the same way, the offset of the third and fourth rows moved to the left cycling was 2 and 3, respectively. After shiftRows, each column in the matrix is ​​composed of elements in each different column in the input matrix.

    In the step, the four bytes of each column are combined with linear transformation. The four elements of each column are used as the coefficient, and the merger is a polynomial in GF (28), and then this polynomial and a fixed polynomial are multiplied under the molo. This step can also be regarded as a matrix multiplication under the Rijndael limited domain. The function accepts 4 bytes of input, outputs 4 bytes, and each input byte will affect the four bytes of the output. Therefore, Shiftrows and two steps provide diffusion for this password system.

    The AES algorithm uses the external input key K (the number of the key can be nk), and the extension of the total 4 (NR 1) of the key can be obtained through the expansion program of the key. It involves the following three modules:
    (1) Location transformation (rotword) -the 4 -byte sequence [a, b, c, d] to [b, c, d, a]; ; ; ;
    (2) S box transformation (Subword) -The replacement of S box for a 4-byte;
    (3) Transform RCON [i]- RCON [i] indicates 32-bit Special Word [xi- 100,00,00]. The x here is (02), such as Rcon [1] = [01000000]; Rcon [2] = [02000000]; Rcon [3] = [04000000] ...
    The previous NK word is the external key K; the subsequent word w [[i]] is equal to its previous word w [[i-1]] and the "different word w [[i-nk]] Or ", that is, w [[i]] = w [[i-1]] w [[i-nk]]. But if i is a multiple of NK, then w [i] = w [I-NK] subword (rotword (w [i-1]]) rcon [I/Nk].

Leave a Comment