JP2004102071A - Polynomial remainder system arithmetic device, method, and program - Google Patents

Polynomial remainder system arithmetic device, method, and program Download PDF

Info

Publication number
JP2004102071A
JP2004102071A JP2002265867A JP2002265867A JP2004102071A JP 2004102071 A JP2004102071 A JP 2004102071A JP 2002265867 A JP2002265867 A JP 2002265867A JP 2002265867 A JP2002265867 A JP 2002265867A JP 2004102071 A JP2004102071 A JP 2004102071A
Authority
JP
Japan
Prior art keywords
polynomial
remainder
arithmetic
montgomery multiplication
arithmetic unit
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.)
Granted
Application number
JP2002265867A
Other languages
Japanese (ja)
Other versions
JP4202701B2 (en
Inventor
Masanobu Koike
小池 正修
Tsutomu Matsumoto
松本 勉
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2002265867A priority Critical patent/JP4202701B2/en
Publication of JP2004102071A publication Critical patent/JP2004102071A/en
Application granted granted Critical
Publication of JP4202701B2 publication Critical patent/JP4202701B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To handle an arbitrary rule polynomial, to reduce a required memory size and to improve processing efficiency in a polynomial remainder system arithmetic device. <P>SOLUTION: The device is provided with a plurality of arithmetic units 10<SB>1</SB>to 10<SB>n</SB>having a polynomial remainder arithmetic function on GF(2) based on each element f<SB>i</SB>,g<SB>i</SB>(where i=1 to n) of the bases of a polynomial remainder arithmetic system. When m dimensional agreement polynomial N(x) on GF(2) and polynomials a(x) and b(x) on an equal to or less than m dimensional GF(2) are inputted into the units, remainder operations at the base elements f<SB>i</SB>, g<SB>i</SB>for input contents N(x), a(x) and b(x) are executed in parallel at the units and a Montgomery multiplication a(x)b(x)G(x)<SP>-1</SP>mod N(x) is computed uning G(x)=g<SB>1</SB>(x)g<SB>2</SB>(x) to g<SB>n</SB>(x). Thus, parallel computations are executed by the arithmetic units employing polynomial remainder system expression without using a multiple table which normally requires a memory size and without conducting computations for conventional polynomial expression. Moreover, the parallel computations use a Montgomery multiplication. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、多項式剰余演算系に基づきGF(2)の元を並列処理により高速に計算する多項式剰余系演算装置、方法及びプログラムに関する。
【0002】
【従来の技術】
公開鍵暗号の分野では、攻撃者の用いる計算機の高性能化や攻撃手法の高度化に対し、安全性を確保するために鍵長が増加する傾向にある。例えば現在、公開鍵暗号の事実上の標準(デファクトスタンダード)として利用されるRSA(Rivest−Shamir−Adleman)方式では、1,024ビットの鍵長が推奨されている。また、楕円曲線暗号の一方式である楕円DSA(Digital Signature Standard)方式では、160ビットの鍵長が現在推奨されている。
【0003】
従って、公開鍵暗号の分野では、このように長い鍵長を用いる際に、非常に大きな整数の演算や、非常に次数の高い多項式の演算をいかに高速に処理するかが重要な課題となっている。
【0004】
ここで、整数の演算処理では、高速化の方法の一つとして、剰余演算系(Residue Number System、以下、RNSと略記する)が知られている。このRNSは、互いに素な比較的小さな整数の組{a,a,…,a}を予め用意し、演算対象の大きな整数をこれらの整数で割った余りの組で表現する手法である。以下、予め用意する整数の組{a,a,…,a}をRNSの基底と呼び、基底を構成する要素の個数nを基底のサイズと呼ぶ。また、基底の集合をa={a,a,…,a}で表す。
【0005】
例えば、整数xと基底{a,a,…,a}が与えられたとき、xを基底要素a(i=1,2,…,n)で割った余りxの組(x,x,…,x)がxのRNS表現である。ここで、x = x mod a である。このとき、xは基底の全要素の積A=a…aを法として一意的に表現できる。すなわち、xがA未満の正整数であれば、xとそのRNS表現(x,x,…,x)とは一対一に対応する。
【0006】
係るRNS表現においては、2つの整数x,yの和を計算する場合、RNS表現したx,yの各基底要素ごとの和を求め、その後に対応する基底で除した余りを求めればよい。減算も同様である。乗算についても、各基底要素ごとの積を求め、さらに、対応する基底で除した余りを求める。
【0007】
このようにRNSでは、加算、減算、乗算は、各基底要素ごとに独立に、基底を法とする演算を行えばよい。このため、例えば基底として計算機のワード長以内の整数を用いることにより、非常に大きな整数の演算を単精度の演算の繰り返しで実現できる。しかしながら、RNS表現での除算は、基数表現に比べて効率良く行う手段があまり知られていない。
【0008】
なお、RNS表現での除算を効率良く行なう手法として、ポッシュ(Posch)ら及び川村らは、剰余演算系を利用し、公開鍵暗号系のRSA暗号方式の演算を高速に行う方法を提案している(例えば、非特許文献1,2及び特許文献1参照)。
【0009】
ポッシュ及び川村の方法は、RNS表現での演算において不利な除算を避けるために、モンゴメリ(Montgomery)が提案した剰余乗算方法(以下、モンゴメリ乗算と呼ぶ)(例えば、非特許文献3参照)を利用していること、あるRNS基底で表現された整数を、基底拡張を用いて別の基底での表現を作り出すこと、などが特徴として挙げられる。
【0010】
ここで、基底拡張とは、基底a={a,a,…,a}で表現された(x mod a, x mod a,…,x mod a)から、基底a∪{b} ={a,a,…,a,b}で表現された(x mod a,x mod a,…,x mod a,x mod b)を作り出す操作である。上の操作では基底のサイズを1つ増やしたが、この操作を繰り返して基底のサイズをn’個(n’は整数)増やし、その基底の下でのRNS表現を作り出すことも基底拡張と呼ぶ。
【0011】
一方、楕円曲線暗号では、標数2の体GF(2)の拡大体GF(2)を基礎体として楕円曲線を構成する手法が知られている。GF(2)の元は多項式で表現されるため、上述した整数の演算法とは若干異なる演算法が必要となる。
【0012】
以下、GF(2)を定めるGF(2)上のm次既約多項式をN(x)と書く。GF(2)の元はGF(2)上の多項式をN(x)で割った余りと見なすことができるため、m−1次以下の多項式で表すことができる。
【0013】
GF(2)の元を効率良く演算するための手法として、RNSの類似概念の多項式剰余演算系(Polynomial Residue ArithmeticまたはPolynomial Residue System、以下、PRSと略記する)が知られている。このPRSは、互いに素な比較的小さな次数のGF(2)上の多項式の組{f(x),f(x),…,f(x)}を予め用意し、演算対象のGF(2)の元をこれらの多項式で割った余りの組で表現する手法である。以下、予め用意する多項式の組{f(x),f(x),…,f(x)}をPRSの基底と呼び、基底を構成する要素の個数nを基底のサイズと呼ぶ。また、基底の集合をf={f(x),f(x),…,f(x)}で表す。
【0014】
例えば、GF(2)の元a(x)と基底{f(x),f(x),…,f(x)}が与えられたとき、a(x)を基底f(x)(i=1,2,…,n)で割った余りa(x)の組(a(x),a(x),…,a(x))がa(x)のPRS表現である。ここで、a(x)=a(x) mod f(x) である。このとき、a(x)は基底の全要素の積F(x)=f(x)f(x)…f(x)を法として一意的に表現できる。すなわち、F(x)の次数をdeg(F(x))と表すとき、a(x)がdeg(F(x))未満の多項式であれば、a(x)とそのPRS表現(a(x),a(x),…,a(x))は一対一に対応する。
【0015】
係るPRS表現において、2つの多項式a(x),b(x)の和を計算する場合、PRS表現したa(x),b(x)の各基底要素ごとの和を求めればよい。乗算については、まず、各基底要素ごとの積を求め、さらに、対応する基底で除した余りを求める。
【0016】
このようにPRSでは、加算、乗算は、各基底要素ごとに独立に、基底を法とする演算を行えばよい。そのため、例えば基底として計算機のワード長以内の次数の多項式を用いることにより、非常に大きな次数の多項式の演算を単精度の演算の繰り返しで実現できる。しかしながら、PRS表現での除算は、通常の多項式表現に比べて効率良く行う手段があまり知られていない。
【0017】
なお、PRS表現での除算を効率良く行なう手法として、Kocらは、PRS表現での剰余乗算手法を提案している(例えば、非特許文献4参照)。
【0018】
Kocの手法では、PRSでの除算を避けるために、法多項式N(x)の倍数テーブルを予め用意していること、が特徴として挙げられる。これにより、除算をするとき、割られる多項式に近い多項式をこの倍数テーブルから検索して減算可能となっている。
【0019】
【非特許文献1】
ポッシュ(Posch),“モジュロ・リダクション・イン・レジデュー・ナンバー・システム(Modulo Reduction in Residue Number System)”,アイトリプルイー・トランザクション・オン・パラレル・アンド・ディストリビューテッド・システムズ(IEEE Transaction on Parallel and Distributed Systems),1995年5月, Vol. 6, No. 5, pp.449−454
【0020】
【非特許文献2】
ポッシュ(Posch),“アールエヌエス−モジュロ・リダクション・アポン・ア・リストリクテッド・ベース・バリュー・セット・アンド・イッツ・アプリケービリティ・トゥ・アールエスエイ・クリプトグラフィ(RNS−Modulo Reduction Upon a Restricted Base Value Set and its Applicability to RSA Cryptography)”,コンピュータ・アンド・セキュリティ(Computer & Security)誌,1998年,Vol. 17, pp.637−650
【0021】
【特許文献1】
特開2001−194993号公報
【0022】
【非特許文献3】
モンゴメリ(Montgomery),“モジュラー・マルチプリケーション・ウィズアウト・トライアル・ディヴィジョン(Modular Multiplication without Trial Division)”,マセマティクス・オブ・コンピューテイション(Mathematics of Computation),1985年4月, Vol.44, No.170, pp.519−521
【0023】
【非特許文献4】
Kocら,“パラレル・マルチプリケーション・イン・ジーエフザケイスパワーオブツー・ユージング・ポリノミアル・レジデュー・アリスメティク(Parallel multiplication in GF(2) using polynomial residue arithmetic)”、デザインズ・コーズ・アンド・クリプトグラフィ(Designs, Codes and Cryptography),2000年6月, 20(2),pp.155−173
【0024】
【発明が解決しようとする課題】
しかしながら、以上のようなKocの手法は、以下の3つの点で改良の余地があると考えられる。
1点目は、法多項式の倍数テーブルを用意したことで、扱える法多項式が限定されてしまうことである。すなわち、この倍数テーブルを演算装置の記憶装置に書き込むと、その演算装置はこの法多項式でしか演算できなくなる。
【0025】
2点目は、倍数テーブルが巨大である点である。例えば、基底の多項式を16ビットとし、法多項式N(x)を160ビットとすると、倍数テーブルは約1.25Mバイトのメモリサイズが必要となる。このような倍数テーブルを格納するのは非現実的である。
【0026】
3点目は、この倍数テーブルを検索するために、PRS表現された多項式とともに、対応する通常の多項式の表現でも同時に計算をする点である。このため、二重に処理することで効率を落としていることに加え、通常の多項式の表現の計算も行うことで、PRS表現で計算する意味が薄れていると考えられる。
【0027】
すなわち、Kocの方法では、PRS表現の持つ効率の良い演算特性を十分に生かし切れていないと考えられる。
【0028】
本発明は上記実情を考慮してなされたもので、多項式剰余系の演算に関し、必要なメモリサイズを低減でき、且つ処理効率を向上し得る多項式剰余系演算装置、方法及びプログラムを提供することを目的とする。
【0029】
【課題を解決するための手段】
第1の発明は、予め設定された多項式剰余演算系の基底{f(x),f(x),…,f(x)}及び{g(x),g(x),…,g(x)}の各基底要素f,g(i=1,2,…,n)に基づき、GF(2)上の多項式の剰余演算機能を有する複数の演算ユニットを備えた多項式剰余系演算装置であって、前記GF(2)上のm次の既約多項式N(x)と、m未満の次数のGF(2)上の多項式a(x),b(x)とを各演算ユニットに入力するための入力手段と、前記設定された各基底要素f,g及び前記入力された入力内容N(x),a(x),b(x)に基づいて、各基底要素f,gでの剰余演算を各演算ユニットに並列に実行させる剰余演算制御手段と、前記各演算ユニットにG(x)=g(x)g(x)…g(x)で定義されたG(x)を用いてモンゴメリ乗算a(x)b(x)G(x)−1 mod N(x)を計算させるように、前記剰余演算制御手段を制御するモンゴメリ乗算制御手段と、を備えた多項式剰余系演算装置である。
【0030】
このように、従来とは異なり、巨大なメモリサイズを要する倍数テーブルを用いることなく、また、通常の多項式の表現での計算をすることなく、多項式剰余系表現を用いて各演算ユニットに並列に演算を実行させている。また法多項式の倍数テーブルのような、法多項式を限定してしまうパラメータは用いていないため、任意の法多項式に対して演算可能である。さらに、並列演算としては、除算を避けるために、多項式剰余系表現では従来用いられなかったモンゴメリ乗算を用いている。
従って、多項式剰余系の演算に関し、必要なメモリサイズを低減でき、且つ処理効率を向上させることができる。
【0031】
なお、第1の発明は、「装置」として表現したが、「システム」、「方法」、「プログラム」又は「コンピュータ読取り可能な記憶媒体」等として表現してもよいことは言うまでもない。
【0032】
【発明の実施の形態】
以下、本発明の各実施形態について図面を用いて説明するが、その前に本発明の原理について述べる。
【0033】
GF(2)上のモンゴメリ乗算は、入力された多項式a(x),b(x),N(x)に対して、a(x)b(x)R(x)−1 mod N(x)を出力するアルゴリズムであり、次の5ステップST1〜ST5からなる。
【0034】
(ST1) s(x) ← a(x)b(x)
(ST2) t(x) ← s(x)N(x)−1 mod R(x)
(ST3) u(x) ← t(x)N(x)
(ST4) v(x) ← s(x)+u(x)
(ST5) w(x) ← v(x)/R(x)
ここで、s(x),t(x),u(x),v(x),w(x)は中間変数を表す。
R(x)は、次数deg(R(x))が法多項式N(x)の次数deg(N(x))より大きく、N(x)と互いに素な多項式である。
【0035】
以上のモンゴメリ乗算をPRSで実現するには、次の7ステップST11〜ST17を行えばよい。この7ステップST11〜ST17は、ポッシュらが提案したRNS表現におけるモンゴメリ乗算アルゴリズムに類似している。
【0036】
(ST11) <s(x)> = <a(x)> <b(x)>,<s(x)> = <a(x)> <b(x)>
(ST12) <t(x)> = <s(x)> <N(x)−1
(ST13) <t(x)> から基底拡張で <t(x)> を求める
(ST14) <u(x)> = <t(x)> <N(x)>
(ST15) <v(x)> = <s(x)> + <u(x)>
(ST16) <w(x)> = <v(x)> <G(x)−1
(ST17) <w(x)> から基底拡張で <w(x)> を求める
ここで、<s(x)> などは通常の多項式表現で s(x) である多項式を、基底fによってPRS表現したものを表す。
【0037】
上記7ステップを正しく処理するには、deg(N(x)) <deg(F(x))の条件と、deg(N(x)) <deg(G(x))の条件とを満たす必要がある。
【0038】
この2つの条件から、a(x)を基底fのみ又は基底gのみで表現できるので、<a(x)>, <a(x)> のペアで a(x) を表すこと自体は冗長である。
しかしながら、多項式a(x)とb(x)の積s(x)は、その次数deg(s(x))がdeg(F(x))、deg(G(x))より大きいことがありうるので、f∪gを基底として初めて正しく表現できる。なお、一般に、基底fと基底gとはサイズが異なる。但し、特殊な場合として両基底f,gのサイズを等しく取った場合には、基底fの演算ユニットと基底gの演算ユニットとを共用できる利点がある。
【0039】
次に、PRS表現のモンゴメリ乗算アルゴリズムのステップST13,ST17の基底拡張について説明する。
いま、β(x)をdeg(β(x)) <deg(F(x)) なる多項式とし、そのPRS表現を<β(x)> =(β(x),β(x),…,β(x))とする。
【0040】
このPRS表現された多項式<β(x)> から基底拡張後の多項式<β(x)> を求めるとする。このとき、周知の中国剰余定理から次の式(1)が成立する。
【0041】
【数1】

Figure 2004102071
【0042】
ここで、F(x)=F(x)/f(x)である。F(x)−1は、法f(x)におけるF(x)の乗法逆元である。
【0043】
上の式(1)は次の式(2)のように書いても良い。
【0044】
【数2】
Figure 2004102071
【0045】
ここで、右辺のmod F(x)を施す前の次数は、以下のように、deg(F(x))より小さい値となる。
【0046】
max{deg(f(x))+deg(F(x))}<max{deg(f(x))+deg(F(x))−deg(f(x))}=deg(F(x))
従って、式(2)は、mod F(x)を省略し、次の式(3)として表現される。
【数3】
Figure 2004102071
式(3)によると、乗算と加算でβ(x)を求めることができる。
【0047】
<β(x)> はこのようにして求めたβ(x)を、各基底要素g(x) での剰余を計算することで得られる。
【0048】
続いて、以上のようなPRS表現を用いたモンゴメリ乗算アルゴリズムを実現する本発明の各実施形態について図面を用いて説明する。
(第1の実施形態)
図1は本発明の第1の実施形態に係る多項式剰余系演算装置の構成を示す模式図である。この多項式剰余系演算装置は、n個の演算ユニット10〜10が制御装置20に接続されている。
【0049】
ここで、各演算ユニット10〜10は、制御装置20に制御され、単精度の多項式の剰余乗算を行うものであり、それぞれ対応する添字のROM11〜11、RAM12〜12及び積和回路13〜13を備えている。なお、各演算ユニット10〜10は、互いに同一構成を有するため、以下の説明は、任意の演算ユニット10(但し、i=1,2,…,n)を代表例として述べる。また、演算ユニット10の各要素11,12,13も同様である。
【0050】
ROM11は、制御装置20により読出制御される読出専用メモリであり、積和回路13で用いる基底要素f,gi、及びf(x)を法とした乗法逆元値F(x)−1mod f(x)、g(x)を法とした乗法逆元値G(x)−1mod g(x)、事前計算された<F(x)>g、<G(x)>(i=1,2,…,n)、<G−1(x)>を保持し、保持内容を制御装置20からの制御により、対応する積和回路13に転送可能となっている。
【0051】
なお、多項式剰余系のn個の基底要素{f,…,f}は、どの2つ同士も互いに素な多項式が使用されている。他方のn個の基底要素{g,…,g}も同様である。また、一般には多項式剰余系の基底要素の個数nと、積和回路13〜13の個数nとは一致しなくてよいが、ここでは簡単のため、共にn個とする。
【0052】
乗法逆元値F(x)−1mod f(x)、G(x)−1mod g(x)及び<F(x)>g、<G(x)>(i=1,2,…,n)、<G−1(x)>は、多項式剰余系の基底が定まれば決まる値なので、事前計算して格納するが、ROM11に限らず、RAM12や図示しない他のメモリ(例えばEEPROM)に格納されていてもよい。
【0053】
RAM(記憶装置)12は、制御装置20により読出/書込制御される随時書込読出メモリであり、積和回路13への入力データや、積和回路13からの演算の中間結果データ、及び演算ユニット10外部への出力データ、といった各データを保持するために用いられる。また、RAM12は、事前計算された<N(x)>、<N(x)−1<N(x)>が保持されている。また、RAM12は、書込可能な記憶装置であればよく、例えばRAMに代えて、EAROM(electrically alterable read only memory)又はEEPROM(electrically erasable programmable read only memory)等、といった任意の書換え可能な記憶装置に変形可能となっている。
【0054】
制御装置20は、図2に示すモンゴメリ乗算アルゴリズムに基づいて、各演算ユニット10や入出力データを制御することにより、所定の演算を実行させる機能をもっている。ここで、図2のモンゴメリ乗算アルゴリズムの各ステップST11〜ST17は、前述したPRSにおける7つのステップST11〜ST17に対応している。また、各演算ユニット10の制御としては、例えば、各積和回路13内にセレクタを設け、このセレクタに制御信号を与えて積和回路13内の加算回路や乗算回路(図示せず)を選択することにより実現可能となっている。
【0055】
また、以上のような各演算ユニット10及び制御装置20はそれぞれハードウェア、又はハードウェアとソフトウェアの組合せにより構成可能となっている。ここで、各演算ユニット10及び制御装置20がハードウェアとソフトウェアにより構成される場合、ソフトウェアとしては、後述する各機能を実現させるためのプログラムが予め多項式剰余系演算装置のコンピュータにインストールされている。なお、ハードウェア、又はハードウェアとソフトウェアの組合せにより各演算ユニット10及び制御装置20を個別に構成可能な旨の説明は、以下の各実施形態にも適用される。
【0056】
次に、以上のように構成された多項式剰余系演算装置による多項式剰余系演算方法について図2を用いて説明する。
始めに、基底f(x),g(x)は、予めROM11に保持されている。また、入力a(x),b(x),法N(x)は、制御装置20により、各演算ユニット10に設定される。
【0057】
(ST11) 各演算ユニット10は、2つの基底f,gの下で、それぞれa(x)×b(x)を行う。例えば基底fの下での <a(x)> × <b(x)> は次のように行う。
【0058】
すなわち、RAM12内の <a(x)>,<b(x)> の第i成分a(x),b(x)と、ROM11内の基底要素f(x)とを用い、積和回路13がa(x)×b(x) mod f(x)を計算し、計算結果s(x)をRAM12に格納する。
【0059】
(ST12) 各演算ユニット10は、基底gのみの演算で、ステップ1で求めた<s(x)>と、RAM12内の<N(x)−1とを乗算する。なお、<N(x)−1 は事前計算により RAM12に格納されている。
【0060】
(ST13) 各演算ユニット10は、<t(x)>を基底gから基底fへの表現に変換する基底拡張を行なう。基底拡張は、式(3)に基づいて行なう(β(x)=t(x)とし、fとgの役割を入れ替える)。
【0061】
まず、各演算ユニット10は、RAM12内の <t(x)> の第j成分t(x)と、ROM11内の G(x)−1 mod g(x),基底要素g(x) を用い、積和回路13によりt(x)×G(x)−1 mod g(x)を計算し、計算結果h(x)をすべてのjについてRAM12、RAM12、…、RAM12すべてに格納する。ここで各演算ユニット間には図示しない結線があり、この結線を通じて異なるユニットのRAM12に格納する。
【0062】
次に、この計算結果h(x)及びROM11内のG(x) mod f(x),基底要素 f(x)を用い、積和回路13によりh(x)×G(x) mod f(x)を計算し、この計算結果k1i(x)をRAM12に格納する。
【0063】
次に、RAM12内のh(x)及びROM11内のG(x) mod f(x),基底要素f(x)を用い、積和回路13によりh(x)×G(x) mod f(x)を計算し、この計算結果とRAM12内のk1i(x)とを加算したk2i(x)をRAM12に格納する。
【0064】
以下同様に、G(x) mod f(x),…,G(x) mod f(x)を順に用いてk3i(x),…,kni(x)を求め、t(x) mod f(x)= kni(x)とおくことで <t(x)> を得ることができる。
【0065】
(ST14) 各演算ユニット10は、ステップST13で求めた<t(x)>と、RAM12内の<N(x)> とを積和回路13により乗算し、乗算結果<u(x)> をRAM12に格納する。ここで、<N(x)> は事前計算によりRAM12に格納されている。
【0066】
(ST15) 各演算ユニット10は、ステップST11で求めた<s(x)>と、ステップST14で求めた<u(x)>とを積和回路13により加算し、加算結果<v(x)> をRAM12に格納する。
【0067】
(ST16) 各演算ユニット10は、ステップST15で求めた<v(x)> と、ROM11内の<G(x)−1とを積和回路13により乗算し、乗算結果<w(x)> をRAM12に格納する。ここで、<G(x)−1は事前計算してROM11に格納されている。
このステップST16で得られた<w(x)> に、求めたかったa(x)b(x)G(x)−1 mod N(x)の全ての情報が含まれている。
【0068】
(ST17) このアルゴリズムを繰り返し用いる場合、各演算ユニット10は、次の入力とするために、ステップST16の<w(x)> を基底fから基底gに変換する。
【0069】
上述したように本実施形態によれば、従来とは異なり、巨大なメモリサイズを要する倍数テーブルを用いることなく、また、通常の多項式の表現での計算をすることなく、多項式剰余系表現を用いて各演算ユニットに並列に演算を実行させている。また法多項式の倍数テーブルのような、法多項式を限定してしまうパラメータは用いていないため、任意の法多項式に対して演算可能である。さらに、並列演算としては、除算を避けるために、多項式剰余系表現では従来用いられなかったモンゴメリ乗算を用いている。
従って、多項式剰余系の演算に関し、必要なメモリサイズを低減でき、且つ処理効率を向上させる、さらに任意の法多項式を扱うことができる。
【0070】
補足すると、従来技術では巨大な倍数テーブルが必要であったり、PRS表現と通常の多項式の表現で二重に処理を行ったりして効率を落としていたが、本実施形態では、倍数テーブルは不要であり、計算もPRS表現で閉じているため、効率よく処理できるようになっている。また、従来技術では倍数テーブルを用意することにより扱える法多項式が限定されていたが、本実施形態では、基底要素と互いに素であれば、任意の法多項式が扱えるようになっている。
【0071】
これに加え、本実施形態では、PRS表現におけるモンゴメリ乗算を行うことができるので、より一層、効率よく処理できるようになっている。
【0072】
(第2の実施形態)
図3は本発明の第2の実施形態に係る多項式剰余系演算装置の構成を示す模式図であり、図1と同一部分には同一符号を付してその詳しい説明を省略し、ここでは異なる部分について主に述べる。
【0073】
本実施形態は、第1の実施形態におけるPRS表現のモンゴメリ乗算を楕円曲線暗号に用いた応用例であり、図1の制御装置20に代えて、楕円曲線暗号のアルゴリズムに基づいた制御を行なう制御装置30を有しており、また、各演算ユニット10に対する共通の入出力部(図中I/O)40を備えている。
【0074】
ここで、制御装置30は、PRS表現においてGF(2)上の楕円曲線暗号の処理に必要な楕円曲線上の点のスカラー倍算を行うためのものであり、図4及び図5に示すスカラ倍算アルゴリズムに基づいて、各演算ユニット10や入出力データを制御することにより、所定の演算を実行させる機能をもっている。
【0075】
入出力部40は、多項式剰余系演算装置の外部と、各演算ユニット10との間でデータを入出力するためのインターフェイスである。
【0076】
次に、以上のように構成された多項式剰余系演算装置における多項式剰余系演算方法を図4及び図5を用いて説明する。ここで、図4はPRSにおける楕円曲線上の点のスカラー倍算を行うアルゴリズムを示し、図5は図4のアルゴリズムの途中において、射影座標でモンゴメリ演算領域の楕円曲線上の点のスカラー倍算を行うアルゴリズムを示している。
【0077】
始めに、図4を用いて説明する。
(ST21) 図示しない外部CPUは、スカラーkを各演算ユニット10に入力する。また、入出力部40は、楕円曲線上の点(P(x),P(x))、法N(x)を各演算ユニット10に入力する。
【0078】
(ST22) 図示しない通常の多項式の表現での剰余乗算器により、GN(x)2=G(x)2 mod N(x)を計算する。
【0079】
(ST23) 各演算ユニット10は、通常の多項式の表現であるGN(x) , N(x),P(x),P(x)をPRS表現に変換する。この変換は、積和回路13のビットサイズをLとしたとき、例えばN(x)をPRS表現にするには、
【数4】
Figure 2004102071
【0080】
(ST24) 各演算ユニット10は、モンゴメリ乗算で必要な <N(x)−1を計算する。<N(x)−1は、g(x)のカーマイケル数λを事前に計算しておき、N(x)λ  mod g(x)により求める。
【0081】
(ST25) 各演算ユニット10は、アフィン座標表示された(<P(x)> , <P(x)> )を射影座標かつモンゴメリ演算領域(<Pmx(x)> , <Pmy(x)> ,<GN(x) )に変換する。
この変換は、x, y座標に関しては<GN(x)  とのモンゴメリ乗算により計算できる。z座標に関しては <GN(x)  と<1>  のモンゴメリ乗算により計算できる。
【0082】
(ST26) 各演算ユニット10は、楕円曲線上の点(<Pmx(x)> , <Pmy(x)> ,<GN(x) )をk倍して(<Qpmx(x)> ,<Qpmy(x)> ,<Qpmz(x)> )を得る。なお、本ステップST26は後で図5を用いて詳述する。
【0083】
(ST27) 各演算ユニット10は、(<Qpmx(x)> ,<Qpmy(x)> ,<Qpmz(x)> )をモンゴメリ演算領域から通常の領域(<QPx(x)> ,<QPy(x)> ,<QPz(x)> )に変換する。この変換は、各成分と<1> とのモンゴメリ乗算で計算できる。
【0084】
(ST28) 各演算ユニット10は、<QPx(x)> ,<QPy(x)> ,<QPz(x)> を通常の多項式の表現 QPx(x),QPy(x),QPz(x)に変換する。
例えば<QPx(x)>については次のように行う。
ξ(x)=QPxi(x)G(x)−1 mod g(x)
とし、
【数5】
Figure 2004102071
【0085】
これにより、QPx(x)の通常の多項式の表現が得られる。QPx(x)は基底fのみで表現できているので、<QPx(x)>に関する操作は不要である。
【0086】
(ST29) 各演算ユニット10は、射影座標表示された楕円曲線上の点(QPx(x),QPy(x),QPz(x))をアフィン座標表示(Q(x),Q(x))に変換する。
【0087】
(ST30) 各演算ユニット10は、アフィン座標表示の(Q(x),Q(x))を出力する。
【0088】
次に、前述したステップST26のスカラー倍算を図5を用いて詳細に説明する。
【0089】
(ST26−1) 各演算ユニット10は、まず入力として、スカラーkと、射影座標かつモンゴメリ演算領域で表現された楕円曲線上の点(PPmx(x),PPmy(x),PPmz(x))が与えられる。
【0090】
(ST26−2) 各演算ユニット10は、初期値として(QPmx(x),QPmy(x),QPmz(x))に(PPmx(x),PPmy(x),PPmz(x))を代入する。以下、スカラーkをビット表現したときの第iビットをkで表すことにする。スカラーkのMSB(最上位)ビットkm−1からkまで順に以下のループを行う。
【0091】
(ST26−3) 各演算ユニット10は、(QPmx(x),QPmy(x),QPmz(x))を2倍する。
【0092】
(QPmx(x),QPmy(x),QPmz(x))← DBL((QPmx(x),QPmy(x),QPmz(x)),(QPmx(x),QPmy(x),QPmz(x)))。ここで、DBL( )は、楕円曲線上の点の2倍算を意味する。
【0093】
(ST26−4) 制御装置30は、k=1か否かを判定し、k=1の場合にはステップS26−5に進む。k=0の場合は、この加算を行わず、ループの先頭(ST26−3)に戻る。なお、ループの先頭に戻る毎にcの値を1ずつ減じる。
【0094】
(ST26−5) 各演算ユニット10は、(QPmx(x),QPmy(x),QPmz(x))に(PPmx(x),PPmy(x),PPmz(x))を加算する。
【0095】
(QPmx(x),QPmy(x),QPmz(x))← ADD((QPmx(x),QPmy(x),QPmz(x)),(PPmx(x),PPmy(x),PPmz(x)))。ここで、ADD( )は、楕円曲線上の点の加算を意味する。
【0096】
(ST26−6) 制御装置30は、c=1か否かを判定し、c≠1の場合にはcの値を1だけ減じ、ループの先頭(ST26−3)に戻る。c=1のときにループを終了し、ステップST26−7に進む。
【0097】
(ST26−7) 各演算ユニット10は、(QPmx(x),QPmy(x),QPmz(x))を出力し、ステップST27に進む。
【0098】
以上でステップST26は完了する。ここで、図5は通常の多項式の表現で記述してあるが、各元をPRS表現に置き換えることで容易にPRS表現でのスカラー倍算を実現できる。このとき、ADD( )やDBL( )で必要な剰余乗算を、第1の実施形態で示したPRS表現によるモンゴメリ乗算アルゴリズムを用いて行う。
【0099】
上述したように本実施形態によれば、第1の実施形態の効果に加え、効率よく楕円曲線上の点のスカラー倍算処理を実行することができる。
【0100】
なお、上記各実施形態に記載した手法は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フロッピー(登録商標)ディスク、ハードディスクなど)、光ディスク(CD−ROM、DVDなど)、光磁気ディスク(MO)、半導体メモリなどの記憶媒体に格納して頒布することもできる。
【0101】
また、この記憶媒体としては、プログラムを記憶でき、かつコンピュータが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であっても良い。
【0102】
また、記憶媒体からコンピュータにインストールされたプログラムの指示に基づきコンピュータ上で稼働しているOS(オペレーティングシステム)や、データベース管理ソフト、ネットワークソフト等のMW(ミドルウェア)等が本実施形態を実現するための各処理の一部を実行しても良い。
【0103】
さらに、本発明における記憶媒体は、コンピュータと独立した媒体に限らず、LANやインターネット等により伝送されたプログラムをダウンロードして記憶または一時記憶した記憶媒体も含まれる。
【0104】
また、記憶媒体は1つに限らず、複数の媒体から本実施形態における処理が実行される場合も本発明における記憶媒体に含まれ、媒体構成は何れの構成であっても良い。
【0105】
尚、本発明におけるコンピュータは、記憶媒体に記憶されたプログラムに基づき、本実施形態における各処理を実行するものであって、パソコン等の1つからなる装置、複数の装置がネットワーク接続されたシステム等の何れの構成であっても良い。
【0106】
また、本発明におけるコンピュータとは、パソコンに限らず、情報処理機器に含まれる演算処理装置、マイコン等も含み、プログラムによって本発明の機能を実現することが可能な機器、装置を総称している。
【0107】
なお、本願発明は、上記各実施形態に限定されるものでなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は可能な限り適宜組み合わせて実施してもよく、その場合、組み合わされた効果が得られる。さらに、上記各実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出され得る。例えば実施形態に示される全構成要件から幾つかの構成要件が省略されることで発明が抽出された場合には、その抽出された発明を実施する場合には省略部分が周知慣用技術で適宜補われるものである。
【0108】
その他、本発明はその要旨を逸脱しない範囲で種々変形して実施できる。
【0109】
【発明の効果】
以上説明したように本発明によれば、多項式剰余系の演算に関し、任意の法多項式を扱え、必要なメモリサイズを低減でき、且つ処理効率を向上できる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る多項式剰余系演算装置の構成を示す模式図
【図2】同実施形態におけるPRS表現のモンゴメリ乗算のアルゴリズムを示す流れ図
【図3】本発明の第2の実施形態に係る多項式剰余系演算装置の構成を示す模式図
【図4】同実施形態におけるPRS表現を利用した楕円曲線上の点のスカラー倍算アルゴリズムを示す流れ図
【図5】図4の一部を詳細に説明するためのスカラー倍算アルゴリズムを示す流れ図
【符号の説明】
10〜10…演算ユニット
11〜11…ROM
12〜12…RAM
13〜13…積和回路
20,30…制御装置
40…入出力部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention uses a GF (2mThe present invention relates to a polynomial remainder-based arithmetic device, method and program for calculating elements of ()) at high speed by parallel processing.
[0002]
[Prior art]
In the field of public key cryptography, the key length tends to increase in order to ensure security in response to the sophistication of computers used by attackers and the sophistication of attack techniques. For example, at present, a key length of 1,024 bits is recommended in the RSA (Rivest-Shamir-Adleman) scheme used as a de facto standard of public key cryptography. In the elliptic DSA (Digital @ Signature @ Standard) scheme, which is one of the elliptic curve cryptosystems, a key length of 160 bits is currently recommended.
[0003]
Therefore, in the field of public key cryptography, when using such a long key length, it is an important issue how to process a very large integer operation or a very high-order polynomial operation at high speed. I have.
[0004]
Here, in the integer arithmetic processing, a residue arithmetic system (Residue \ Number \ System, hereinafter abbreviated as RNS) is known as one of the methods for speeding up. This RNS is a set of relatively prime integers {a1, A2, ..., an} Is prepared in advance, and a large integer to be calculated is represented by a set of remainders divided by these integers. Hereinafter, a set of integers {a prepared in advance1, A2, ..., an} Is called the base of the RNS, and the number n of elements constituting the base is called the size of the base. Let a set of bases be a = {a1, A2, ..., anExpressed by}.
[0005]
For example, an integer x and a base {a1, A2, ..., anGiven}, let x be the base element aiThe remainder x divided by (i = 1, 2,..., N)iSet (x1, X2, ..., xn) Is the RNS representation of x. Where xi= X mod ai. At this time, x is the product A = a of all the base elements.1a2... anCan be uniquely expressed modulo. That is, if x is a positive integer less than A, x and its RNS expression (x1, X2, ..., xn) Corresponds one-to-one.
[0006]
In this RNS expression, when calculating the sum of two integers x and y, the sum of each base element of x and y expressed in the RNS may be obtained, and the remainder after dividing by the corresponding base may be obtained. The same applies to subtraction. Regarding the multiplication, the product for each base element is obtained, and the remainder after division by the corresponding base is obtained.
[0007]
As described above, in the RNS, addition, subtraction, and multiplication may be performed by using the base modulo independently for each base element. For this reason, for example, by using an integer within the word length of the computer as a base, a very large integer operation can be realized by repeating single-precision operations. However, there are few known means for performing the division in the RNS expression more efficiently than the radix expression.
[0008]
As a method of efficiently performing the division in the RNS expression, Posch et al. And Kawamura et al. Proposed a method of performing the operation of the RSA cryptosystem of the public key cryptosystem at a high speed by using a residual arithmetic system. (For example, see Non-Patent Documents 1 and 2 and Patent Document 1).
[0009]
Posh and Kawamura's method uses a modular multiplication method (hereinafter referred to as Montgomery multiplication) proposed by Montgomery to avoid disadvantageous division in the operation in RNS expression (for example, see Non-Patent Document 3). The feature is that an integer represented by one RNS basis is represented by another basis using basis extension, and the like.
[0010]
Here, the basis extension is a basis a = {a1, A2, ..., an(X mod a1, X mod a2, ..., x mod an), The basis a∪ {b1} = {A1, A2, ..., an, B1(X mod a1, X mod a2, ..., x mod an, X mod b1). In the above operation, the size of the base is increased by one. However, repeating this operation to increase the size of the base by n ′ (n ′ is an integer) and creating an RNS expression under the base is also called base extension. .
[0011]
On the other hand, in the elliptic curve cryptosystem, the extended field GF (2) of the field GF (2) of the characteristic 2 is used.m) Is known as a method of constructing an elliptic curve based on a basic field. GF (2mSince the element of ()) is expressed by a polynomial, an arithmetic method slightly different from the above-described integer arithmetic method is required.
[0012]
Hereinafter, GF (2m) Is written as N (x) on the m-th irreducible polynomial on GF (2). GF (2m) Can be regarded as a remainder obtained by dividing the polynomial on GF (2) by N (x), and can be represented by a polynomial of degree m-1 or less.
[0013]
GF (2m) Is known as a polynomial residue arithmetic system (Polynominal Residue Arithmetic or Polynomial Residue System, hereinafter abbreviated as PRS) having a similar concept to RNS. This PRS is a set of polynomials {f} on GF (2) of relatively small order that are relatively prime.1(X), f2(X), ..., fn(X)} is prepared in advance, and GF (2m) Is expressed as a set of remainders obtained by dividing these elements by these polynomials. Hereinafter, a set of polynomials {f prepared in advance1(X), f2(X), ..., fn(X)} is called the basis of the PRS, and the number n of elements constituting the basis is called the size of the basis. Further, a set of bases is represented by f = {f1(X), f2(X), ..., fn(X) Expressed by}.
[0014]
For example, GF (2m) And the basis {f1(X), f2(X), ..., fnGiven (x)}, let a (x) be the basis fi(X) remainder a divided by (i = 1, 2,..., N)i(X) set (a1(X), a2(X), ..., an(X)) is the PRS expression of a (x). Where ai(X) = a (x) mod fi(X). At this time, a (x) is a product F (x) = f of all the base elements.1(X) f2(X) ... fn(X) can be uniquely expressed modulo. That is, when the degree of F (x) is expressed as deg (F (x)), if a (x) is a polynomial less than deg (F (x)), a (x) and its PRS expression (a1(X), a2(X), ..., an(X)) corresponds one-to-one.
[0015]
When calculating the sum of two polynomials a (x) and b (x) in such a PRS expression, the sum of each base element of a (x) and b (x) expressed in the PRS may be obtained. As for the multiplication, first, the product for each base element is obtained, and the remainder after division by the corresponding base is obtained.
[0016]
As described above, in the PRS, addition and multiplication may be performed by using the base modulo independently for each base element. Therefore, for example, by using a polynomial of an order within the word length of the computer as a basis, an operation of a polynomial of an extremely large order can be realized by repeating single-precision arithmetic. However, there are few known means for performing division in the PRS expression more efficiently than in the ordinary polynomial expression.
[0017]
Koc et al. Have proposed a remainder multiplication method in PRS expression as a method for efficiently performing division in PRS expression (for example, see Non-Patent Document 4).
[0018]
The feature of the Koc method is that a multiple table of the modulo polynomial N (x) is prepared in advance in order to avoid division by PRS. As a result, when performing division, a polynomial close to the polynomial to be divided can be retrieved from the multiple table and subtracted.
[0019]
[Non-patent document 1]
Posch, "Modulo Reduction in Residue Number System", iTransaction on Parallel and Distributed Systems (IEEE Translator and Online), and "Modulo Reduction in Residue Number System". Systems), May 1995, @Vol. 6, No. $ 5, $ pp. 449-454
[0020]
[Non-patent document 2]
Posch, “RNS-Modulo Reduction-upon-Restricted Base Value Set and It's Applicability to RSA Cryptography (RNS-Modulo-Reduction-Upon-a-Restricted-Base) Value Set and It's Applicability to RSA Cryptography, "Computer & Security, 1998, Vol. $ 17, $ pp. 637-650
[0021]
[Patent Document 1]
JP-A-2001-194993
[0022]
[Non-Patent Document 3]
Montgomery, "Modular Multiplication Without Trial Division", The Mathematicals of Computation (Mathmatics, March, 19th April, April, April 2008). 44, No. 170, @pp. 519-521
[0023]
[Non-patent document 4]
Koc et al., "Parallel Multiplication in GF (2) Power of Two Using Polynomial Residue Arismetic (Parallel @ multiplication @ in @ GF (2)k) \ Using \ polynomial \ residue \ arithmetic, "Designs Causes and Cryptography, Designs, Codes and Cryptography, June 2000, 20 (2), pp. 155-173.
[0024]
[Problems to be solved by the invention]
However, it is considered that the Koc method described above has room for improvement in the following three points.
The first point is that the preparation of the multiple table of the modal polynomial limits the modulo polynomial that can be handled. That is, when the multiple table is written in the storage device of the arithmetic device, the arithmetic device can only perform the operation using the modal polynomial.
[0025]
The second point is that the multiple table is huge. For example, if the base polynomial is 16 bits and the modulus polynomial N (x) is 160 bits, the multiple table requires a memory size of about 1.25 Mbytes. Storing such a multiple table is impractical.
[0026]
The third point is that, in order to search the multiple table, the PRS-expressed polynomial and the corresponding ordinary polynomial are simultaneously calculated. For this reason, it is considered that the significance of performing the calculation in the PRS expression is reduced by performing the calculation of the expression of the ordinary polynomial in addition to reducing the efficiency by performing the double processing.
[0027]
That is, it is considered that the Koc method does not fully utilize the efficient operation characteristics of the PRS expression.
[0028]
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and provides a polynomial remainder system operation device, method, and program that can reduce the required memory size and improve processing efficiency with respect to polynomial residue system operations. Aim.
[0029]
[Means for Solving the Problems]
According to a first aspect, a base {f} of a preset polynomial remainder operation system is used.1(X), f2(X), ..., fn(X)} and {g1(X), g2(X), ..., gn(X) each base element f of}i, Gi(I = 1, 2,..., N), a polynomial remainder system operation device including a plurality of operation units having a polynomial remainder operation function on GF (2), wherein the GF (2) input means for inputting m-order irreducible polynomial N (x) and polynomials a (x) and b (x) on GF (2) of degree less than m to each arithmetic unit; Each base element fi, GiAnd each of the base elements f based on the input contents N (x), a (x), b (x)i, GiCalculation means for causing each operation unit to execute the remainder operation in parallel in parallel, and G (x) = g1(X) g2(X) ... gnMontgomery multiplication a (x) b (x) G (x) using G (x) defined by (x)-1And a Montgomery multiplication control means for controlling the remainder operation control means so as to calculate mod N (x).
[0030]
Thus, unlike the conventional method, without using a multiple table that requires a huge memory size, and without performing calculations in the ordinary polynomial expression, each arithmetic unit can be processed in parallel using the polynomial residue system expression. The calculation is being executed. In addition, since a parameter that limits the modulus polynomial, such as a multiple table of the modulus polynomial, is not used, calculation can be performed on an arbitrary modulus polynomial. Furthermore, in order to avoid division, Montgomery multiplication, which has not been conventionally used in polynomial residue system representation, is used as a parallel operation.
Therefore, regarding the operation of the polynomial remainder system, the required memory size can be reduced and the processing efficiency can be improved.
[0031]
Although the first invention is described as an “apparatus”, it is needless to say that the first invention may be expressed as a “system”, a “method”, a “program”, a “computer-readable storage medium”, or the like.
[0032]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings, but before that, the principle of the present invention will be described.
[0033]
Montgomery multiplication on GF (2) calculates a (x) b (x) R (x) for input polynomials a (x), b (x), and N (x).-1This is an algorithm for outputting {mod} N (x), and includes the following five steps ST1 to ST5.
[0034]
(ST1) s (x) ← a (x) b (x)
(ST2) t (x) ← s (x) N (x)-1Mod R (x)
(ST3) u (x) ← t (x) N (x)
(ST4) v (x) ← s (x) + u (x)
(ST5) w (x) ← v (x) / R (x)
Here, s (x), t (x), u (x), v (x), w (x) represent intermediate variables.
R (x) is a polynomial whose degree deg (R (x)) is larger than the degree deg (N (x)) of the modulus polynomial N (x) and is relatively prime to N (x).
[0035]
To implement the above Montgomery multiplication by PRS, the following seven steps ST11 to ST17 may be performed. The seven steps ST11 to ST17 are similar to the Montgomery multiplication algorithm in the RNS expression proposed by Posh et al.
[0036]
(ST11) <s (x)>f= <A (x)>f<B (x)>f, <S (x)>g= <A (x)>g<B (x)>g
(ST12) <t (x)>g= <S (x)>g<N (x)-1>g
(ST13) <t (x)>g<T (x)> fromfAsk for
(ST14) <u (x)>f= <T (x)>f<N (x)>f
(ST15) <v (x)>f= <S (x)>f+ <U (x)>f
(ST16) <w (x)>f= <V (x)>f<G (x)-1>f
(ST17) <w (x)>f<W (x)> in base extension fromgAsk for
Here, <s (x)>fAnd the like represent a PRS representation of a polynomial that is {s (x)} in a normal polynomial representation using a basis f.
[0037]
In order to correctly process the above seven steps, it is necessary to satisfy a condition of deg (N (x)) <deg (F (x)) and a condition of deg (N (x)) <deg (G (x)). There is.
[0038]
From these two conditions, a (x) can be expressed only by the base f or the base g, so that <a (x)>f, <A (x)>gRepresenting {a (x)} with a pair of {} is redundant.
However, the product s (x) of the polynomials a (x) and b (x) may have an order deg (s (x)) larger than deg (F (x)) and deg (G (x)). Therefore, it can be correctly expressed only when f∪g is used as a basis. Note that, in general, the size of the basis f and the basis g are different. However, as a special case, when the sizes of both bases f and g are set to be equal, there is an advantage that the arithmetic unit of the base f and the arithmetic unit of the base g can be shared.
[0039]
Next, the base extension of steps ST13 and ST17 of the Montgomery multiplication algorithm of the PRS expression will be described.
Now, let β (x) be a polynomial of deg (β (x)) {<deg (F (x))}, and express its PRS expression as <β (x)>f= (Β1(X), β2(X), ..., βn(X)).
[0040]
This PRS-represented polynomial <β (x)>fPolynomial <β (x)> after base extension fromf gSuppose you want At this time, the following equation (1) is established from the well-known Chinese remainder theorem.
[0041]
(Equation 1)
Figure 2004102071
[0042]
Where Fi(X) = F (x) / fi(X). Fi(X)-1Is the law fiF in (x)iThis is the multiplicative inverse of (x).
[0043]
The above equation (1) may be written as the following equation (2).
[0044]
(Equation 2)
Figure 2004102071
[0045]
Here, the order before the application of mod @ F (x) on the right side is smaller than deg (F (x)) as follows.
[0046]
max @ deg (fi(X)) + deg (Fi(X))} <max {deg (fi(X)) + deg (F (x))-deg (fi(X))} = deg (F (x))
Therefore, the expression (2) omits mod F (x) and is expressed as the following expression (3).
(Equation 3)
Figure 2004102071
According to equation (3), β (x) can be obtained by multiplication and addition.
[0047]
<Β (x)>gRepresents β (x) obtained in this manner with each base element gi(X) It is obtained by calculating the remainder at.
[0048]
Next, each embodiment of the present invention for realizing the Montgomery multiplication algorithm using the above PRS expression will be described with reference to the drawings.
(1st Embodiment)
FIG. 1 is a schematic diagram showing a configuration of a polynomial remainder system operation device according to the first embodiment of the present invention. This polynomial remainder system arithmetic unit comprises n arithmetic units 101-10nAre connected to the control device 20.
[0049]
Here, each operation unit 101-10nAre controlled by the controller 20 to perform modular multiplication of a single-precision polynomial.1~ 11n, RAM121~ 12nAnd product-sum circuit 131~ 13nIt has. Note that each arithmetic unit 101-10nHave the same configuration as each other.i(Where i = 1, 2,..., N) will be described as a representative example. The operation unit 10iEach element 11 ofi, 12i, 13iThe same is true for
[0050]
ROM11iIs a read-only memory that is read-controlled by the control device 20, and the product-sum circuit 13iBase element f used ini, Gi,And fiMultiplicative inverse value F modulo (x)i(X)-1mod @ fi(X), giMultiplicative inverse value G modulo (x)i(X)-1mod @ gi(X), pre-calculated <Fi(X)>g,<Gi(X)>f(I = 1, 2,..., N), <G-1(X)>fAre held, and the held contents are controlled by the control device 20 so that the corresponding product-sum circuit 13iCan be transferred to
[0051]
Note that n base elements {f of the polynomial remainder system1, ..., fnFor。, a polynomial which is relatively prime to any two is used. The other n base elements {g1, ..., gnThe same applies to}. In general, the number n of base elements of the polynomial remainder system and the product-sum circuit 131~ 13nDoes not need to coincide with the number n, but for the sake of simplicity, it is assumed that both are n.
[0052]
Multiplicative inverse value Fi(X)-1mod @ fi(X), Gi(X)-1mod @ gi(X) and <Fi(X)>g,<Gi(X)>f(I = 1, 2,..., N), <G-1(X)>fIs a value determined once the basis of the polynomial remainder system is determined, and is pre-calculated and stored.iNot limited to, RAM12iAlternatively, the program may be stored in another memory (for example, an EEPROM) not shown.
[0053]
RAM (storage device) 12iIs an as-necessary write / read memory controlled by the control device 20 to read / write.iInput data and the product-sum circuit 13iResult data of the operation from theiIt is used to hold data such as output data to the outside. The RAM 12iIs pre-calculated <N (x)>f, <N (x)-1>g<N (x)>fIs held. The RAM 12iMay be any writable storage device. For example, instead of the RAM, any rewritable storage device such as an EAROM (electrically readable, only available, only memory) or an EEPROM (electrically erasable, programmable, read only, only memory) or the like may be used. It has become.
[0054]
The control device 20 controls each operation unit 10 based on the Montgomery multiplication algorithm shown in FIG.iIt has a function to execute a predetermined operation by controlling the input and output data. Here, each step ST11 to ST17 of the Montgomery multiplication algorithm in FIG. 2 corresponds to the seven steps ST11 to ST17 in the PRS described above. In addition, each operation unit 10iIs controlled by, for example, each product-sum circuit 13i, A control signal is applied to the selector, and the product-sum circuit 13iIt can be realized by selecting an addition circuit or a multiplication circuit (not shown).
[0055]
Also, each of the arithmetic units 10 as described aboveiThe control device 20 can be configured by hardware or a combination of hardware and software. Here, each operation unit 10iWhen the control device 20 is configured by hardware and software, a program for realizing each function to be described later is previously installed in the computer of the polynomial remainder system arithmetic device as software. It should be noted that each arithmetic unit 10 can be implemented by hardware or a combination of hardware and software.iThe description that the control device 20 can be individually configured also applies to the following embodiments.
[0056]
Next, a polynomial residue system operation method using the polynomial residue system operation device configured as described above will be described with reference to FIG.
First, the basis fi(X), gi(X) is the ROM 11iIs held in. The inputs a (x), b (x), and the modulus N (x) are transmitted by the control unit 20 to each arithmetic unit 10.iIs set to
[0057]
(ST11) Each arithmetic unit 10iPerforms a (x) × b (x) under two bases f and g, respectively. For example, <a (x)> under the basis ff× <b (x)>fIs performed as follows.
[0058]
That is, the RAM 12i<A (x)>f, <B (x)>fIth component a ofi(X), bi(X) and the ROM 11iThe base element f ini(X) and the product-sum circuit 13iIs ai(X) × bi(X) \ mod \ fi(X) is calculated and the calculation result si(X) in RAM 12iTo be stored.
[0059]
(ST12) Each arithmetic unit 10i<S (x)> is an operation of only the base g and is obtained in step 1.gAnd the RAM 12i<N (x)-1>gAnd multiply by Note that <N (x)-1>gIs RAM12iIs stored in
[0060]
(ST13) Each arithmetic unit 10iIs <t (x)>gIs converted to a representation from base g to base f. Base extension is performed based on equation (3) (β (x) = t (x), and the roles of f and g are switched).
[0061]
First, each operation unit 10jIs the RAM12j<T (x)> withingJ-th component t ofj(X) and the ROM 11jG inj(X)-1Mod gj(X), base element gj(X) The product-sum circuit 13jBy tj(X) × Gj(X)-1Mod gj(X) is calculated, and the calculation result hj(X) for all j1, RAM122, ..., RAM12nStore in everything. Here, there is a connection (not shown) between the operation units.iTo be stored.
[0062]
Next, this calculation result h1(X) and ROM 11iG in1(X) \ mod \ fi(X), base element fiUsing (x), the product-sum circuit 13iBy h1(X) × G1(X) \ mod \ fi(X) is calculated, and the calculation result k1i(X) in RAM 12iTo be stored.
[0063]
Next, the RAM 12iH in2(X) and ROM 11iG in2(X) \ mod \ fi(X), base element fiUsing (x), the product-sum circuit 13iBy h2(X) × G2(X) \ mod \ fi(X) is calculated, and the calculation result and the RAM 12iK in1iK obtained by adding (x)2i(X) in RAM 12iTo be stored.
[0064]
Similarly, G3(X) \ mod \ fi(X), ..., Gn(X) \ mod \ fiUsing (x) in order3i(X), ..., kni(X), and t (x) xmod fi(X) = kni(X), <t (x)>fYou can get.
[0065]
(ST14) Each arithmetic unit 10iIs <t (x)> obtained in step ST13.fAnd the RAM 12i<N (x)>f積 and the product-sum circuit 13iAnd the multiplication result <u (x)>fTo RAM12iTo be stored. Here, <N (x)>fMeans RAM12iIs stored in
[0066]
(ST15) Each arithmetic unit 10iIs <s (x)> obtained in step ST11.f<U (x)> obtained in step ST14fAnd the product-sum circuit 13iAnd the addition result <v (x)>fTo RAM12iTo be stored.
[0067]
(ST16) Each arithmetic unit 10iIs <v (x)> obtained in step ST15.fAnd ROM11i<G (x)-1>fAnd the product-sum circuit 13iAnd multiplication result <w (x)>fTo RAM12iTo be stored. Here, <G (x)-1>fIs calculated in advance in ROM11iIs stored in
<W (x)> obtained in step ST16f, A (x) b (x) G (x)-1All information of {mod} N (x) is included.
[0068]
(ST17) {When this algorithm is used repeatedly, each arithmetic unit 10iIs <w (x)> in step ST16 in order to obtain the next input.fIs converted from a basis f to a basis g.
[0069]
As described above, according to the present embodiment, unlike the related art, a polynomial residue system expression is used without using a multiple table requiring a huge memory size and without performing calculations in a normal polynomial expression. In this way, each arithmetic unit is caused to execute an arithmetic operation in parallel. In addition, since a parameter that limits the modulus polynomial, such as a multiple table of the modulus polynomial, is not used, calculation can be performed on an arbitrary modulus polynomial. Furthermore, in order to avoid division, Montgomery multiplication, which has not been conventionally used in polynomial residue system representation, is used as a parallel operation.
Therefore, regarding the operation of the polynomial remainder system, it is possible to reduce the required memory size and improve the processing efficiency, and it is possible to handle any arbitrary polynomial.
[0070]
Supplementally, in the prior art, a large multiple table is required, or the efficiency is reduced by performing a double process using the PRS expression and the ordinary polynomial expression, but in the present embodiment, the multiple table is unnecessary. Since the calculation is closed in the PRS expression, it can be processed efficiently. In the prior art, the number of modal polynomials that can be handled by preparing a multiple table is limited. However, in the present embodiment, any modulo polynomial can be handled as long as it is relatively prime to the base element.
[0071]
In addition, in the present embodiment, Montgomery multiplication in the PRS expression can be performed, so that processing can be performed more efficiently.
[0072]
(Second embodiment)
FIG. 3 is a schematic diagram showing the configuration of a polynomial remainder system arithmetic unit according to a second embodiment of the present invention. The same parts as those in FIG. 1 are denoted by the same reference numerals, and detailed description thereof will be omitted. The parts are mainly described.
[0073]
The present embodiment is an application example in which Montgomery multiplication of the PRS expression in the first embodiment is used for elliptic curve cryptography, and is a control that performs control based on an algorithm of elliptic curve cryptography instead of the control device 20 in FIG. Device 30 and each arithmetic unit 10i, A common input / output unit (I / O in the figure) 40 is provided.
[0074]
Here, the control device 30 determines that GF (2m) Is for performing scalar multiplication of points on the elliptic curve necessary for the above-mentioned processing of the elliptic curve encryption, and based on the scalar multiplication algorithm shown in FIG. 4 and FIG.iIt has a function to execute a predetermined operation by controlling the input and output data.
[0075]
The input / output unit 40 is connected to the outside of the polynomial remainder system arithmetic unit and to each arithmetic unit 10iThis is an interface for inputting and outputting data to and from.
[0076]
Next, a polynomial residue system operation method in the polynomial residue system operation device configured as described above will be described with reference to FIGS. Here, FIG. 4 shows an algorithm for performing scalar multiplication of a point on an elliptic curve in the PRS, and FIG. Is shown.
[0077]
First, a description will be given with reference to FIG.
(ST21) {The external CPU, not shown, converts the scalar k intoiTo enter. In addition, the input / output unit 40 outputs a point (Px(X), Py(X)) and the modulus N (x)iTo enter.
[0078]
(ST22) GN (x) 2 = G (x) 2 mod N (x) is calculated by a remainder multiplier in an ordinary polynomial expression (not shown).
[0079]
(ST23) {Each arithmetic unit 10}iIs an ordinary polynomial expression GN (x) 2, N (x), Px(X), Py(X) is converted to a PRS expression. This conversion is performed by the product-sum circuit 13iIf the bit size of L is L, for example, to express N (x) in PRS expression,
(Equation 4)
Figure 2004102071
[0080]
(ST24) {Each arithmetic unit 10}iIs <N (x) required for Montgomery multiplication-1>gIs calculated. <N (x)-1>gIs gi(X) Carmichael number λiIs calculated in advance, and Ni(X)λ iMod giDetermined by (x).
[0081]
(ST25) {Each arithmetic unit 10}iIs displayed in affine coordinates (<Px(X)>f g, <Py(X)>f g) In projective coordinates and the Montgomery operation area (<Pmx(X)>f g, <Pmy(X)>f g, <GN (x)>f g).
This transformation is <G for x, y coordinates.N (x) 2>f gIt can be calculated by Montgomery multiplication with. For the z coordinate, 座標 <GN (x) 2>f gAnd <1>f gIt can be calculated by Montgomery multiplication of.
[0082]
(ST26) {Each arithmetic unit 10}iIs a point on the elliptic curve (<Pmx(X)>f g, <Pmy(X)>f g, <GN (x)>f g) By k times (<Qpmx(X)>f g, <Qpmy (x)>f g, <Qpmz(X)>f gGet). Step ST26 will be described later in detail with reference to FIG.
[0083]
(ST27) {Each arithmetic unit 10}iIs (<Qpmx(X)>f g, <Qpmy(X)>f g, <Qpmz(X)>f g) From the Montgomery operation area to the normal area (<QPx(X)>f g, <QPy(X)>f g, <QPz(X)>f g). This conversion is based on each component and <1>f gIt can be calculated by Montgomery multiplication with.
[0084]
(ST28) {Each arithmetic unit 10}iIs <QPx(X)>f g, <QPy(X)>f g, <QPz(X)>f gTo the ordinary polynomial expression QPx(X), QPy(X), QPz(X).
For example, <QPx(X)>fIs performed as follows.
ξi(X) = QPxi(X) Gi(X)-1Mod gi(X)
age,
(Equation 5)
Figure 2004102071
[0085]
This gives QPxAn ordinary polynomial expression of (x) is obtained. QPxSince (x) can be expressed only by the base f, <QPx(X)>gNo operation is required for
[0086]
(ST29) {Each arithmetic unit 10}iIs a point on the elliptic curve (QPx(X), QPy(X), QPz(X)) is displayed in affine coordinates (Qx(X), Qy(X)).
[0087]
(ST30) Each arithmetic unit 10iIs (Qx(X), QP(X)) is output.
[0088]
Next, the scalar multiplication in step ST26 will be described in detail with reference to FIG.
[0089]
(ST26-1) {Each arithmetic unit 10}iIs input as a scalar k and a point on the elliptic curve (PPmx(X), PPmy(X), PPmz(X)).
[0090]
(ST26-2) {Each arithmetic unit 10}iIs (QPmx(X), QPmy(X), QPmz(X)) to (PPmx(X), PPmy(X), PPmz(X)). Hereinafter, the ith bit when the scalar k is expressed in bits is represented by kcWill be represented by MSB (most significant) bit k of scalar km-1To k1Perform the following loop in order.
[0091]
(ST26-3) {Each arithmetic unit 10}iIs (QPmx(X), QPmy(X), QPmz(X)) is doubled.
[0092]
(QPmx(X), QPmy(X), QPmz(X)) ← DBL ((QPmx(X), QPmy(X), QPmz(X)), (QPmx(X), QPmy(X), QPmz(X))). Here, DBL () means doubling of a point on the elliptic curve.
[0093]
(ST26-4) The control device 30 sets kc= 1 or not, and kcIf = 1, the process proceeds to step S26-5. kcIf = 0, the process returns to the beginning of the loop (ST26-3) without performing this addition. Note that the value of c is decremented by one each time the loop returns to the beginning.
[0094]
(ST26-5) {Each arithmetic unit 10}iIs (QPmx(X), QPmy(X), QPmz(X)) to (PPmx(X), PPmy(X), PPmz(X)).
[0095]
(QPmx(X), QPmy(X), QPmz(X)) ← ADD ((QPmx(X), QPmy(X), QPmz(X)), (PPmx(X), PPmy(X), PPmz(X))). Here, ADD () means addition of points on the elliptic curve.
[0096]
(ST26-6) The control device 30 determines whether or not c = 1, and if c ≠ 1, reduces the value of c by 1 and returns to the beginning of the loop (ST26-3). When c = 1, the loop ends and the process proceeds to step ST26-7.
[0097]
(ST26-7) {Each arithmetic unit 10}iIs (QPmx(X), QPmy(X), QPmz(X)), and the process proceeds to step ST27.
[0098]
Thus, step ST26 is completed. Here, FIG. 5 is described in an ordinary polynomial expression, but scalar multiplication in the PRS expression can be easily realized by replacing each element with the PRS expression. At this time, the remainder multiplication necessary for ADD () and DBL () is performed using the Montgomery multiplication algorithm based on the PRS expression shown in the first embodiment.
[0099]
As described above, according to the present embodiment, in addition to the effects of the first embodiment, scalar multiplication of points on an elliptic curve can be efficiently performed.
[0100]
The method described in each of the above embodiments may be a computer-executable program such as a magnetic disk (floppy (registered trademark) disk, hard disk, etc.), an optical disk (CD-ROM, DVD, etc.), a magneto-optical disk ( MO) and a storage medium such as a semiconductor memory.
[0101]
The storage medium may be in any form as long as it can store a program and can be read by a computer.
[0102]
Further, an OS (Operating System) running on the computer based on an instruction of a program installed in the computer from a storage medium, MW (Middleware) such as database management software, network software, etc. realize the present embodiment. May be partially executed.
[0103]
Further, the storage medium in the present invention is not limited to a medium independent of a computer, but also includes a storage medium in which a program transmitted through a LAN, the Internet, or the like is downloaded and stored or temporarily stored.
[0104]
Further, the number of storage media is not limited to one, and the case where the processing in the present embodiment is executed from a plurality of media is also included in the storage medium of the present invention, and any media configuration may be used.
[0105]
Note that the computer according to the present invention executes each process in the present embodiment based on a program stored in a storage medium, and includes a device such as a personal computer and a system in which a plurality of devices are connected to a network. Or any other configuration.
[0106]
Further, the computer in the present invention is not limited to a personal computer, but also includes an arithmetic processing unit, a microcomputer, and the like included in an information processing device, and is a general term for devices and devices that can realize the functions of the present invention by a program. .
[0107]
Note that the present invention is not limited to the above embodiments, and various modifications can be made in the implementation stage without departing from the scope of the invention. In addition, the embodiments may be implemented in appropriate combinations as much as possible, in which case the combined effects can be obtained. Furthermore, the above-described embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, when an invention is extracted by omitting some constituent elements from all constituent elements described in the embodiment, when implementing the extracted invention, the omitted part is appropriately supplemented by well-known conventional techniques. It is something to be done.
[0108]
In addition, the present invention can be variously modified and implemented without departing from the gist thereof.
[0109]
【The invention's effect】
As described above, according to the present invention, regarding the operation of the polynomial remainder system, any modal polynomial can be handled, the required memory size can be reduced, and the processing efficiency can be improved.
[Brief description of the drawings]
FIG. 1 is a schematic diagram illustrating a configuration of a polynomial remainder-based arithmetic device according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing an algorithm of Montgomery multiplication of a PRS expression in the embodiment.
FIG. 3 is a schematic diagram showing a configuration of a polynomial remainder system operation device according to a second embodiment of the present invention.
FIG. 4 is a flowchart showing a scalar multiplication algorithm of a point on an elliptic curve using a PRS expression in the embodiment.
FIG. 5 is a flowchart showing a scalar multiplication algorithm for explaining a part of FIG. 4 in detail;
[Explanation of symbols]
101-10n… Calculation unit
111~ 11n… ROM
121~ 12n… RAM
131~ 13n… Sum-and-sum circuit
20, 30 ... control device
40 ... input / output unit

Claims (6)

予め設定された多項式剰余演算系の基底{f(x),f(x),…,f(x)}及び{g(x),g(x),…,g(x)}の各基底要素f,g(i=1,2,…,n)に基づき、GF(2)上の多項式の剰余演算機能を有する複数の演算ユニットを備えた多項式剰余系演算装置であって、
前記GF(2)上のm次の既約多項式N(x)と、m未満の次数のGF(2)上の多項式a(x),b(x)とを各演算ユニットに入力するための入力手段と、
前記設定された各基底要素f,g及び前記入力された入力内容N(x),a(x),b(x)に基づいて、各基底要素f,gでの剰余演算を各演算ユニットに並列に実行させる剰余演算制御手段と、
前記各演算ユニットにG(x)=g(x)g(x)…g(x)で定義されたG(x)を用いてモンゴメリ乗算a(x)b(x)G(x)−1 mod N(x)を計算させるように、前記剰余演算制御手段を制御するモンゴメリ乗算制御手段と、
を備えたことを特徴とする多項式剰余系演算装置。
Basis of preset polynomial remainder calculation system {f 1 (x), f 2 (x), ..., f n (x)} and {g 1 (x), g 2 (x), ..., g n ( x) Based on each base element f i , g i (i = 1, 2,..., n) of}, a polynomial residue system operation including a plurality of operation units having a polynomial residue operation function on GF (2) A device,
An m-order irreducible polynomial N (x) on the GF (2) and polynomials a (x) and b (x) on the GF (2) of an order less than m are input to each arithmetic unit. Input means;
Each base element f i said set, g i and the inputted input content N (x), on the basis of a (x), b (x ), the base element f i, the remainder operation on g i A remainder operation control means for causing each operation unit to execute in parallel;
G (x) to the arithmetic units = g 1 (x) g 2 (x) ... g n (x) using been G (x) is defined in the Montgomery multiplication a (x) b (x) G (x ) Montgomery multiplication control means for controlling the remainder operation control means so as to calculate -1 mod N (x);
A polynomial remainder system arithmetic unit comprising:
請求項1に記載の多項式剰余系演算装置において、
前記モンゴメリ乗算を用いた所定のアルゴリズムに従ってGF(2)上定義された楕円曲線上の点のスカラー倍演算を実行するように、前記各演算ユニット及び前記モンゴメリ乗算制御手段を制御する楕円曲線演算制御手段、
を備えたことを特徴とする多項式剰余系演算装置。
2. The polynomial remainder arithmetic unit according to claim 1,
Elliptic curve operation controlling each of the arithmetic units and the Montgomery multiplication control means so as to execute a scalar multiplication operation on a point on an elliptic curve defined on GF (2 m ) according to a predetermined algorithm using the Montgomery multiplication. Control means,
A polynomial remainder system arithmetic unit comprising:
予め設定された多項式剰余演算系の基底{f(x),f(x),…,f(x)}及び{g(x),g(x),…,g(x)}の各基底要素f,g(i=1,2,…,n)に基づき、GF(2)上の多項式の剰余演算機能を有する複数の演算ユニットを用いた多項式剰余系演算方法であって、
前記GF(2)上のm次の既約多項式N(x)と、m未満の次数のGF(2)上の多項式a(x),b(x)とを各演算ユニットの記憶装置に入力するための入力工程と、
前記設定された各基底要素f,g及び前記入力された入力内容N(x),a(x),b(x)に基づいて、各基底要素f,gでの剰余演算を各演算ユニットに並列に実行させ、実行結果を各演算ユニットの記憶装置に格納させる剰余演算制御工程と、
前記各演算ユニットにG(x)=g(x)g(x)…g(x)で定義されたG(x)を用いてモンゴメリ乗算a(x)b(x)G(x)−1 mod N(x)を計算させるように、前記剰余演算制御工程を制御するモンゴメリ乗算制御工程と、
を備えたことを特徴とする多項式剰余系演算方法。
Basis of preset polynomial remainder calculation system {f 1 (x), f 2 (x), ..., f n (x)} and {g 1 (x), g 2 (x), ..., g n ( x) Based on each base element f i , g i (i = 1, 2,..., n) of}, a polynomial residue system operation using a plurality of operation units having a polynomial residue operation function on GF (2) The method,
The m-order irreducible polynomial N (x) on the GF (2) and the polynomials a (x) and b (x) on the GF (2) of an order less than m are input to the storage device of each arithmetic unit. Input process for performing
Each base element f i said set, g i and the inputted input content N (x), on the basis of a (x), b (x ), the base element f i, the remainder operation on g i A remainder operation control step of causing each operation unit to execute in parallel and storing an execution result in a storage device of each operation unit;
G (x) to the arithmetic units = g 1 (x) g 2 (x) ... g n (x) using been G (x) is defined in the Montgomery multiplication a (x) b (x) G (x A) Montgomery multiplication control step of controlling the remainder operation control step so as to calculate −1 mod N (x);
And a polynomial remainder system operation method.
請求項3に記載の多項式剰余系演算方法において、
前記モンゴメリ乗算を用いた所定のアルゴリズムに従ってGF(2)上定義された楕円曲線上の点のスカラー倍演算を各演算ユニットに実行させるように、各演算ユニット及び前記モンゴメリ乗算制御工程を制御する楕円曲線演算制御工程、
を備えたことを特徴とする多項式剰余系演算方法。
4. The method according to claim 3, wherein:
According to a predetermined algorithm using the Montgomery multiplication, each arithmetic unit and the Montgomery multiplication control step are controlled so that each arithmetic unit executes a scalar multiplication operation on a point on an elliptic curve defined on GF (2 m ). Elliptic curve calculation control process,
And a polynomial remainder system operation method.
予め設定された多項式剰余演算系の基底{f(x),f(x),…,f(x)}及び{g(x),g(x),…,g(x)}の各基底要素f,g(i=1,2,…,n)に基づき、GF(2)上の多項式の剰余演算機能を有する複数の演算ユニット及び各演算ユニットを制御するための制御装置を備えた多項式剰余系演算装置に関し、前記制御装置に用いられるプログラムであって、
前記制御装置のコンピュータを、
前記GF(2)上のm次の既約多項式N(x)と、m未満の次数のGF(2)上の多項式a(x),b(x)とを各演算ユニットの記憶装置に入力するための入力手段、
前記設定された各基底要素f,g及び前記入力された入力内容N(x),a(x),b(x)に基づいて、各基底要素f,gでの剰余演算を各演算ユニットに並列に実行させ、実行結果を各演算ユニットの記憶装置に格納させる剰余演算制御手段、
前記各演算ユニットにG(x)=g(x)g(x)…g(x)で定義されたG(x)を用いてモンゴメリ乗算a(x)b(x)G(x)−1 mod N(x)を計算させるように、前記剰余演算制御手段を制御するモンゴメリ乗算制御手段、
として機能させるためのプログラム。
Basis of preset polynomial remainder calculation system {f 1 (x), f 2 (x), ..., f n (x)} and {g 1 (x), g 2 (x), ..., g n ( x) Based on each base element f i , g i (i = 1, 2,..., n) of}, a plurality of operation units having a polynomial remainder operation function on GF (2) and each operation unit are controlled. A polynomial remainder-based arithmetic device having a control device for the program used in the control device,
Computer of the control device,
The m-order irreducible polynomial N (x) on the GF (2) and the polynomials a (x) and b (x) on the GF (2) of an order less than m are input to the storage device of each arithmetic unit. Input means for
Each base element f i said set, g i and the inputted input content N (x), on the basis of a (x), b (x ), the base element f i, the remainder operation on g i Remainder operation control means for causing each operation unit to execute in parallel and storing an execution result in a storage device of each operation unit;
G (x) to the arithmetic units = g 1 (x) g 2 (x) ... g n (x) using been G (x) is defined in the Montgomery multiplication a (x) b (x) G (x ) Montgomery multiplication control means for controlling said remainder operation control means so as to calculate -1 mod N (x);
Program to function as
請求項5に記載のプログラムにおいて、
前記制御装置のコンピュータを、
前記モンゴメリ乗算を用いた所定のアルゴリズムに従ってGF(2)上定義された楕円曲線上の点のスカラー倍演算を各演算ユニットに実行させるように、各演算ユニット及び前記モンゴメリ乗算制御手段を制御する楕円曲線演算制御手段、
として機能させるためのプログラム。
The program according to claim 5,
Computer of the control device,
In accordance with a predetermined algorithm using the Montgomery multiplication, each arithmetic unit and the Montgomery multiplication control means are controlled so that each arithmetic unit executes a scalar multiplication of a point on an elliptic curve defined on GF (2 m ). Elliptic curve calculation control means,
Program to function as
JP2002265867A 2002-09-11 2002-09-11 Polynomial residue arithmetic unit, method and program Expired - Lifetime JP4202701B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002265867A JP4202701B2 (en) 2002-09-11 2002-09-11 Polynomial residue arithmetic unit, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002265867A JP4202701B2 (en) 2002-09-11 2002-09-11 Polynomial residue arithmetic unit, method and program

Publications (2)

Publication Number Publication Date
JP2004102071A true JP2004102071A (en) 2004-04-02
JP4202701B2 JP4202701B2 (en) 2008-12-24

Family

ID=32264879

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002265867A Expired - Lifetime JP4202701B2 (en) 2002-09-11 2002-09-11 Polynomial residue arithmetic unit, method and program

Country Status (1)

Country Link
JP (1) JP4202701B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007234086A (en) * 2006-02-27 2007-09-13 Toshiba Corp Semiconductor memory device
JP2009258437A (en) * 2008-04-17 2009-11-05 Toshiba Corp Power calculation device and program
JP5175983B2 (en) * 2009-09-24 2013-04-03 株式会社東芝 Arithmetic unit
JP2014138194A (en) * 2013-01-15 2014-07-28 Mitsubishi Electric Corp Information processing device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007234086A (en) * 2006-02-27 2007-09-13 Toshiba Corp Semiconductor memory device
JP2009258437A (en) * 2008-04-17 2009-11-05 Toshiba Corp Power calculation device and program
JP5175983B2 (en) * 2009-09-24 2013-04-03 株式会社東芝 Arithmetic unit
JP2014138194A (en) * 2013-01-15 2014-07-28 Mitsubishi Electric Corp Information processing device

Also Published As

Publication number Publication date
JP4202701B2 (en) 2008-12-24

Similar Documents

Publication Publication Date Title
US7904498B2 (en) Modular multiplication processing apparatus
Öztürk et al. Low-power elliptic curve cryptography using scaled modular arithmetic
TW550498B (en) Method and apparatus for modular multiplying and calculating unit for modular multiplying
Yanık et al. Incomplete reduction in modular arithmetic
US8862651B2 (en) Method and apparatus for modulus reduction
US20050041811A1 (en) Method and apparatus for modular inversion for information security and recording medium with a program for implementing the method
JP3532860B2 (en) Arithmetic device, method, and program using remainder representation
US8417760B2 (en) Device and method for calculating a multiplication addition operation and for calculating a result of a modular multiplication
US6917956B2 (en) Apparatus and method for efficient modular exponentiation
JP4351987B2 (en) Montgomery conversion device, arithmetic device, IC card, encryption device, decryption device, and program
JP2004227344A (en) Multiplier and code circuit
JP2011512556A (en) Apparatus and method for calculating a number of points on an elliptic curve
JP4202701B2 (en) Polynomial residue arithmetic unit, method and program
JP4621162B2 (en) Finite commutative group operation method, apparatus and program thereof
Arazi et al. On calculating multiplicative inverses modulo $2^{m} $
JP2007526513A (en) Method of element power or scalar multiplication
JP4080754B2 (en) Remainder calculation apparatus and method
JP3136709B2 (en) Exponentiation unit
JP4724200B2 (en) Power calculation apparatus and program
JP3390966B2 (en) Remainder arithmetic device modulo square number and program recording medium therefor
JP2003084667A (en) Method and device for performing a plurality of power residue calculation to same base, and program
JP2003029630A (en) Exponential remainder arithmetic unit
JP2003216034A (en) Power residue computing element
Inverses Brief Contributions_
JP4679590B2 (en) Remainder calculation device and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050901

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20081007

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081009

R151 Written notification of patent or utility model registration

Ref document number: 4202701

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20111017

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111017

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121017

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121017

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131017

Year of fee payment: 5

EXPY Cancellation because of completion of term