JP2701378B2 - Calculation method - Google Patents

Calculation method

Info

Publication number
JP2701378B2
JP2701378B2 JP63270579A JP27057988A JP2701378B2 JP 2701378 B2 JP2701378 B2 JP 2701378B2 JP 63270579 A JP63270579 A JP 63270579A JP 27057988 A JP27057988 A JP 27057988A JP 2701378 B2 JP2701378 B2 JP 2701378B2
Authority
JP
Japan
Prior art keywords
output
input
circuit
reciprocal
square root
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63270579A
Other languages
Japanese (ja)
Other versions
JPH02116934A (en
Inventor
勉 松本
秀樹 今井
篤弘 山岸
井上  徹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63270579A priority Critical patent/JP2701378B2/en
Publication of JPH02116934A publication Critical patent/JPH02116934A/en
Application granted granted Critical
Publication of JP2701378B2 publication Critical patent/JP2701378B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、誤り訂正符号の復号器あるいは暗号化技
術の暗号器・復号器を実現する場合に必要となる演算方
式に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic method necessary for realizing a decoder of an error correction code or an encryptor / decoder of an encryption technique.

〔従来の技術〕[Conventional technology]

第5図(a),(b)は、例えば、電子通信学会・論
文誌(J63−D,12,PP1034〜1041)に示された従来の演算
方式を採用した乗算回路および除算回路の構成を示すブ
ロック図である。図において、1,2はデータ入力端子で
あり、16はデータ出力端子である。27は標数を2とする
基礎有限体GF(2)上のm次元ベクトルとして表現され
たGF(2m)の任意の元を、GF(2)上の既約多項式g
(x)の根αのべき乗として表現したときの指数に変換
する指数変換ROM(表)である。ただしROM27は全要素が
零であるm次元ベクトルを2m−1に変換する。28はその
変換された指数が2m−1であることを検出する機能を持
つ零元検出回路であり、29は除算回路を構成する場合の
補数回路であり、指数変換ROM27の出力の補数をとる。3
0はmビットの全加算器であり、31は全加算器30の出力
を法2m−1で補正するとともに、零元検出回路28の出力
により2m−1を出力する補正回路であり、32は指数に変
換されたGF(2m)上の元をGF(2)のm次元ベクトル表
現に変換するベクトル変換ROM(表)である。
FIGS. 5 (a) and 5 (b) show, for example, the configurations of a multiplication circuit and a division circuit adopting the conventional operation method shown in the IEICE Transactions (J63-D, 12, PP1034-1041). FIG. In the figure, 1 and 2 are data input terminals, and 16 is a data output terminal. 27 represents an arbitrary element of GF (2 m ) expressed as an m-dimensional vector on a basic finite field GF (2) having characteristic 2 by an irreducible polynomial g on GF (2)
7 is an exponential conversion ROM (table) for converting into an exponent when expressed as a power of the root α of (x). However, the ROM 27 converts an m-dimensional vector in which all elements are zero to 2 m -1. Reference numeral 28 denotes a zero element detection circuit having a function of detecting that the converted exponent is 2 m -1. Reference numeral 29 denotes a complement circuit for forming a division circuit, which calculates the complement of the output of the exponent conversion ROM 27. Take. Three
0 is an m-bit full adder, 31 is a correction circuit for correcting the output of the full adder 30 modulo 2 m -1 and outputting 2 m -1 based on the output of the zero element detection circuit 28; Reference numeral 32 denotes a vector conversion ROM (table) for converting an element on GF (2 m ) converted into an exponent into an m-dimensional vector expression of GF (2).

次に従来の演算方式の動作原理について説明する。有
限体GF(2m)の任意の非零元αとαの乗算を考え
る。ここで、αは、GF(2)上の既約多項式g(x)の
根とする。αiはそれぞれGF(2)上のm次元ベク
トルで表現されているものとする。αとαの乗算
は、次式のように表される。
Next, the operation principle of the conventional arithmetic method will be described. Consider the multiplication of an arbitrary nonzero element α i and α j of a finite field GF (2 m ). Here, α is the root of the irreducible polynomial g (x) on GF (2). α i and α j are each represented by an m-dimensional vector on GF (2). The multiplication of α i and α j is represented by the following equation.

つまり、GF(2m)上の乗算は、指数の法2m−1の加算と
して i+j(mod2m−1) (2) のように表すことができる。
That is, the multiplication on GF (2 m ) can be expressed as i + j (mod 2 m −1) (2) as the addition of the exponent modulo 2 m −1.

次いで、第5図(a)の乗算回路に基づいて乗算動作
を説明する。ベクトル表現されたαiは各々データ
入力端子1,2より、指数変換ROM27に入力され、各々の指
数iとjに変換される。変換された指数i,jは零元検出
回路28を経由して、mビットの全加算器30で加え合わさ
れる。全加算器30の出力は0から2m−1までの値をとる
が、指数表現されたGF(2m)の元は0〜2m−2までの値
しか持たないので、補正回路31によって0〜2m−2まで
の値に補正する。さらに補正回路31の出力をベクトル変
換ROM32へ入力し、指数表現からベクトル表現へと変換
され、データ出力端子16より が出力される。
Next, a multiplication operation will be described based on the multiplication circuit shown in FIG. The vectors α i and α j are input to the exponent conversion ROM 27 from the data input terminals 1 and 2, respectively, and are converted into the respective indices i and j. The converted indices i and j are added by an m-bit full adder 30 via a zero element detection circuit 28. The output of the full adder 30 takes a value from 0 to 2 m -1. However, since the element of the exponentially expressed GF (2 m ) has only a value from 0 to 2 m -2, the correction circuit 31 Correct to a value from 0 to 2 m -2. Further, the output of the correction circuit 31 is input to the vector conversion ROM 32, and is converted from the exponential expression to the vector expression. Is output.

次いで、第5図(b)の除算回路に基づいて除算動作
を説明する。いま表現しようとする除算を とする。αをGF(2)上のm次元ベクトルとして表現
したデータを入力端子1より入力し、同じく被除数α
をデータ入力端子2より入力する。入力されたαi
は指数変換ROM27により指数iとjに変換される。指数
jは乗算回路と同様に零元検出回路28を通して、mビッ
トの全加算器30に入力され、指数iは補数回路29を通し
てiの補数−iに変換されて同じくmビット全加算器30
に入力され、全加算器30により指数の加算された j+(−i)=j−i (4) が出力される。以下の動作は乗算器の場合と同様に、補
正回路31により2m−1を法とする指数に補正され、ベク
トル変換ROM32によりm次元ベクトルに変換され、デー
タ出力端子16より が出力される。
Next, the division operation will be described based on the division circuit of FIG. The division we are going to express now And Data representing α i as an m-dimensional vector on GF (2) is input from an input terminal 1 and a dividend α j is similarly input.
From the data input terminal 2. Input α i , α j
Are converted into exponents i and j by the exponent conversion ROM 27. The exponent j is input to the m-bit full adder 30 through the zero element detection circuit 28 in the same manner as the multiplication circuit. The exponent i is converted to the complement -i of i through the complement circuit 29, and the m-bit full adder 30 is also input.
J + (− i) = ji (4) to which the exponent is added by the full adder 30 is output. In the following operation, as in the case of the multiplier, an exponent modulo 2 m -1 is corrected by the correction circuit 31 and converted into an m-dimensional vector by the vector conversion ROM 32. Is output.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

従来の演算方式は上述したような動作を行うので、基
礎有限体GF(2)上のm次元ベクトルとして表わされた
有限体GF(2m)上の任意の元に関する乗除演算を行う場
合、m次元ベクトルと指数との間の変換や、全加算器の
出力を2m−1を法として補正することが必要となり、こ
れにより演算処理が複雑化するという問題点があった。
Since the conventional operation method performs the above-described operation, when performing a multiplication / division operation on an arbitrary element on a finite field GF (2 m ) expressed as an m-dimensional vector on a basic finite field GF (2), It is necessary to convert between an m-dimensional vector and an exponent and to correct the output of the full adder modulo 2 m −1, which causes a problem that the arithmetic processing becomes complicated.

この発明は上記のような問題点を解消するためになさ
れたもので、有限体GF(2m)上の任意の元に関する乗除
演算をm次元ベクトルのまま行うようにし、演算処理を
簡単化することができる演算方式を提供することを目的
とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and simplifies arithmetic processing by performing multiplication / division operation on an arbitrary element on a finite field GF (2 m ) as an m-dimensional vector. It is an object of the present invention to provide a calculation method that can perform the calculation.

〔課題を解決するための手段〕[Means for solving the problem]

この発明に係る演算方式は、標数を2とする有限体GF
(2m)の任意の元xの逆数を出力する逆数出力手段と、
上記有限体GF(2m)の任意の元yの平方根を出力する平
方根出力手段と、上記任意の元xと上記平方根出力手段
の出力結果とのmビットの排他的論理和を行うととも
に、上記逆数出力手段の出力結果と上記平方根出力手段
の出力結果とのmビットの排他的論理和を行い、さらに
上記逆数出力手段の出力結果同士のmビットの排他的論
理和を行う加算手段とを有し、上記逆数出力手段は、さ
らに上記平方根出力手段の出力結果の逆数を出力すると
ともに、上記加算手段の出力結果の逆数を出力するもの
であって、上記任意の元x,yの乗算は、 なる式1に基づき、上記任意の元x,yの除算は、 なる式に基づいて、上記逆数出力手段と上記平方根出力
手段と上記加算手段とにより演算されるものである。
An arithmetic method according to the present invention is a finite field GF having a characteristic of 2.
Reciprocal output means for outputting the reciprocal of an arbitrary element x of (2 m );
A square root output means for outputting a square root of an arbitrary element y of the finite field GF (2 m ); an exclusive OR of m bits between the arbitrary element x and an output result of the square root output means; There is an adding means for performing an exclusive OR of m bits between the output result of the reciprocal output means and the output result of the square root output means, and further performing an exclusive OR of m bits between the output results of the reciprocal output means. And the reciprocal output means further outputs the reciprocal of the output result of the square root output means, and outputs the reciprocal of the output result of the addition means, and the multiplication of the arbitrary element x, y Based on Equation 1, the division of any of the above elements x and y is It is calculated by the reciprocal output means, the square root output means, and the addition means based on the following equation.

[作用] この演算方式において、上記任意の元x,yの乗除算
は、上記式1及び式2の右辺を逆数出力手段(逆数ROM
9)と平方根出力手段(平方根ROM10)と加算手段(加算
回路13)とにより求める。即ち、上記任意の元x,yの乗
除算は、逆数への変換、平方根への変換、および加算の
組合わせに分割されることより求められる。したがっ
て、一般にm次元ベクトルのまま乗除算を実現すること
ができる。
[Operation] In this operation method, the multiplication / division of the arbitrary elements x and y is performed by reciprocal output means (reciprocal ROM)
9), square root output means (square root ROM 10), and addition means (addition circuit 13). That is, the multiplication / division of the arbitrary element x, y is obtained by being divided into a combination of conversion into a reciprocal, conversion into a square root, and addition. Therefore, multiplication / division can be generally realized with an m-dimensional vector.

