JP2004233428A - Inverse element calculation device, inverse element calculation method, and inverse element calculation program - Google Patents

Inverse element calculation device, inverse element calculation method, and inverse element calculation program Download PDF

Info

Publication number
JP2004233428A
JP2004233428A JP2003018846A JP2003018846A JP2004233428A JP 2004233428 A JP2004233428 A JP 2004233428A JP 2003018846 A JP2003018846 A JP 2003018846A JP 2003018846 A JP2003018846 A JP 2003018846A JP 2004233428 A JP2004233428 A JP 2004233428A
Authority
JP
Japan
Prior art keywords
field
inverse
prime
norm
conjugate
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.)
Pending
Application number
JP2003018846A
Other languages
Japanese (ja)
Inventor
Jun Furukawa
潤 古川
Isamu Teranishi
勇 寺西
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2003018846A priority Critical patent/JP2004233428A/en
Publication of JP2004233428A publication Critical patent/JP2004233428A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for calculating, at high speed, an inverse element of a field which is the base of elliptic cipher, code or the like. <P>SOLUTION: In the inverse element calculation method, when there are an arbitrary base field and its extended field M in an arbitrary order, a field L which is extended by a q-th order cyclotomic polynomial (q is a prime number obtained by adding 1 to an integral multiple of the above order) is considered, and the field M is considered as a medium field of the extended field L. In the above manner, Frobenius mapping in M is obtained naturally from Frobenius mapping in L. The quantity of calculation required for the Frobenius mapping in L is very small. Also, when obtaining the inverse element, frequency of using multiplication in M is reduced by repeating calculation of products and norms of all the conjugate elements in relation to a medium field which is on a certain medium field and has less members. By this operation, an extended field in an arbitrary order can be obtained and, as a result, the inverse element can be obtained at high speed. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は, 有限体である基礎体とその有限次拡大体との中間体の元の逆元を求める方法に関し、特に前記拡大体が前記基礎体を、既約な多項式で、ある整数mがあって根として1の原始m乗根およびそれのみを根とするものを定義多項式として用いる逆元演算装置、逆元演算方法、及び逆元演算プログラムに関する。
【0002】
【従来の技術】
楕円曲線暗号や符号においては素体とは限らない有限体の元の逆元を求める演算が使われることがある。そして多くの場合この演算は、乗算加算等のその他の演算に比べて計算時間を多く必要とするため、この高速化による恩恵は大きい。
【0003】
特許文献1には、この内容が記載されている。
楕円曲線暗号の例をあげる。ある有限体上定義された楕円曲線上の点の加算に必要な計算は、点をaffine座標であらわした場合に定義体上の乗算3個と逆元演算1個である。定義体が素体の場合逆元演算に必要な計算量は乗算の10倍以上必要で、点の加算に必要な計算に占める逆元演算の割合は大きい。それゆえ、逆元演算の高速化は重要な課題となっている。
【0004】
定義体を素体でない有限体にすることで、定義体の逆元演算を効率化する方法が 幾つか知られている。そうした効率化方法として例えば、OEFによる方法、逐次拡大OEF法, 円分拡大による方法などが知られている。
【0005】
OEFによる方法とは, 非特許文献1に記載されている方法である.
逐次拡大OEF法とは, 非特許文献2に記載されている方法である。
【0006】
円分拡大による方法とは、非特許文献3に記載されている方法である。
【0007】
まずOEFによる方法を説明する。定義体の素体からの拡大次数をmとすると、定義体の元は素体の元m個の列と見做す事ができる。情報処理装置の処理するワード長をuとする。OEFにおいては、定義体の位数pは2以下で, しかも位数は2に近い値でなければならない。さらに、定義体の定義多項式は、ある整数wで
−wの形で 書けるものを用いる。整数wの絶対値が小さければ小さいほど演算は高速である。
【0008】
OEFによる方法における乗算および逆元演算を説明する。例えば上記ワード長が32(32ビット情報処理装置)で、拡大次数mが7であったとする。
定義体の位数pのビット数は32以下である。また、Z/pZの元は1ワードで書くことができる。定義体の元Aを任意に取るとき、Aは、Z/pZの元a、a、a、a、a、a、aを用いて、
+aX+a+a+a+a+aと表現することができる。定義体のもう一つの元Bをb+bX+b+b+b+b+bとした時に、二つの要素の積ABを求めるにはまず、二つの要素の多項式としての積を求める。結果は12次の多項式で、Z/pZの要素c、c、c、c、c、c、c、c、c、c、c10、c11、c12を用いて、c+cX+c+c+c+c+c+c+c+c+c1010+c1111+c1212とあらわせる。
【0009】
これを既約多項式X−wを用いて、6次の多項式に落す。すなわち、7以上のnに関して操作「c→wcn−7」を繰り返し、6次の多項式を得る。得られた6次式が拡大体上での二つの元A、Bの積ABである。
【0010】
次に、逆元演算の方法を記述する。^
まず、A−1=(A(p^(m−1)+p^(m−2)+、、、+p+1)−1(p^(m−1)+p^(m−2)+、、、+P)であることが知られている. 最初にA(p^(m−1)+p^(m−2)+、、、+P)を求める。
【0011】
OEFにおいてはフロベニウス写像A→Aは簡単に計算できるので、この計算は高速に行うことができる。
【0012】
具体的には、
(p^(m−1)+p^(m−2)+、、、+P)=(...((AA)A)...)である事を用いて、フロベニウス写像とAとの積を取る演算とを交互に用いることで値を計算する。次にこれにAを乗じてA(p^(m−1)+p^(m−2)+、、、+p+1)を求める。この値は素体の元なので、基礎体上での逆元を計算すれば良い。
【0013】
OEFを用いることの第一の利点は、多項式の積を求める上述の計算が、情報処理装置の処理するワード長に収まる数どうしの積と和とで可能なため、多倍長演算が不要となり、ソフトウェア実装の場合高速になる事である。
【0014】
第二の利点は、12次の多項式を6次に落す際に、各Z/pZにwという小さい値を乗じるだけで済む事である。これが拡大体と同程度の位数を持つ素体である場合は、同じ操作に対応する除算に必要な計算コストが非常に大きい。
【0015】
第3の利点は、逆元の計算が容易なことである。素体上での逆元演算は、体が大きいとコストが非常に大きくなるが、OEFの場合拡大体の逆元を計算する時に必要な逆元演算は、小さな素体上での逆元演算だけである為、コストが少なくてすむ。
【0016】
次に逐次拡大OEFによる方法を説明する。逐次拡大OEFによる方法は、OEFによる方法と同様の拡大を繰り返し適用して拡大した体を用いる。例として、2回拡大する場合を記述する。
【0017】
まず有限体Kをひとつとり、その拡大体Mをとる。拡大体Mをさらに拡大したものを拡大体Lと呼ぶことにする。MのKからの拡大次数をn’とし、LのMからの拡大次数をnとする。Lの元Aを任意に取る。逐次拡大OEFで元Aの逆元を求める方法を説明する。
【0018】
OEFの場合と同様に
−1=(A(p^(n−1)+p^(n−2)+、、、+p+1)−1(p^(n−1)+p^(n−2)+、、、+P)である事を利用する。
ここで、B=A(p^(n−1)+p^(n−2)+、、、+p+1)とするとBはMの要素である。
するとまた、
−1=(B(p^(n’−1)+p^(n’−2)+、、、+p+1)−1(p^(n’−1)+p^(n’−2)+、、、+p)がなり立つ。
【0019】
ここでC=B(p^(n’−1)+p^(n’−2)+、、、+p+1)とおくと、Cは基礎体Kの要素である。よってA−1=A(p^(n−1)+p^(n−2)+、、、+p)(p^(n’−1)+p^(n’−2)+、、、+p)−1である。
【0020】
この等式を用いてA−1を求める。拡大の回数が2より大きい場合は、同様の手法を各拡大体に対して順次繰り返せば良い.
逐次拡大OEF による方法を用いることの利点を上記例で説明する.
等式A−1=A(p^(n−1)+p^(n−2)+、、、+p)(p^(n’−1)+p^(n’−2)+、、、+p)−1を用いて、式A−1を求める場合、右辺の計算において、Aを乗じる演算は、体L上の演算であるが、Bを乗じる演算は体M上の演算である。体Mは体Lより小さいので、後者の演算はより効率的に行える。OEFによる方法におけるmと、本方法におけるn,n’の間に、m=nn’の関係があるとする。これは、暗号にこれらの体を用いた時に、暗号に同程度の強度を持たせるためには適切な仮定である。
【0021】
OEFで用いられる拡大体をL’とする。逆元演算のために必要な演算は、OEFの場合体L’上の乗算がm個と素体上の逆元演算、逐次拡大OEFの場合体L上の乗算はn個、体M上の乗算がn’個と基礎体上の逆元演算である. 体L上の乗算と体L’上の乗算にかかるコストはほぼ同じであるので、全体として逐次拡大OEFの方が演算コストが低い。但し、逐次拡大OEFは体の拡大次数がnn’と書けるため、拡大次数は合成数である必要がある。
【0022】
最後に円分拡大を用いる方法を説明する。有限体Kに対し、K上の多項式で、1の原始m乗根およびそれのみを根とするものを、K上の第m円分多項式と呼ぶことにする。Kが1の原始m乗根を含まないことがK上のm次の円分多項式が既約であるための必用十分条件である。円分拡大を用いる方法では、OEFとほぼ同等の効果に加えて、フロベニウス写像がより高速であることが期待できる。但し、選択できる拡大体は、拡大次数が素数より1小さいものに限られている。
【0023】
【特許文献1】
特開2000−214768(4−4、図1)
【非特許文献1】
ダニエル(Daniel V.)、ベイリー(Bailey)、パー(Christof Paar)による文献「オプティマル イクステンション フィールド フォー ファスト アリスメティック イン パブリックキー アルゴリズムズ。クリプト98、シュプリンガー レクチャーノート イン コンピューター サイエン ス、1996年(Optimal Extension Fields for Fast Arithmetic in Public−Key Algorithms, CRYPTO’98. Springer Lecture Notes in Computer Sciencs, 1996.)」
【非特許文献2】
小林鉄太郎 青木和麻呂、星野文学による文献「逐次拡大OEF, SCIS2000−B02」
【非特許文献3】
柳澤重 毅 松尾和人 趙 晋輝 辻井重男による文献「楕円暗号のハードウェア実装, SCIS’98−10.1.C.」
【0024】
【発明が解決しようとする課題】
2003年現在、多くのコンピューターが32ビットCPUを使っている。
【0025】
その為、楕円曲線暗号を高速にソフトウエア実装するためには、その演算の単位が32ビット以下で、その値が232に近いものであることが望ましい。また同現在, 楕円曲線暗号の安全定数のビット数の標準は160ビットである。これは、用いる体の位数が2160−1以上であることを要求している。もし、32ビット程度の素体を選んだ場合、その拡大体の位数が上記値であるためには、拡大次数は5または6である必要がある。拡大次数が5であるためには基礎体のビット数は丁度32(=160/5)である必要がある。拡大次数が6であるならば、基礎体のビット数は27(>160/6)ビット以上であれば良い。
【0026】
従来の技術では、フロベニウス写像を高速化するためには、体の拡大は円分多項式で行うことが好ましく、乗算を少しでも小さな体で行うためには逐次拡大が好ましいことが結論される。ところが、拡大次数として5を選んだ場合、5は素数であるので逐次拡大とはなり得ず、5+1は素数でもないので円分多項式による拡大も行えない。また、拡大次数として6を選んだ場合、6=2x3であるので逐次拡大とすることはできるが、3+1が合成数なので4次の拡大は円分多項式による拡大とはできない。
【0027】
本発明は、いかなる拡大次数の拡大体でも円分多項式を用いる拡大を応用して、拡大体のフロベニウス写像を高速に演算することを可能にし、またその拡大次数が合成数の場合、逐次拡大の長所もあわせ持たせることを可能にする逆元演算装置、逆元演算方法、及び逆元演算プログラムを提供するものである。
【0028】
【課題を解決するための手段】
本発明の第1の逆元演算装置は、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算装置であって、
外部からの入力データを受け付ける入力部と、前記入力データの数値から約数列を決定する約数列算出部と、前記約数列算出部から前記約数を逐次入力して共役元積とノルムとを計算し前記約数列算出部に返却する共役元積ノルム計算部と、前記約数列算出部から入力した共役元積とノルムとから逆元を計算する逆元計算部と、前記逆元計算部で計算した逆元を出力する出力部とを備え、
前記入力部は、前記基礎体Kを拡大して前記拡大体Mを求める任意の拡大次数n(nは自然数)と、q=n・j+1が素数となるようなq(jは小さい自然数)と、q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、を入力し、
素数pと既約多項式をもとに基礎体Kを生成し、基礎体Kをnによって拡大して拡大体M、基礎体Kをq次の円分多項式で拡大して拡大体Lを決定し、前記拡大体Mの元で逆元の演算を行う元Aを入力し、
前記約数列算出部は、nの約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数が基礎体Kのn[i]乗であるLの部分体をN[i] とし、n[0]=1、n[k+1]=n、N[0]=K、N[k+1]=M、A[k+1]=Aとした時、nの約数n[i]、n[i+1]と、A[i]とをiがkから始まり1になるまで逐次前記共役元積ノルム算出部に提供し、結果として前記共役元積ノルム算出部から返却された共役元積A[i] を記憶し、
前記共役元積ノルム算出部は、約数n[i] 、n[i+1]と、A[i]を用い、
N[i−1]に関するA[i]を除くA[i]の共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])、と計算し、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]、として計算し、このノルムを
新たにA[i−1]とし共役元積A[i]とともに前記約数列算出部に返却し、
前記逆元算出部は、前記約数列算出部の記憶する共役元積全てと、
前記約数列算出部が最後に呼び出した時の前記共役元積ノルム算出部が出力したノルムの逆元A[0]−1との積を、
−1=A[k+1]A[k]・・・A[1]A[0]−1として計算し、
前記出力部は、前記逆元計算部の計算結果を出力する、
ことを備える。
【0029】
本発明の第1の逆元演算方法は、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
ある素数qがあって1の原始q乗根のみを根とする前記基礎体Kについて既約な多項式を定義多項式として用いて前記基礎体Kを拡大した拡大体Lを得る第1のステップと、
前記基礎体Kと前記拡大体Lとの間の所与の拡大次数nで前記基礎体Kを拡大した拡大体Mを求める第2のステップと、
前記拡大体Mの元の逆元を前記拡大体Lにおけるフロベニウス写像を用いて求める第3のステップと、
を備え、
前記qは、前記中間体の拡大次数nの整数倍に1を足した素数であることを備える。
【0030】
本発明の第2の逆元演算方法は、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、任意の基礎体とその任意拡大次数nの拡大体Mがあったとき、前記拡大次数nの整数倍に1を足した素数qによって得られるq次円分多項式により前記基礎体を拡大した拡大体Lを求め、前記拡大体Mにおけるフロベニウス写像が拡大体Lにおけるフロベニウス写像から自然に得られることを利用して逆元を求めることを備える。
【0031】
本発明の第3の逆元演算方法は、第2の発明において、前記拡大体Mの元Aの逆元を求めるにあたり、前記拡大体Mと前記基礎体Kとの間で前記拡大次数nの任意の約数n[1]、・・・n[k] を、n[i] がn[i+1]を割りきるよう選び、
位数が(#K)n[i]である部分体をN[i] としたとき、
K=N[0]⊂N[1]⊂・・・N[k]⊂N[k+1]=Mであって、
最初にMの直下の部分体N[k]に関するAの全ての共役元の積とノルムをもとめ、これを基礎体Kに達するまで繰り返し計算することにより逆元を求めることを備える。
【0032】
本発明の第4の逆元演算方法は、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
前記拡大体Mの拡大次数nと、
q=n・j+1(jは小さな自然数)で得られる素数qと、
q次円分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下で、かつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数、のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して前記基礎体Kを得るための既約多項式と、
前記拡大体中の逆元を求める元Aを入力する第1のステップと、
前記拡大次数nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選ぶ第2のステップと、
前記拡大体Mと前記基礎体Kの間にあって位数が(#K)n[i]である中間体列を求める第3のステップと、
前記中間体列の前記拡大体M直下の中間体に関する元Aの共役元で自分自身以外のものを全てかけあわせた共役元積を求めこれを記憶する第4のステップと、
前記共役元積と元Aを掛け合わせてAのノルムを計算してこれをA’とする第5のステップと、
前記第5のステップのA’について前記中間体列でMから1段下げてシフトした中間体について前記第4のステップと第5のステップを実行し、同様にして前記ノルムが前記基礎体Kの元になるまでこれを有限回繰り返す第6のステップと、
基礎体についてのノルムの逆元を求め、前記第4のステップで記憶する全ての中間体列に関する共役元積との積を計算してこれをAの逆元とする第7のステップと、
を備える。
【0033】
本発明の第5の逆元演算方法は、27ビット以上32ビット以下の素数を標数とし1の原始7乗根を含まない素体に1の原始7乗根を付加して拡大した6次拡大体の元の逆元を計算する逆元演算方法であって,
前記6次拡大体の元で逆元を求める元が入力される第1のステップと、
前記素体の3次拡大体N[1]を求める第2のステップと、
元Aの前記3次拡大体N[1]についての共役元全ての積を第一共役元積として計算する第3のステップと、
前記第一共役元積に元Aをかけあわせた第一ノルムを計算する第4のステップと、
前記第一ノルムの前記素体についての共役元すべての積を第二共役元積として計算する第5のステップと、
前記第二共役元積に前記第一ノルムをかけあわせた第二ノルムを計算する第6のステップと、
第二ノルムの逆元を計算する第7のステップと、
第二ノルムの逆元と第二共役元積と第一共役元積とをかけあわせてAの逆元を計算する第8のステップと、
Aの逆元を出力する第9のステップと、
を備える。
【0034】
本発明の第6の逆元演算方法は、第5の発明において、前記素体の元は情報処理装置において1ワードとして処理され、前記6次拡大体の元は6ワードとして処理されることを備える。
【0035】
本発明の第7の逆元演算方法は、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
前記基礎体Kを拡大して前記拡大体Mを求める任意の拡大次数n(nは自然数)と、
q=n・j+1が素数となるようなq(jは小さい自然数)と、
q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、
を入力する第1のステップと、
素体Z/pZ上の既約多項式を一つ選び、この既約多項式でZ/pZを拡大して得られる体を前記基礎体Kとし、既約多項式として一次式が選ばれた場合にはK=Z/pZとするとともに、基礎体Kをq次の円分多項式(xq−1+xq−2+・・・+x+1)で拡大した体を拡大体Lとする時、拡大体Lの中間体Mとして
j=1の場合はMとしてL自身をとり、j>1の場合は、位数がpのものをMとし、逆元を計算する対象のMの元Aを入力する第2のステップと、
nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数が(#K)n[i]であるLの部分体をN[i] とし、n[0]=1、N[0]=K、N[k+1]=M、A[k+1]=Aとする第3のステップと、
N[i]の要素A[i] について、N[i−1]に関する共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])と計算して記憶する第4のステップと、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]と計算し、このノルムを新たにA[i−1]とする第5のステップと、
i=k+1の拡大体Mの元Aから1の基礎体Kまで順に、A[i]を入力し、
A[i]及びノルムNN[i]/N[i−1](A[i])を得る第6のステップと、
N[1]/N[0](A[1])の逆元を求め、これをA[0]−1とする第7のステップと、
第4のステップで記憶したA[i]と第7のステップのA[0]−1から
−1=A[k+1]A[k]・・・A[1]A[0]−1としてAの逆元を得る第8のステップと、
を備える。
【0036】
本発明の第1の逆元演算プログラムは、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算処理をコンピュータに実行させる逆元演算プログラムであって、
ある素数qがあって1の原始q乗根のみを根とし前記基礎体Kについて既約な多項式を定義多項式として用いて前記基礎体Kを拡大した拡大体Lを得る機能と、前記基礎体Kと前記拡大体Lとの間の所与の数値nで前記基礎体Kを拡大した拡大体Mを求める機能と、
前記拡大体Mの元の逆元を前記拡大体Lにおけるフロベニウス写像を用いて求める機能と、
を備え、
前記qは、前記中間体の拡大次数nの整数倍に1を足した素数であることを備える。
【0037】
本発明の第2の逆元演算プログラムは、有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算処理をコンピュータに実行させる逆元演算プログラムであって、
前記基礎体Kを拡大して前記拡大体Mを求める任意の拡大次数n(nは自然数)と、
q=n・j+1が素数となるようなq(jは小さい自然数)と、
q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、
を入力する機能と、
素体Z/pZ上の既約多項式を一つ選び、この既約多項式でZ/pZを拡大して得られる体を前記基礎体Kとし、既約多項式として一次式が選ばれた場合にはK=Z/pZとするとともに、基礎体Kをq次の円分多項式(xq−1+xq−2+・・・+x+1)で拡大した体を拡大体Lとする時、拡大体Lの中間体Mとして
j=1の場合はMとしてL自身をとり、j>1の場合は、位数がpのものをMとし、逆元を計算する対象のMの元Aを入力する機能と、
nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数が(#K)n[i]であるLの部分体をN[i] とし、n[0]=1、N[0]=K、N[k+1]=M、A[k+1]=Aとする機能と、
N[i]の要素A[i] について、N[i−1]に関する共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])と計算して記憶する機能と、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]と計算し、このノルムを新たにA[i−1]とする機能と、
i=k+1の拡大体Mの元Aから1の基礎体Kまで順に、A[i]を入力し、
A[i]及びノルムNN[i]/N[i−1](A[i])を得る機能と、
N[1]/N[0](A[1])の逆元を求め、これをA[0]−1とする機能と、
第4のステップで記憶したA[i]と第7のステップのA[0]−1から
−1=A[k+1]A[k]・・・A[1]A[0]−1としてAの逆元を得る機能と、
を備える。
【0038】
【発明の実施の形態】
本発明の実施の形態の構成を図1を参照して説明する。
【0039】
本発明の実施の形態の構成は、共通鍵暗号等で使用する暗号鍵を生成する情報処理装置である暗号鍵生成装置1と、暗号鍵生成装置1と同じ構成をもつ暗号鍵生成装置2と、暗号鍵生成装置1と暗号鍵生成装置2とを接続するインターネットを含むネットワーク3と、から構成される。
【0040】
さらに、暗号鍵生成装置1と暗号鍵生成装置2とは、キーボード等の入力手段10と、暗号鍵生成のため楕円曲線の演算を行う暗号鍵演算装置11と、ディスプレイやプリンタを含む出力手段12と、暗号鍵の生成を行うソフトウェアプログラムを格納する磁気ディスク装置等の二次記憶装置13と、から構成されている。
【0041】
さらに、暗号鍵演算装置11は、64ビットアーキテクチャ、32ビットアーキテクチャ等で設計されたCPU110と、予め固定された数値データ等の不揮発性データを記憶するROM111と、二次記憶装置13からロードした演算処理のプログラムを記憶するRAM112と、二次記憶装置13との入出力を制御するIOポート113と、から構成されている。
【0042】
次に、本発明の実施の形態の動作時におけるソフトウェアの構成について図2をもとに説明すると、外部からの入力データを入力手段11によって受け付ける入力部41と、前記入力データの数値から約数列を決定する約数列算出部42と、前記約数列算出部から前記約数を逐次入力して共役元積とノルムとを計算し前記約数算出部42に返却する共役元積ノルム計算部43と、前記約数列算出部42から入力した共役元積とノルムとから逆元を計算する逆元計算部44と、前記逆元計算部44で計算した逆元を出力手段12等に出力する出力部45とを備えている。
【0043】
尚、本実施の形態は、共通鍵暗号処理における逆元の演算を例として説明するが、本発明は、これに限られるものでないことは明瞭である。
【0044】
次に、本発明の実施の形態の動作について図3と図4のフローチャートを元に説明する。
【0045】
暗号鍵生成装置1,2は、ネットワーク3を介して情報を交換して暗号鍵生成装置1,2の間で共有する共通暗号鍵の生成を行う。暗号鍵生成装置1、2の管理者は、暗号鍵演算装置11のもつアーキテクチャに従って処理されるワード長以下でかつそれに近い素数pの持つビット数|p|及びpによる素体Z/pZによる基礎体Kに対する任意の拡大次数n等を入力手段10から入力する。これらの入力から楕円曲線を定義する体を決定する。
[体の選び方]
まずワード長倍数ζを1、1/2、または2とし、そこからζを選択する。ワード長倍数ζが1か1/2か2かに応じて、情報処理装置の処理するワード長以下でかつそれに近い素数pのビット数、ワード長の半分以下でかつそれに近い素数pのビット数, およびワード長の2倍以下でかつそれに近い素数pのビット数|p|のいずれかが入力手段10から与えられるとする。
【0046】
さらに任意の拡大次数nが与えられたとする(ステップ101)。尚、一旦入力された数値は、ROM111に記憶し、以降はROM111に記憶した数値を取り込むようにしてもよい。
【0047】
jを、q=n・j+1が素数となるような整数とする(ステップ102)。
(なおjは小さい方がより好ましい。)
q分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pでかつpのビット数が与えられたビット数に一致するようなpを選ぶ。 さらに、素体Z/pZ上の既約多項式を一つ選び、この既約多項式でZ/pZを拡大して得られる体を基礎体として固定する(ステップ103)。以後この基礎体をKと書く。 なお既約多項式として一次式が選ばれた場合にはK=Z/pZとする。基礎体Kをq分多項式で拡大した体をLとする。
【0048】
ここで、q分多項式はxq−1+xq−2+・・・+x+1となる。j=1の場合はMとしてL自身をとる。j>1の場合は、Lの中間体で位数がpのものをMとする(ステップ104)。尚、q分多項式の数値q及び既約多項式も入力手段10から入力されるものとする。
【0049】
以上説明した本発明の逆元演算に関する所与の条件を整理すると、
(1)任意の拡大次数n(nは自然数)
(2)q=n・j+1が素数となるようなq
(3)q分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数p
(4)素体Z/pZを拡大して基礎体Kを得るための既約多項式
となる。
【0050】
以上の前提のもとに暗号鍵の生成処理に必要な処理プログラムが、暗号鍵演算装置11の図示しないオペレーティングシステムによって二次記憶装置13から読み出され、RAM112に配置されて実行が開始される。この暗号鍵の生成における楕円曲線の演算にあたり、ある数値について上記体の逆元の計算が必要となった場合、暗号鍵の生成を行う本体から逆元を求める対象となる数値を引数として本発明に関する逆元演算処理の呼び出しが行われ、逆元が演算の結果として生成されると、呼び出し元にこの逆元が返却されるようになっている。
[逆元演算方法]
[準備(1)(体Kの2つの元の積の計算)]
Kの要素(a、a、、、、aq−1) 及び(b、b、、、bq−1)を用いてあらわされる体Lの要素A=ax+a+・・・+aq−1q−1、及びB=bx+b+・・・bq−1q−1の積は、多項式ABの積を求めた後、q分多項式による同値関係を用いて、一意にcx+c+・・・cq−1q−1とあらわすことができる。但し、(c、c、、、、cq−1)はZ/pZの要素である。
[準備(2)(体L上の演算)]
体Lの任意の元wは、q−1個のKの元a、a、、、、aq−1を用いて、
w=ax+a+・・・+aq−1q−1とあらわすことができる。
【0051】
以下、ax+a+・・・+aq−1q−1を略して(a、a、、、、aq−1)とも書くことにする。
【0052】
この要素のフロベニウス写像φによるφ(w)は、
φ(w)=(a’、a’、、、、a’q−1)と表すことができる。
但し、a’ip mod =a
[準備(3)(体M上の演算)]
体Mは体Lに埋め込まれているため、体Mの要素に対するフロベニウス写像は、体Lの要素に対するフロベニウス写像と同様に計算できる。
【0053】
また、同様に体Mの要素の積も計算できる。
【0054】
この時、体Mは体Lより位数が小さいので、q−1個のZ/pZの要素(a、a、、、、aq−1)の中には、高々n個しか異なる値を含まない。これを利用すると、体Mの要素間の積は体Lのそれより簡単に計算できる。
[逆元演算]
前記[体の選び方]に記述した様に選ばれた体L,M,K,Z/pZ及びn、qがあるとする。そして、逆元演算対象として体Mの要素Aが入力されたとする(ステップ201)。
【0055】
nの任意の約数n[1]、・・・n[k] を、n[i] がn[i+1]を割りきるよう複数選ぶ(ステップ202)。
【0056】
位数が(#K)n[i](Kの位数のn[i]乗)で、拡大体Lの部分体をN[i] と呼ぶことにする(ステップ203)。
【0057】
また、n[0]=1、N[0]=K、N[k+1]=M、A[k+1]=Aとする。
【0058】
N[i]の要素A[i] が逐次入力されたとき、
N[i−1]に関するA[i]を除くA[i]の共役元全ての積A[i] 及びノルムNN[i]/N[i−1](A[i])を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])、
N[i]/N[i−1](A[i])=A[i]A[i]、と計算する。
【0059】
共役元積生成方法を利用して以下の処理をする。
【0060】
ここでK=N[0]⊂N[1]⊂・・・⊂N[k+1]=Mである。
i=k+1から1まで順に(ステップ206)、共役元積生成方法に A[i]を入力し、A[i](ステップ204)及びノルムNN[i]/N[i−1](A[i])(ステップ205)を得、NN[i]/N[i−1](A[i])をA[i−1]とする。
N[1]/N[0](A[1])の逆元を求め(ステップ207)これをA[0]−1とする. A−1=A[k+1]A[k]・・・A[1]A[0]−1とする(ステップ208)。これがAの逆元である(ステップ209)。
【0061】
[実施例(1)]
情報処理装置の処理ワード長が32ビットであるとし、ワード長倍数ζ1で、拡大次数nが8となる拡大体Mを選び、この体上での逆元演算を行う方法を図3と図4のフローチャートを参照しながら説明する。
【0062】
ワード長の数値32と拡大次数の数値8が入力される(ステップ101)。
8*2+1=17が素数なのでq=17とする(ステップ102)。
【0063】
第17円分多項式Φ17=1+x+x+・・・+x16がZ/pZ上既約となる素数pで かつpのビット長が32以下32に近いpを選ぶ(ステップ103)。ここでは例としてp=227−39とする。
【0064】
次にZ/pZ上の既約多項式を一つ選ぶ。ここでは一次式が選ばれたとする。よって基礎体KはZ/pZ自身である。Kを17分多項式で拡大した体をLとする。
Lの中間体でその位数がpであるものをMとする(ステップ104)。
【0065】
Mの要素Aは8個のKの要素(a,a,・・・、a)を用いて、
A=ax+a+・・・+a+a+a+a10+・・・+a15+a16とあらわすことができる。
Mの要素Aが入力される(ステップ201)。
(1)MのKに対する拡大次数は8である。8の約数として2,4を選ぶ(2は4を割りきる)(ステップ202)。以下、Lの中間体で位数がpであるものをN[1], 位数がpであるものをN[2] とする(ステップ203)。
(2)AのN[2]に関する共役元全ての積Aを、
=A^{p} として計算する(ステップ204)。
【0066】
これはフロベニウス写像を4回作用させたもので
φ:A→A^{p}は成分でかくと、
φ:ax+a+a+a+a+a+a+a+a+a10+a11+a12+a13+a14+a15+a16
→ ax+a+a+a+a+a+a+a+a+a10+a11+a12+a13+a14+a15+a16
である。
(Aを拡大体Lの要素と見ることで、フロベニウス写像が、単なるKの要素の入れ替えとなっている。)
(3)AのN[2]に関するノルムA[2]を、
A[2]=A・A mod Φ17として計算する(ステップ205)。
【0067】
A[2]の要素は4個のKの要素(c、c、c、c)を用いて、
A[2]=cx+c+c+c+c+c+c+c+c+c10+c11+c12+c13+c14+c15+c16
とあらわすことができる。
(4)N[2]に関する共役元、ノルムを計算したが、このN[2]は基礎体Kの元ではないので、再び共役元の積を求めるステップに行く(ステップ206)。
(5)A[2]のN[1]に関する共役元全ての積A[2]を、
A[2]=A[2]^{p}と計算する(ステップ204)。
【0068】
これはフロベニウス写像を2回作用させたもので
A[2]^{p}=φ(A[2])を、成分でかくと、
φ(cx+c+c+c+c+c+c+c+c+c10+c11+c12+c13+c14+c15+c16
=cx+c+c+c+c+c+c+c+c+c10+c11+c12+c13+c14+c15+c16
である。
(6)A[2]のN[1]に関するノルムA[1]を、
A[1]=A[2]・A[2] mod Φ17により計算する(ステップ205)。
A[1]の要素は2個のKの要素(d、d)を用いて、
A[1]=dx+d+d+d+d+d+d+d+d+d10+d11+d12+d13+d14+d15+d16
とあらわすことができる。
(7)N[1]に関する共役元、ノルムを計算したが、このN[1]は基礎体Kの元ではないので、再び共役元の積を求めるステップに行く(ステップ206)。
(8)A[1]のKに関する共役元全ての積A[1]を、
A[1]=A[1]^{p} と計算する(ステップ204)。
これはフロベニウス写像を1回作用させたもので、
φ(A[1])=A[1]^{p}は、成分でかくと、
φ(dx+d+d+d+d+d+d+d+d+d10+d11+d12+d13+d14+d15+d16
=dx+d+d+d+d+d+d+d+d+d10+d11+d12+d13+d14+d15+d16
である。
(9)A[1]のKに関するノルムA[0]を、
A[0]=A[1]・A[1] mod Φ17を計算する(ステップ205)。
【0069】
A[0]の要素は1個のKの要素(e)を用いて、
A[0]=ex+e+e+e+e+e+e+e+e+e10+e11+e12+e13+e14+e15+e16
とあらわすことができる。
(10)Kに関する共役元、ノルムを計算し終えたが、このKは基礎体なので次の(ステップ207)に行く。
(11)eの逆元 e −1を求める(ステップ207)。
(12)Aの逆元A−1を、
−1=e −1A[1]A[2]と計算する(ステップ208)。
最後にA−1を出力手段12によって出力して終了する(ステップ209)。
【0070】
[実施例(2)]
情報処理装置の処理ワード長が32ビットであるとし、ワード長倍数ζが1で、拡大次数が6となる拡大体Mを選び、この体上での逆元演算を行う方法を図3と図4のフローチャートを参照しながら説明する。
ワード長(32)と拡大次数(6)が入力される(ステップ101)。
6x1+1=7が素数なので、q=7とする(ステップ102)。
【0071】
7分多項式Φ=1+x+x+x+x+x+xがZ/pZ上既約となる素数pで かつpのビット長が32以下32に近いpを選ぶ(ステップ103)。
【0072】
ここでは例としてp=227−115とする。Z/pZ上の既約多項式を一つ選ぶ。ここでは既約多項式として一次式が選ばれたとする。よって基礎体KはZ/pZ自身である。
【0073】
Kを7分多項式で拡大した体をLとする。L自体をMとする(ステップ104)。Mの要素Aを選択すると、Aは6個のKの要素 (a1、2、3、4、5、)を用いて、
A=ax+a+a+a+a+aとあらわすことができる。
Mの要素 Aが入力される(ステップ201)。
(1)MのKに対する拡大次数は6である。6の約数として3を選ぶ。以下、Lの中間体で位数がpであるものをN[1]とする(ステップ203)。
(2)AのN[1]に関する共役元全ての積Aを、
=A^{p} として計算する(ステップ204)。
これはフロベニウス写像を3回作用させたもので
φ(A)=A^{p}を成分でかくと、
φ(ax+a+a+a+a+a)=ax+a+a+a+a+aである。
(3)AのN[1]に関するノルムA[1]を、
A[1]=A・A mod Φを計算する(ステップ205)。
A[1] の要素は3個のKの要素(c、c、c)を用いて、
A[1]=cx+c+c+c+c+c
とあらわすことができる。
(4)N[1]に関する共役元、ノルムを計算したが、このN[1] は基礎体Kではないので、再び共役元の積を求めるステップに行く(ステップ206)。
(5)A[1]のKに関する共役元全ての積A[1]を、
A[1]=A[1]^{p+p}=(A[1]^pA)^pとして計算する(ステップ204)。
これはフロベニウス写像と積の演算により可能である。
ここで φ(A[1])=A[1]^{p}は、成分でかくと、
φ( cx+c+c+c+c+c)=cx+c+c+c+c+cである。
(6)A[1]のKに関するノルムA[0]を、
A[0]=A[1]・A[1] mod Φとして計算する(ステップ205)。
【0074】
A[0]の要素は1個のKの要素(e)を用いて、
A[0]=ex+e+e+e+e+e
とあらわすことができる。
(7)Kに関する共役元、ノルムを計算したが、このKは基礎体なので次の(ステップ207)に行く。
(8)eの逆元e −1を求める(ステップ207)。
(9)Aの逆元A−1を、
−1=e −1A[1]として計算する(ステップ208)。
最後にA−1を出力手段12によって出力して終了する(ステップ209)。
【0075】
【発明の効果】
任意の基礎体とその任意次の拡大体に対し逆元演算が従来の技術に比べて同等かより高速に行える。
【0076】
第1に、本発明におけるフロベニウス写像はいずれも基礎体上の要素の入れ替えにすぎないため、計算のコストは著しく低い。このような特徴を持つためには、拡大体を素数qによるq分多項式による拡大で生成するか、q円分多項式で逐次拡大する必要があった。
【0077】
このため利用できる拡大体の拡大次数が限られていたが、本発明の場合はこの制限をうけない。また、本発明におけるフロベニウス写像の計算コストはOEFによる方法のそれよりも低い。
【0078】
第2に本発明における積の計算コストはOEFのそれと比較しても低い。これは、Mの元をLへ埋め込まれていると見ると、qより次数の高い項はΦによりより低い項と同一視できるからである。OEFの場合この高次の項は、その係数に小さい係数を乗じた低次の項と同一視できるため、乗算の計算コストが発生する。
【0079】
第3に、本発明は逐次、より小さい中間体に関する共役元の逆元演算に帰着している。このことは、積の計算をより小さい体で行うことを可能にしている。例えば、実施例(1)ではAのKに関する全ての共役元の積をM上のフロベニウス写像と乗算を用いて求めるより、これを実施例のようにAA[1]A[2]として求める方が効率的である。なぜならA[1]等をより小さな中間体の積を使うことにより求めることができるからである。尚、これは逐次拡大の持つ利点と同じである。
【図面の簡単な説明】
【図1】本発明の実施の形態の構成を説明するブロック図である。
【図2】本発明の実施の形態のソフトウェア構成を説明するブロック図である。
【図3】本発明の実施例1及び実施例2の拡大体を決定する方法のフローーチャートである。
【図4】本発明の実施例1及び実施例2の逆元を求める方法のフローーチャートである。
【符号の説明】
1 暗号鍵生成装置
10 入力手段
11 暗号鍵演算装置
110 CPU
111 ROM
112 RAM
113 IOポート
12 出力手段
13 二次記憶装置
2 暗号鍵生成装置
3 ネットワーク
41 入力部
42 約数列算出部
43 共役元積ノルム計算部
44 逆元計算部
45 出力部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for obtaining the inverse of an element of an intermediate between a base field which is a finite field and a finite-order extension field thereof. The present invention relates to an inverse operation device, an inverse operation method, and an inverse operation program that use a primitive m-th root as a root and a root having only the primitive m-th root as a definition polynomial.
[0002]
[Prior art]
In elliptic curve cryptography and codes, an operation for finding the inverse of an element of a finite field that is not necessarily a prime field may be used. In many cases, this operation requires more calculation time than other operations such as multiplication and addition.
[0003]
Patent Literature 1 describes this content.
Here is an example of elliptic curve cryptography. The calculations required for the addition of points on an elliptic curve defined on a certain finite field are three multiplications on the definition field and one inverse operation when the points are represented by the affine coordinates. When the definition field is a prime field, the amount of calculation required for the inverse operation is 10 times or more the multiplication, and the ratio of the inverse operation in the calculation required for adding points is large. Therefore, speeding up the inverse operation has become an important issue.
[0004]
Several methods are known for improving the inverse operation of a definition field by making the definition field a finite field that is not a prime field. As such an efficiency improving method, for example, an OEF method, a successively expanding OEF method, a method of expanding a circle, and the like are known.
[0005]
The OEF method is a method described in Non-Patent Document 1.
The successive expansion OEF method is a method described in Non-Patent Document 2.
[0006]
The method of enlarging a circle is a method described in Non-Patent Document 3.
[0007]
First, an OEF method will be described. Assuming that the extension degree of the definition field from the prime field is m, the element of the definition field can be regarded as m elements of the prime field. The word length processed by the information processing device is u. In OEF, the order p of the definition field is 2uLess than and the order is 2uMust be close to Furthermore, the definition polynomial of the definition field is given by an integer w
XmUse something that can be written in -w form. The smaller the absolute value of the integer w, the faster the operation.
[0008]
The multiplication and the inverse operation in the OEF method will be described. For example, it is assumed that the word length is 32 (32-bit information processing device) and the extension degree m is 7.
The number of bits of the order p of the definition field is 32 or less. The element of Z / pZ can be written in one word. When the element A of the definition field is arbitrarily taken, A is an element a of Z / pZ.0, A1, A2, A3, A4, A5, A6Using,
a0+ A1X + a2X2+ A3X3+ A4X4+ A5X5+ A6X6Can be expressed as Let another element B of the definition field be b0+ B1X + b2X2+ B3X3+ B4X4+ B5X5+ B6X6Then, in order to obtain the product AB of the two elements, first, the product as a polynomial of the two elements is obtained. The result is a twelfth order polynomial, the element c of Z / pZ0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12Using c0+ C1X + c2X2+ C3X3+ C4X4+ C5X5+ C6X6+ C7X7+ C9X8+ C9X9+ C10X10+ C11X11+ C12X12I will show you.
[0009]
This is represented by the irreducible polynomial X7Use -w to reduce to a 6th order polynomial. That is, the operation “c” for n of 7 or morenXn→ wcnXn-7And obtain a sixth-order polynomial. The obtained sixth order equation is the product AB of the two elements A and B on the extended field.
[0010]
Next, the method of the inverse operation will be described. ^
First, A-1= (A(P ^ (m−1) + p ^ (m−2) +,... + P + 1))-1A(P ^ (m-1) + p ^ (m-2) +,... + P)Is known to be. A first(P ^ (m-1) + p ^ (m-2) +,... + P)Ask for.
[0011]
In the OEF, the Frobenius map A → ApThis calculation can be done quickly, since can be easily calculated.
[0012]
In particular,
A(P ^ (m-1) + p ^ (m-2) +,... + P)= (... ((ApA)pA). . . )p, The value is calculated by alternately using the Frobenius mapping and the operation for taking the product of A. Then multiply this by A(P ^ (m−1) + p ^ (m−2) +,... + P + 1)Ask for. Since this value is an element of the prime field, it is sufficient to calculate the inverse element on the basic field.
[0013]
The first advantage of using the OEF is that the above-described calculation for obtaining a polynomial product can be performed with a product and a sum of numbers within a word length processed by the information processing device, so that a multiple length operation is not required. In the case of software implementation, the speed is increased.
[0014]
The second advantage is that when the 12th-order polynomial is dropped to the 6th order, each Z / pZ need only be multiplied by a small value of w. If this is a prime field having the same order of magnitude as the extension field, the computation cost required for division corresponding to the same operation is very large.
[0015]
A third advantage is that the calculation of the inverse is easy. The inverse operation on the prime field is very expensive if the field is large, but in the case of OEF, the inverse operation required when calculating the inverse of the expanded field is the inverse operation on the small prime field Only costs are low.
[0016]
Next, a method using the successively enlarged OEF will be described. The method based on the successive expansion OEF uses a body expanded by repeatedly applying the same expansion as the method based on the OEF. As an example, a case where the image is enlarged twice will be described.
[0017]
First, one finite field K is taken and its expanded field M is taken. What is further enlarged from the enlarged body M will be referred to as an enlarged body L. The extension order of M from K is n ', and the extension order of L from M is n. Take an element A of L arbitrarily. A method of obtaining the inverse of the element A by the successively enlarged OEF will be described.
[0018]
As with OEF
A-1= (A(P ^ (n−1) + p ^ (n−2) +,... + P + 1))-1A(P ^ (n-1) + p ^ (n-2) +,... + P)Take advantage of that.
Where B = A(P ^ (n−1) + p ^ (n−2) +,... + P + 1)Then, B is an element of M.
Then again
B-1= (B(P ^ (n′−1) + p ^ (n′−2) +,... + P + 1))-1B(P ^ (n'-1) + p ^ (n'-2) +,... + P)Will stand out.
[0019]
Where C = B(P ^ (n′−1) + p ^ (n′−2) +,... + P + 1)In particular, C is an element of the base body K. Therefore A-1= A(P ^ (n-1) + p ^ (n-2) +,... + P)B(P ^ (n'-1) + p ^ (n'-2) +,... + P)C-1It is.
[0020]
Using this equation, A-1Ask for. If the number of times of enlargement is larger than 2, the same method may be repeated for each of the enlarged fields.
The advantage of using the method based on the successive expansion OEF will be described in the above example.
Equation A-1= A(P ^ (n-1) + p ^ (n-2) +,... + P)B(P ^ (n'-1) + p ^ (n'-2) +,... + P)C-1Using the formula A-1In the calculation on the right side, the operation of multiplying A is an operation on the field L, but the operation of multiplying B is an operation on the field M. Since the field M is smaller than the field L, the latter operation can be performed more efficiently. It is assumed that there is a relation of m = nn 'between m in the OEF method and n, n' in the present method. This is an appropriate assumption to make the ciphers of similar strength when these bodies are used for the ciphers.
[0021]
The expanded field used in the OEF is denoted by L '. In the case of OEF, the necessary operations for the inverse operation are m multiplications over the field L ′ and the inverse operation on the prime field, and in the case of the successively expanded OEF, n multiplications over the field L and on the field M Multiplication is n 'inverse operations on the base field. Since the cost of multiplication on the field L and the cost of multiplication on the field L 'are almost the same, the sequentially expanded OEF as a whole has a lower computation cost. However, in the case of the successively expanded OEF, the expansion order of the field can be written as nn ', so that the expansion order needs to be a composite number.
[0022]
Finally, a method using the circle enlargement will be described. With respect to the finite field K, a polynomial on K with a primitive m-th root and only the root is referred to as an m-th circle polynomial on K. The fact that K does not include a primitive mth root of 1 is a necessary and sufficient condition for an m-th order circular polynomial on K to be irreducible. In the method using the circle enlargement, it is expected that the Frobenius mapping is faster in addition to the effect almost equivalent to the OEF. However, selectable expansion fields are limited to those whose expansion degree is one smaller than a prime number.
[0023]
[Patent Document 1]
JP-A-2000-214768 (4-4, FIG. 1)
[Non-patent document 1]
Daniel V., Bailey, Christof Paar, "Optimal Extension Field for Fast Arismetic in Public Key Algorithms. Crypt 98, Springer Lecture Notes in Computer Science, 1996 ( Optimal Extension Fields for Fast Arithmetic in Public-Key Algorithms, CRYPTO '98. Springer Lecture Notes in Computer Sciences, 1996.).
[Non-patent document 2]
Tetsutaro Kobayashi, Kazumaro Aoki, Literature by Hoshino Literature "Successive Expansion OEF, SCIS2000-B02"
[Non-Patent Document 3]
Shigetake Yanagisawa, Kazuto Matsuo, Shinki Cho, Document by Shigeo Tsujii, "Hardware Implementation of Elliptic Cryptography, SCIS'98-10.1.C."
[0024]
[Problems to be solved by the invention]
As of 2003, many computers use 32-bit CPUs.
[0025]
Therefore, in order to implement software for elliptic curve cryptography at high speed, the unit of the operation is 32 bits or less and the value is 2 bits.32It is desirable to be close to At the same time, the standard number of bits for the security constant of the elliptic curve cryptosystem is 160 bits. This means that the order of the body used is 2160-1It is required to be more than that. If a prime field of about 32 bits is selected, the extension degree must be 5 or 6 so that the order of the extension field is the above value. In order for the extension degree to be 5, the number of bits of the base field needs to be exactly 32 (= 160/5). If the extension degree is 6, the number of bits of the basic field may be 27 (> 160/6) bits or more.
[0026]
In the prior art, it is concluded that in order to speed up the Frobenius mapping, it is preferable that the field expansion be performed by a circular polynomial, and that in order to perform multiplication with a small field, sequential expansion be preferable. However, when 5 is selected as the expansion degree, 5 cannot be a sequential expansion because 5 is a prime number, and 5 + 1 is not a prime number, so that expansion by a circular polynomial cannot be performed. When 6 is selected as the expansion order, 6 = 2 × 3, so that the expansion can be performed sequentially. However, since 3 + 1 is a composite number, the expansion of the 4th order cannot be performed by the circular polynomial.
[0027]
The present invention makes it possible to apply a magnification using a circular polynomial to an extension field of any extension degree, and to calculate the Frobenius mapping of the extension field at high speed. It is an object of the present invention to provide an inverse operation device, an inverse operation method, and an inverse operation program which can also have advantages.
[0028]
[Means for Solving the Problems]
A first inverse operation device of the present invention is an inverse operation device for obtaining an inverse element of an element of an enlarged field M obtained by enlarging a base field K of a finite field,
An input unit that receives input data from the outside, a divisor sequence calculator that determines a divisor sequence from the numerical values of the input data, and calculates the conjugate product and norm by sequentially inputting the divisor from the divisor sequence calculator A conjugate element product norm calculation section returned to the divisor sequence calculation section; an inverse element calculation section that calculates an inverse element from the conjugate element product and the norm input from the divisor sequence calculation section; And an output unit for outputting the inverted element,
The input unit includes an arbitrary expansion degree n (n is a natural number) for obtaining the expansion field M by expanding the basic field K, and q (j is a small natural number) such that q = n · j + 1 is a prime number. , Q-th circular fraction polynomial (xq-1+ Xq-2+ ... + x + 1) is a prime p that is irreducible in the prime field Z / pZ, and the number of effective bits when the prime p is expressed as a numerical value on the information processing device is equal to the processing of the information processing device. A prime number p having any of the following conditions: the number of bits that is less than or equal to the word length, the number of bits that is less than or equal to half the word length, and the number of bits that is less than or equal to twice the word length and closer thereto.
And an irreducible polynomial for expanding the prime field Z / pZ to obtain the basic field K,
A base field K is generated based on the prime number p and the irreducible polynomial, and the base field K is expanded by n to expand the field M, and the base field K is expanded by the q-th circular polynomial to determine an expanded field L. , An element A for performing an inverse operation on the element of the extension field M is input,
The divisor sequence calculator selects a divisor sequence such that n [i] divides n [i + 1] for divisors n [1],..., N [k] of n. Let n [i] be the subfield of L that is the power of n [i], n [0] = 1, n [k + 1] = n, N [0] = K, N [k + 1] = M, A [k + 1] ] = A, the divisors n [i] and n [i + 1] of n and A [i] are sequentially provided to the conjugate product norm calculation unit until i starts from k and becomes 1; The conjugate element product A [i] returned from the conjugate element product norm calculation unit as*Remember
The conjugate element product norm calculation unit uses divisors n [i], n [i + 1] and A [i],
The product A [i] of all conjugate elements of A [i] except for A [i] with respect to N [i-1]*To
A [i]*= A [i] ^ {pn [i-1]+ P2n [i-1]+ ... + pn [i] -n [i-1]} = (... ((A [i] ^ (pn [i-1]) A [i]) ^ (pn [i-1]) A [i]) ...) ^ (pn [i-1]), And calculate,
Norm NN [i] / N [i-1](A [i])
NN [i] / N [i-1](A [i]) = A [i] A [i]*, And calculate this norm
A [i-1] is newly set and the conjugate product A [i]*And returned to the divisor sequence calculator,
The inverse element calculation unit, all the conjugate element products stored in the divisor sequence calculation unit,
The inverse element A [0] of the norm output by the conjugate element product norm calculation section when the divisor series calculation section last called-1With the product
A-1= A [k + 1]*A [k]*... A [1]*A [0]-1Calculated as
The output unit outputs a calculation result of the inverse calculation unit,
It is prepared.
[0029]
A first inverse operation method of the present invention is an inverse operation method for finding an inverse element of an element of an extended field M obtained by enlarging a base field K of a finite field,
A first step of obtaining an extended field L obtained by enlarging the basic field K by using an irreducible polynomial as a defining polynomial for the basic field K having only a primitive q-th root having a certain prime q,
A second step of determining an extension M that is an extension of the foundation K with a given extension order n between the foundation K and the extension L;
A third step of determining the original inverse of the extension field M using the Frobenius mapping in the extension field L;
With
The q is a prime number obtained by adding 1 to an integral multiple of the extension degree n of the intermediate.
[0030]
The second inverse element calculation method of the present invention is an inverse element calculation method for calculating an inverse element to an element of an enlarged field M obtained by expanding a basic field K of a finite field. When there is an extension field M, an extension field L obtained by enlarging the base field is obtained by a qth-order circular polynomial obtained by a prime number q obtained by adding 1 to an integer multiple of the extension degree n, and Frobenius mapping in the extension field M is performed. Is obtained from the Frobenius mapping in the extended field L by using the fact that the inverse is obtained.
[0031]
The third inverse operation method according to the second aspect of the present invention is the method according to the second aspect, wherein, when obtaining the inverse of the element A of the extension field M, the extension degree n between the extension field M and the base field K is determined. An arbitrary divisor n [1],... N [k] is selected such that n [i] divides n [i + 1],
The order is (#K)n [i]Is the subfield N [i],
K = N [0] ⊂N [1] ⊂... N [k] ⊂N [k + 1] = M,
The method comprises first finding the product and norm of all the conjugate elements of A with respect to the subfield N [k] immediately below M, and repeatedly calculating this until it reaches the base field K to find the inverse element.
[0032]
A fourth inverse operation method according to the present invention is an inverse operation method for calculating an inverse element of an element of an extended field M obtained by enlarging a base field K of a finite field,
An expansion degree n of the expansion body M;
a prime number q obtained by q = n · j + 1 (j is a small natural number);
q-th circle polynomial (xq-1+ Xq-2+ ... + x + 1) is a prime p that is irreducible in the prime field Z / pZ, and the number of effective bits when the prime p is expressed as a numerical value on the information processing device is equal to the processing of the information processing device. A prime number p having one of the following conditions: the number of bits less than or equal to the word length, the number of bits less than or equal to half the word length, and the number of bits less than or equal to twice the word length and
An irreducible polynomial for expanding the prime field Z / pZ to obtain the basic field K;
A first step of inputting an element A for obtaining an inverse element in the expanded field;
A second step of selecting, for any divisor n [1],... N [k] of the extension degree n, a divisor sequence such that n [i] divides n [i + 1];
The order is (#K) between the extension body M and the base body K.n [i]A third step for determining an intermediate sequence that is
A fourth step of obtaining a conjugate element product obtained by multiplying all of the conjugate elements of the element A with respect to the intermediate immediately below the extension field M of the intermediate string by anything other than itself, and storing the result;
A fifth step of calculating the norm of A by multiplying the conjugate element product and the element A and setting this as A ';
The fourth step and the fifth step are executed for the intermediate that is shifted down by one stage from M in the intermediate row for A ′ of the fifth step, and the norm is similarly set to the value of the basic body K. A sixth step that repeats this finite times until it comes back,
A seventh step of finding the inverse of the norm for the basic field, calculating the product of the intermediate products stored in the fourth step with the conjugate element products for all the intermediate sequences, and using this as the inverse of A;
Is provided.
[0033]
The fifth inverse element calculation method according to the present invention is directed to a sixth order element obtained by adding a primitive 7th root of 1 to a prime field having a prime number of 27 bits or more and 32 bits or less and excluding a primitive 7th root of 1 An inverse operation method for calculating an original inverse of an extension field,
A first step of inputting an element for obtaining an inverse element in the element of the sixth degree extension field;
A second step of obtaining a tertiary extension field N [1] of the prime field;
A third step of calculating the product of all the conjugate elements of the element A for the tertiary extension field N [1] as a first conjugate element product;
A fourth step of calculating a first norm obtained by multiplying the first conjugate element product by the element A;
A fifth step of calculating the product of all conjugate elements of the first norm for the prime field as a second conjugate element product;
A sixth step of calculating a second norm obtained by multiplying the second conjugate product by the first norm;
A seventh step of calculating the inverse of the second norm;
An eighth step of calculating the inverse of A by multiplying the inverse of the second norm by the second conjugate element and the first conjugate element;
A ninth step of outputting the inverse of A;
Is provided.
[0034]
According to a sixth aspect of the present invention, in the fifth aspect, in the fifth aspect, the element of the prime field is processed as one word in the information processing device, and the element of the sixth extension field is processed as six words. Prepare.
[0035]
A seventh inverse operation method of the present invention is an inverse operation method for calculating an inverse element of an element of an enlarged field M obtained by enlarging a basic field K of a finite field,
An arbitrary expansion order n (n is a natural number) for obtaining the expansion field M by expanding the base field K;
q (j is a small natural number) such that q = n · j + 1 is a prime number;
q-th order circle polynomial (xq-1+ Xq-2+ ... + x + 1) is a prime p that is irreducible in the prime field Z / pZ, and the number of effective bits when the prime p is expressed as a numerical value on the information processing device is equal to the processing of the information processing device. A prime number p having any of the following conditions: the number of bits that is less than or equal to the word length, the number of bits that is less than or equal to half the word length, and the number of bits that is less than or equal to twice the word length and closer thereto.
An irreducible polynomial for expanding the prime field Z / pZ to obtain a basic field K;
A first step of inputting
If one irreducible polynomial on the prime field Z / pZ is selected, and a field obtained by expanding Z / pZ with this irreducible polynomial is the base field K, and a linear expression is selected as the irreducible polynomial, K = Z / pZ, and the base field K is defined as a q-th circular polynomial (xq-1+ Xq-2+ ... + x + 1), when the expanded body is defined as an expanded body L, as an intermediate M of the expanded body L
When j = 1, L is taken as M, and when j> 1, the order is pnA second step of inputting an element A of M for which the inverse is to be calculated,
For any arbitrary divisor n [1],... n [k] of n, select a divisor sequence such that n [i] divides n [i + 1], and the order is (#K).n [i]A third subfield of N [i], n [0] = 1, N [0] = K, N [k + 1] = M, A [k + 1] = A,
For an element A [i] of N [i], the product A [i] of all conjugate elements for N [i−1]*To
A [i]*= A [i] ^ {pn [i-1]+ P2n [i-1]+ ... + pn [i] -n [i-1]} = (... ((A [i] ^ (pn [i-1]) A [i]) ^ (pn [i-1]) A [i]) ...) ^ (pn [i-1]A) calculating and storing;
Norm NN [i] / N [i-1](A [i])
NN [i] / N [i-1](A [i]) = A [i] A [i]*A fifth step in which the norm is newly set to A [i-1];
Input A [i] in order from the element A of the extended field M of i = k + 1 to the basic field K of 1;
A [i]*And norm NN [i] / N [i-1]A sixth step of obtaining (A [i]);
NN [1] / N [0]The inverse of (A [1]) is obtained, and this is expressed as A [0]-1A seventh step,
A [i] stored in the fourth step*And A [0] of the seventh step-1From
A-1= A [k + 1]*A [k]*... A [1]*A [0]-1An eighth step of obtaining the inverse of A as
Is provided.
[0036]
A first inverse operation program according to the present invention is an inverse operation program for causing a computer to execute an inverse operation process for calculating an inverse element of an element of an enlarged field M obtained by enlarging a base field K of a finite field,
A function of obtaining an extended field L obtained by enlarging the basic field K by using a primitive polynomial as a defining polynomial with only a primitive q-th root having a certain prime number q as a root and the basic field K; A function for obtaining an extension field M obtained by enlarging the base field K by a given numerical value n between the extension field L and
A function of calculating the original inverse of the expansion field M using the Frobenius mapping in the expansion field L;
With
The q is a prime number obtained by adding 1 to an integral multiple of the extension degree n of the intermediate.
[0037]
The second inverse operation program according to the present invention is an inverse operation program for causing a computer to execute an inverse operation process for finding an inverse element of an element of an enlarged field M obtained by enlarging a base field K of a finite field,
An arbitrary expansion order n (n is a natural number) for obtaining the expansion field M by expanding the base field K;
q (j is a small natural number) such that q = n · j + 1 is a prime number;
q-th order circle polynomial (xq-1+ Xq-2+ ... + x + 1) is a prime p that is irreducible in the prime field Z / pZ, and the number of effective bits when the prime p is expressed as a numerical value on the information processing device is equal to the processing of the information processing device. A prime number p having any of the following conditions: the number of bits that is less than or equal to the word length, the number of bits that is less than or equal to half the word length, and the number of bits that is less than or equal to twice the word length and closer thereto.
An irreducible polynomial for expanding the prime field Z / pZ to obtain a basic field K;
Function to input
If one irreducible polynomial on the prime field Z / pZ is selected, and a field obtained by expanding Z / pZ with this irreducible polynomial is the base field K, and a linear expression is selected as the irreducible polynomial, K = Z / pZ, and the base field K is defined as a q-th circular polynomial (xq-1+ Xq-2+ ... + x + 1), when the expanded body is defined as an expanded body L, as an intermediate M of the expanded body L
When j = 1, L is taken as M, and when j> 1, the order is pnA function of inputting an element A of M for which an inverse element is to be calculated,
For any arbitrary divisor n [1],... n [k] of n, select a divisor sequence such that n [i] divides n [i + 1], and the order is (#K).n [i]A function of n [0] = 1, N [0] = K, N [k + 1] = M, and A [k + 1] = A;
For an element A [i] of N [i], the product A [i] of all conjugate elements for N [i−1]*To
A [i]*= A [i] ^ {pn [i-1]+ P2n [i-1]+ ... + pn [i] -n [i-1]} = (... ((A [i] ^ (pn [i-1]) A [i]) ^ (pn [i-1]) A [i]) ...) ^ (pn [i-1]) And the function of calculating and storing
Norm NN [i] / N [i-1](A [i])
NN [i] / N [i-1](A [i]) = A [i] A [i]*And a function that newly sets this norm to A [i-1];
Input A [i] in order from the element A of the extended field M of i = k + 1 to the basic field K of 1;
A [i]*And norm NN [i] / N [i-1](A [i]);
NN [1] / N [0]The inverse of (A [1]) is obtained, and this is expressed as A [0]-1Function and
A [i] stored in the fourth step*And A [0] of the seventh step-1From
A-1= A [k + 1]*A [k]*... A [1]*A [0]-1Function to obtain the inverse of A as
Is provided.
[0038]
BEST MODE FOR CARRYING OUT THE INVENTION
The configuration of the embodiment of the present invention will be described with reference to FIG.
[0039]
The configuration of the embodiment of the present invention includes an encryption key generation device 1 that is an information processing device that generates an encryption key used in common key encryption or the like, and an encryption key generation device 2 that has the same configuration as the encryption key generation device 1. And a network 3 including the Internet for connecting the encryption key generation device 1 and the encryption key generation device 2 to each other.
[0040]
Further, the encryption key generation device 1 and the encryption key generation device 2 include an input unit 10 such as a keyboard, an encryption key operation device 11 that performs an elliptic curve operation for generating an encryption key, and an output unit 12 including a display and a printer. And a secondary storage device 13 such as a magnetic disk device for storing a software program for generating an encryption key.
[0041]
Further, the encryption key operation device 11 includes a CPU 110 designed with a 64-bit architecture, a 32-bit architecture, a ROM 111 storing nonvolatile data such as numerical data fixed in advance, and an operation loaded from the secondary storage device 13. The RAM 112 includes a RAM 112 that stores a processing program, and an IO port 113 that controls input and output to and from the secondary storage device 13.
[0042]
Next, the configuration of software at the time of operation of the embodiment of the present invention will be described with reference to FIG. 2. An input unit 41 for receiving input data from the outside by the input unit 11, a divisor sequence from the numerical value of the input data And a conjugate element product norm calculation section 43 that sequentially inputs the divisors from the divisor sequence calculation section, calculates a conjugate element product and a norm, and returns the norm to the divisor calculation section 42. An inverse calculator 44 for calculating an inverse from the conjugate element product and the norm input from the divisor sequence calculator 42, and an output unit for outputting the inverse calculated by the inverse calculator 44 to the output unit 12 or the like. 45.
[0043]
In the present embodiment, an inverse operation in symmetric key cryptography will be described as an example, but it is clear that the present invention is not limited to this.
[0044]
Next, the operation of the embodiment of the present invention will be described based on the flowcharts of FIGS.
[0045]
The encryption key generation devices 1 and 2 exchange information via the network 3 and generate a common encryption key shared between the encryption key generation devices 1 and 2. The manager of the cryptographic key generation devices 1 and 2 prepares a basis based on the prime field Z / pZ by the number of bits | p | An arbitrary expansion order n or the like for the field K is input from the input means 10. From these inputs, the field that defines the elliptic curve is determined.
[How to choose a body]
First, the word length multiple ζ is set to 1, 1/2, or 2, and ζ is selected therefrom. The number of bits of the prime number p which is equal to or less than the word length to be processed by the information processing apparatus and the number of bits of the prime number p which is equal to or less than half the word length and which are close to the word length to be processed by the information processing apparatus depending on whether the word length multiple ζ is 1 or 1/2 or , And a bit number | p | of a prime number p that is less than or equal to twice the word length and that is close to the word length, is given from the input means 10.
[0046]
Further, it is assumed that an arbitrary expansion order n is given (step 101). The numerical value once input may be stored in the ROM 111, and thereafter, the numerical value stored in the ROM 111 may be fetched.
[0047]
Let j be an integer such that q = n · j + 1 is a prime number (step 102).
(Note that j is preferably smaller.)
q-minute polynomial (xq-1+ Xq-2+ ... + x + 1) is selected such that the prime number p is irreducible on the prime field Z / pZ, and p is such that the number of bits of p matches the given number of bits. Further, one irreducible polynomial on the prime field Z / pZ is selected, and a field obtained by expanding Z / pZ with this irreducible polynomial is fixed as a base field (step 103). Hereinafter, this basic body will be referred to as K. When a linear expression is selected as the irreducible polynomial, K = Z / pZ. Let L be a field obtained by expanding the base field K by a q-minute polynomial.
[0048]
Here, the q-minute polynomial is xq-1+ Xq-2+ ... + x + 1. When j = 1, L is taken as M. If j> 1, the intermediate of L is of order pnIs set to M (step 104). It is assumed that the numerical value q of the q-th polynomial and the irreducible polynomial are also input from the input means 10.
[0049]
When the given conditions regarding the inverse element operation of the present invention described above are arranged,
(1) Arbitrary expansion degree n (n is a natural number)
(2) q such that q = n · j + 1 is a prime number
(3) q-minute polynomial (xq-1+ Xq-2+ ... + x + 1) is a prime p that is irreducible in the prime field Z / pZ, and the number of effective bits when the prime p is expressed as a numerical value on the information processing device is equal to the processing of the information processing device. A prime number p that has one of the following conditions: the number of bits less than or equal to the word length, the number of bits less than or equal to half the word length, and the number of bits less than or equal to twice the word length
(4) An irreducible polynomial for expanding the prime field Z / pZ to obtain the basic field K
Becomes
[0050]
Based on the above assumptions, a processing program required for the encryption key generation processing is read from the secondary storage device 13 by an operating system (not shown) of the encryption key operation device 11, placed in the RAM 112, and executed. . In the calculation of the elliptic curve in the generation of the encryption key, if it is necessary to calculate the inverse of the above field for a certain numerical value, the present invention uses the numerical value for which the inverse is to be obtained from the main unit that generates the encryption key as an argument. When an inverse operation process is called and the inverse is generated as a result of the operation, the inverse is returned to the caller.
[Inverse operation method]
[Preparation (1) (Calculation of product of two elements of field K)]
The element of K (a1, A2,,,, aq-1) And (b)1, B2,,, bq-1), The element A = a of the field L1x + a2x2+ ... + aq-1xq-1, And B = b1x + b2x2+ ... bq-1xq-1Is obtained by calculating the product of the polynomials AB and then using the equivalence relation by the q-minute polynomial to uniquely obtain c.1x + c2x2+ ... cq-1xq-1Can be represented. However, (c1, C2,,,, cq-1) Is the element of Z / pZ.
[Preparation (2) (operation on body L)]
An arbitrary element w of the field L is q-1 elements a of K1, A2,,,, aq-1Using,
w = a1x + a2x2+ ... + aq-1xq-1Can be represented.
[0051]
Hereinafter, a1x + a2x2+ ... + aq-1xq-1Abbreviation (a1, A2,,,, aq-1).
[0052]
Φ (w) by Frobenius mapping φ of this element is
φ (w) = (a ′1, A '2,,, a 'q-1)It can be expressed as.
Where a 'ip  mod  q= Ai
[Preparation (3) (operation on body M)]
Since the field M is embedded in the field L, the Frobenius mapping for the elements of the field M can be calculated in the same manner as the Frobenius mapping for the elements of the field L.
[0053]
Similarly, the product of the elements of the field M can be calculated.
[0054]
At this time, since the order of the field M is smaller than that of the field L, q-1 elements of the Z / pZ (a1, A2,,,, aq-1) Contains at most n different values. Using this, the product between elements of the field M can be calculated more easily than that of the field L.
[Inverse operation]
It is assumed that there are fields L, M, K, Z / pZ, and n and q selected as described in [How to select fields]. Then, it is assumed that the element A of the field M is input as an inverse element operation target (step 201).
[0055]
A plurality of arbitrary divisors n [1],... n [k] of n are selected such that n [i] divides n [i + 1] (step 202).
[0056]
The order is (#K)n [i]The subfield of the extended field L is called N [i] by (the order of K raised to the power n [i]) (step 203).
[0057]
Also, n [0] = 1, N [0] = K, N [k + 1] = M, and A [k + 1] = A.
[0058]
When elements A [i] of N [i] are sequentially input,
The product A [i] of all conjugate elements of A [i] except for A [i] with respect to N [i-1]*  And norm NN [i] / N [i-1](A [i])
A [i]*= A [i] ^ {pn [i-1]+ P2n [i-1]+ ... + pn [i] -n [i-1]} = (... ((A [i] ^ (pn [i-1]) A [i]) ^ (pn [i-1]) A [i]) ...) ^ (pn [i-1]),
NN [i] / N [i-1](A [i]) = A [i] A [i]*, And calculate.
[0059]
The following processing is performed using the conjugate element product generation method.
[0060]
Here, K = N [0] {N [1]}... {N [k + 1] = M.
In order from i = k + 1 to 1 (step 206), A [i] is input to the conjugate element product generation method, and A [i]*(Step 204) and norm NN [i] / N [i-1](A [i]) (step 205) is obtained,N [i] / N [i-1](A [i]) is defined as A [i-1].
NN [1] / N [0]The inverse of (A [1]) is obtained (step 207), and this is converted to A [0]-1And A-1= A [k + 1]*A [k]*... A [1]*A [0]-1(Step 208). This is the inverse of A (step 209).
[0061]
[Example (1)]
Assuming that the processing word length of the information processing apparatus is 32 bits, an extension field M having a word length multiple ワ ー ド 1 and an extension degree n of 8 is selected, and a method of performing an inverse element operation on this field is shown in FIGS. This will be described with reference to the flowchart of FIG.
[0062]
The numerical value 32 of the word length and the numerical value 8 of the expansion degree are input (step 101).
Since 8 * 2 + 1 = 17 is a prime number, q = 17 (step 102).
[0063]
17th circle polynomial Φ17= 1 + x + x2+ ... + x16Is a prime number p that is irreducible on Z / pZ, and a bit length of p is 32 or less and close to 32 (step 103). Here, for example, p = 227-39.
[0064]
Next, one irreducible polynomial on Z / pZ is selected. Here, it is assumed that a linear expression is selected. Therefore, the base body K is Z / pZ itself. Let L be the field obtained by expanding K by a 17-minute polynomial.
Is an intermediate of L and its order is p8Is M (step 104).
[0065]
The element A of M is composed of eight K elements (a1, A2, ..., a8)Using,
A = a1x + a2x2+ ... + a7x7+ A8x8+ A8x9+ A7x10+ ... + a2xFifteen+ A1x16Can be represented.
The element A of M is input (step 201).
(1) The expansion degree of M with respect to K is 8. 2, 4 is selected as a divisor of 8 (2 is divided by 4) (step 202). Hereinafter, the order of the intermediate of L is p2Is N [1] and the order is p4Is defined as N [2] (step 203).
(2) The product A of all conjugate elements of A with respect to N [2]*To
A*= A ^ {p4計算 is calculated (step 204).
[0066]
This is the Frobenius mapping applied four times.
φ4: A → A ^ {p4} Is an ingredient,
φ4: A1x + a2x2+ A3x3+ A4x4+ A5x5+ A6x6+ A7x7+ A8x8+ A8x9+ A7x10+ A6x11+ A5x12+ A4xThirteen+ A3x14+ A2xFifteen+ A1x16
→ a4x + a8x2+ A5x3+ A1x4+ A3x5+ A7x6+ A6x7+ A2x8+ A2x9+ A6x10+ A7x11+ A3x12+ A1xThirteen+ A5x14+ A8xFifteen+ A4x16
It is.
(By seeing A as an element of the enlarged field L, the Frobenius mapping is simply a replacement of the element of K.)
(3) The norm A [2] for N [2] of A is
A [2] = A · A*  mod Φ17(Step 205).
[0067]
The element of A [2] is composed of four K elements (c1, C2, C3, C4)Using,
A [2] = c1x + c2x2+ C3x3+ C1x4+ C3x5+ C4x6+ C4x7+ C2x8+ C2x9+ C4x10+ C4x11+ C3x12+ C1xThirteen+ C3x14+ C2xFifteen+ C1x16
Can be represented.
(4) The conjugate element and norm relating to N [2] are calculated. However, since N [2] is not an element of the base field K, the process goes to the step of calculating the product of the conjugate elements again (step 206).
(5) Product A [2] of all conjugate elements of N [1] of A [2]*To
A [2]*= A [2] ^ {p2計算 is calculated (step 204).
[0068]
This is the Frobenius mapping applied twice.
A [2] ^ {p2} = Φ2(A [2]) is replaced with a component,
φ2(C1x + c2x2+ C3x3+ C1x4+ C3x5+ C4x6+ C4x7+ C2x8+ C2x9+ C4x10+ C4x11+ C3x12+ C1xThirteen+ C3x14+ C2xFifteen+ C1x16)
= C2x + c1x2+ C4x3+ C2x4+ C4x5+ C3x6+ C3x7+ C1x8+ C1x9+ C3x10+ C3x11+ C4x12+ C2xThirteen+ C4x14+ C1xFifteen+ C2x16
It is.
(6) The norm A [1] of N [1] of A [2] is given by
A [1] = A [2] · A [2]*  mod Φ17(Step 205).
The element of A [1] is composed of two K elements (d1, D2)Using,
A [1] = d1x + d1x2+ D2x3+ D1x4+ D2x5+ D2x6+ D2x7+ D1x8+ D1x9+ D2x10+ D2x11+ D2x12+ D1xThirteen+ D2x14+ D1xFifteen+ D1x16
Can be represented.
(7) The conjugate element and norm for N [1] are calculated. However, since this N [1] is not the element of the base field K, the procedure goes to the step of calculating the product of the conjugate elements again (step 206).
(8) A [1] of all conjugate elements of A [1] with respect to K*To
A [1]*= A [1] {p} (step 204).
This is a Frobenius mapping that is applied once,
φ (A [1]) = A [1] {p} is a component,
φ (d1x + d1x2+ D2x3+ D1x4+ D2x5+ D2x6+ D2x7+ D1x8+ D1x9+ D2x10+ D2x11+ D2x12+ D1xThirteen+ D2x14+ D1xFifteen+ D1x16)
= D2x + d2x2+ D1x3+ D2x4+ D1x5+ D1x6+ D1x7+ D2x8+ D2x9+ D1x10+ D1x11+ D1x12+ D2xThirteen+ D1x14+ D2xFifteen+ D2x16
It is.
(9) The norm A [0] of A [1] with respect to K is
A [0] = A [1] · A [1]*  mod Φ17Is calculated (step 205).
[0069]
The element of A [0] is one K element (e1)Using,
A [0] = e1x + e1x2+ E1x3+ E1x4+ E1x5+ E1x6+ E1x7+ E1x8+ E1x9+ E1x10+ E1x11+ E1x12+ E1xThirteen+ E1x14+ E1xFifteen+ E1x16
Can be represented.
(10) The conjugate element and norm for K have been calculated, but since this K is a basic field, go to the next (Step 207).
(11) e1The inverse of e1 -1Is obtained (step 207).
(12) Inverse A of A-1To
A-1= E1 -1A [1]*A [2]*A*Is calculated (step 208).
Finally A-1Is output by the output means 12 and the process is terminated (step 209).
[0070]
[Example (2)]
Assuming that the processing word length of the information processing apparatus is 32 bits, a method of selecting an extension field M whose word length multiple 1 is 1 and the extension degree is 6 and performs an inverse operation on this field is shown in FIGS. This will be described with reference to the flowchart of FIG.
The word length (32) and the expansion degree (6) are input (step 101).
Since 6x1 + 1 = 7 is a prime number, q is set to 7 (step 102).
[0071]
7-minute polynomial Φ7= 1 + x + x2+ X3+ X4+ X5+ X6Is a prime number p that is irreducible on Z / pZ, and a bit length of p is 32 or less and close to 32 (step 103).
[0072]
Here, for example, p = 227-115. Choose one irreducible polynomial on Z / pZ. Here, it is assumed that a linear expression is selected as an irreducible polynomial. Therefore, the base body K is Z / pZ itself.
[0073]
Let L be a field obtained by expanding K by a 7-minute polynomial. Let L be M (step 104). If an element A of M is selected, A becomes 6 elements of K (a1,a2,a3,a4,a5,a6)Using,
A = a1x + a2x2+ A3x3+ A4x4+ A5x5+ A6x6Can be represented.
The element A of M is input (step 201).
(1) The extension degree of M with respect to K is 6. Choose 3 as a divisor of 6. Hereinafter, the order of the intermediate of L is p3Is set to N [1] (step 203).
(2) The product A of all conjugate elements of A with respect to N [1]*To
A*= A ^ {p3計算 is calculated (step 204).
This is the Frobenius map applied three times.
φ3(A) = A ^ {p3} With the ingredients,
φ3(A1x + a2x2+ A3x3+ A4x4+ A5x5+ A6x6) = A6x + a5x2+ A4x3+ A3x4+ A2x5+ A1x6It is.
(3) The norm A [1] for N [1] of A is
A [1] = A · A*  mod Φ7Is calculated (step 205).
The element of A [1] is composed of three K elements (c1, C2, C3)Using,
A [1] = c1x + c2x2+ C3x3+ C3x4+ C2x5+ C1x6
Can be represented.
(4) The conjugate element and norm for N [1] are calculated. However, since N [1] is not the base field K, the process goes to the step of obtaining the product of the conjugate elements again (step 206).
(5) The product A [1] of all conjugate elements of A [1] with respect to K*To
A [1]*= A [1] ^ {p + p2} = (A [1] ^ pA) ^ p is calculated (step 204).
This is possible by calculating the Frobenius map and the product.
Here, φ (A [1]) = A [1] {p} is a component,
φ (c1x + c2x2+ C3x3+ C3x4+ C2x5+ C1x6) = C3x + c1x2+ C2x3+ C2x4+ C1x5+ C3x6It is.
(6) The norm A [0] of A [1] with respect to K is
A [0] = A [1] · A [1]*  mod Φ7(Step 205).
[0074]
The element of A [0] is one K element (e1)Using,
A [0] = e1x + e1x2+ E1x3+ E1x4+ E1x5+ E1x6
Can be represented.
(7) The conjugate element and norm for K are calculated. Since this K is a basic field, go to the next (step 207).
(8) e1The inverse of e1 -1Is obtained (step 207).
(9) Inverse A of A-1To
A-1= E1 -1A [1]*A*(Step 208).
Finally A-1Is output by the output means 12 and the process is terminated (step 209).
[0075]
【The invention's effect】
Inverse operations can be performed on an arbitrary basic field and an arbitrary-order extension field at a speed equal to or higher than that of the conventional technique.
[0076]
First, the computational cost is significantly lower because the Frobenius mapping in the present invention is merely an exchange of elements on the foundation. In order to have such a feature, it is necessary to generate an expansion field by expansion by a q-minute polynomial with a prime number q or to sequentially expand by a q-circle polynomial.
[0077]
For this reason, the available expansion degree of the expansion body is limited, but the present invention is not limited to this. Also, the computational cost of the Frobenius mapping in the present invention is lower than that of the OEF method.
[0078]
Second, the calculation cost of the product in the present invention is lower than that of the OEF. This means that if we look at the elements of M embedded in L, the terms higher in order than q are ΦqThis is because it can be identified with a lower term. In the case of OEF, this higher-order term can be identified with a lower-order term obtained by multiplying its coefficient by a small coefficient, so that the calculation cost of multiplication occurs.
[0079]
Third, the present invention sequentially reduces to the inverse operation of the conjugate element for smaller intermediates. This allows the product calculation to be performed in a smaller field. For example, in the embodiment (1), the product of all conjugate elements of A with respect to K is obtained by using the Frobenius mapping on M and multiplication.*A [1]*A [2]*It is more efficient to ask for Because A [1]*Etc. can be obtained by using the product of smaller intermediates. This is the same as the advantage of the successive enlargement.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment of the present invention.
FIG. 2 is a block diagram illustrating a software configuration according to an embodiment of the present invention.
FIG. 3 is a flow chart of a method for determining an enlarged object according to the first and second embodiments of the present invention.
FIG. 4 is a flow chart of a method for obtaining an inverse of Embodiments 1 and 2 of the present invention.
[Explanation of symbols]
1 Encryption key generation device
10 Input means
11 Cryptographic key operation device
110 CPU
111 ROM
112 RAM
113 IO port
12 Output means
13 Secondary storage device
2 Encryption key generation device
3 network
41 Input unit
42 Divisor sequence calculation unit
43 Conjugate product norm calculator
44 Inverse calculation unit
45 Output unit

Claims (10)

有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算装置であって、
外部からの入力データを受け付ける入力部と、前記入力データの数値から約数列を決定する約数列算出部と、前記約数列算出部から前記約数を逐次入力して共役元積とノルムとを計算し前記約数列算出部に返却する共役元積ノルム計算部と、前記約数列算出部から入力した共役元積とノルムとから逆元を計算する逆元計算部と、前記逆元計算部で計算した逆元を出力する出力部とを備え、
前記入力部は、基礎体Kを拡大して拡大体Mを求める任意の拡大次数n(nは自然数)と、q=n・j+1が素数となるようなq(jは小さい自然数)と、q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、を入力し、
素数pと既約多項式をもとに基礎体Kを生成し、基礎体Kをnによって拡大して拡大体M、基礎体Kをq次の円分多項式で拡大して拡大体Lを決定し、前記拡大体Mの元で逆元の演算を行う元Aを入力し、
前記約数列算出部は、nの約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数が基礎体Kのn[i]乗であるLの部分体をN[i] とし、n[0]=1、n[k+1]=n、N[0]=K、N[k+1]=M、A[k+1]=Aとした時、nの約数n[i]、n[i+1]と、A[i]とをiがkから始まり1になるまで逐次前記共役元積ノルム算出部に提供し、結果として前記共役元積ノルム算出部から返却された共役元積A[i] を記憶し、
前記共役元積ノルム算出部は、約数n[i] 、n[i+1]と、A[i]を用い、
N[i−1]に関するA[i]を除くA[i]の共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])、と計算し、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]、として計算し、このノルムを
新たにA[i−1]とし共役元積A[i]とともに前記約数列算出部に返却し、
前記逆元算出部は、
前記約数列算出部の記憶する共役元積全てと、
前記約数列算出部が最後に呼び出した時の前記共役元積ノルム算出部が出力したノルムの逆元A[0]−1と、の積を、
−1=A[k+1]A[k]・・・A[1]A[0]−1として計算し、
前記出力部は、前記逆元計算部の計算結果を出力する、
ことを特徴とする逆元演算装置。
An inverse operation device for calculating an inverse element of an element of an extension field M obtained by enlarging a base field K of a finite field,
An input unit that receives input data from the outside, a divisor sequence calculator that determines a divisor sequence from the numerical values of the input data, and calculates the conjugate product and norm by sequentially inputting the divisor from the divisor sequence calculator A conjugate element product norm calculation section returned to the divisor sequence calculation section; an inverse element calculation section that calculates an inverse element from the conjugate element product and the norm input from the divisor sequence calculation section; And an output unit for outputting the inverted element,
The input unit includes an arbitrary expansion degree n (n is a natural number) for obtaining an expansion field M by expanding the basic field K, q (j is a small natural number) such that q = n · j + 1 is a prime number, and q The following circle-dividing polynomial (x q−1 + x q−2 +... + X + 1) is a prime number p that is irreducible on the prime field Z / pZ, and the prime number p is stored in the information processing device. The number of effective bits when expressed as a numerical value is equal to or less than the word length processed by the information processing device, the number of bits equal to or less than half the word length and equal to or less than twice the word length, and the number of bits equal to or less than twice the word length A prime number p having any condition of numbers,
And an irreducible polynomial for expanding the prime field Z / pZ to obtain the basic field K,
A base field K is generated based on the prime number p and the irreducible polynomial, and the base field K is expanded by n to expand the field M, and the base field K is expanded by the q-th circular polynomial to determine an expanded field L. , An element A for performing an inverse operation on the element of the extension field M is input,
The divisor sequence calculator selects a divisor sequence such that n [i] divides n [i + 1] for divisors n [1],..., N [k] of n. Let n [i] be the subfield of L that is the power of n [i], n [0] = 1, n [k + 1] = n, N [0] = K, N [k + 1] = M, A [k + 1] ] = A, the divisors n [i] and n [i + 1] of n and A [i] are sequentially provided to the conjugate product norm calculation unit until i starts from k and becomes 1; And stores the conjugate element product A [i] * returned from the conjugate element product norm calculation unit as
The conjugate element product norm calculation unit uses divisors n [i], n [i + 1] and A [i],
The product A [i] * of all conjugate elements of A [i] excluding A [i] with respect to N [i-1] is
A [i] * = A [i] @pn [i-1] + p2n [i-1] + ... + pn [i] -n [i-1] } = (... (( A [i] ^ ( pn [i-1] ) A [i]) ^ ( pn [i-1] ) A [i]) ...) ^ ( pn [i-1] ) Calculate,
The norm NN [i] / N [i-1] (A [i]) is expressed as
NN [i] / N [i-1] (A [i]) = A [i] A [i] * , and this norm is newly set as A [i-1], and the conjugate product A [ i] and *
The inverse element calculation unit,
All the conjugate element products stored by the divisor sequence calculation unit,
The product of the inverse element A [0] −1 of the norm output by the conjugate element product norm calculation unit when the divisor sequence calculation unit last called is
A- 1 = A [k + 1] * A [k] * ... A [1] * A [0] -1
The output unit outputs a calculation result of the inverse calculation unit,
An inverse operation device characterized by the above-mentioned.
有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
ある素数qがあって1の原始q乗根のみを根とする基礎体Kについて既約な多項式を定義多項式として用い、基礎体Kを拡大した拡大体Lを得る第1のステップと、
基礎体Kと拡大体Lとの間の、所与の拡大次数nで基礎体Kを拡大した拡大体Mを求める第2のステップと、
拡大体Mの元の逆元を拡大体Lにおけるフロベニウス写像を用いて求める第3のステップと、
を備え、
前記qは、拡大次数nの整数倍に1を足した素数であることを特徴とする逆元演算方法。
An inverse element calculation method for finding an inverse element to an element of an extended field M obtained by expanding a basic field K of a finite field,
A first step of using an irreducible polynomial as a definition polynomial for a base field K having only a primitive q-th root having a certain prime number q as a definition polynomial to obtain an expanded field L obtained by expanding the base field K;
A second step of finding an extension M between the base K and the extension L, which is an extension of the base K by a given extension n;
A third step of finding the original inverse of the extension field M using the Frobenius mapping in the extension field L;
With
The method according to claim 1, wherein q is a prime number obtained by adding 1 to an integral multiple of the extension degree n.
有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
任意の基礎体Kとその任意拡大次数nによる拡大体Mがあったとき、前記拡大次数nの整数倍に1を足した素数qによって得られるq次円分多項式により基礎体Kを拡大した拡大体Lを求め、拡大体Mにおけるフロベニウス写像が拡大体Lにおけるフロベニウス写像から自然に得られることを利用して逆元を求めることを特徴とする逆元演算方法。
An inverse element calculation method for finding an inverse element to an element of an extended field M obtained by expanding a basic field K of a finite field,
When there is an arbitrary base field K and an expansion field M with an arbitrary expansion degree n, an expansion obtained by expanding the base field K by a q-th circle polynomial obtained by a prime number q obtained by adding 1 to an integer multiple of the expansion degree n. An inverse element calculation method, wherein a field L is obtained, and an inverse element is obtained by utilizing the fact that the Frobenius map in the enlarged field M is naturally obtained from the Frobenius map in the enlarged field L.
請求項3において、拡大体Mの元Aの逆元を求めるにあたり、拡大次数nの任意の約数列n[1]、・・・n[k] を、n[i] がn[i+1]を割りきるよう選び、
拡大体Mと基礎体Kとの間の位数が(#K)n[i](有限体Kの位数のn[i]乗)のある部分体をN[i] としたとき、
K⊂N[1]⊂・・・⊂N[k]⊂Mであって、
最初に拡大体Mの直下の部分体N[k]に関するAの全ての共役元の積とノルムをもとめ、これを基礎体Kに達するまで繰り返し計算することにより逆元を求めることを特徴とする逆元演算方法。
In claim 3, in obtaining the inverse of the element A of the extension field M, an arbitrary divisor sequence n [1],... N [k] of the extension degree n, and n [i] is n [i + 1] Choose to divide,
When a partial field whose order between the extension field M and the base field K is (#K) n [i] (the order of the finite field K raised to the power n [i]) is N [i],
K⊂N [1] ⊂... ⊂N [k] ⊂M,
First, the product and norm of all the conjugate elements of A with respect to the subfield N [k] immediately below the extension field M are obtained, and this is repeatedly calculated until the base field K is reached to obtain the inverse element. Inverse element calculation method.
有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
拡大体Mの拡大次数nと、
q=n・j+1(jは小さな自然数)で得られる素数qと、
q次円分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下で、かつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数、のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、
拡大体中の逆元を求める元Aを入力する第1のステップと、
拡大次数nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選ぶ第2のステップと、
拡大体Mと基礎体Kの間にあって位数が(#K)n[i]である中間体列を求める第3のステップと、
中間体列の拡大体M直下の中間体に関する元Aの共役元で自分自身以外のものを全てかけあわせた共役元積を求めこれを記憶する第4のステップと、
共役元積と元Aを掛け合わせてAのノルムを計算してこれをA’とする第5のステップと、
前記第5のステップのA’について前記中間体列でMから1段下げてシフトした中間体について前記第4のステップと前記第5のステップのAをA’で置き換えて実行し、同様にして前記ノルムが基礎体Kの元になるまでこれを有限回繰り返す第6のステップと、
基礎体についてのノルムの逆元を求め、前記第4のステップで記憶する全ての中間体列に関する共役元積との積を計算してこれをAの逆元とする第7のステップと、
を備えることを特徴とする逆元演算方法。
An inverse element calculation method for finding an inverse element to an element of an extended field M obtained by expanding a basic field K of a finite field,
An extension degree n of the extension field M;
a prime number q obtained by q = n · j + 1 (j is a small natural number);
The q-th circle polynomial (x q−1 + x q−2 +... + x + 1) is a prime p that is irreducible on the prime field Z / pZ, and the prime p is a numerical value on the information processing device. The number of effective bits when expressed as is less than or equal to the word length processed by the information processing device, less than or equal to half the word length and equal to or less than twice the word length and equal to or less than twice the word length A prime p with any of the conditions
An irreducible polynomial for expanding the prime field Z / pZ to obtain a basic field K;
A first step of inputting an element A for obtaining an inverse element in the extension field;
A second step of selecting, for any divisor n [1],... N [k] of the extension degree n, a divisor sequence such that n [i] divides n [i + 1];
A third step of finding an intermediate sequence having an order of (#K) n [i] between the extension field M and the base field K;
A fourth step of obtaining a conjugate element product obtained by multiplying all of the conjugate elements of the element A with respect to the intermediate immediately below the extended field M of the intermediate sequence by anything other than itself, and storing the result;
A fifth step of calculating the norm of A by multiplying the conjugate product and the element A and setting this as A ';
For A ′ of the fifth step, for the intermediate that is shifted down by one stage from M in the intermediate row, the A of the fourth step and the fifth step is replaced with A ′ and executed. A sixth step of repeating this finite times until the norm is an element of the base field K;
A seventh step of finding the inverse of the norm for the basic field, calculating the product of the intermediate products stored in the fourth step with the conjugate element products for all the intermediate sequences, and using this as the inverse of A;
An inverse element calculation method comprising:
27ビット以上32ビット以下の素数を標数とし1の原始7乗根を含まない素体Pに1の原始7乗根を付加して拡大した6次拡大体Mの元の逆元を計算する逆元演算方法であって,
6次拡大体Mの元で逆元を求める元Aが入力される第1のステップと、
素体Pの3次拡大体N[1]を求める第2のステップと、
元Aの3次拡大体N[1]についての共役元全ての積を第一共役元積として計算する第3のステップと、
前記第一共役元積に元Aをかけあわせた第一ノルムを計算する第4のステップと、
前記第一ノルムの前記素体についての共役元すべての積を第二共役元積として計算する第5のステップと、
前記第二共役元積に前記第一ノルムをかけあわせた第二ノルムを計算する第6のステップと、
前記第二ノルムの逆元を計算する第7のステップと、
前記第二ノルムの逆元と前記第二共役元積と前記第一共役元積とをかけあわせてAの逆元A−1を計算する第8のステップと、
Aの逆元A−1を出力する第9のステップと、
を備えることを特徴とする逆元演算方法。
A prime number of 27 bits or more and 32 bits or less is used as a characteristic, and the original inverse element of a sixth-order extended field M obtained by adding a primitive 7th root of 1 to a prime field P not including the 7th root of 1 is calculated. An inverse element operation method,
A first step of inputting an element A for obtaining an inverse element under a sixth order extension field M;
A second step of obtaining a tertiary extension field N [1] of the prime field P;
A third step of calculating a product of all conjugate elements of the cubic extension field N [1] of the element A as a first conjugate element product;
A fourth step of calculating a first norm obtained by multiplying the first conjugate element product by the element A;
A fifth step of calculating a product of all conjugate elements of the first norm for the prime field as a second conjugate element product;
A sixth step of calculating a second norm obtained by multiplying the second conjugate product by the first norm;
A seventh step of calculating the inverse of the second norm;
An eighth step of multiplying the inverse of the second norm by the second conjugate element and the first conjugate element to calculate the inverse A -1 of A;
A ninth step of outputting the inverse A -1 of A;
An inverse element calculation method comprising:
請求項6において、素体Pの元は情報処理装置において1ワードとして処理され、6次拡大体Mの元は6ワードとして処理されることを特徴とする逆元演算方法。7. The inverse element calculation method according to claim 6, wherein the element of the prime field P is processed as one word in the information processing apparatus, and the element of the sixth-order expanded field M is processed as six words. 有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算方法であって、
基礎体Kを拡大して拡大体Mを求める任意の拡大次数n(nは自然数)と、
q=n・j+1が素数となるようなq(jは小さい自然数)と、
q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、
を入力する第1のステップと、
素体Z/pZ上の既約多項式を一つ選び、この既約多項式でZ/pZを拡大して得られる体を基礎体Kとし、既約多項式として一次式が選ばれた場合にはK=Z/pZとするとともに、基礎体Kをq次の円分多項式(xq−1+xq−2+・・・+x+1)で拡大した体を拡大体Lとする時、拡大体Lの中間体Mとしてj=1の場合はMとしてL自身をとり、j>1の場合は、位数がpのものをMとし、逆元を計算する対象のMの元Aを入力する第2のステップと、
nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数がKの位数のn[i]乗であるLの部分体をN[i]とし、n[0]=1、N[0]=K、N[k+1]=M、A[k+1]=Aとする第3のステップと、
N[i]の要素A[i] について、N[i−1]に関する共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])と計算して記憶する第4のステップと、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]と計算し、このノルムを新たにA[i−1]とする第5のステップと、
i=k+1の拡大体Mの元Aから1の基礎体Kまで順に、A[i]を入力し、
A[i]及びノルムNN[i]/N[i−1](A[i])を得る第6のステップと、
N[1]/N[0](A[1])の逆元を求め、これをA[0]−1とする第7のステップと、
第4のステップで記憶したA[i]と第7のステップのA[0]−1から
−1=A[k+1]A[k]・・・A[1]A[0]−1としてAの逆元を得る第8のステップと、
を備えることを特徴とする逆元演算方法。
An inverse element calculation method for finding an inverse element to an element of an extended field M obtained by expanding a basic field K of a finite field,
An arbitrary expansion degree n (n is a natural number) for obtaining an expansion field M by expanding the base field K;
q (j is a small natural number) such that q = n · j + 1 is a prime number;
The qth-order circular fraction polynomial (x q−1 + x q−2 +... + x + 1) is a prime p that is irreducible on the prime field Z / pZ, and the prime p is processed on the information processing apparatus. The number of effective bits when expressed as a numerical value of is less than or equal to the word length processed by the information processing device, less than or equal to half the word length and equal to or less than twice the word length A prime p having any condition of the number of bits;
An irreducible polynomial for expanding the prime field Z / pZ to obtain a basic field K;
A first step of inputting
One irreducible polynomial on the prime field Z / pZ is selected, and a field obtained by expanding Z / pZ with this irreducible polynomial is set as a base field K. If a linear expression is selected as the irreducible polynomial, K = Z / pZ, and when the field obtained by expanding the basic field K with the q-th circular polynomial (x q−1 + x q−2 +... + X + 1) is the expanded field L, the intermediate of the expanded field L If j = 1 as the field M, take L itself as M, and if j> 1, take M with an order of pn and input the element A of M for which the inverse element is to be calculated. Steps and
For any divisor n [1],... n [k] of n, select a divisor sequence such that n [i] divides n [i + 1], and order n [i A third step in which a subfield of L that is the power is N [i], n [0] = 1, N [0] = K, N [k + 1] = M, and A [k + 1] = A;
For the element A [i] of N [i], the product A [i] * of all conjugate elements for N [i−1] is
A [i] * = A [i] @pn [i-1] + p2n [i-1] + ... + pn [i] -n [i-1] } = (... (( A [i] ^ ( pn [i-1] ) A [i]) ^ ( pn [i-1] ) A [i]) ...) ^ ( pn [i-1] ) A fourth step of storing and storing
The norm NN [i] / N [i-1] (A [i]) is expressed as
A fifth step of calculating NN [i] / N [i-1] (A [i]) = A [i] A [i] *, and newly setting this norm to A [i-1]; ,
Input A [i] in order from the element A of the extended field M of i = k + 1 to the basic field K of 1;
A sixth step of obtaining A [i] * and norm N N [i] / N [i−1] (A [i]);
A seventh step of finding the inverse of NN [1] / N [0] (A [1]) and setting this to A [0] -1 ;
A [i] * stored in the fourth step and A [0] −1 in the seventh step to A− 1 = A [k + 1] * A [k] * ... A [1] * A [0 An eighth step of obtaining the inverse of A as -1 ;
An inverse element calculation method comprising:
有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算処理をコンピュータに実行させる逆元演算プログラムであって、
ある素数qがあって1の原始q乗根のみを根とし基礎体Kについて既約な多項式を定義多項式として用いて基礎体Kを拡大した拡大体Lを得る機能と、基礎体Kと拡大体Lとの間の所与の数値nで基礎体Kを拡大した拡大体Mを求める機能と、
拡大体Mの元の逆元を拡大体Lにおけるフロベニウス写像を用いて求める機能と、
を備え、
qは、中間体の拡大次数nの整数倍に1を足した素数であることを特徴とする逆元演算プログラム。
An inverse operation program for causing a computer to execute an inverse operation process for calculating an inverse of an element of an enlarged field M obtained by enlarging a basic field K of a finite field,
A function of obtaining an extended field L obtained by enlarging the basic field K by using a primitive polynomial as a defining polynomial with only a primitive q-th root having a certain prime number q as a root and the basic field K and the extended field A function for obtaining an expanded field M obtained by expanding the base field K by a given numerical value n between L and
A function for calculating the original inverse of the extension field M using the Frobenius mapping in the extension field L;
With
q is a prime element operation program, wherein q is a prime number obtained by adding 1 to an integral multiple of the extension degree n of the intermediate.
有限体の基礎体Kを拡大した拡大体Mの元に対する逆元を求める逆元演算処理をコンピュータに実行させる逆元演算プログラムであって、
基礎体Kを拡大して拡大体Mを求める任意の拡大次数n(nは自然数)と、
q=n・j+1が素数となるようなq(jは小さい自然数)と、
q次の円分分多項式(xq−1+xq−2+・・・+x+1)が素体Z/pZ上で既約となるような素数pであって、その素数pを情報処理装置上の数値として表現した場合の有効ビット数が情報処理装置の処理するワード長以下でかつそれに近いビット数、ワード長の半分以下でかつそれに近いビット数, およびワード長の2倍以下でかつそれに近いビット数のいずれかの条件をもつ素数pと、
素体Z/pZを拡大して基礎体Kを得るための既約多項式と、
を入力する機能と、
素体Z/pZ上の既約多項式を一つ選び、この既約多項式でZ/pZを拡大して得られる体を基礎体Kとし、既約多項式として一次式が選ばれた場合にはK=Z/pZとするとともに、基礎体Kをq次の円分多項式(xq−1+xq−2+・・・+x+1)で拡大した体を拡大体Lとする時、拡大体Lの中間体Mとしてj=1の場合はMとしてL自身をとり、j>1の場合は、位数がpのものをMとし、逆元を計算する対象のMの元Aを入力する機能と、
nの任意の約数n[1]、・・・n[k] について、n[i] がn[i+1]を割りきるような約数列を選び、位数が(#K)n[i]であるLの部分体をN[i] とし、n[0]=1、N[0]=K、N[k+1]=M、A[k+1]=Aとする機能と、
N[i]の要素A[i] について、N[i−1]に関する共役元全ての積A[i] を、
A[i]=A[i]^{pn[i−1]+p2n[i−1]+・・・+pn[i]−n[i−1]}=(・・・((A[i]^(pn[i−1])A[i])^(pn[i−1])A[i])・・・)^(pn[i−1])と計算して記憶する機能と、
ノルムNN[i]/N[i−1](A[i])を、
N[i]/N[i−1](A[i])=A[i]A[i]と計算し、このノルムを新たにA[i−1]とする機能と、
i=k+1の拡大体Mの元Aから1の基礎体Kまで順に、A[i]を入力し、
A[i]及びノルムNN[i]/N[i−1](A[i])を得る機能と、
N[1]/N[0](A[1])の逆元を求め、これをA[0]−1とする機能と、
第4のステップで記憶したA[i]と第7のステップのA[0]−1から
−1=A[k+1]A[k]・・・A[1]A[0]−1としてAの逆元を得る機能と、
を備えることを特徴とする逆元演算プログラム。
An inverse operation program for causing a computer to execute an inverse operation process for calculating an inverse of an element of an enlarged field M obtained by enlarging a basic field K of a finite field,
An arbitrary expansion degree n (n is a natural number) for obtaining an expansion field M by expanding the base field K;
q (j is a small natural number) such that q = n · j + 1 is a prime number;
The qth-order circular fraction polynomial (x q−1 + x q−2 +... + x + 1) is a prime p that is irreducible on the prime field Z / pZ, and the prime p is processed on the information processing apparatus. The number of effective bits when expressed as a numerical value of is less than or equal to the word length processed by the information processing device, less than or equal to half the word length and equal to or less than twice the word length A prime p having any condition of the number of bits;
An irreducible polynomial for expanding the prime field Z / pZ to obtain a basic field K;
Function to input
One irreducible polynomial on the prime field Z / pZ is selected, and a field obtained by expanding Z / pZ with this irreducible polynomial is set as a base field K. If a linear expression is selected as the irreducible polynomial, K = Z / pZ, and when the field obtained by expanding the basic field K with the q-th circular polynomial (x q−1 + x q−2 +... + X + 1) is the expanded field L, the intermediate of the expanded field L When j = 1 as a field M, take L itself as M, and when j> 1, assume that M has an order of pn , and input an element A of M for which an inverse element is to be calculated; ,
For any divisor n [1],... n [k] of n, a divisor sequence is selected such that n [i] divides n [i + 1], and the order is (#K) n [i] A function of n [0] = 1, N [0] = K, N [k + 1] = M, and A [k + 1] = A;
For the element A [i] of N [i], the product A [i] * of all conjugate elements for N [i−1] is
A [i] * = A [i] @pn [i-1] + p2n [i-1] + ... + pn [i] -n [i-1] } = (... (( A [i] ^ ( pn [i-1] ) A [i]) ^ ( pn [i-1] ) A [i]) ...) ^ ( pn [i-1] ) And memorize,
The norm NN [i] / N [i-1] (A [i]) is expressed as
NN [i] / N [i-1] (A [i]) = A [i] A [i] * , and a function to newly set this norm to A [i-1];
Input A [i] in order from the element A of the extended field M of i = k + 1 to the basic field K of 1;
A [i] * and a function to obtain norm N N [i] / N [i−1] (A [i]);
A function of calculating the inverse of NN [1] / N [0] (A [1]) and setting this to A [0] -1 ;
A [i] * stored in the fourth step and A [0] −1 in the seventh step to A− 1 = A [k + 1] * A [k] * ... A [1] * A [0 A function of obtaining the inverse of A as −1 ,
An inverse operation program characterized by comprising:
JP2003018846A 2003-01-28 2003-01-28 Inverse element calculation device, inverse element calculation method, and inverse element calculation program Pending JP2004233428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003018846A JP2004233428A (en) 2003-01-28 2003-01-28 Inverse element calculation device, inverse element calculation method, and inverse element calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003018846A JP2004233428A (en) 2003-01-28 2003-01-28 Inverse element calculation device, inverse element calculation method, and inverse element calculation program

Publications (1)

Publication Number Publication Date
JP2004233428A true JP2004233428A (en) 2004-08-19

Family

ID=32948871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003018846A Pending JP2004233428A (en) 2003-01-28 2003-01-28 Inverse element calculation device, inverse element calculation method, and inverse element calculation program

Country Status (1)

Country Link
JP (1) JP2004233428A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008013154A1 (en) * 2006-07-24 2008-01-31 National University Corporation Okayama University Extension filed multiplication program and extension filed multiplication device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008013154A1 (en) * 2006-07-24 2008-01-31 National University Corporation Okayama University Extension filed multiplication program and extension filed multiplication device
US8090099B2 (en) 2006-07-24 2012-01-03 National University Corporation Okayama University Computer-readable recording medium recording program and apparatus for encryption/decryption, apparatus for multiplication in extension field

Similar Documents

Publication Publication Date Title
JP4559505B2 (en) Extending the repetition period of random sequences
CN101194457B (en) Randomized modular polynomial reduction method and hardware therefor
JP4842993B2 (en) Mixed radix generator with selected statistical artifacts
US8345864B1 (en) Elliptic curve cryptography scalar multiplication with on demand acceleration table generation
JP4783382B2 (en) Montgomery method multiplication remainder calculator
US6766344B2 (en) Processing Galois Field arithmetic
Granger et al. Faster ECC over
JP5553773B2 (en) Apparatus and method for calculating scalar multiple of points on elliptic curve
JP5147085B2 (en) Calculation method and calculation device
JP3551853B2 (en) Secure parameter generation apparatus, generation method, and recording medium in algebraic curve cryptography having a definition equation of the form αYa + βXb + 1 = 0
JP2004233428A (en) Inverse element calculation device, inverse element calculation method, and inverse element calculation program
Basiri et al. Implementing the arithmetic of C 3, 4 curves
Arce-Nazario et al. Multidimensional linear complexity analysis of periodic arrays
KR100954843B1 (en) Method and Apparatus of elliptic curve cryptographic operation based on block indexing on sensor mote and Recording medium using by the same
KR101548174B1 (en) Method for calculating negative inverse of modulus
JP2000276331A (en) Device and method for outputting random vector string, and information recording medium
JP2007187978A (en) Data compression device and parameter setting device used for the same
JP2004077948A (en) Jacobi group element adding device
WO2023199440A1 (en) Signed integer remainder products calculation device, signed integer remainder products calculation method, and program
JP4752176B2 (en) Unidirectional function calculation method, apparatus and program
JP7101430B1 (en) Cryptographic processing program, cryptographic processing method, cryptographic processing device, cryptographic processing system
WO2023112211A1 (en) Polynomial multiplication device, polynomial multiplication method, polynomial multiplication program, polynomial multiplication source code generation device, polynomial multiplication source code generation method, and polynomial multiplication source code generation program
JP3435473B2 (en) Encryption / decryption method and device
JP2004205870A (en) Method and device for hyperelliptic curve scalar multiple operation
Sunar et al. Comparison of bit and word level algorithms for evaluating unstructured functions over finite rings

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050310

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051215

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070115

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20080610

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20090508

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090602

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091104