Mathematical Method to Search for Monic Irreducible Polynomials with Decimal Equivalents of Polynomials over Galois Field GF(p q )

Substitution boxes or S-boxes play a significant role in encryption and decryption of bit level plaintext and ciphertext respectively. Irreducible Polynomials (IPs) have been used to construct 4-bit or 8-bit substitution boxes in many cryptographic block ciphers. In Advance Encryption Standard the 8-bit the elements S-box have been obtained from the Multiplicative Inverse (MI) of elemental polynomials (EPs) of the 1 st IP over Galois field GF(2 8 ) by adding an additive element. In this paper a mathematical method and the algorithm of the said method with the discussion of the execution time of the algorithm, to obtain monic IPs over Galois field GF(p q ) have been illustrated with example. The method is very similar to polynomial multiplication of two polynomials over Galois field GF(p q ) but has a difference in execution. The decimal equivalents of polynomials have been used to identify Basic Polynomials (BPs), EPs, IPs and Reducible polynomials (RPs). The monic RPs have been determined by this method and have been cancelled out to produce monic IPs. The non-monic IPs have been obtained with multiplication of α where α  GF(p q ) and assume values from 2 to (p-1) to monic IPs.


INTRODUCTION
Now Basic Polynomials or BPs over Galois Field GF(p q ) have been defined as the polynomials with highest degree q.The polynomials with degree less than q have been termed as Elemental Polynomials or EPs over Galois Field GF(p q ).The polynomials those contains only constant term have been termed as Constant Polynomials or CPs over Galois Field GF(p q ).BPs that have more than one non-constant BPs as Factors have been termed as Reducible Polynomials or RPs over Galois Field GF(p q ).Rest of BPs those have CPs and itself as factors have been termed as Irreducible Polynomials or IPs over Galois Field GF(p q ).BPs with coefficient of highest degree term or leading coefficient equal to unity have been termed as Monic BPs and rest with leading coefficient greater than unity have been termed as Non-Monic BPs as follows, A basic polynomial BP(x) over finite field or Galois Field GF(p q ) is expressed as, BP(x) = a q x q + a q-1 x q-1 + ---+ a 1 x + a 0. B(x) has (q+1) terms, where a q has been non-zero and has been termed as the leading coefficient.A BP has been monic if a q is unity, else it is non-monic.The GF(p q ) have (p qp) elemental polynomials ep(x) ranging from p to (p q -1) each of whose representation involves q terms with leading coefficient a q-1 .The expression of ep(x) is written as, ep(x) = a q-1 x q-1 + ---+ a 1 x + a 0 , where a 1 to a q-1 have not been simultaneously zero.
Many of BP(x), which has an non-constant elemental polynomial as a factor under GF(p q ), have been termed as reducible.Those of the BP(x) that have no factors have been termed as irreducible polynomials IP(x) and has been expressed as, IP(x) = a q x q + a q-1 x q-1 + ---+ a 1 x + a 0 , where a q ≠ 0.
In Galois field GF(p q ), the decimal equivalents or DEs of BPs vary from p q to (p q+1 -1) while the EPs have been those with decimal equivalents vary from p to (p q -1).Some of the monic BPs have been irreducible, since it has no monic nonconstant EPs as a factor.
The method in this paper has been to look for the DEs of monic RPs with multiplication, addition and modulus of pnary coefficients of each term of each two monic EPs to obtain the DE of monic RP.The polynomials belonging to the list of RPs have been cancelled leaving behind the monic IPs.A non-monic IP have been computed by multiplying a monic IP by α where α GF(p) and assumes values from 2 to (p-1).
In literatures, to the best knowledge of the present authors, there is no mention of a paper in which the composite polynomial method is translated into an algorithm and in turned into a computer program.
The survey of relevant Literatures has been notified in sec.2.For convenient understanding, the proposed mathematical 18 method is presented in Sec.3.for p=7 with q=7.The method can find all monic and after it all non-monic IPs IP(x) over GF (7 7 ).Sec.4.demonstrates the obtained results and a discussion on efficiency of the algorithm to show that the proposed searching algorithm is actually able to search for any extension of the Galois field with any prime over Galois field GF(p q ), where p= 3, 5, 7,....,101,..,p and q= 2, 3, 5, 7,…,101,….q.In Sec.5.and Sec.6. the conclusion of the paper, and the references have been illustrated.The complete Lists of all monic IPs in a sequential manner over Galois fields GF(7 7 ) and (101 3 ) have been found in ref.