〔発明の実施例〕(Example of the invention)

以下、この発明の一実施例を図について説明する。第
1図はこの実施例の演算方式を採用した演算回路の構成
ブロック図である。第1図において、1および2はデー
タ入力端子、3は実現する演算を指定する演算モード入
力端子、4はデータ入力端子1より入力されたm次元ベ
クトルと演算の途中結果とのいずれかを選択する入力選
択回路、5は演算の途中結果あるいはデータ入力端子1
を通して入力されたデータを一時的に蓄えるXレジス
タ、6はデータ入力端子2を通して入力されたm次元ベ
クトルを蓄えるYレジスタ、7、8は演算モード入力端
子3より指定された演算モードに対応して索表(変換)
するデータを選択する入力選択回路、9は入力されたm
次元ベクトルで表現された有限体GF(2m)上の元α
その逆数α-i=1/αに索表(変換)するための逆数RO
M(逆数出力手段)、10は入力されたm次元ベクトルで
表現された有限体GF(2m)上の元αをその平方根 に索表(変換)するための平方根ROM(平方根出力手
段)、11は逆数ROM9の入力となる変換前のデータと逆数
ROM9の出力データとのいずれかを選択する入力選択回
路、12は平方根ROM10の入力となる変換前のデータと、
平方根ROM10の出力と、平方根ROM10の出力をさらに逆数
に変換した逆数ROM9の出力とのいずれかを選択する入力
選択回路、13はmビットの排他的論理和ゲートと、mビ
ットの全零バターン検出ゲートとからなる加算回路(加
算手段)、14は加算回路13の出力と平方根変換ROM10の
出力と入力選択回路8の出力とのいずれかを選択する入
力選択回路、15は演算結果を蓄えるZレジスタ、16は演
算結果を出力するデータ出力端子、12は加算回路13の出
力が全零となったことを検出する零元検出信号、18は演
算モード入力端子3と零元検出信号17の状態により、入
力選択回路4,7,8,11,12,14,25を制御する信号を発生す
る制御回路、19〜24,26は各々入力選択回路4,7,8,11,1
2,14,25を制御する選択信号、25は平方根ROM10の出力と
入力選択回路8の出力とのいずれかを選択する入力選択
回路である。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an arithmetic circuit employing the arithmetic method of this embodiment. In FIG. 1, 1 and 2 are data input terminals, 3 is an operation mode input terminal for designating an operation to be realized, and 4 is one of an m-dimensional vector input from the data input terminal 1 and an intermediate result of the operation. The input selection circuit 5 is an intermediate result of the operation or the data input terminal 1
An X register for temporarily storing data input through the data input terminal 6, a Y register for storing an m-dimensional vector input through the data input terminal 2, and 7 and 8 corresponding to the operation mode specified from the operation mode input terminal 3 Lookup table (conversion)
Input selection circuit for selecting data to be input, 9 is the input m
Reciprocal RO for Sakuhyo (convert) the original alpha i on the finite field GF expressed (2 m) in its reciprocal α -i = 1 / α i in dimensional vector
M (reciprocal output means), 10 represents the element α j on the finite field GF (2 m ) represented by the input m-dimensional vector as its square root Square root ROM (square root output means) for performing a look-up table (conversion), and 11 is the reciprocal of the data before conversion which is the input of reciprocal ROM 9
An input selection circuit for selecting any of the output data of the ROM 9, 12 is data before conversion which is an input of the square root ROM 10,
An input selection circuit for selecting either the output of the square root ROM 10 or the output of the reciprocal ROM 9 obtained by further converting the output of the square root ROM 10 into a reciprocal. 13 is an m-bit exclusive OR gate and m-bit all-zero pattern detection. An addition circuit (adding means) comprising a gate, 14 is an input selection circuit for selecting one of the output of the addition circuit 13, the output of the square root conversion ROM 10, and the output of the input selection circuit 8, and 15 is a Z register for storing the operation result , 16 is a data output terminal for outputting a calculation result, 12 is a zero element detection signal for detecting that the output of the adder circuit 13 has become all zero, and 18 is a state of the operation mode input terminal 3 and the state of the zero element detection signal 17. A control circuit for generating signals for controlling the input selection circuits 4, 7, 8, 11, 12, 14, 25; 19 to 24, 26 are input selection circuits 4, 7, 8, 11, 1
A selection signal for controlling 2, 14, 25 is an input selection circuit for selecting one of the output of the square root ROM 10 and the output of the input selection circuit 8.

