# Error-Correction Coding Using Polynomial Residue Number System
## 1 Introduction
New algorithms for constructing modular multipliers, as well as their circuit implementations, are proposed in [52; 53; 54] for reducing the execution time of multiplicative operations in PRNS. Unlike codes of RNS, codes of polynomial residue number system have found wide application in cryptography, as shown in [55; 56; 57; 58]. The work [59] presents a technique that allows for switching from the AES encryption algorithm implemented in the finite field GF(2\({}^{8}\)) to calculations in the ring of finite fields of a smaller order, GF(2\({}^{4}\)). It is known that the AES block cipher is implemented in the Galois field GF(2\({}^{8}\)) using a generating polynomial \(p(z)=z^{8}+z^{4}+z^{3}+z+1\). The present work proposes to perform all AES cryptographic transformations using two irreducible polynomials, \(p_{1}(z)=z^{4}+z+1\) and \(p_{2}(z)=z^{4}+z^{3}+1\). In this case, the plaintext byte will be represented as two residues, which are obtained when it is divided by the polynomials \(p_{1}(z)=z^{4}+z+1\) and \(p_{2}(z)=z^{4}+z^{3}+1\). As a result, the encryption process using the AES algorithm is performed using the code of polynomial residue number system, which has two informational bases. Circuit implementations of this technique are given in the works [60; 61; 62; 63]. As failures may occur during the operation of computing devices using elements of finite Galois fields GF(2\({}^{n}\)), it becomes necessary to use codes that are able to detect and correct these errors. Currently, error-correction BCH codes, which belong to polynomial cyclic codes, are widely used in signal processing and transmission systems. BCH codes are capable of correcting multiple errors. The construction of such codes is based on the theory of finite Galois fields GF(2\({}^{n}\)). Depending on the multiplicity of the error being corrected, developers determine the number of irreducible polynomials that are used to obtain the generating polynomial. For example, we can use the code (15, 11) and the generating polynomial \(g(x)=x^{4}+x+1\) in order to correct a single error, which is understood as a distortion of one binary digit in a code combination. This code is defined over the Galois field GF(2\({}^{4}\)). Itis necessary to use the code (15, 7) in order to correct two errors in the code combination. The product of two minimal polynomials, \(x^{4}+x+1\) and \(x^{4}+x^{3}+1\), will provide the generating polynomial \(g(x)=x^{8}+x^{7}+x^{5}+x^{4}+x^{3}+x+1\) of the considered code. However, there is a difference between codes of PRNS and BCH codes; the latter does not allow the use of polynomial cyclic codes for detecting and correcting errors that occur during calculations. All residues in modular codes of PRNS, both informational and redundant, are obtained by dividing the original polynomial into bases of the code, which are irreducible polynomials. Because the process of obtaining the residues is the same, we can say that they are equal in relation to each other. Therefore, codes of PRNS are arithmetical codes and can be used when calculations are being performed. At the same time, arithmetical operations will take place in the same way on all bases of the code. It is the equality of residues in relation to each other that allows us to dynamically change the number of informational and control bases. For example, the following irreducible polynomials can be defined for GF(2\({}^{4}\)): \(m_{0}(x)=x+1\), \(m_{1}(x)=x^{4}+x+1\), \(m_{3}(x)=x^{4}+x^{3}+x^{2}+x+1\), \(m_{5}(x)=x^{2}+x+1\), \(m_{7}(x)=x^{4}+x^{3}+1\). If it is necessary to detect a single error, which is understood as a distortion of one residue of the code, then one base of the code can be taken as a control base, for example, \(m_{7}(x)=x^{4}+x^{3}+1\). The four remaining bases of the code of PRNS will be considered informational. If a single error needs to be corrected during the calculation process, a polynomial, \(m_{1}(x)=x^{4}+x+1\), can be added to the control bases. Then, the code will have three informational bases and two control bases.