LITERATURE SURVEY
In early Twentieth Century Radolf Church initiated the search for irreducible polynomials over Galois Field GF(p q ) for p = 2, 3, 5 and 7 and for p = 2, q = 1 through 11, for p =3, q = 1 through 7, for p = 5, q = 1 through 4 and for p = 7, q = 1 through 3 respectively.A manual polynomial multiplication among respected EPs gives RPs in the said Galois field.All RPs have been cancelled from the list of BPs to give IPs over the said Galois field GF(p q ) [RC35].Later The necessary condition for a BP to be an IPs had been generalized to Even 2 characteristics.It had also been applied to RPs and gives Irreducible factors mod 2 [RS62].Next to it Elementary Techniques to compute over finite Fields or Galois Field GF(p q ) had been descried with proper modifications [TD63].In next the factorization of Polynomials over Galois Field GF(p q ) had been elaborated [EB67].Later Appropriate Coding Techniques of Polynomials over Galois Field GF(p q ) had been illustrated with example [TK68].The previous idea of factorizing Polynomials over Galois Field GF(p q ) [EB67] had also been extended to Large value of P or Large Finite fields [EB70].Later Few Probabilistic Algorithms to find IPs over Galois Field GF(p q ) for degree q had been elaborated with example

MATHEMATICAL METHOD TO SEARCH FOR MONIC IPS OVER GF (p q )
In this section the overview of the method behind the proposed algorithm has been given in subsec.3.1.The example to search for monic IPs over Galois field GF(7 7 ) has been described in subsec.3.2.The pseudo code of the proposed algorithm of proposed mathematical method has been given in subsec.3.3 and its time complexity and comparison of time complexity with other algorithms have been illustrated in subsec.3.4.

Overview of the Method
The idea behind this mathematical method and is algorithm has been to choose any two non-constant monic EPs at a time split the respective DEs into p-nary coefficients of respective EPs.Two EPs have been multiplied through polynomial multiplication or multiplication by the said method to obtain a BP.Since the obtained BP has two non-constant EPs as factors so it is termed as monic RPs.After considering all possible two EP combinations it has been found that all possible monic RPs have been generated.The monic RPs have been cancelled out from the list of all monic BPs leaving behind all monic IPs.The monic IPs have been multiplied with all CPs to obtain all non-monic IPs.
In the case of multiplication of two monic EPs, the respective DEs have been split into coefficients of respective EPs.All coefficient of each EP have been multiplied by modulo multiplication with each other along with variables.Next to it the coefficients of the same degree term have been added by modulo addition to obtain the concerned monic BP or monic RP.RPs have been cancelled out from the list of monic BPs to obtain monic IPs.

Mathematical method to search for monic IPs over Galois Field GF(7 7 ).
Here the interest has been to find the monic IPs over Galois Field or GF(7 7 ), where p=7 has been the prime field and q=7 has been the extension of that prime field.In general the indices of multiplicand and multiplier have been added to obtain the product.The extension q=7 can be demonstrated as a sum of two integers d 1 and d 2 .The degree of the highest degree term present in EPs of GF(7 7 ) has been (q-1) = 6 through 1.The polynomials with highest degree of term has been 0, are constant polynomials and they do not play any significant role here, so they have been neglected.Hence the two set of monic elemental polynomials for which the product has been a monic BP where p=7, q=7, have the degree of highest degree terms d In this way the DEs of all the monic BPs or monic RPs have been pointed out.The monic RPs belonging to the list of monic BPs have been cancelled out leaving behind the monic IPs.Non-monic IPs have been computed with multiplication of a monic IP by α where α GF(p) and assumes values from 2 through 6.