さらに、第2図は第1図中の加算回路13の詳細であ
る。図中33,34は加算回路13の入力となる2つGF(2)
上のm次元ベクトルの入力端子を1ビット毎に展開した
入力端子、35は入力端子33,34から入力されたm次元ベ
クトルの対応するビット同士をGF(2)上で加算する排
他的論理和ゲート、36はm個の排他的論理和ゲート35の
出力すべてが零となったことを検出する全零パターン検
出ゲート、37はm個の排他的論理和ゲート35の出力端子
で、加算回路13の出力を1ビット毎に展開したものであ
る。
FIG. 2 shows the details of the adder circuit 13 in FIG. In the figure, 33 and 34 are two GF (2) which are the inputs of the adder circuit 13.
An input terminal obtained by expanding the input terminal of the above m-dimensional vector for each bit, 35 is an exclusive OR that adds corresponding bits of the m-dimensional vector input from the input terminals 33 and 34 on GF (2). A gate 36 is an all-zero pattern detection gate for detecting that all the outputs of the m exclusive OR gates 35 have become zero, and 37 is an output terminal of the m exclusive OR gates 35. Is developed for each bit.

第1図の回路により実現できる有限体GF(2m)上の演
算は次のように行われる。ここでは便宜上α=X,α
=Yと表すこととする。
The operation on the finite field GF (2 m ) which can be realized by the circuit of FIG. 1 is performed as follows. Here, for convenience, α i = X, α j
= Y.

