Data processing apparatus for calculating a multiplicatively inverted element of a finite field

Abstract: There is described the calculation of multiplicatively inverted element of an input vector specified in a finite major Galois field. From the set of vector coefficients there is formed a first set of linear forms and a further set of matrix-organized linear forms. The elements of the first set of linear forms are pairwise combined to quadratic forms that represent a set of coefficients of a vector defined in a subfield in the major field. This latter vector is then converted to its multiplicative inverse, after which the inverted subfield-vector has its coefficients multiplied by elements of the further set to generate the multiplicative inverse in the major field. By scrupulously combining the generation of various intermediate terms a further reduction of the necessary hardware and/or processing time is attained.

Description: BACKGROUND TO THE INVENTION The invention relates to calculating the multiplicative inversion of a Galois field element in GF(q m ), when this element is provided in vectorial representation. Herein, q is a prime raised to an exponent, usually q=2 1 =2. For many applications, m is even and often equal to m=8. Such calculations then represent byte-wise data processing for purposes of cryptography, error protection such as by means of Reed-Solomon codes, fast Fourier transform, and others. The data then corresponds to video data, audio data wherein a -Compact Disc- or -Digital Audio Tape- recording audio sample would be constituted by two bytes, or measuring results. As reference the US Patent Specification 4,587,627 is called upon. Hereinafter elementary properties and calculatory operations in a Galois field are considered standard knowledge. Generally, any Galois field element may be inverted by means of a translation table (PROM or ROM), which for reasonable fields, such as GF(2 8 ) requires a very extensive amount of hardware. An alternative method using, for example, a programmed processor would require heavy pipelining and in consequence, much computational delay. The present invention uses the concept of subfields and in particular, calculates the multiplicative inverse of a vectorially represented element of a finite field, the major field, by means of inversion in a subfield of the major field. Now, a finite field GF(q m ) contains GF(q n ) as a subfield if m=rn, wherein for disclosing the present invention, restriction is made in that r=2. However, the principle of the invention is just as well applicable to other values of r. The index of the major field over the subfield is r. Now, inasmuch as a calculation in a subfield operates on fewer vector coefficients than a corresponding operation in the major field, the former calculation is easier and/or faster. WO 89/01660 (earlier patent documentation, but published after the filing date of the present invention) discloses an apparatus for computing multiplicative inverses in data encoding decoding devices. Here two elements, X and Y, of GF(2 m ) with m = 2n are divided. The operation Y/X is performed by first finding the multiplicative inverse of the divisor X, and then by multiplying the inverse X -1 by the numerator, Y. This prior art further discloses that a conventional Galois Field division requires that the multiplicative inverse of divisor X be found in a look-up table having 2 m elements, and provides a solution which requires a table look-up having 2 n elements. The operational sequence is as follows: a. a conversion factor D = X 2 n is computed, computing D in a Galois Field of characteristic 2 appears relatively simple; b. C, an element of a smaller Galois Field, GF(2 n ), which is a subfield of GF(2 m ), is computed: C = D * X; c. the multiplicative inverse of C in GF(2 n ) is retrieved from a table containing the 2 n elements of GF(2 n ); d. C -1 * D = X -1 is computed. The present invention also uses the concept of subfields, but does not need the complicated finite field multiplier for step d. SUMMARY TO THE INVENTION Among other things, it is an object of the present invention to provide a data processing apparatus for calculating a multiplicatively inverted element in a finite filed which operates fast at a limited hardware requirement by using inversions in a subfield, in particular, a subfield of index 2, by means of sensibly combining quadratic forms plyaing a part in that reduction, to standard forms. According to one aspect thereof, such object is realized by an apparatus for computing the components X -1 k with k = 0, 1, ..., 2n-1 of an element X -1 which is the inverse of an input element X of the major field GF(2 m ) with m=2n, whereby X is presented by a signal having a set of vector coefficients (X 0 , X 1 ; X 2 ; ...; X 2n-1 ), and whereby (α 0 , α 1 , ...α 2n-1 ) is a base in GF (2 m ), so that according to the equation: said apparatus comprising: a. first means (22) receiving together the 2n bits of a signal representing said element X for generating a first array of 2n 2 linear forms L j,i (X) with j = 0, ..., n-1 and i = 0, ..., 2n-1, and a second array of 2n 2 linear forms W jk (X) with j = 0,..., n-1 and k = 0, ..., 2n-1, whereby for certain numbers c ij and d ijk E GF(2): and b. second means (28) receiving signals representing the linear forms L j,i (X) for pair wise combining and adding the linear forms, all additions being executed modulo 2, for calculating quadratic forms Q j (X) being elements of GF (2 n ) according to the equation: for = 0, 1, ... , n-1 c. third means (30) receiving signals representing the quadratic forms Q j (X) for calculating R j (X) in the subfield GF(2 n ) by inverting Q j (X); d. fourth means (32) receiving signals representative of the inverse forms R j (X) and the forms W jk (X) for calculating the k-th component of the element X -1 according to the equation BRIEF DESCRIPTION OF THE FIGURES Hereinafter, the invention will be disclosed more extensively, first the mathematical aspects thereof, then the resulting operational sequence of steps and hardware circuitry, and finally a particular example, with reference to the accompanying Figures, wherein: Figure 1 is an elementary block diagram of an apparatus according to the invention. Table 1A-1E are a gate listing of an inversion device for GF(2 8 ). MATHEMATICAL FORMULATION OF THE INVENTION For reasons of simplicity, the invention is described for the finite field GF(2 m ), wherein m=2n. The case q=3 would instead of bits lead to three-valued elements that may, in principle, be realized by means of known logic circuitry. The major field GF(2 m ) has for m=8 for example a generating polynomial g(X)=X 8 +X 4 +X 3 +X 2 +1. Its elements are expressed with respect to a standard base (1,d...d 7 ), given by the solutions of g(d)=0. The starting point of the invention is to compute the multiplicative inverse element X -1 of an element X, determined in GF (2 m ) by X.X -1 = 1 , by using the expression: X -1 =(X 2 n +1 ) -1 .X 2 n . Herein, the bracketed expression is an element of the subfield, whereas X is an element of the major field. We define a linear form L(X) over GF(2 m ) as a function L(X)=L0.X0+L1.X1+...+Lm-1.Xm-1, from GF(2 m ) to GF(2), wherein each Li is an element of GF(2). Such linear form as herein defined is a modulo 2 sum of selected coefficients of the vector representation of X. A quadratic form Q(X) over GF(2 m ) from GF(2 m ) to GF(2) is defined as a function: wherein ci, aij E GF(2). Herein, -E- means -is an element of-. Therefore, such quadratic form as herein defined is a modulo 2 sum of selected coefficients and selected, ANDED coefficient pairs of the vector representation of X. In roughly similar way, higher degree forms could be defined. Now, for L(X)=X 2 n and Q(X)=X 2 n +1 , wherein X E GF(2 m=2n ), L(X) can be written as L(X)=(LO(X),..Lm-1(X)), with respect to some base in GF(2 m ) that needs not be the standard base (1..d m-1 ) which had been fixed according to some standardization convention. Herein each coefficient Li(X) is a linear form. In fact, for X,Y E GF(2 m ), (X+Y) 2 =X 2 +2XY+Y 2 =X 2 +Y 2 , because XY+XY=0 and also (X+Y) 2n =X 2 n +y 2 n . Thus, the transition from X to L(X) is a linear operation and each Li(X) is a linear form. Now, for X E GF(2 m ), Q(X) is in GF(2 n ). In fact, the elements X of GF(2 m ) satisfy X 2 m =X. Moreover, the elements Y of GF(2 n )⊆GF(2 m ) are exactly those that satisfy Y 2 n =Y. Now, (Q(X)) 2 n =X 2 2n +2 n =X 2 2n .X 2 n =X.X 2 n =Q(X). For a base bo,b1..bn-1 in GF(2 n ), Q(X) may be written as Q(X)=(QO(X),Q1(X),..Qn-1(X)), the choice of the base influencing the values of the coefficients. Now, each coefficient Qj(X) is a quadratic form. In fact, for B(X,Y)=Q(X+Y)+Q(X)+Q(Y), obviously B(X,Y)=(X 2 n +Y 2 n )(X+Y)+X 2 n +1 +Y 2 n +1 =X 2 n .Y+X.Y 2 n = L(X).Y+X.L(Y), so that B(X,Y) indeed defines a bilinear operation. This proves the statement on Qj(X). FINDING REPRESENTATIONS OF THE LINEAR AND QUADRATIC FORMS Lj(X), Qk(X) Now, for given basis α0..αm-1 in GF(2 m ) and β0..βn-1 in GF(2 n ) there exist straightforward ways for computing expressions for the linear forms Li(X), i=0..m-1 and quadratic forms Qj(X), j=0..n-1 mentioned earlier. Thus, such computing may be effected automatically, by means of a computer program. For all i,j, we have αi.αj 2 n +αi 2 n .αj E GF(2 n ); a1 2 n +1 E GF(2 n ); αi 2 n E GF(2 m ). Whereas, for all i,j: and for certain numbers cij, bik, aijk E GF(2). Therefore, and As a result: In sequal to the above, the quadratic forms so defined can be reexpressed in better manageable representation. Now, consider M(X,Y), defined as (X 2 n .Y), wherein X E GF(2 m ) and Y E GF(2 n ). Herein, Therefore, Write Then we find Put Now, it can be proven, that wlk(X) is a linear form over GF(2 m ). Consequently, M(X,Y) has components (0..m-1): Now, a function L(X) from GF(2 m ) to GF(2) be called essentially linear, if either L(X) itself, or 1+L(X) is a linear form. It turns out that the following is true. For Q(X) to be a quadratic form over GF(2 m ), it is possible to find essentially linear forms Li(X), such that Q(X)=L1(X).L2(X)+L2(X).L3(X)+..+L2k-1(X).L2k(X), or L1(X)...L2k(X)+1, where the required number 2k of such linear forms needed for Q(X) is governed only by the number of zeroes of Q(X) on GF(2 m ). It has been found that the number of zeroes of the quadratic forms Qi(X) is equal to 1+(2 n +1)(2 n-1 -1), and independent of the bases (αj) in GF(2 2n ) and (βj) in GF(2 n ) actually used. In fact, such zero would be generated for x 2 n +1 =y 2 n +1 , which in the case if either X=Y=0, or (X/Y) 2 n +1 =1. In fact, for α being a primitive element in GF(2 m ), the equation Z 2 n +1 =1 has exactly 2 n +1 solutions Zj = α j(2 n -1) for j=0,..2 n . As a consequence, Q(X)=X 2 n +1 assumes each value different from zero exactly 2 n+1 times. Since Q(X) E GF(2 n ), GF(2 2n ) has 2 2n elements, and GF(2 n ) has 2 n elements, Q(X) assumes each value in GF(2 n ) different from zero exactly 2 n +1 times and the value zero exactly once. Now if Y runs through all elements of GF(2 n ), each coefficient of Y with respect to some fixed base will, for reasons of symmetry be 0 exactly half the number of cases. So any particular coefficient of all non-zero elements in GF(2 n ) will be zero exactly 2 n-1 -1 times. The number 2k of essentially linear forms necessary for the expressions for the quadratic forms Qi(X) is determined by the number of zeroes a quadratic form Q(X) over GF(2 n ), to wit: 1 + (2 k +1) + (2 k-1 -1). Essentially linear forms thus give the quadratic form as: Qi(X) = Li,1(X).Li,2(X)+..+Li,2n-1(X).Li,2n(X). RESUME OF THE RESULTS FORMULATED AS A SEQUENCE OF STEPS According to the foregoing, the multiplicative inverse is to be calculated as follows: x -1 = x 2 n +1 . x 2 n . Herein, L(X):=X n 2 E GF(2 m ), Q(X):=X 2 n +1 E GF(2 n ). First, two bases are chosen, to wit: GF(2 m ) : α0,α1...α2n-1 GF(2 n ): β0,β1...βn-1. In particular the choice for the second basis is arbitrary. Expressed in the first basis, L(X)=((LO(X)L2n-1(X)), wherein the coefficients are linear forms which, however, not be calculated explicitly. Furthermore, Q(X)=(Q0(X)...Qn-1(X)), wherein the coefficients are quadratic forms. Note that the basis can be chosen freely for the second Galois field. Now the first object is to calculate R(X)=(RO(X)... Rn-1(X)), which is the inverse of Q(X) in the subfield GF(2 n ). Then the following product is calculated: Define the linear form These are the linear forms that must be calculated in particular. In conclusion, the k-th component of the inverse quantity to be sought, is given by Now, from Rj(X)(j) the quantity Qj(X)(j) must be produced. In the foregoing, it has been found that wherein the quantities Lj,... are linear forms. In consequence, the following quantities must be produced: Ljs(X), for s=0..2n-1, j=0...n-1 wjk(X), for k=0..2n-j, j=0..n-1. As shown in the examples, infra, certain parts of these calculations can be combined. Next, the quantities Qj(X) are formed, which together give the quantity Q(X). Thereafter, the inverse of Q(X), called R(X) is calculated in the subfield, by means of its coefficients Rj(X). This calculation generally will be done in the classical way. Alternatively, the subfield-inversal could still be split into a further inversion in a secondary subfield. Finally, the coefficients of the inverse value in the major field are given by the expression for X -1 k. DESCRIPTION OF A HARDWARE EMBODIMENT Figure 1 is an elementary block diagram of an apparatus according to the invention. On a first level the various subsystems are only described as blocks. These may be realized either as hardwired logic for ultrafast operation on a single Galois field, such as has been defined for the HIFI audio Compact Disc System, such as for effecting error correction on the basis of cross-interleaved Reed-Solomon codes and other signal treatment features. Alternatively, the various blocks could be realized by means of program control of more generally, applicable processor blocks, such as an 8-bit microprocessor. In the latter case, time-sharing of various blocks among a plurality of functions would still be feasible and decrease chip area, and/or give other advantages. Of course processing power versus operational speed are considered for a trade-off. The latter realization would still represent an improvement on the longer pipelining necessary for direct inversion in the major field. Moreover, there is no explicit limitation to operating in only a single major Galois field, and interchanges among various fields and/or various bases for corresponding field would be perfectly feasible. For brevity, further description of such standard building blocks is omitted. Now, in the circuitry, input 20 carries the 2n bits of the input quantity in parallel. In block 22 the calculation of the linear forms Lij(X) and wlk(X) takes place, either category producing 2n 2 linear forms. In the case of wild logic, the gate depth of the arrangement is at most (1+k), wherein k= 2 log n or the next higher integer. Thus for Compact Disc, k=3. In the above, the effect of combining calculations for the L and the w quantities has not been considered. The linear forms Lij(X) are output on interconnection 24 towards block 24; the linear forms wlk(X) on output 26 directly to block 32. The bit width of the interconnections 24, 26 has not been shown explicitly. In block 28 the linear forms are pairwise combined and added to produce the quantities Qi(X), with i=0..n-1, all additions being executed modulo-2. This requires a total of n 2 AND operations and n(n-1) XOR operations to a logic gate depth of 1+k. The result is outputted as an n-bit wide quantity to block 30. In block 30 the inverse quantity R(X)=Q(X) -1 is calculated in the subfield GF(2 n ), for example by means of a programmed table memory. The result is outputted as an n-bit wide quantity to block 32. In block 32 the inverse in the subfield is received and also the linear forms wLk(X) for calculating the expression: X -1 l=M(X,R(X)0l=R0(X).Wl0(X)+...+Rn-1(X).Wl,n-1(X), wherein l=0..2n-1. This operation requires in total 2n 2 AND operations and 2n(n-1) XOR operations, with a total logical gate depth of (k+1). The total number of operations is 8n 3 -n 2 -3n XOR operations which for reasonable values of n (≥4) is approximately 8n 3 . Furthermore 3n 2 AND operations are necessary that in view of the more simple structure of the AND operations, is rather negligible. The total logic depth is 3+3k. Now, the structure of the above conversions may be fixed, but there is still an appreciable freedom as regards the precise realization. Even in case the base in the major field has been specified, the following options still exists: a. choice of the base β0..n-1 in GF(2 n ). This choice influences the linear forms wlk(X), the quadratic forms Qi(X), and thus also the linear forms Lij(X); b. even after fixing the choice of base (β0..βn-1) in GF(2 n ) the representations for Qi(X) as products of essentially linear forms, i.e. the precise formulation of the linear forms Lij(X) is open to choice. In particular, the second choice may be advantageous. In many cases, the linear forms Lij(X) may be chosen such that each only involves at most n of the coefficients (instead of 2n). In this case the logic depth is reduced by 1 and the number of XOR's for calculating the Lij(X) is halved. Moreover, various intermediate results may be shared among the respective calculations, both for the computation of the quantities Lij(X) and of the quantities wlk(X) for reducing the number of XOR-operations still further. In fact, the number of XOR-operations need to be only (1...1½).n 3 . If both bases α and β are open to choice, it is suggested to choose a normal base. In that case, exactly the same hardware can be used to calculate each of the coefficients of the inverse. The overall structure of the hardware would then become more regular. Alternatively, if the coefficients of the inverse may be computed sequentially, the same hardware may be used for each of those coefficients in succession. EXAMPLE OF EXECUTING THE METHOD Hereinafter, as an example an inversion in GF(2 4 ) is described: m=2n=4. The finite field GF(2 4 ) is generated by the irreducible polynomial g(X)=X 4 +X+1 over GF(2). Let α be a formal zero of g(X), thus: α 4 =α+1. As a base in GF(2 4 ) we take: (1,α,α 2 ,α 3 ). Now, GF(2 4 ) contains GF(2 2 ). Indeed the elements of GF(2 2 ) are writeable as {0,1,α 5 ,α 10 }. As a base in GF(2 2 ) the normal base (α 5 ,α 10 ) is chosen. The vector to be inverted is now: X=(X0,X1,X2,X3)=X0+X1α+X2α 2 +3α 3 . Write Q(X)=Q0(X)α 5 +Q1(X)α 10 . This directly leads to the expressions for the only two quadratic forms needed now, Q0(X)=X0+X1+X3+X0X1+X0X2+X1X2+X1X3 Q1(X)=X0+X2+X3+X0X1+X0X2+X0X3+X2X3. Herein, use is made of the expression Q(X)=X 2 n +1 , which is then resolved to its basic elements. The inverse of element Y1α 5 +Y2α 10 can in this simple subfield directly be written as Y2α 5 +Y1α 10 , so that R1(X)=Q0(X) and R0(X)=Q1(X). In a larger subfield the inversion itself by means of a table-ROM would be conventional. Computation of the forms wlk(X) now leads to: X0 -1 =R0.(X2)+R1.(X0+X1+X3) Xn -1 =R0.(X0+X1)+R1.(X0+X3) X2 -1 =R0.(X0+X2+X3)+R1.(X0) X3 -1 =R0.(X1+X2)+R1.(X1+X2+X3). An alternative representation for Q0(X), Q1(X) is the following: Q0(X)=1+(X0+X1).(X2)+( X0+X3 ).( X1 ) Q1(X)=1+( X0+X1 ).( X3 )+( X0+X3 ).(X1+X2). Herein, the bracketed expressions represent essentially linear forms, the overstrike denoting the inverse logical value. The subterms are used several times and can be shared, by means of: a1=X0+X1 a4=a1+X3=X0+X1+X3 a2=X0+X3 a5=a2+x2=X0+X2+X3 a3=X1+X2 a6=a3+X3=X1+X2+X3. The number of EXOR-additions required is much less than the upper bound specified earlier: 4n 2 (2n-1)=48. In a bigger major field, and therefore bigger associated subfield, the computations involve more quantities and in consequence the necessary gates have more inputs and also the logic depth is greater. All taken together, the principle of the calculation is the same and is effected along the general approach lines described earlier. DESCRIPTION OF A PREFERRED EMBODIMENT Tables 1A-1E give a tabular representation for a preferred embodiment for inversion in the Compact Disc Galois field, GF(2 8 ). The standard number of gates would be of order 4n 2 (2n-1)=448. The gate representation is in three columns. The first column lists the name of the gate, which is also used as a name of output signal of the gate. The second column lists the function of the gate. The third column lists the input-signals of the gate in question. The top two lines of table 1A define the eight components (I7...I0) of the input vector, and the eight components (J7...J0) of the output vector that is the multiplative inverse of the input vector. Now, 35 D-gates effect the inversion in the subfield that in itself in fact corresponds to a table look-up. This inversion uses as input signals various C.. signals to be discussed hereinafter, and also various intermediate signals produced in the inversion array itself. The gate library has the following elements used in the present inversion: QNOR2 is a two-input NOR-gate QNAND2 is a two-input NAND-gate QIN1 is a one-input inverter QIN2 is a one-input inverter with larger fan-out QAND3 is a three-input AND-gate QNOR3 is a three-input NOR-gate QAND4 is a four-input AND-gate QNAND3 is a three-input NAND-gate QXNOR is a two-input EXCLUSIVE-NOR-gate QOR3 is a three-input OR-gate QIN3 is a one-input invertor with still larger fan-out QFO6 is a first special function expressed as follows for a sequence of four input signals a1...a4: (a1+a2+a3.a4) QFO8 is a second special function expressed as follows for a sequence of five input signals a1...a5: (a1+a2.a3+a4.a5). Further elements of the library are not specified for brevity. Now, in block 22 of Figure 1 the various linear forms are calculated. This is effected by means the set of gates starting with gate N47 up to B256 (or up to gate N5). These forms are only EXCLUSIVE-OR-gates, EXCLUSIVE-NOR-gates and inverters. In block 28 the quadratic forms are calculated. This is effected by means of the set of gates starting with gate NC01 up to gate C3. Thereafter, the necessary vector components C0...C3 are ready for processing in block 30. After the inversion in the subfield has been effected to produce the vector components D0...D3, the multiplication in block 32 is effected. This is realized by means of the gates starting with gate NJ01. The total gate count is now block 22: 76 block 28: 32 block 30: 35 block 32: 64 total : 207. OVERVIEW For enhanced clarity, the following brief overview of the method followed hereinbefore is presented. The final result should be X -1 k, that is, the k-th component of the inverse vector = to get Rj(X) (j=0...n-1) we had to calculate the quadratic form Qj(X) (j=0...n-1). To this effect we wrote: both L's being linear forms. In fact, we had to calculate the linear forms Ljs(X) s=0...2n-1, j=0...n-1 wjk(X) k=0...2n-1, j=0...n-1. Qj(X) follows from equation (B), yielding Q(X). Rj(X) (j=0...n-1) is found by inverting Q(X). Finally X -1 k follows from equation (A).

Claims: An apparatus for computing the components X -1 k with k = 0, 1, ..., 2n-1 of an element X -1 which is the inverse of an input element X of the major field GF(2 m ) with m=2n, whereby X is presented by a signal having a set of vector coefficients (X 0 , X 1 ; X 2 ; ...; X 2n-1 ), and whereby (α 0 , α 1 , ..., α 2n-1 ) is a base in GF (2 m ), so that according to the equation: said apparatus comprising: a. first means (22) receiving together the 2n bits of a signal representing said element X for generating a first array of 2n 2 linear forms L j,i (X) with j = 0, ..., n-1 and i = 0, ..., 2n-1, and a second array of 2n 2 linear forms W jk (X) with j = 0, ..., n-1 and k = 0, ..., 2n-1, whereby for certain numbers c ij and d ijk E GF(2): and b. second means (28) receiving signals representing the linear forms L j,i (X) for pair wise combining and adding the linear forms, all additions being executed modulo 2, for calculating quadratic forms Q j (X) being elements of GF (2 n ) according to the equation: for j = 0, 1, ... , n- 1 c. third means (30) receiving signals representing the quadratic forms Q j (X) for calculating R j (X) in the subfield GF(2 n ) by inverting Q j (X); d. fourth means (32) receiving signals representative of the inverse forms R j (X) and the forms W jk (J) for calculating the k-th component of the element X -1 according to the equation An apparatus as claimed in Claim 1, wherein said input is 2n bits wide, said matrix evaluator having a further output that is 2n bits wide.

Inventors: HOLLMANN HENDRIK DIRK LODEWIJK, HOLLMANN, HENDRIK DIRK LODEWIJK
Applicants: PHILIPS ELECTRONICS NV, PHILIPS ELECTRONICS N.V.
Application year: 1988
Main classification: G06F7
IPC codes: H03M13, G06F11, G06F7