Generalized mathematical method to search for monic IPs over Galois Field GF(p q ).
Here the interest has been to find the monic IPs over Galois Field or GF(7 7 ), where p=7 has been the prime field and q=7 has been the extension of that prime field.In general the indices of multiplicand and multiplier have been added to obtain the product.The extension q can be demonstrated as a sum of two integers d 1 and d 2 .The degree of the highest degree term present in EPs of GF(p q ) has been (q-1) through 1.The polynomials with highest degree of term has been 0, are constant polynomials and they do not play any significant role here, so they have been neglected.Hence the two set of monic elemental polynomials for which the product has been a monic BP, have the degree of highest degree terms d 1 , d 2 where, d 1 =1,2,3,..,(q-1/2), and the corresponding values of d 2 have been, (q-1), (q-2), (q-3).,...,q-(q-1/2).Here the number of coefficients in the monic basic polynomial, BP = (q+1); they have been defined as BP 0, BP 1, BP 2, BP 3, BP 4, BP 5, BP 6, BP 7…….., BP q, the value of the suffix also indicates the degree of the term of the monic BP and for monic polynomials BP 7 = 1.for this case, total number of blocks is the number of integers in d 1 or d 2, i.e. (q-1/2).

Time Complexity of the Given Pseudo Code
Since the pseudo code of algorithm consists of three nested loops so the time complexity of the algorithm has been O(n 3 ).

DISCUSSION
From the Experiment on C99 platform the obtained results have been shown in Table .2. given below.The hand on Calculation and analysis of results have been done for GF(3 3 ), GF(3 5 ), GF(3 7 ), GF(7 3 ), GF (11 3 ) and it has been proved that the proposed algorithm works correctly on each Galois Fields.From this conclusion the list of all monic IPs in a monotonically increasing order of DEs have uploaded to links given in ref.
[SDS17] and [SDH17].From the table below and hands on calculation it seems that the calculation is correct and up to date.
From Table .1.it seems that the complexity of other algorithms increases with value of prime p and extension q.But for this algorithm the complexity is same for all p and q.That is why for large value of p and q the algorithm takes few minutes to produce the list of all monic IPs over the examined Galois field.So this algorithm has been proved to be a better algorithm.On the other hand most other algorithms had been developed with in concern of binary galois field GF(2) or Galois Field GF(p) where the proposed algorithm is designed in concern of extended Galois field GF(p q ).So the aspects of the proposed algorithm have a broad range of application.