有限体GF(2)とその拡大体GF(2m)(mは正整数)
の上では、減算a−bは、加算a+bと同一であり、a
+a=0となることが知られている(武田二郎著「代数
系と符号理論」槙書房(1978)参照)。
Finite field GF (2) and its extended field GF (2 m ) (m is a positive integer)
Above, the subtraction a−b is the same as the addition a + b,
It is known that + a = 0 (see Jiro Takeda, "Algebraic System and Coding Theory", Maki Shobo (1978)).

従って、関係式 と書き直すことができる。Therefore, the relational expression Can be rewritten.

式(A)′を変形することにより以下の式が得られ
る。
By transforming equation (A) ', the following equation is obtained.

以上の式に基づいて、 のいずれの場合も、第1図の入力端子1にXを、入力端
子2にYを入力することで、上述の演算を実現できる。
Based on the above formula, In either case, the above calculation can be realized by inputting X to the input terminal 1 and Y to the input terminal 2 in FIG.

以下、典型的な例である乗算X・Yと除算Y/Xについ
ての動作を説明する。なお、説明を容易にするために、
X,Yとも非零とする。
Hereinafter, operations of typical examples of multiplication XY and division Y / X will be described. Note that, for ease of explanation,
Both X and Y are non-zero.

まず、乗算について説明する。まず初期状態として、
入力選択回路4をb側に入力選択回路25をa側に閉じ、
Xを入力端子1を経由してXレジスタ5へ入力し、同時
に入力端子2を経由してYをYレジスタ6へ入力する。
次いで、入力選択回路7をa側に閉じ、入力選択回路8
をb側に閉じ、入力選択回路11をb側に、入力選択回路
12をa側に閉じ、加算回路13へXレジスタ5の内容を逆
数ROM9にて1/Xに変換して入力し、Yレジスタ6の内容
を平方根ROM10にて に変換して入力する。加算回路13の出力が全零となった
場合には、その結果を零元検出信号17によって制御回路
18へ通知し、制御回路18は制御信号24により入力選択回
路14をb側に閉じ、平方根ROM10の出力をZレジスタ15
へ蓄え、出力端子16を経由してZレジスタ15の内容を出
力し、処理を終了する。これは、 のときに相当し、式(5)の例外的な場合であり明らか
となり、平方根ROM10の出力がそのまま演算結果として
出力すればよいからである。加算回路13の出力が零でな
ければ、入力選択回路14をa側に、入力選択回路4をa
側に閉じて、加算回路13の出力をXレジスタ5へ蓄え
る。次いで入力選択回路4をb側へ閉じて、加算回路13
へXレジスタ5の内容 を逆数ROM9で を変換して入力し、Yレジスタ6の内容を平方根ROM10
および逆数ROM9を通して に変換して入力し、加算回路13にてその和 を計算して入力選択回路14および4を経由してXレジス
タ5に蓄える。次いで入力選択回路12を再びa側に閉
じ、加算回路13へXレジスタ5の内容 を逆数ROM9で に変換し入力するとともに、Yレジスタ6の内容を平方
根ROM10により平方根 に変換し入力する。次いで加算回路13の出力を入力選択
回路14を経由してZレジスタ15に蓄え、さらにZレジス
タ15の内容X・Yを出力端子16を経由して出力すること
で乗算の処理が終了する。
First, multiplication will be described. First, as an initial state,
Close the input selection circuit 4 to the b side and the input selection circuit 25 to the a side,
X is input to the X register 5 via the input terminal 1, and Y is input to the Y register 6 via the input terminal 2 at the same time.
Next, the input selection circuit 7 is closed to the side a, and the input selection circuit 8 is closed.
Is closed to the b side, and the input selection circuit 11 is
12 is closed on the a side, the contents of the X register 5 are converted into 1 / X by the reciprocal ROM 9 and input to the addition circuit 13, and the contents of the Y register 6 are input by the square root ROM 10. Convert to and input. If the output of the adder circuit 13 becomes all zeros, the result is sent to the control circuit by the zero element detection signal 17.
The control circuit 18 closes the input selection circuit 14 to the b side by the control signal 24 and outputs the output of the square root ROM 10 to the Z register 15.
And outputs the contents of the Z register 15 via the output terminal 16 to end the processing. this is, , Which is an exceptional case of equation (5) and obviously This is because the output of the square root ROM 10 may be directly output as the calculation result. If the output of the adding circuit 13 is not zero, the input selecting circuit 14 is set to the a side and the input selecting circuit 4 is set to the a side.
And the output of the adder circuit 13 is stored in the X register 5. Next, the input selection circuit 4 is closed to the side b, and the addition circuit 13 is closed.
X Register 5 contents In reciprocal ROM9 Is converted and input, and the contents of the Y register 6 are square-root ROM10.
And through reciprocal ROM9 , And input the result. Is calculated and stored in the X register 5 via the input selection circuits 14 and 4. Next, the input selection circuit 12 is closed again on the a side, and the contents of the X register 5 are transferred to the addition circuit 13. In reciprocal ROM9 , And input the contents of the Y register 6 to the square root ROM 10 to obtain the square root. Convert to and input. Next, the output of the adder circuit 13 is stored in the Z register 15 via the input selection circuit 14, and the contents X and Y of the Z register 15 are output via the output terminal 16, thereby completing the multiplication process.

次いで、除算Y/Xについて説明する。まず、演算モー
ド入力端子3から、除算を指定すると初期状態として入
力選択回路4はb側に、入力選択回路7はa側に、入力
選択回路8はb側に、入力選択回路11はa側に、入力選
択回路12はa側に、入力選択回路25はa側にそれぞれ閉
じられる。次いで、入力端子1より除数Xを、入力端子
2より被除数Yを入力し、それぞれをXレジスタ5とY
レジスタ6とに蓄える。Xレジスタ5の内容Xは入力選
択回路7および11を経由し、Yレジスタ6の内容Yは入
力選択回路8を経由して平方根ROM10によりYの平方根 に変換され入力選択回路12を経由して、加算回路13に入
力される。加算回路13の出力が全零となった場合にはそ
の結果を零元検出信号17によって制御回路18へ通知し、
制御回路18は制御信号24により、入力選択回路14をb側
に閉じて、Xレジスタ15へ平方根ROM10の出力 を蓄え、出力端子16を経由して出力し、処理を終了す
る。これは の場合に相当し、明らかに となり、平方根ROM10の出力をそのまま出力すればよい
からである。加算回路13の出力が零でなければ、入力選
択回路14をa側に、入力選択回路4をa側に閉じて、加
算回路13の出力 をXレジスタ5へ蓄える。
Next, the division Y / X will be described. First, when a division is designated from the operation mode input terminal 3, the input selection circuit 4 is set to the b side, the input selection circuit 7 is set to the a side, the input selection circuit 8 is set to the b side, and the input selection circuit 11 is set to the a side as the initial state. The input selection circuit 12 is closed on the a side, and the input selection circuit 25 is closed on the a side. Next, the divisor X is input from the input terminal 1 and the dividend Y is input from the input terminal 2, and they are respectively input to the X registers 5 and Y.
Stored in register 6. The content X of the X register 5 passes through the input selection circuits 7 and 11, and the content Y of the Y register 6 passes through the input selection circuit 8 and the square root ROM 10 stores the square root of Y. And input to the addition circuit 13 via the input selection circuit 12. When the output of the adding circuit 13 becomes all zeros, the result is notified to the control circuit 18 by the zero element detection signal 17,
The control circuit 18 closes the input selection circuit 14 to the b side by the control signal 24 and outputs the square root ROM 10 to the X register 15. And outputs the result via the output terminal 16, and the process ends. this is , Obviously This is because the output of the square root ROM 10 may be output as it is. If the output of the adding circuit 13 is not zero, the input selecting circuit 14 is closed on the a side and the input selecting circuit 4 is closed on the a side, and the output of the adding circuit 13 is closed. Is stored in the X register 5.