CONCLUSION
To the best knowledge of the present authors, there is no mention of a paper in which the composite polynomial method is translated into an algorithm and turn into a computer program.The new mathematical method has been a much simpler method similar to composite polynomial method to find monic IPs over Galois Field GF(p q ).It is able to determine DEs of the monic IPs over Galois Field with a larger value of prime, also with large extensions.So this method can reduce the complexity to find monic IPs over Galois Field GF(p q ) with large value of prime and also with large extensions of the prime field.So this would help the crypto community to build S-boxes or ciphers using IPs over Galois Fields of a large value of prime, also with the large extensions of the prime field.
Substitution box or S-box in block ciphers is of utmost importance in Public Key Cryptography from the initial days.A 4-bit S-box has been defined as a box of 2 4 = 16 elements Varies from 0 to F in hex, arranged in a random manner as used in Data Encryption Standard or DES [AT90][HF71][NT77][NT99].Similarly for 8 bit S-box, number of elements are 2 8 or 256 varies from 0 to 255 as used in Advance Encryption Standard or AES [DR00][VM95].So the construction of S-boxes is a major issue in Cryptology from initial days.Using Irreducible Polynomials to construct S-box had already adopted by crypto community.But the study of IPs has been limited to almost binary Galois field GF(2 q ) as used in AES S-boxes [DR00][VM95].So search for Monic as well as Non-Monic IPs has been the untouched stone to break in cryptography.
[MR80].Later Factorization of multivariate polynomials over Galois fields GF(p) had also been introduced to mathematics community [AL85].With that the separation of irreducible factors of BPs [EB67] had also been introduced later [RM87].Next to it the factorization of BPs with Generalized Reimann Hypothesis (GRH) had also been elaborated [LR88].Later a Probabilistic Algorithm to find irreducible factors of Basic bivariate Polynomials over Galois Field GF(p q ) had also been illustrated [DW90].Later the conjectural Deterministic algorithm to find primitive elements and relevant primitive polynomials over binary Galois Field GF(2) had been introduced [MR90].Some new algorithms to find IPs over Galois Field GF(p) had also been introduced at the same time [VS90].Another use of Generalized Reimann Hypothesis (GRH) to determine irreducible factors in a deterministic manner and also for multiplicative subgroups had been introduced later [LR92].The table binary equivalents of binary primitive polynomials had been illustrated in literature [MZ94].The method to find roots of primitive polynomials over binary Galois field GF(2) had been introduced to mathematical community [IS96].A method to search for IPs in a Random manner and factorization of BPs or to find irreducible factors of BPs in a random fashion had been introduced later [PX96].After that a new variant of Rabin's algorithm [MR80] had been introduced with probabilistic analysis of BPs with no irreducible factors [GP97].Later a factorization of univariate Polynomials Over Galois Field GF(p) in sub quadratic execution time had also been notified [EV98].Later a deterministic algorithm to factorized IPs over one variable had also been introduced [EJ01].An algorithm to factorize bivariate polynomials over Galois Field GF(p) with hensel lifting had also been notified [GA02].Next to it an algorithm had also been introduced to find factor of Irreducible and almost primitive polynomials over Galois Field GF(2) [BZ03].Later a deterministic algorithm to factorize polynomials over Galois Field GF(p) to distinct degree factors had also been notified [SE04].A detailed study of multiples and products of univariate primitive polynomials over binary Galois Field GF(2) had also been done [SM05].Later algorithm to find optimal IPs over extended binary Galois Field GF(2 m ) [MS07] and a deterministic algorithm to determine Pascal Polynomials over Galois Field GF(2) [CF08] had been added to literature.Later the search of IPs and primitive polynomials over binary Galois Field GF(2) had also been done successfully [AA09].at the same time the square free polynomials had also been factorized [CR09] where a work on divisibility of trinomials by IPs over binary Galois Field GF(2) [RW09] had also been notified.Later a probabilistic algorithm to factor polynomials over finite fields had been introduced [SM11].An explicit factorization to obtain irreducible factors to obtain for cyclotomic polynomials over Galois Field GF(p q ) had also been reported later [LQ12].A fast randomized algorithm to obtain IPs over a certain Galois Field GF(p q ) had been notified [JC13].A deterministic algorithm to obtain factors of a polynomial over Galois field GF(p q ) had also been notified at the same time [DM14].A review of construction of IPs over finite fields and algorithms to Factor polynomials over finite fields had been reported to literature [GH14][NC14].An algorithm to search for primitive polynomials had also been notified at the same time [WJ14].The residue of division of BPs by IPs must be 1 and this reported to literature a bit later [SJ15].The IPs with several coefficients of different categories had been illustrated in literature a bit later [HJ16].The use of zeta function to factor polynomials over finite fields had been notified later on [BP17] At last Integer polynomials had also been described with examples [EWNN].
1 , d 2 where, d 1 =1,2,3, and the corresponding values of d 2 are, 6,5,4.Here the number of coefficients in the monic basic polynomial, BP = (q+1) = (7+1) = 8; they are defined as BP 0, BP 1, BP 2, BP 3, BP 4, BP 5, BP 6, BP 7, the value of the suffix also indicates the degree of the term of the monic BP and for monic polynomials BP 7 = 1.for this case, total number of blocks is the number of integers in d 1 or d 2, i.e. 3.
The comparison of time complexity of the proposed algorithm with Rabin's and modified rabin's algorithm has been given below in table.1.