次いで、入力選択回路11をb側に、入力選択回路12を
b側に閉じ、加算回路13へXレジスタ5の内容 に変換し入力選択回路11を経由して入力するとともに、
Yレジスタ6の内容Yを入力選択回路8を経由し、平方
根ROM10で に変換し、入力選択回路25を経由し逆数ROM9で に変換し、入力選択回路12を経由して入力し、加算回路
13によってその和 を計算し、入力選択回路14および4を経由いて再びXレ
ジスタ5に蓄える。
Next, the input selection circuit 11 is closed on the b-side and the input selection circuit 12 is closed on the b-side. And input via the input selection circuit 11,
The content Y of the Y register 6 is transferred to the square root ROM 10 via the input selection circuit 8. To the reciprocal ROM 9 via the input selection circuit 25. And input via the input selection circuit 12
Its sum by 13 Is calculated and stored again in the X register 5 via the input selection circuits 14 and 4.

次いで入力選択回路12を再びa側に閉じ、加算回路13
へXレジスタ5の内容 を入力選択回路7を経由して逆数ROM9により に変換し入力選択回路11を経由して入力するとともに、
Yレジスタ6の内容Yを入力選択回路8を経由して平方
根ROM10により に変換し入力選択回路12を経由して入力する。次いで加
算回路13の出力Y/Xを入力選択回路14を経由してZレジ
スタ5に蓄え、さらにZレジスタ15の内容を出力端子16
を経由して出力することで、除算が終了する。
Next, the input selection circuit 12 is closed again to the side a, and the addition circuit 13
X Register 5 contents By the reciprocal ROM 9 via the input selection circuit 7 And input via the input selection circuit 11,
The content Y of the Y register 6 is read by the square root ROM 10 via the input selection circuit 8. And input via the input selection circuit 12. Next, the output Y / X of the adding circuit 13 is stored in the Z register 5 via the input selecting circuit 14, and the contents of the Z register 15 are further stored in the output terminal 16
The division is completed by outputting via.

上述の動作説明では、入力されるX,Yともに非零とし
たが、X=0またはY=0の場合には、Xレジスタ5お
よびYレジスタ6のそれぞれに第2図の中に示した零元
検出回路を付加し、入力選択回路14より零元を出力する
機能を付加することで乗除算が容易に実現できることは
いうまでもない。
In the above description of the operation, both the input X and Y are assumed to be non-zero. However, when X = 0 or Y = 0, the X register 5 and the Y register 6 have the zero shown in FIG. It goes without saying that multiplication / division can be easily realized by adding an element detection circuit and adding a function of outputting a zero element from the input selection circuit 14.

なお、上記実施例では演算回路を用いて実現したもの
を示したが、計算機上のプログラムとしても実現でき
る。計算機上のプログラムにより有限体GF(2m)上の乗
算を実現した場合のフローチャートを第3図に示す。ま
た、第4図において、逆数表41とは有限体GF(2m)上の
任意の非零の元Xをその乗算に関する逆元(逆数)1/X
に変換する表であり、平方根表42はGF(2m)上の任意の
元Xをその平方根 に変換する表である。
Note that, in the above-described embodiment, the implementation using the arithmetic circuit has been described, but it can also be implemented as a program on a computer. FIG. 3 is a flowchart in the case where the multiplication on the finite field GF (2 m ) is realized by a program on a computer. In FIG. 4, the reciprocal table 41 is obtained by converting an arbitrary nonzero element X on a finite field GF (2 m ) into an inverse element (reciprocal) 1 / X related to the multiplication.
Is a table that converts any element X on GF (2 m ) into its square root. Is a table to be converted to

このプログラムの処理を第3図のフローチャートに基
づいて説明する。まず、有限体GF(2m)上の任意の元X,
Yを入力し(ステップS1)、上記逆数表41によりXを1/X
に変換する(ステップS2)。次に上記平方根表42により
Yを に変換し(ステップS3)、1/Xと との排他的論理和をビット毎にとり(ステップS4)、そ
の和Vが論理「0」である場合は乗算の値を として出力する(ステップSb)。一方、和Vが論理
「0」でない場合は、逆数表41によりVを1/Vに変換し
(ステップS7)、同じく逆数表41により に変換する(ステップS8)。そして、1/Vと との排他的論理和をとり(ステップS9)、逆数表41によ
りその和Wを1/Wに変換し(ステップS10)、1/Wと との排他的論理和をとり乗算の値Zを出力する(ステッ
プS11)。
The processing of this program will be described with reference to the flowchart of FIG. First, any element X, on a finite field GF (2 m )
Y is input (step S1), and X is 1 / X according to the reciprocal table 41.
(Step S2). Next, Y is calculated from the square root table 42 described above. (Step S3), 1 / X and Is exclusive-ORed for each bit (step S4), and if the sum V is logical "0", the value of the multiplication is (Step Sb). On the other hand, if the sum V is not logic "0", V is converted to 1 / V by the reciprocal table 41 (step S7), and (Step S8). And 1 / V (Step S9), and the sum W is converted into 1 / W by the reciprocal table 41 (step S10), and 1 / W and And an exclusive OR is calculated to output a multiplication value Z (step S11).

このように、有限体GF(2)上のm次元ベクトルとし
て表された有限体GF(2m)上の任意の元に関する演算
を、予め作製した逆数表と平方根表とmビットの排他的
論理和処理とにより簡単に実現できる。
As described above, an operation on an arbitrary element on the finite field GF (2 m ) expressed as an m-dimensional vector on the finite field GF (2) is performed by using a reciprocal table, a square root table, and an m-bit exclusive logic. It can be easily realized by sum processing.

〔発明の効果〕〔The invention's effect〕

以上のように本発明によれば、標数を2とする有限体
GF(2m)の任意の元xの逆数を出力する逆数出力手段
と、上記有限体GF(2m)の任意の元yの平方根を出力す
る平方根出力手段と、上記任意の元xと上記平方根出力
手段の出力結果とのmビットの排他的論理和を行うとと
もに、上記逆数出力手段の出力結果と上記平方根出力手
段の出力結果とのmビットの排他的論理和を行い、さら
に上記逆数出力手段の出力結果同士のmビットの排他的
論理和を行う加算手段とを有し、上記逆数出力手段は、
さらに上記平方根出力手段の出力結果の逆数を出力する
とともに、上記加算手段の出力結果の逆数を出力するも
のであって、上記任意の元x,yの乗算は、 なる式に基づき、上記任意の元x,yの除算は、 なる式に基づいて、上記逆数出力手段と上記平方根出力
手段と上記加算手段とにより演算されるので、有限体GF
(2m)上の任意の元に関する乗除演算がm次元ベクトル
のまま行うことができ、したがって演算処理が簡単化
し、高速演算を実現できるという効果が得られる。
As described above, according to the present invention, a finite field having a characteristic of 2
The reciprocal output means for outputting the inverse of any element x of GF (2 m), a square root output means for outputting any of the square root of the original y of the finite field GF (2 m), the arbitrary elements x and the An exclusive OR of m bits with the output result of the square root output means is performed, and an exclusive OR of m bits between the output result of the reciprocal output means and the output result of the square root output means is performed. Means for performing an exclusive OR of m bits between output results of the means, and the reciprocal output means includes:
Furthermore, while outputting the reciprocal of the output result of the square root output means, and outputting the reciprocal of the output result of the addition means, the multiplication of the arbitrary element x, y, Based on the following formula, the division of any of the above elements x and y is Is calculated by the reciprocal output means, the square root output means, and the addition means, based on the following formula, the finite field GF
The multiplication / division operation on any element in (2 m ) can be performed as an m-dimensional vector, so that the effect of simplifying the operation process and realizing high-speed operation can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

第1図はこの発明の一実施例に係る演算方式を作用した
演算回路の構成ブロック図、第2図は第1図中の加算回
路の論理回路図、第3図は他の実施例に係る演算方式を
実現するためのプログラムの乗算フローチャート、第4
図は他の実施例における逆数表および平方根表を示す
図、第5図(a),(b)は従来の演算方式を採用した
乗算回路と除算回路との構成ブロック図である。 9……逆数ROM(逆数出力手段)、10……平方根ROM(平
方根出力手段)、13……加算回路(加算手段)、41……
逆数表、42……平方根表。
FIG. 1 is a block diagram showing a configuration of an arithmetic circuit to which an arithmetic system according to an embodiment of the present invention is applied, FIG. 2 is a logic circuit diagram of an adder circuit in FIG. 1, and FIG. Flow chart of multiplication of a program for realizing the operation method, fourth
FIG. 5 is a diagram showing a reciprocal table and a square root table in another embodiment, and FIGS. 5 (a) and 5 (b) are block diagrams showing the configuration of a multiplication circuit and a division circuit employing a conventional operation method. 9 ... reciprocal ROM (reciprocal output means), 10 ... square root ROM (square root output means), 13 ... addition circuit (addition means), 41 ...
Reciprocal table, 42 ... square root table.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 井上 徹 神奈川県鎌倉市大船5丁目1番1号 三 菱電機株式会社情報電子研究所内 (56)参考文献 特開 昭61−187422(JP,A) ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Toru Inoue 5-1-1, Ofuna, Kamakura City, Kanagawa Prefecture Inside the Information Electronics Research Laboratory, Mitsubishi Electric Corporation (56) References JP-A-61-187422 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】標数を2とする有限体GF(2m)の任意の元
xの逆数を出力する逆数出力手段と、上記有限体GF
(2m)の任意の元yの平方根を出力する平方根出力手段
と、上記任意の元xと上記平方根出力手段の出力結果と
のmビットの排他的論理和を行うとともに、上記逆数出
力手段の出力結果と上記平方根出力手段の出力結果との
mビットの排他的論理和を行い、さらに上記逆数出力手
段の出力結果同士のmビットの排他的論理和を行う加算
手段とを有し、上記逆数出力手段は、さらに上記平方根
出力手段の出力結果の逆数を出力するとともに、上記加
算手段の出力結果の逆数を出力するものであって、上記
任意の元x,yの乗算は、 なる式に基づき、上記任意の元x,yの除算は、 なる式に基づいて、上記逆数出力手段と上記平方根出力
手段と上記加算手段とにより演算されることを特徴とす
る演算方式。
1. A reciprocal output means for outputting a reciprocal of an arbitrary element x of a finite field GF (2 m ) having a characteristic of 2, and the finite field GF
A square root output means for outputting a square root of an arbitrary element y of (2 m ); an exclusive OR of m bits of the arbitrary element x with an output result of the square root output means; Adding means for performing an exclusive OR of m bits between the output result and the output result of the square root output means, and further performing an exclusive OR of m bits between the output results of the reciprocal output means; The output means further outputs the reciprocal of the output result of the square root output means, and outputs the reciprocal of the output result of the addition means, wherein the multiplication of the arbitrary element x, y Based on the following formula, the division of any of the above elements x and y is A calculation method, wherein the calculation is performed by the reciprocal output means, the square root output means, and the addition means based on the following formula:
JP63270579A 1988-10-26 1988-10-26 Calculation method Expired - Fee Related JP2701378B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63270579A JP2701378B2 (en) 1988-10-26 1988-10-26 Calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63270579A JP2701378B2 (en) 1988-10-26 1988-10-26 Calculation method

Publications (2)

Publication Number Publication Date
JPH02116934A JPH02116934A (en) 1990-05-01
JP2701378B2 true JP2701378B2 (en) 1998-01-21

Family

ID=17488096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63270579A Expired - Fee Related JP2701378B2 (en) 1988-10-26 1988-10-26 Calculation method

Country Status (1)

Country Link
JP (1) JP2701378B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2595820B2 (en) * 1991-03-06 1997-04-02 松下電器産業株式会社 Galois extended field arithmetic unit
US7895253B2 (en) * 2001-11-30 2011-02-22 Analog Devices, Inc. Compound Galois field engine and Galois field divider and square root engine and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0642632B2 (en) * 1985-02-15 1994-06-01 株式会社日立製作所 Arithmetic unit on Galois field

Also Published As

Publication number Publication date
JPH02116934A (en) 1990-05-01

Similar Documents

Publication Publication Date Title
CN104391675B (en) Apparatus and processor for improving processing efficiency
ARAKI et al. Fast inverters over finite field based on Euclid's algorithm
JP2001502153A (en) Hardware-optimized Reed-Solomon decoder for large data blocks
JPH0680491B2 (en) Finite field arithmetic circuit
JPH0728782A (en) Operating circuit and operating method
Großschädl A bit-serial unified multiplier architecture for finite fields GF (p) and GF (2 m)
US8244790B2 (en) Multiplier and cipher circuit
US6175945B1 (en) Reed-Solomon decoder
Savas et al. Architectures for unified field inversion with applications in elliptic curve cryptography
JP2000172520A (en) Galois field operation processor
JP2701378B2 (en) Calculation method
JP2597775B2 (en) Division method and division device
JP3343857B2 (en) Decoding device, arithmetic device, and methods thereof
JPH10187416A (en) Floating point arithmetic unit
JP3913921B2 (en) Circuit for reciprocal of arbitrary element in finite field
JPH04256016A (en) Method and apparatus for correcting multiplier for complement of 2 so that multiplication of non-signed number is performed
JP3850512B2 (en) Reed-Solomon decoder
JPS6217256B2 (en)
KR100946256B1 (en) Scalable Dual-Field Montgomery Multiplier On Dual Field Using Multi-Precision Carry Save Adder
JPH10322226A (en) Reed solomon decoding method
Lórencz et al. Subtraction-free almost Montgomery inverse algorithm
JP2705162B2 (en) Arithmetic processing unit
JPH0778748B2 (en) Galois field arithmetic unit
JP3210420B2 (en) Multiplication circuit over integers
JP2753922B2 (en) Fixed-point division method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071003

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081003

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees