[go: up one dir, main page]

JP2005208327A - Surplus device, surplus method, program, and recording medium - Google Patents

Surplus device, surplus method, program, and recording medium Download PDF

Info

Publication number
JP2005208327A
JP2005208327A JP2004014656A JP2004014656A JP2005208327A JP 2005208327 A JP2005208327 A JP 2005208327A JP 2004014656 A JP2004014656 A JP 2004014656A JP 2004014656 A JP2004014656 A JP 2004014656A JP 2005208327 A JP2005208327 A JP 2005208327A
Authority
JP
Japan
Prior art keywords
coefficient
multiplication
calculation
bits
calculating
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
JP2004014656A
Other languages
Japanese (ja)
Other versions
JP4399280B2 (en
Inventor
Kazumaro Aoki
和麻呂 青木
Katsuyuki Okeya
勝幸 桶屋
Yasuyuki Sakai
康行 酒井
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.)
Hitachi Ltd
Mitsubishi Electric Corp
NTT Inc
Original Assignee
Hitachi Ltd
Mitsubishi Electric Corp
Nippon Telegraph and Telephone 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 Hitachi Ltd, Mitsubishi Electric Corp, Nippon Telegraph and Telephone Corp filed Critical Hitachi Ltd
Priority to JP2004014656A priority Critical patent/JP4399280B2/en
Publication of JP2005208327A publication Critical patent/JP2005208327A/en
Application granted granted Critical
Publication of JP4399280B2 publication Critical patent/JP4399280B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

【課題】 従来、高速に剰余演算を行うことができなかった使用環境において高速な剰余演算を実現する。
【解決手段】 剰余対象cをc=Σi=0 cixiと表現した場合における、各係数cを入力し、縮約手段16において、係数cと乗算係数pとを用い、Σi=0 u-1 ci’xii=0 ci’ximod f(x) を満たす各係数c’を算出する。ただし、L:modnの値のビット数、w:ワードのビット数、u:L/w以上の最小の整数、Q:2以上の整数、E=uw‐L、法n=QLj=0 L-1 djQj、乗算係数phk=0 w-1 dwh+k-EQk(h=0,1,...,u-1)、f(x)=xu‐Σi=0 u-1pixiである。
そして、全ての係数c’の算出後、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行う。
【選択図】 図1
PROBLEM TO BE SOLVED: To realize a high-speed residue calculation in a use environment where a high-speed residue calculation cannot be performed conventionally.
The A residue subject c in the case where expressed as c = Σ i = 0 c i x i, enter each coefficient c i, in contraction means 16, using the coefficients c i and multiplier coefficient p h, Each coefficient c i ′ satisfying Σ i = 0 u−1 c i 'x i = Σ i = 0 c i ' x i mod f (x) is calculated. Where L: number of bits of modn value, w: number of bits in word, u: minimum integer greater than or equal to L / w, Q: integer greater than or equal to 2, E = uw-L, modulus n = Q Lj = 0 L-1 d j Q j , multiplication factor p h = Σ k = 0 w-1 d wh + kE Q k (h = 0,1, ..., u-1), f (x) = x u −Σ i = 0 u−1 p i x i .
Then, after calculation of all the coefficients c i ′, carry-up correction between the terms x i of the coefficient c i ′ when x = Q w is performed collectively.
[Selection] Figure 1

Description

この発明は、剰余演算を行う剰余装置、剰余方法、その機能を実現するためのプログラム及び記録媒体に関し、特に、剰余演算を高速に行うことができる剰余装置、剰余方法、プログラム及び記録媒体に関する。   The present invention relates to a remainder device, a remainder method, a program for realizing the function, and a recording medium, and more particularly to a remainder apparatus, a remainder method, a program, and a recording medium that can perform a remainder operation at high speed.

多倍長の剰余乗算は、離散対数問題の困難性に根拠をおく公開鍵暗号や電子署名などの実装中から多数実行され、剰余乗算の速度が公開鍵暗号や電子署名などの速度を決めるといっても過言ではない。そのため従来より数多くの剰余乗算の高速化手法が考案されてきた。
多くの剰余乗算計算法では、
m←ab mod n (0≦a,b≦n)
を計算する際に、
Step1:c←abを計算
Step2:c mod nを計算
という手順を踏むことが多い。
Multiple-multiple modular multiplication is performed from the implementation of public key cryptography and digital signatures based on the difficulty of the discrete logarithm problem, and the speed of modular multiplication determines the speed of public key cryptography and digital signatures. It is no exaggeration to say. For this reason, many techniques for increasing the speed of remainder multiplication have been devised.
In many remainder multiplication methods,
m ← ab mod n (0 ≦ a, b ≦ n)
When calculating
Step 1: calculate c ← ab Step 2: often calculate c mod n.

<Step1の高速化>
このStep1で必要となる多倍長乗算の高速実装法として非特許文献1の方法が知られている。以下に、Wビット同士の積から2Wビットを生成する乗算器と、2Wビット加算器を利用し、非特許文献1の方法によってa,bの積を求める手順を説明する。なお、aやbはLビット以内とする。なお、Lは、セキュリティパラメータ等の規格化されたデータのビット数を示す。
まず、a,bを以下のようにQ進数(Q≧2)表現する。

Figure 2005208327
ここで、uは、
Figure 2005208327
<Speedup of Step 1>
The method of Non-Patent Document 1 is known as a high-speed mounting method of multiple length multiplication required in Step 1. The procedure for obtaining the product of a and b by the method of Non-Patent Document 1 using a multiplier that generates 2 W bits from a product of W bits and a 2 W bit adder will be described below. Note that a and b are within L bits. Note that L indicates the number of bits of standardized data such as security parameters.
First, a, Q w ary as follows b (Q ≧ 2) represents.
Figure 2005208327
Where u is
Figure 2005208327

また、式(3)を条件とするのは、教科書法で乗算を計算した場合、(Q‐1)のデータをu回加算する場合もあるが、そのような場合であっても、演算結果が2Wビット乗算器の処理能力Q2Wを超えない(溢れが生じない)ようにするためである。また、式(1)のような表現を冗長表現と呼ぶ。
このとき、aとbの積である

Figure 2005208327
を以下のように計算する。
Step1−1 初期化:「c←0」とする。
Step1−2 語長乗算:全ての0≦s,t≦uに対し、「cs+t←cs+t+a」を計算する。
Step1−3 繰り上がり補正:i=0,1,...,2u-2に対し、
Figure 2005208327
In addition, the condition of the expression (3) is that when the multiplication is calculated by the textbook method, the data of (Q w −1) 2 may be added u times, but even in such a case, This is to prevent the calculation result from exceeding the processing capability Q 2W of the 2W bit multiplier (no overflow occurs). In addition, an expression like Expression (1) is called a redundant expression.
At this time, it is the product of a and b
Figure 2005208327
Is calculated as follows.
Step 1-1 Initialization: “c i ← 0”.
Step 1-2 Word length multiplication: “c s + t ← c s + t + a s b t ” is calculated for all 0 ≦ s, t ≦ u.
Step 1-3 Carrying correction: For i = 0,1, ..., 2u-2,
Figure 2005208327

ここで、wは式(3)の条件を満たすように選ばれているため、Step1−2の加算で溢れが生じることはない。また、Step1−2の加算では繰り上がり補正を行わず、最後のStep1−3において繰り上がり補正をまとめて行うため、処理を高速化できる。
なお、LがWに比べあまり大きくなく、実行すべき多倍長乗算の回数が少ない場合は、冗長表現と通常の2進数を使った表現の変換コスト(Step1−3)が馬鹿にならない。しかし、暗号用途のように多数の乗算を必要とする場合は、通常表現との変換コストを考えても冗長表現を使った乗算の方が有利であることが多い。
Here, since w is selected so as to satisfy the condition of Expression (3), overflow does not occur in the addition of Step 1-2. In addition, the addition of Step 1-2 does not perform the carry-up correction, and the carry-up correction is collectively performed in the last Step 1-3, so that the processing can be speeded up.
Incidentally, L is not so large compared with W, is less the number of to be multiple-precision multiplication performed, redundant representation conversion cost of the usual representation using 2 W Decimal (Step 1-3) is not a fool. However, when a large number of multiplications are required as in cryptographic applications, multiplication using redundant expressions is often more advantageous even considering the conversion cost with normal expressions.

<Step2の高速化>
また、計算に適した法nを選び、Step2の剰余を高速に計算する方法がある。これは、例えば、公開鍵暗号などを構成する際に使用される方法である。このような方法の1つとして特許文献1の方法が知られている。以下に、この特許文献1の方法について説明する。
特許文献1の方法では、

Figure 2005208327
となるnを利用する。ただし、kはwk=Lを満たす自然数である。すなわち、Lはwの倍数である。
以下では、例として、
Q=2,w=64,k=3,L=192,
n=(264‐264‐1 …(5)
を選んだ場合のStep2の処理を説明する。 <Speedup of Step2>
Further, there is a method of selecting a method n suitable for calculation and calculating the remainder of Step 2 at high speed. This is a method used when configuring public key cryptography, for example. As one of such methods, the method of Patent Document 1 is known. Below, the method of this patent document 1 is demonstrated.
In the method of Patent Document 1,
Figure 2005208327
N is used. However, k is a natural number satisfying wk = L. That is, L is a multiple of w.
In the following, as an example
Q = 2, w = 64, k = 3, L = 192,
n = (2 64 ) 3 −2 64 −1 (5)
The process of Step 2 when selecting is described.

また、剰余対象cは、

Figure 2005208327
と表されているとする。
このとき式(5)より、
(264≡264+1(mod n) …(7)
であり、この合同式(7)を式(6)に複数回利用すると、
c≡(c+c+c)+(c+c+c+c)264+(c+c+c)(264(mod n) …(8)
となる。 In addition, the remainder object c is
Figure 2005208327
Is expressed.
At this time, from equation (5),
(2 64) 3 ≡2 64 +1 (mod n) ... (7)
When this congruence formula (7) is used multiple times in formula (6),
c≡ (c 0 + c 3 + c 5 ) + (c 1 + c 3 + c 4 + c 5 ) 2 64 + (c 2 + c 4 + c 5 ) (2 64 ) 2 (mod n) (8)
It becomes.

ここで、式(6)のc<264より、式(8)の右辺の
(c+c+c)+(c+c+c+c)264+(c+c+c)(264 …(9)
は、式(5)で示されるnの4倍以下となる。そのため、式(9)の各係数(c+c+c)、(c+c+c+c)、(c+c+c)を算出し、式(9)から式(5)で示されるnを最大3回減じることにより剰余結果mを求めることができる。これは、式(6)からcのmod nを直接計算する場合に比べ、計算量を大幅に低減できることを意味している。
Here, from the c i <2 64 of formula (6), the right side of the equation (8) (c 0 + c 3 + c 5) + (c 1 + c 3 + c 4 + c 5) 2 64 + (c 2 + c 4 + c 5 ) (2 64 ) 2 (9)
Is less than or equal to 4 times n shown in Equation (5). Therefore, each coefficient (c 0 + c 3 + c 5 ), (c 1 + c 3 + c 4 + c 5 ), (c 2 + c 4 + c 5 ) of equation (9) is calculated, and equation ( 5 ) is calculated from equation (9). The remainder result m can be obtained by subtracting n indicated by 3 at most. This means that the amount of calculation can be greatly reduced compared to the case where mod n of c is directly calculated from Equation (6).

なお、式(9)の各係数(c+c+c)、(c+c+c+c)、(c+c+c)の加算処理は、上位項への繰り上がり補正を行いつつ実行される。すなわち、例えば、(c+c+c)の加算過程のc+cで加算結果が264以上となった場合、その時点でその項の繰り上がり補正値(c+c)mod 264と、繰り上がり分である(c+c)/264以下の最大の整数を算出する処理を行い、さらに必要な場合には、さらに上位項への繰り上がり処理を順次行う。
Intel Corporation, “ストリーミングSIMD拡張命令2(SSE2)を使用した大数の乗算の実行,”バージョン2.0,AP−941,資料番号248606J−001,2000 松井充,“演算装置、演算方法並びにその演算方法を記録した記録媒体,”特許第3183670号,1999年1月21日出願,2001年4月27日登録
In addition, the addition processing of each coefficient (c 0 + c 3 + c 5 ), (c 1 + c 3 + c 4 + c 5 ), and (c 2 + c 4 + c 5 ) in Expression (9) performs a carry-up correction to a higher term. Performed while doing. That is, for example, when the addition result is 2 64 or more at c 0 + c 3 in the addition process of (c 0 + c 3 + c 5 ), the carry correction value (c 0 + c 3 ) mod 2 of the term at that time 64 and (c 0 + c 3 ) / 2, which is the carry-up amount, is calculated to calculate a maximum integer equal to or less than 64. If necessary, carry-up processing to higher terms is sequentially performed.
Intel Corporation, “Execution of Large Number Multiplication Using Streaming SIMD Extension Instruction 2 (SSE2),” Version 2.0, AP-941, Document No. 248606J-001, 2000 Mitsuru Matsui, “Calculation device, calculation method and recording medium recording the calculation method,” Japanese Patent No. 3183670, filed on Jan. 21, 1999, registered on Apr. 27, 2001

しかし、従来の剰余演算方法の場合、使用環境によっては高速に剰余演算を行うことができないことがある。
つまり、式(4)の説明で示した通り、特許文献1の剰余方法は、Lがwの倍数であることを前提としており、Lがwの倍数でない場合には使用できない。
また、特許文献1の剰余方法では、計算量が大きい繰り上がり補正を逐一実行しつつ各係数の加算処理を実行するため、繰り上がり補正が多い場合には、たとえ特許文献1の剰余方法が使用できる場合であっても、高速に剰余演算を行うことができない。
However, in the case of the conventional residue calculation method, the residue calculation may not be performed at high speed depending on the use environment.
That is, as shown in the description of Expression (4), the remainder method of Patent Document 1 is based on the assumption that L is a multiple of w, and cannot be used when L is not a multiple of w.
Further, in the remainder method of Patent Document 1, the addition process of each coefficient is performed while sequentially performing carry correction with a large calculation amount. Therefore, when there are many carry corrections, the remainder method of Patent Document 1 is used. Even if it is possible, the remainder calculation cannot be performed at high speed.

本発明はこのような点に鑑みてなされたものであり、従来高速に剰余演算を行うことができなかった使用環境において高速な剰余演算を実現する剰余装置を提供することを目的とする。
また、本発明の他の目的は、従来高速に剰余演算を行うことができなかった使用環境において高速な剰余演算を実現する剰余方法を提供することである。
The present invention has been made in view of such a point, and an object of the present invention is to provide a remainder device that realizes a high-speed residue calculation in a use environment where a residue calculation cannot be performed at high speed.
Another object of the present invention is to provide a residue method that realizes a high-speed residue calculation in a use environment where a residue operation cannot be performed at a high speed.

この発明では上記課題を解決するために、まず、mod nの値をLビットとし、ソフトウェアからみた処理単位であるワードのビット数をwとし、uをL/w以上の最小の整数とし、Qを2以上の整数とし、E=uw‐Lとし、

Figure 2005208327
を乗算係数格納手段に格納しておく。
また、剰余対象入力手段に、
Figure 2005208327
各係数cを入力する。
そして、縮約手段において、係数cと乗算係数pとを用い、
Figure 2005208327
を満たす各係数c’を、各項x間の繰り上がり補正を行うことなく算出する。 In the present invention, in order to solve the above-mentioned problem, first, the value of mod n is L bits, the number of bits of a word as a processing unit viewed from software is w, u is the smallest integer equal to or greater than L / w, and Q Is an integer greater than or equal to 2, E = uw−L,
Figure 2005208327
Is stored in the multiplication coefficient storage means.
In addition, the remainder target input means
Figure 2005208327
Input each coefficient c i .
Then, the contraction means, using the coefficients c i and multiplier coefficient p h,
Figure 2005208327
Each coefficient c i ′ satisfying the above is calculated without performing carry correction between the terms x i .

そして、全ての係数c’の算出後、正規化手段において、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行う。
ここで、Eは、ワード単位(wビット)で処理可能なLビット以上の最小ビット数とLビットとの誤差を意味しており、乗算係数pはこの誤差Eを考慮して設定されるものである。従って、乗算係数p及びこれを用いて定義されたf(x)は、Lがwの倍数でない場合をも考慮したものである。そして、この乗算係数pと各係数cとを用い、縮約手段において算出された各係数c’を用いることにより、前述の特許文献1の剰余方法と同様、少ない計算量でc mod nを求めることができる。つまり、Lがwの倍数でない場合であっても高速にc mod nを求めることができる。また同様な理由により、Lがwの倍数でなくても、本発明と非特許文献1の乗算方法とを併用でき、高速な剰余乗算が実現できる。
Then, the 'After calculating the in normalization means, the coefficient c i in the case where the x = Q w' all the coefficients c i are collectively a carry correction between each term x i of.
Here, E means an error between the minimum number of L bits or more that can be processed in word units (w bits) and the L bit, and the multiplication coefficient ph is set in consideration of this error E. Is. Therefore, the multiplication coefficient ph and f (x) defined by using this take into consideration the case where L is not a multiple of w. Then, by using this multiplication coefficient ph and each coefficient c i and using each coefficient c i ′ calculated by the contraction means, c mod with a small amount of calculation, as in the remainder method of Patent Document 1 described above. n can be obtained. That is, even if L is not a multiple of w, c mod n can be obtained at high speed. For the same reason, even if L is not a multiple of w, the present invention and the multiplication method of Non-Patent Document 1 can be used in combination, and high-speed modular multiplication can be realized.

また、縮約手段は、各項間における係数の繰り上がり補正を行うことなくc’の各係数c’を算出する。そのため、繰り上がり補正を行いつつ各係数を算出する場合に比べ、処理が高速になる。
さらに、繰り上がり補正を最後にまとめて行うことにより、繰り上がり補正を行いつつ各係数を算出する場合に比べ、繰り上がり補正の計算量を低減することが可能となり、処理が高速になる。
Further, the contraction means calculates each coefficient c i ′ of c ′ without performing the coefficient carry-over correction between the terms. Therefore, the processing becomes faster than when calculating each coefficient while performing carry correction.
Furthermore, by carrying out carry-up correction collectively at the end, it is possible to reduce the calculation amount of carry-up correction compared to the case where each coefficient is calculated while performing carry-up correction, and the processing becomes faster.

本発明では、係数cと乗算係数pとを用い、

Figure 2005208327
を満たす各係数c’を、各項x間の繰り上がり補正を行うことなく算出する。
この乗算係数p及びf(x)は、Lがwの倍数でない場合をも考慮したものである。そして、その演算結果を用いることにより、少ない計算量でc mod nを算出することができる。また、繰り上がり補正を逐一行わないため、従来繰り上がり補正が多く計算量が多くなっていた場合であっても、高速に剰余演算処理を実行することができる。
以上より、本発明では、従来高速に剰余演算を行うことができなかった使用環境において高速な剰余演算を実現することが可能となる。 In the present invention, using the coefficients c i and multiplier coefficient p h,
Figure 2005208327
Each coefficient c i ′ satisfying the above is calculated without performing carry correction between the terms x i .
The multiplication coefficients ph and f (x) take into consideration the case where L is not a multiple of w. Then, by using the calculation result, c mod n can be calculated with a small amount of calculation. In addition, since the carry correction is not performed step by step, the remainder calculation process can be executed at high speed even when the carry correction is large and the calculation amount is large.
As described above, according to the present invention, it is possible to realize a high-speed residue calculation in a use environment where a conventional high-speed residue calculation cannot be performed.

以下、この発明の実施の形態を図面を参照して説明する。
〔第1の実施の形態〕
まず、本発明における第1の実施の形態について説明する。
<概要>
図1は、本形態の剰余装置10の全体構成を例示したブロック図であり、図4は、この剰余装置10の処理の全体を説明するためのフローチャートである。以下、これらの図を用いて本形態の概要を説明する。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
First, a first embodiment of the present invention will be described.
<Overview>
FIG. 1 is a block diagram illustrating the overall configuration of the surplus apparatus 10 according to the present embodiment, and FIG. 4 is a flowchart for explaining the entire processing of the surplus apparatus 10. Hereinafter, the outline of this embodiment will be described with reference to these drawings.

図1に例示するように、本形態の剰余装置10は、乗算対象入力手段11、乗算手段12、加算手段13(「第4の加算手段」に相当)、剰余対象入力手段14、乗算係数格納手段15、縮約手段16、正規化手段17及び制御手段18を有しており、制御手段18の制御のもと、入力されたa,bについての剰余乗算(c←ab、m←cmod n)を行う。
なお、本形態の剰余装置10は、語長Wビットを用いた剰余乗算を想定し、ハードウェアからみた処理単位を2Wビットとする公知のコンピュータに所定のプログラムを実行させることにより構築されたものである。つまり、Wビット同士から2Wビットを得る乗算と、2Wビット同士の加算が効率よく計算できる環境を想定している。
As illustrated in FIG. 1, the remainder device 10 of this embodiment includes a multiplication target input unit 11, a multiplication unit 12, an addition unit 13 (corresponding to “fourth addition unit”), a residue target input unit 14, and a multiplication coefficient storage. Means 15, contraction means 16, normalization means 17, and control means 18. Under the control of the control means 18, the remainder multiplication (c ← ab, m ← cmd n for the inputted a and b) )I do.
The remainder device 10 according to the present embodiment is assumed to be a remainder multiplication using a word length of W bits, and is constructed by causing a known computer having a processing unit as viewed from hardware to have 2 W bits to execute a predetermined program. It is. In other words, an environment is assumed in which multiplication for obtaining 2 W bits from W bits and addition of 2 W bits can be efficiently calculated.

また、本形態では、法nを

Figure 2005208327
とおく。ここで、L(ビット)は出力するmod nの値のビット数を意味し、例えば、セキュリティビット等が該当する。また、Qは2以上の整数である。
Figure 2005208327
とおく。
ここで、wはソフトウェアからみた処理単位であるワードを示し、uはL/w以上の最小の整数を意味する。また、Eは、ワード単位(wビット)で処理可能なLビット以上の最小ビット数と、Lビットとの誤差を意味する(E=uw‐L)。また、式(11)のdwh+k‐Eは、式(10)のdに対応するものであるが、wh+k‐E<0の場合にはdwh+k‐E=0とする。また、xは、正規化手段17における正規化処理の際x=Qとして取り扱われる値である。 In this embodiment, the modulus n is
Figure 2005208327
far. Here, L (bit) means the number of bits of the value of mod n to be output, and corresponds to, for example, a security bit. Q is an integer of 2 or more.
Figure 2005208327
far.
Here, w indicates a word that is a processing unit viewed from software, and u indicates a minimum integer equal to or greater than L / w. Further, E means an error between the minimum number of L bits or more that can be processed in word units (w bits) and L bits (E = uw−L). Further, d wh + k−E in equation (11) corresponds to d j in equation (10), but when wh + k−E <0, d wh + k−E = 0. Further, x is a value which is treated as x = Q w during the normalization process in normalization means 17.

なお、式(11)で算出されたp(以下「乗算係数」と呼ぶ。)は、乗算係数格納手段15に格納される。ここで、乗算係数pの格納とは、乗算係数pをデータとして格納する場合の他、この乗算係数pが組み込まれたプログラムを格納する場合も含まれる。
剰余装置10を用いて剰余乗算を行う場合、まず、乗算対象入力手段11において、

Figure 2005208327
と表現した場合における、各係数a及びbの入力を受け付ける(ステップS1)。なお、この例で入力されるa及びbは、
0≦a,b<Q (s,t=0,1,...,u‐2)
0≦au−1,bu−1<Qw‐E
を満たすものとする。また、式(13),(14)のような表現を「冗長表現」と呼ぶ。 In addition, ph (hereinafter referred to as “multiplication coefficient”) calculated by Expression (11) is stored in the multiplication coefficient storage means 15. Here, the storage of the multiplication factor p h, another case of storing the multiplication factor p h as data, but also the case of storing a program which the multiplication factor p h is incorporated.
When performing remainder multiplication using the remainder device 10, first, in the multiplication target input means 11,
Figure 2005208327
In the case of expressing a receives an input of coefficients a s and b t (Step S1). Incidentally, a s and b t are input in this example,
0 ≦ a s , b t <Q w (s, t = 0, 1,..., U−2)
0 ≦ a u−1 , b u−1 <Q w−E
Shall be satisfied. Expressions such as equations (13) and (14) are called “redundant expressions”.

次に、乗算手段12において、乗算対象入力手段11から係数a及びbを受け取り、0≦s,t≦u‐1の全ての整数s,tに対してaの演算を行う。また、加算手段13において、乗算手段12における演算結果を用い、0≦s,t≦u‐1の全ての整数s,tに対し、各項間の繰り上がり補正を行うことなく、cs+t←cs+t+aの演算を行う(乗算処理:ステップS2)。
なお、cs+t←cs+t+aの演算結果は、i=s+t、

Figure 2005208327
とおいた場合における各係数cを構成する。そして、ステップS2で示した「各項間の繰り上がり補正を行うことなく」とは、項xの係数cを構成するcs+t←cs+t+aの演算結果がx以上となった場合でも、この演算結果を項xi+1の係数として繰り上げる処理を行わないことを意味する。
次に、剰余対象入力手段14において、加算手段13での最終的な演算結果cs+tの入力を受け付ける(ステップS3)。なお、このcs+tは、i=s+tとし、剰余対象cを
Figure 2005208327
と表現した場合における各係数cに相当する。 Next, the multiplication unit 12 receives the coefficients a s and b t from the multiplication target input unit 11 and performs a s b t calculation for all integers s and t with 0 ≦ s and t ≦ u−1. . Further, in the adding means 13, c s + t ← using the calculation result in the multiplying means 12 without performing carry correction between the terms for all integers s, t where 0 ≦ s, t ≦ u−1. Calculation of c s + t + a s b t is performed (multiplication processing: step S2).
The calculation result of c s + t ← c s + t + a s b t is i = s + t,
Figure 2005208327
Each coefficient c i is configured. Then, “without performing carry correction between each term” shown in step S2 means that the calculation result of c s + t ← c s + t + a s b t constituting the coefficient c i of the term x i is greater than or equal to x. This means that the calculation result is not carried up as the coefficient of the term x i + 1 .
Next, the remainder target input unit 14 receives the input of the final calculation result c s + t from the addition unit 13 (step S3). This c s + t is i = s + t, and the remainder object c is
Figure 2005208327
Is equivalent to each coefficient ci.

次に、縮約手段16において、剰余対象入力手段14において入力された係数c=cs+tと、乗算係数格納手段15から抽出した乗算係数pとを用い、

Figure 2005208327
を満たす各係数c’を、各項x間の繰り上がり補正を行うことなく算出する(縮約処理:ステップS4)。つまり、式(12)から導かれる合同式
Figure 2005208327
を式(15)に適用することにより得られる式(16)の左辺の各係数c’を、各項x間の繰り上がり補正を行うことなく算出する。なお、ここでの「各項間の繰り上がり補正を行うことなく」とは、式(17)を式(15)に適用した場合における項x(i≦u‐1)の係数c’を算出する過程において、演算結果がx以上となった場合でも、この演算結果を項xi+1の係数として繰り上げる処理を行わないことを意味する。 Then, the contraction means 16, and a coefficient c i = c s + t which is input in the remainder target input unit 14, a multiplication factor p h extracted from the multiplier coefficient storing means 15 using,
Figure 2005208327
Each coefficient c i ′ satisfying the above is calculated without performing a carry correction between the terms x i (contraction processing: step S4). In other words, the congruence derived from equation (12)
Figure 2005208327
Each coefficient c i ′ on the left side of the equation (16) obtained by applying to the equation (15) is calculated without performing a carry correction between the terms x i . Here, “without performing carry correction between the terms” means that the coefficient c i ′ of the term x i (i ≦ u−1) when Equation (17) is applied to Equation (15). This means that even when the calculation result is equal to or greater than x in the process of calculating, the calculation result is not carried up as a coefficient of the term x i + 1 .

全ての前記係数c’の算出後、各係数c’は正規化手段17に送られ、正規化手段17は、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行い(ステップS5)、またLビット長の縮約処理を行うことにより剰余乗算結果mを算出する。
ここで、前述の乗算係数p及びこれを用いて定義されたf(x)は、Lがwの倍数でない場合をも考慮したものである。そして、この乗算係数pと各係数cとを用い、縮約手段16において算出された各係数c’を用いることにより、少ない計算量でc mod nを求めることができる。つまり、Lがwの倍数でない場合であっても高速にc mod nを求めることができる。
'After the calculation of each coefficient c i' all the coefficients c i is sent to the normalization unit 17, the normalizing unit 17, between each term x i of the coefficient c i 'in the case where the x = Q w Are carried out collectively (step S5), and the L-bit length reduction process is performed to calculate the remainder multiplication result m.
Here, the above-described multiplication coefficient ph and f (x) defined by using this take into consideration the case where L is not a multiple of w. Then, by using the multiplication coefficient ph and each coefficient c i and using each coefficient c i ′ calculated by the contracting means 16, c mod n can be obtained with a small amount of calculation. That is, even if L is not a multiple of w, c mod n can be obtained at high speed.

また、縮約手段16は、各項間の係数の繰り上がり補正を行うことなく算出されたc←abの各係数を用い、さらに各項間における係数の繰り上がり補正を行うことなくc’の各係数c’を算出し、最後に正規化手段17において、全ての繰り上がり補正をまとめて行う。そのため、繰り上がり補正を行いつつ各係数を算出する場合に比べ、処理が高速になる。
なお、本形態における法nは、縮約手段16における各演算結果のビット数を、ハードウェアが一度に取り扱うことが可能なビット数(2Wビット)未満とする値である。すなわち、乗算対象入力手段11において、入力されるa及びbが、
0≦a,b<Q (s,t=0,1,...,u‐2)
0≦au−1,bu−1<Qw‐E
であった場合、式(15)の各係数cは、

Figure 2005208327
となるが、このようなcに対して式(16)の左辺の各係数c’がQ2W未満となるようなf(x)に対応するnを法とする。これにより、演算結果が、ハードウェアが一度に取り扱うことが可能なビット数を超え、その補正処理が必要となるという事態を防止できる。なお、一部の演算結果が、ハードウェアが一度に取り扱うことが可能なビット数を超えることになるnであっても、他の補正処理との関係で処理が高速化できる場合には、そのようなnを用いてもよい。 Further, the contracting means 16 uses each coefficient of c ← ab calculated without correcting the coefficient advance between the terms, and further reduces c ′ without correcting the coefficient advance between the terms. Each coefficient c i ′ is calculated, and finally, the normalizing means 17 collectively performs all carry-up corrections. Therefore, the processing becomes faster than when calculating each coefficient while performing carry correction.
The modulus n in this embodiment is a value that makes the number of bits of each calculation result in the contracting means 16 less than the number of bits (2W bits) that the hardware can handle at a time. That is, in the multiplication target input unit 11, a s and b t is input,
0 ≦ a s , b t <Q w (s, t = 0, 1,..., U−2)
0 ≦ a u−1 , b u−1 <Q w−E
When each of the coefficients c i in equation (15) is
Figure 2005208327
However, modulo n corresponding to f (x) such that each coefficient c i ′ on the left side of the equation (16) is less than Q 2W with respect to such c i . As a result, it is possible to prevent a situation in which the calculation result exceeds the number of bits that can be handled by the hardware at one time and the correction process is required. Note that even if some computation results are n that exceeds the number of bits that the hardware can handle at one time, if the processing can be speeded up in relation to other correction processing, Such n may be used.

このようなnは、L=160、w=27とした場合に素数だけでも22751個存在する。そして、その中で縮約手段16における計算コストが少ないものとして、例えば、
160‐227‐2‐(2‐1)
160‐227‐2‐1
160‐23・27‐2‐(2‐1)
等を例示できる。
<実施例1>
次に、本形態における実施例1について説明する。
Such n has 22751 even if only prime numbers when L = 160 and w = 27. And among them, the calculation cost in the contracting means 16 is low, for example,
2 160 -2 27-2- (2 4 -1)
2 160 -2 6 2 27-2 -1
2 160 -2 3 ・ 27-2- (2 4 -1)
Etc. can be illustrated.
<Example 1>
Next, Example 1 in this embodiment will be described.

本実施例は、Q=2であり、Lが160であり、Wが32であり、wが27であり、uが6であり、法nが2160‐279‐15(=2160‐23・27‐2‐(2‐1))である場合のものである。この場合、E=2、p=2(2‐1)、p=1、p=0(h=1,2,4,5)、f(x)=x‐x‐60(=x‐x‐2(2‐1))となる。
<実施例1の構成>
実施例1における全体構成は、前述した通りである(図1)。以下では、実施例1における縮約手段16及び正規化手段17の詳細構成のみを説明する。
In this example, Q = 2, L is 160, W is 32, w is 27, u is 6, and modulus n is 2 160 -2 79 -15 (= 2 160- 2 3 · 27-2- (2 4 -1)). In this case, E = 2, p 0 = 2 2 (2 4 -1), p 3 = 1, p h = 0 (h = 1,2,4,5), f (x) = x 6 -x 3 −60 (= x 6 −x 3 −2 2 (2 4 −1)).
<Configuration of Example 1>
The overall configuration in Example 1 is as described above (FIG. 1). Hereinafter, only detailed configurations of the contracting unit 16 and the normalizing unit 17 in the first embodiment will be described.

図2は、本実施例における縮約手段16の構成を示したブロック図であり、図3は、本実施例における正規化手段17の構成を示したブロック図である。
図2に示すように、本実施例の縮約手段16は、加算手段16a、16b、16d(「第1〜3の加算手段」に相当)及び多倍算手段16cを有しており、図3に示すように、本実施例の縮約手段17は、繰り上がり補正手段17aa、17ab、17c及び縮約処理手段17ba、17bb、17bc、17bdを有している。
また、より具体的には、例えば、本実施例の縮約手段16及び正規化手段17は、32ビット同士の積64ビットを得る乗算器と、64ビット同士の和を得る加算器によって実現される。ここで、加算器は減算も実行でき、64ビットの値のシフトも効率的に計算可能とする。このような環境の例としてIntel(登録商標)のSSE2がある。もちろん、64ビット同士の加算が直接出来ない場合に、32ビット同士の加算を組み合わせて64ビットの加算を実行するなどの置換えがあってもよい(後述する実施例2についても同様)。
FIG. 2 is a block diagram showing the configuration of the contracting means 16 in this embodiment, and FIG. 3 is a block diagram showing the configuration of the normalizing means 17 in this embodiment.
As shown in FIG. 2, the contracting means 16 of the present embodiment includes adding means 16a, 16b, 16d (corresponding to “first to third adding means”) and a multiplying means 16c. As shown in FIG. 3, the contraction means 17 of this embodiment includes carry correction means 17aa, 17ab, 17c and contraction processing means 17ba, 17bb, 17bc, 17bd.
More specifically, for example, the reduction means 16 and the normalization means 17 of this embodiment are realized by a multiplier that obtains a 64-bit product of 64 bits and an adder that obtains the sum of 64 bits. The Here, the adder can also perform subtraction, and the shift of a 64-bit value can be calculated efficiently. An example of such an environment is Intel® SSE2. Of course, when addition of 64 bits cannot be performed directly, there may be a replacement such as executing addition of 64 bits by combining additions of 32 bits (the same applies to Example 2 described later).

<実施例1の処理>
実施例1における処理の全体は、前述した通りである(図4)。以下では、実施例1における、ステップS2,S4,S5の処理(図4)の詳細のみを説明する。
<実施例1におけるステップS2の処理>
図5は、本実施例における図4のステップS2の処理を説明するためのフローチャートである。
図5に示すように、本処理ではまず、i=0,1,...,10に対し、cに0を代入し、s及びtに0を代入する(ステップS11)。次に、乗算手段12(図1)においてaの演算を行い、その演算結果を加算手段13に送る(ステップS12)。加算手段13は、cs+t←cs+t+aの演算を行う(ステップS13)。次に、制御手段18(図1)において、s=5(=u‐1)であるか否かを判断し(ステップS14)、s=5でない場合、s←s+1の演算を行ってステップS12の処理に戻り、s=5である場合、t=5であるか否かを判断する(ステップS15)。ここで、t=5であった場合処理を終了し、t=5でなかった場合、sに0を代入し、t←t+1の演算を行って、ステップS12の処理に戻る。
<Process of Example 1>
The entire processing in the first embodiment is as described above (FIG. 4). Hereinafter, only the details of the processing in steps S2, S4, and S5 (FIG. 4) in the first embodiment will be described.
<Processing of Step S2 in Embodiment 1>
FIG. 5 is a flowchart for explaining the processing in step S2 of FIG. 4 in the present embodiment.
As shown in FIG. 5, in this process, first, for i = 0, 1,..., 0, 0 is substituted for c i and 0 is substituted for s and t (step S11). Next, the multiplication unit 12 (FIG. 1) calculates a s b t and sends the calculation result to the addition unit 13 (step S12). The adding means 13 calculates c s + t ← c s + t + a s b t (step S13). Next, the control means 18 (FIG. 1) determines whether or not s = 5 (= u−1) (step S14). If not s = 5, the calculation of s ← s + 1 is performed and step S12 is performed. Returning to the process, if s = 5, it is determined whether t = 5 (step S15). If t = 5, the process ends. If t = 5, 0 is substituted for s, t ← t + 1 is calculated, and the process returns to step S12.

<実施例1におけるステップS4の処理>
前述のように、本実施例では、u=6、f(x)=x‐x‐60となるため、本実施例の縮約手段16は、

Figure 2005208327
を満たす係数c’を、各項x間の繰り上がり補正を行うことなく算出する。すなわち、剰余対象入力手段14において入力された剰余対象
Figure 2005208327
を複数回適用することにより得られる式(18)のc’の係数c’を、各項x間の繰り上がり補正を行うことなく算出する。以下この演算を概念的に説明する。 <Processing of Step S4 in Embodiment 1>
As described above, in this embodiment, since u = 6 and f (x) = x 6 -x 3 -60, the contracting means 16 of this embodiment is
Figure 2005208327
A coefficient c i ′ satisfying the above is calculated without performing carry correction between the terms x i . That is, the remainder target input by the remainder target input means 14
Figure 2005208327
The coefficient c i ′ of c ′ in the equation (18) obtained by applying a plurality of times is calculated without performing carry correction between the terms x i . This calculation will be conceptually described below.

図6は、剰余対象cの係数cとc’の係数c’との関係を説明するための概念図である。ここで、図6におけるx(i=0,1,...,10)は、c及びc’の項xを意味し、c(i=0,1,...,10)は、cの係数cを意味し、c’(i=0,1,...,5)は、式(18)のc’の係数c’を意味する。また、xと同一列(図6における縦方向の列)にあるc及びc’は、項xの係数に対応する。 FIG. 6 is a conceptual diagram for explaining the relationship between the coefficient c i of the remainder object c and the coefficient c i ′ of c ′. Here, x i (i = 0, 1,..., 10) in FIG. 6 means the terms x i of c and c ′, and c i (i = 0, 1,..., 10). Means the coefficient c i of c, and c i ′ (i = 0, 1,..., 5) means the coefficient c i ′ of c ′ in the equation (18). Moreover, c i and c i ′ in the same column as x i (vertical column in FIG. 6) correspond to the coefficient of the term x i .

図6の(a)は、剰余対象入力手段14において入力された剰余対象cの各項xの係数c(i=0,1,...,10)を示している。なお、前述のように、剰余対象cは、式(13)で表現される第1の乗算対象aと、式(14)で表現される第2の乗算対象bとを、項x間の繰り上がり補正を行うことなく乗算したものである(ステップS2)。従って、係数c(i=0,1,...,10)はx以上となる場合もありえる。言い換えると、x=Q=227に相当するため、係数c(i=0,1,...,10)は27ビット以上となっている場合もある。 FIG. 6A shows the coefficients c i (i = 0, 1,..., 10) of each term x i of the residue object c input by the residue object input means 14. Note that, as described above, the remainder object c is obtained by dividing the first multiplication object a expressed by Expression (13) and the second multiplication object b expressed by Expression (14) between the terms x i . Multiplication is performed without carrying forward correction (step S2). Therefore, the coefficient c i (i = 0, 1,..., 10) may be greater than or equal to x. In other words, since it corresponds to x = Q w = 2 27 , the coefficient c i (i = 0, 1,..., 10) may be 27 bits or more.

図6の(a)に示される式(19)に式(20)を1回適用すると、

Figure 2005208327
となるため、各項xの係数cは図6の(b)のようになる。なお、この図の「×60」とは、この「×60」と同一行(図6における横方向の行)の係数cを60倍することを意味する。
さらに、式(21)に式(20)を適用すると、
Figure 2005208327
となるため、各項xの係数cは図6の(c)のようになる。
そして、図6の(c)に示す各係数c或いは60cを、各項xと同一列(図6における縦方向の列)ごとに、桁上がり補正することなく加算した値が、c’における各項xの係数c’となる(図6の(d))。例えば、c’=c+60c+60cとなる。 When the equation (20) is applied once to the equation (19) shown in FIG.
Figure 2005208327
Therefore, the coefficient c i of each term x i is as shown in FIG. Note that “× 60” in this figure means that the coefficient c i of the same row (lateral row in FIG. 6) as this “× 60” is multiplied by 60.
Furthermore, when the formula (20) is applied to the formula (21),
Figure 2005208327
Therefore, the coefficient c i of each term x i is as shown in FIG.
A value obtained by adding the coefficients c i or 60c i shown in (c) of FIG. 6 for each column x i in the same column (vertical column in FIG. 6) without carry correction is given as c It becomes the coefficient c i ′ of each term x i in “(d) of FIG. 6”. For example, c 0 ′ = c 0 + 60c 6 + 60c 9

この係数c’は、順次、c’←c+60c+60c,c’←c+60c+60c10,...,c’←c+cと演算することにより求めることも可能であるが、本実施例では、この演算方法を工夫し、さらなる処理の高速化を図る。
図7は、本実施例におけるステップS4の処理を説明するためのフローチャートである。以下、このフローチャートに沿って、本実施例におけるステップS4の処理を具体的に説明する。
図7に示すように、本処理ではまず、加算手段16aにおいて、剰余対象入力手段14において入力された係数c(i=6,7,9,10)を取得し、i=6,7に対して、c←c+ci+3の演算を行う(ステップS21)。この演算結果である係数c(i=6,7)は、加算手段16b及び多倍算手段16cに送られる。
The coefficient c i ′ is obtained by sequentially calculating c 0 ′ ← c 0 +60 c 6 +60 c 9 , c 1 ′ ← c 1 +60 c 7 +60 c 10 ,..., C 5 ′ ← c 5 + c 8 However, in this embodiment, this calculation method is devised to further speed up the processing.
FIG. 7 is a flowchart for explaining the processing in step S4 in the present embodiment. Hereinafter, the process of step S4 in the present embodiment will be specifically described with reference to this flowchart.
As shown in FIG. 7, in this process, first, the adding means 16a obtains the coefficients c i (i = 6, 7, 9, 10) inputted in the remainder target input means 14, and sets i = 6, 7 On the other hand, the calculation of c i ← c i + c i + 3 is performed (step S21). The coefficient c i (i = 6, 7), which is the calculation result, is sent to the adding means 16b and the multiple multiplying means 16c.

加算手段16aにおける演算後、加算手段16bにおいて、剰余対象入力手段14において入力された係数c(i=3,4,5,8)及び加算手段16aから送られた係数c(i=6,7)を取得し、i=3,4,5に対して、c←c+ci+3の演算を行う(ステップS22)。この演算結果である係数c(i=3,4)は加算手段16dに送られ、cはc’として出力される。すなわち、係数c’は、加算手段16bにおける演算結果cである。
その後、多倍算手段16cにおいて、i=0,1,…,4に対して、2(2‐1)ci+6の演算を行い、その演算結果を加算手段16dに送る。また、加算手段16b及び多倍算手段16cにおける演算後、加算手段16dにおいて、剰余係数格納手段15(図1)から剰余係数p=2(2‐1)を取得し、i=0,1,…,4に対して、c←c+2(2‐1)ci+6の演算を行い、その演算結果をc’(i=0,1,...,4)として出力する(ステップS23)。すなわち、係数c’(i=0,1,…,4)は、加算手段16dにおける演算結果c(i=0,1,…,4)である。なお、多倍算手段16cにおける処理は、加算手段16aにおける演算後であれば、加算手段16bの演算前に行ってもよい。
After the calculation in the adding means 16a, the coefficient c i (i = 3,4,5,8) inputted in the remainder target input means 14 and the coefficient c i (i = 6) sent from the adding means 16a in the adding means 16b. , 7) and for i = 3, 4, 5, the calculation of c i ← c i + c i + 3 is performed (step S22). The coefficient c i (i = 3,4), which is the calculation result, is sent to the adding means 16d, and c 5 is output as c 5 ′. That is, the coefficient c 5 ′ is the calculation result c 5 in the adding means 16b.
Thereafter, the multiple multiplication means 16c performs 2 2 (2 4 −1) c i + 6 calculation on i = 0, 1,..., 4 and sends the calculation result to the addition means 16d. Further, after the calculation in the adding means 16b and the multiplying means 16c, the adding means 16d obtains the remainder coefficient p 0 = 2 2 (2 4 −1) from the remainder coefficient storage means 15 (FIG. 1), and i = 0 , 1,..., 4 are subjected to an operation of c i ← c i +2 2 (2 4 −1) c i + 6 , and the operation result is expressed as c i ′ (i = 0, 1,... 4) is output (step S23). That is, the coefficient c i ′ (i = 0, 1,..., 4) is the calculation result c i (i = 0, 1,..., 4) in the adding means 16d. Note that the processing in the multiplication unit 16c may be performed before the calculation of the addition unit 16b as long as it is after the calculation in the addition unit 16a.

なお、縮約手段16における演算は繰り上がり補正を行うことなく行われるため、算出された各係数c’(i=0,1,…,5)は、27(=w)ビット以上となる場合もある。
<実施例1におけるステップS5の処理>
正規化処理では、160(=L)ビット長の縮約処理を行うとともに、x=227とした場合における係数c’の各項x間の繰り上がり補正をまとめて行う。ここで、160ビット長の縮約処理とは、nを超える値に対しmod n演算を施すことをいう。本実施例では、繰り上がり補正の一部を160ビット長の縮約処理の前に行うことにより、正規化処理を簡略化し、処理の高速化を図る。
Since the calculation in the contraction means 16 is performed without carrying forward correction, each calculated coefficient c i ′ (i = 0, 1,..., 5) is 27 (= w) bits or more. In some cases.
<Processing of Step S5 in Embodiment 1>
In the normalization process is performed 160 (= L) performs a contraction process bit length, collectively the carry correction between each term x i of the coefficient c i 'in the case where the x = 2 27. Here, 160-bit length reduction processing refers to performing mod n operation on values exceeding n. In this embodiment, a part of the carry correction is performed before the 160-bit length reduction process, thereby simplifying the normalization process and speeding up the process.

図8は、本実施例におけるステップS5の処理を説明するためのフローチャートである。以下、このフローチャートに沿って、本実施例におけるステップS5の処理を具体的に説明する。なお、このフローチャートにおけるステップS31,S32は、cからcへの繰り上がり処理であり、ステップS33〜S36は、160ビット長の縮約処理であり、ステップS37は、cからci+1(i=0,1,...,4)への繰り上がり処理であり、ステップS38〜S40は、最後の調整処理である。 FIG. 8 is a flowchart for explaining the processing in step S5 in the present embodiment. Hereinafter, the process of step S5 in the present embodiment will be specifically described with reference to this flowchart. Note that steps S31, S32 in the flowchart is a carry process from c 4 to c 5, step S33~S36 is contraction processing 160-bit length, step S37 is c i + 1 from the c i ( This is a carry-up process to i = 0, 1,..., 4), and steps S38 to S40 are the last adjustment process.

図8に例示するように、まず、繰り上がり補正手段17aaにおいて、縮約手段16から出力された係数c’、c’を取得し、

Figure 2005208327
の演算を行い、その演算結果c’を縮約処理手段17ba、17bbに送る(ステップS31)。
次に、繰り上がり補正手段17abにおいて、縮約手段16から出力された係数c’を取得してc’←c’ mod 227を演算し、その演算結果c’を繰り上がり補正手段17cに送る(ステップS32)。 As illustrated in FIG. 8, first, the carry correction unit 17aa acquires the coefficients c 4 ′ and c 5 ′ output from the contraction unit 16,
Figure 2005208327
The calculation result c 5 ′ is sent to the contraction processing means 17ba and 17bb (step S31).
Next, the carry correction means 17ab obtains the coefficient c 4 ′ output from the reduction means 16, calculates c 4 ′ ← c 4mod 2 27, and carries out the carry correction of the calculation result c 4 ′. The data is sent to the means 17c (step S32).

次に、縮約処理手段17baにおいて、

Figure 2005208327
の演算を行い、その演算結果zを縮約処理手段17bc,17bdに送る(ステップS33)。
次に、縮約処理手段17bbにおいて、繰り上がり補正手段17aaから送られた演算結果c’を用い、c’←c’ mod 225を演算し、その演算結果c’を繰り上がり補正手段17cに送る(ステップS34)。 Next, in the contraction processing means 17ba,
Figure 2005208327
The calculation result z is sent to the contraction processing means 17bc and 17bd (step S33).
Next, the reduction processing means 17bb uses the calculation result c 5 'sent from the carry correction means 17aa to calculate c 5 ' ← c 5 'mod 2 25, and carries the calculation result c 5 ' up. It sends to the correction means 17c (step S34).

また、縮約処理手段17bcにおいて、縮約手段16から出力された係数c’及び縮約処理手段17baから出力されたzを取得し、c’←c’+(2‐1)zを演算し、その演算結果c’を繰り上がり補正手段17cに送る(ステップS35)。
さらに、縮約処理手段17bdにおいて、縮約手段16から出力された係数c’及び縮約処理手段17baから出力されたzを取得し、c’←c’+225zを演算し、その演算結果c’を繰り上がり補正手段17cに送る(ステップS36)。
その後、繰り上がり補正手段17cにおいて、縮約手段16から出力された係数c’, c’、繰り上がり補正手段17abから出力された係数c’、縮約処理手段17bc、17bdから出力された係数c’, c’を取得し、

Figure 2005208327
’←c’ mod 227
(i=0,1,2,3,4)
の演算を行い、その演算結果c’(i=0,1,...,5)を減算手段17dに送る(ステップS37)。
次に、減算手段17dにおいて、繰り上がり補正手段17cから送られた演算結果c’(i=0,1,...,5)を取得し、これらによって
Figure 2005208327
のように特定されるc’がn未満であるか否かを判断する(ステップS38)。ここで、c’<nであった場合には、減算手段17dにおいて、cを演算結果mとして出力し、処理を終了する(ステップS39)。一方、c’<nでなかった場合には、m←c’‐nの演算を行い、その演算結果mを出力して処理を終了する(ステップS40)。なお、ステップS38〜S40の処理は、c’-nの演算を行い、c’-n<0であればc’を演算結果mとして出力し、c’-n≧0であればm←c’‐nとすることとしてもよい。 Further, the reduction processing unit 17bc obtains the coefficient c 0 ′ output from the reduction unit 16 and z output from the reduction processing unit 17ba, and c 0 ′ ← c 0 ′ + (2 4 −1). z is calculated, and the calculation result c 0 ′ is sent to the carry correction means 17c (step S35).
Further, in the contraction processing unit 17bd, the coefficient c 2 ′ output from the contraction unit 16 and z output from the contraction processing unit 17ba are obtained, and c 2 ′ ← c 2 ′ +2 25 z is calculated. The calculation result c 2 ′ is sent to the carry correction means 17c (step S36).
Thereafter, in the carry correction means 17c, the coefficients c 1 'and c 3 ' output from the reduction means 16, the coefficient c 4 'output from the carry correction means 17ab, and the reduction processing means 17bc and 17bd are output. Obtained coefficients c 0 ′, c 2 ′,
Figure 2005208327
c i '← c i ' mod 2 27
(I = 0,1,2,3,4)
The calculation result c i ′ (i = 0, 1,..., 5) is sent to the subtraction means 17d (step S37).
Next, the subtraction means 17d obtains the calculation result c i ′ (i = 0, 1,..., 5) sent from the carry correction means 17c.
Figure 2005208327
It is determined whether or not c ′ specified as follows is less than n (step S38). Here, if c ′ <n, the subtraction means 17d outputs c as the operation result m, and the process is terminated (step S39). On the other hand, if c ′ <n is not satisfied, the calculation m ← c′−n is performed, the calculation result m is output, and the process ends (step S40). In the processing of steps S38 to S40, c'-n is calculated. If c'-n <0, c 'is output as the calculation result m. If c'-n ≧ 0, m ← c. '-N may be used.

<実施例2>
次に、本形態における実施例2について説明する。
本実施例は、Q=2であり、Lが160であり、Wが32であり、wが27であり、uが6であり、法nが2160‐231‐1(=2160‐26・27‐2‐1)である場合のものである。この場合、E=2、p=2、p=2、p=0(h=2,3,4,5)、f(x)=x‐64x‐4(=x‐2x‐2)となる。
<実施例2の構成>
実施例2における全体構成は、前述した通りである(図1)。以下では、実施例2における縮約手段16及び正規化手段17の詳細構成のみを説明する。
<Example 2>
Next, Example 2 in this embodiment will be described.
In this example, Q = 2, L is 160, W is 32, w is 27, u is 6, and modulus n is 2 160 -2 31 -1 (= 2 160- 2 6.27-2 -1). In this case, E = 2, p 0 = 2 2, p 1 = 2 6, p h = 0 (h = 2,3,4,5), f (x) = x 6 -64x-4 (= x 6 -2 6 x-2 2 ).
<Configuration of Example 2>
The overall configuration in Example 2 is as described above (FIG. 1). Hereinafter, only detailed configurations of the contracting unit 16 and the normalizing unit 17 in the second embodiment will be described.

図9は、本実施例における縮約手段16の構成を示したブロック図であり、図10は、本実施例における正規化手段17の構成を示したブロック図である。
図9に示すように、本実施例の縮約手段16は、多倍算手段116a,116c(「第1,第2の多倍算手段」に相当)及び加算手段116b,116d(「第1,第2の加算手段」に相当)を有しており、図10に示すように、本実施例の縮約手段17は、繰り上がり補正手段117aa、117ab、117c及び縮約処理手段117ba、117bb、117bc、117bdを有している。
FIG. 9 is a block diagram showing the configuration of the contracting means 16 in this embodiment, and FIG. 10 is a block diagram showing the configuration of the normalizing means 17 in this embodiment.
As shown in FIG. 9, the contracting means 16 of this embodiment includes multiple multiplying means 116a and 116c (corresponding to "first and second multiple multiplying means") and adding means 116b and 116d ("first first"). , The second adding means ”), and as shown in FIG. 10, the contracting means 17 of this embodiment includes carry correction means 117aa, 117ab, 117c and contraction processing means 117ba, 117bb. 117bc, 117bd.

<実施例2の処理>
実施例2における処理の全体は、前述した通りである(図4)。また、ステップS2の処理は実施例1と同じである。以下では、実施例2におけるステップS4,S5の処理(図4)の詳細のみを説明する。
<実施例2におけるステップS4の処理>
前述のように、本実施例では、u=6、f(x)=x‐64x‐4となるため、本実施例の縮約手段16は、

Figure 2005208327
を満たす係数c’を、各項x間の繰り上がり補正を行うことなく算出する。以下この演算を概念的に説明する。 <Process of Example 2>
The entire processing in the second embodiment is as described above (FIG. 4). The processing in step S2 is the same as that in the first embodiment. Hereinafter, only the details of the processing of steps S4 and S5 (FIG. 4) in the second embodiment will be described.
<Processing of Step S4 in Embodiment 2>
As described above, in this embodiment, since u = 6 and f (x) = x 6 -64x-4, the contracting means 16 of this embodiment is
Figure 2005208327
A coefficient c i ′ satisfying the above is calculated without performing carry correction between the terms x i . This calculation will be conceptually described below.

図11は、式(19)で表現された剰余対象cの係数cと、式(22)で示されるc’の係数c’との関係を説明するための概念図である。ここで、図11におけるx(i=0,1,...,10)、c(i=0,1,...,10)、c’(i=0,1,...,5)の意味は図6と同様である。
図11の(a)は、剰余対象入力手段14において入力された剰余対象cの各項xの係数c(i=0,1,...,10)を示している。
図11の(a)に示される式(19)に、

Figure 2005208327
となるため、各項xの係数cは図11の(b)のようになる。なお、この図の「×4」や「×64」とは、この「×4」や「×64」と同一行(図11における横方向の行)の係数cを4倍や64倍することを意味する。
そして、図11の(b)に示す各係数c(i=0,1,...,5)、4c(i=6,7,...,10)及び64c(i=6,7,...,10)を、各項xと同一列(図11における縦方向の列)ごとに、桁上がり補正することなく加算した値が、c’における各項xの係数c’となる(図11の(c))。例えば、c’=c+4cとなる。 Figure 11 is a conceptual diagram for explaining the coefficient c i of the remainder subject c expressed by equation (19), the relationship between the 'coefficients c i of' c of formula (22). Here, x i (i = 0, 1,..., 10), c i (i = 0, 1,..., 10), c i ′ (i = 0, 1,...) In FIG. ., 5) has the same meaning as in FIG.
FIG. 11A shows the coefficients c i (i = 0, 1,..., 10) of each term x i of the remainder object c input by the remainder object input means 14.
In equation (19) shown in FIG.
Figure 2005208327
Therefore, the coefficient c i of each term x i is as shown in FIG. Note that “× 4” and “× 64” in this figure mean that the coefficient c i of the same row (horizontal row in FIG. 11) as this “× 4” or “× 64” is multiplied by 4 or 64 times. Means that.
Then, each coefficient c i (i = 0, 1,..., 5), 4c i (i = 6, 7,..., 10) and 64c i (i = 6) shown in FIG. , 7,..., 10) are added to each term x i in the same column (vertical column in FIG. 11) without carry correction, and the coefficient of each term x i in c ′ It becomes c i '((c) of FIG. 11). For example, c 0 ′ = c 0 + 4c 6 .

図12は、本実施例におけるステップS4の処理を説明するためのフローチャートである。以下、このフローチャートに沿って、本実施例におけるステップS4の処理を具体的に説明する。
図12に示すように、本処理ではまず、多倍算手段116aにおいて、剰余対象入力手段14において入力された係数c(i=6,7,8,9,10)、及び乗算係数格納手段15に格納された乗算係数p=2を取得し、i=0,1,…,4に対して、2i+6の演算を行い、その演算結果2i+6を加算手段116bに送る。また、加算手段116bにおいて、剰余対象入力手段14において入力された係数c(i=0,1,2,3,4)、及び多倍算手段116aから送られた多倍算手段116aにおける演算結果2i+6を取得し、c←c+2i+6(i=0,1,2,3,4)の演算を行う(ステップS51)。この演算結果c(i=1,2,3,4)は加算手段116dに送られ、演算結果cは、係数c’として出力される。すなわち、係数c’は、加算手段116bにおける演算結果cである。
FIG. 12 is a flowchart for explaining the processing in step S4 in the present embodiment. Hereinafter, the process of step S4 in the present embodiment will be specifically described with reference to this flowchart.
As shown in FIG. 12, in this process, first, in the multiplication means 116a, the coefficient c i (i = 6, 7, 8, 9, 10) inputted in the remainder target input means 14 and the multiplication coefficient storage means. multiplication coefficient stored in 15 p 0 = 2 2 acquires, i = 0, 1, ..., against 4 performs calculation of the 2 2 c i + 6, the operation result 2 2 c i + 6 The data is sent to the adding means 116b. In addition, in addition means 116b, coefficient c i (i = 0, 1, 2, 3, 4) input in remainder target input means 14 and calculation in multiple multiplication means 116a sent from multiple multiplication means 116a. Result 2 2 c i + 6 is acquired, and c i ← c i +2 2 c i + 6 (i = 0, 1, 2, 3, 4) is calculated (step S51). The calculation result c i (i = 1, 2, 3, 4) is sent to the adding means 116d, and the calculation result c 0 is output as a coefficient c 0 ′. That is, the coefficient c 0 ′ is the calculation result c 0 in the adding unit 116b.

加算手段116bにおける演算後、多倍算手段116cにおいて、剰余対象入力手段14において入力された係数c(i=1,2,3,4,5)、及び乗算係数格納手段15に格納された乗算係数p=2を取得し、i=1,2,…,5に対して、2i+5の演算を行い、その演算結果2i+5を加算手段116dに送る。また、加算手段116dにおいて、剰余対象入力手段14において入力された係数c、多倍算手段116cから送られた演算結果2i+5、及び加算手段116bから送られた演算結果c(i=1,2,3,4)を取得し、これらを用い、i=1,2,…,5に対して、c←c+2i+5の演算を行う(ステップS52)。この演算結果c(i=1,2,…,5)は、係数c’(i=1,2,…,5)として出力される。すなわち、係数c’(i=1,2,…,5)は、加算手段116dにおける演算結果c’(i=1,2,…,5)である。 After the calculation in the adding means 116b, the coefficient c i (i = 1, 2, 3, 4, 5) input in the remainder target input means 14 and the multiplication coefficient storage means 15 are stored in the multiple multiplication means 116c. get the multiplication factor p 1 = 2 6, i = 1,2, ..., for the 5 performs calculation of 2 6 c i + 5, and sends the calculation result 2 6 c i + 5 to the adding means 116d . In addition, in addition means 116d, coefficient c 5 input in remainder target input means 14, calculation result 2 6 c i + 5 sent from multiple multiplication means 116c, and calculation result c i sent from addition means 116b. (I = 1, 2, 3, 4) are obtained and used to calculate c i ← c i +2 6 c i + 5 for i = 1, 2,..., 5 (step S52). ). The calculation result c i (i = 1, 2,..., 5) is output as a coefficient c i ′ (i = 1, 2,..., 5). That is, the coefficient c i ′ (i = 1, 2,..., 5) is the calculation result c i ′ (i = 1, 2,..., 5) in the adding unit 116d.

<実施例2におけるステップS5の処理>
正規化処理では、160(=L)ビット長の縮約処理を行うとともに、x=227とした場合における係数c’の各項x間の繰り上がり補正をまとめて行う。本実施例でも、繰り上がり補正の一部を160ビット長の縮約処理の前に行うことにより、正規化処理を簡略化し、処理の高速化を図る。
図13は、本実施例におけるステップS5の処理を説明するためのフローチャートである。以下、このフローチャートに沿って、本実施例におけるステップS5の処理を具体的に説明する。なお、このフローチャートにおけるステップS61,S62は、cからcへの繰り上がり処理であり、ステップS63〜S66は、160ビット長の縮約処理であり、ステップS67は、cからci+1(i=0,1,...,4)への繰り上がり処理であり、ステップS68〜S70は、最後の調整処理である。
<Processing of Step S5 in Example 2>
In the normalization process is performed 160 (= L) performs a contraction process bit length, collectively the carry correction between each term x i of the coefficient c i 'in the case where the x = 2 27. Also in this embodiment, a part of the carry correction is performed before the 160-bit length reduction process, thereby simplifying the normalization process and speeding up the process.
FIG. 13 is a flowchart for explaining the processing in step S5 in the present embodiment. Hereinafter, the process of step S5 in the present embodiment will be specifically described with reference to this flowchart. Note that steps S61, S62 in the flowchart is a carry process from c 4 to c 5, step S63~S66 is contraction processing 160-bit length, step S67 is c i + 1 from the c i ( This is a carry-over process to i = 0, 1,..., 4), and steps S68 to S70 are the last adjustment process.

図13に例示するように、まず、繰り上がり補正手段117aaにおいて、縮約手段16から出力された係数c’、c’を取得し、

Figure 2005208327
の演算を行い、その演算結果c’を縮約処理手段117ba、117bbに送る(ステップS61)。
次に、繰り上がり補正手段117abにおいて、縮約手段16から出力された係数c’を取得してc’←c’ mod 227を演算し、その演算結果c’を繰り上がり補正手段117cに送る(ステップS62)。 As illustrated in FIG. 13, first, the carry correction unit 117aa acquires the coefficients c 4 ′ and c 5 ′ output from the contraction unit 16,
Figure 2005208327
The calculation result c 5 ′ is sent to the contraction processing means 117ba and 117bb (step S61).
Next, the carry correction means 117ab obtains the coefficient c 4 ′ output from the contraction means 16, calculates c 4 ′ ← c 4mod 2 27, and carries out the carry correction of the calculation result c 4 ′. The data is sent to the means 117c (step S62).

次に、縮約処理手段117baにおいて、

Figure 2005208327
の演算を行い、その演算結果zを縮約処理手段117bc,117bdに送る(ステップS63)。
次に、縮約処理手段117bbにおいて、繰り上がり補正手段117aaから送られた演算結果c’を用い、c’←c’ mod 225を演算し、その演算結果c’を繰り上がり補正手段117cに送る(ステップS64)。
また、縮約処理手段117bcにおいて、縮約手段16から出力された係数c’及び縮約処理手段117baから出力されたzを取得し、c’←c’+zを演算し、その演算結果c’を繰り上がり補正手段117cに送る(ステップS65)。 Next, in the contraction processing means 117ba,
Figure 2005208327
The calculation result z is sent to the contraction processing means 117bc and 117bd (step S63).
Next, the reduction processing unit 117bb uses the calculation result c 5 ′ sent from the carry correction unit 117aa, calculates c 5 ′ ← c 5mod 2 25, and carries the calculation result c 5 ′ up. It sends to the correction means 117c (step S64).
Further, the contraction processing means 117bc obtains the coefficient c 0 ′ output from the contraction means 16 and z output from the contraction processing means 117ba, calculates c 0 ′ ← c 0 ′ + z, and calculates The result c 0 ′ is sent to the carry correction means 117c (step S65).

さらに、縮約処理手段117bdにおいて、縮約手段16から出力された係数c’及び縮約処理手段117baから出力されたzを取得し、c’←c’+2zを演算し、その演算結果c’を繰り上がり補正手段117cに送る(ステップS66)。
その後、繰り上がり補正手段117cにおいて、縮約手段16から出力された係数c’, c’、繰り上がり補正手段117abから出力された係数c’、縮約処理手段117bbから出力された係数c’、縮約処理手段117bc、117bdから出力された係数c’, c’を取得し、

Figure 2005208327
’←c’ mod 227
(i=0,1,2,3,4)
の演算を行い、その演算結果c’(i=0,1,...,5)を減算手段117dに送る(ステップS67)。 Further, the contraction processing unit 117bd obtains the coefficient c 1 ′ output from the contraction unit 16 and z output from the contraction processing unit 117ba, and calculates c 1 ′ ← c 1 ′ +2 4 z, The calculation result c 1 ′ is sent to the carry correction means 117c (step S66).
Thereafter, in the carry correction unit 117c, the coefficients c 2 ′ and c 3 ′ output from the reduction unit 16, the coefficient c 4 ′ output from the carry correction unit 117ab, and the coefficient output from the reduction processing unit 117bb. c 5 ′, the coefficients c 0 ′ and c 1 ′ output from the reduction processing means 117 bc and 117 bd are acquired,
Figure 2005208327
c i '← c i ' mod 2 27
(I = 0,1,2,3,4)
The calculation result c i ′ (i = 0, 1,..., 5) is sent to the subtraction means 117d (step S67).

次に、減算手段117dにおいて、繰り上がり補正手段117cから送られた演算結果c’(i=0,1,...,5)を取得し、これらによって特定されるc’がn未満であるか否かを判断する(ステップS68)。ここで、c’<nであった場合には、減算手段117dにおいて、cを演算結果mとして出力し、処理を終了する(ステップS69)。一方、c’<nでなかった場合には、m←c’‐nの演算を行い、その演算結果mを出力して処理を終了する(ステップS70)。
なお、実施例1,2における各演算を実施するにあたり、2の冪(べき)に関する乗算・切捨て除算は、多くの場合、左シフト・右シフト演算を施すことによって行うほうが高速となる。
Next, in the subtraction unit 117d, the carry correction means operation result transmitted from 117c c i '(i = 0,1 , ..., 5) acquires, c specified by these' is less than n It is determined whether or not there is (step S68). Here, if c ′ <n, the subtraction means 117d outputs c as the operation result m, and the process is terminated (step S69). On the other hand, if c ′ <n is not satisfied, the calculation m ← c′−n is performed, the calculation result m is output, and the process ends (step S70).
It should be noted that in performing each calculation in the first and second embodiments, the multiplication and truncation division related to the power of 2 is often performed by performing a left shift / right shift calculation.

また、本発明は上述の実施の形態に限定されるものではない。
例えば、上述した計算の順序は上記に限定されるものではなく、結果が矛盾しない範囲で入れ替えて、或いは同時に行うこととしてもよい。
また、aとbとの語長乗算(ステップS2)を上記の教科書的な方法ではなく、Karatsuba法、Toom−Cook法、FFT法などの別の方法により高速に行うこととしてもよい。通常、多倍長乗算を実行する場合、L=160,W=32といった小さな値では繰り上がり処理が繁雑になるためKaratsuba法は有効でない場合が多かった。しかし、本発明では繰り上がりは最後にまとめて行うため、この程度の大きさのL,WでもKaratsuba法が有効な場合が多い。
The present invention is not limited to the above-described embodiment.
For example, the above-described calculation order is not limited to the above, but may be performed within the range where the results are not contradictory or may be performed simultaneously.
Further, the word length multiplication of a and b (step S2) may be performed at high speed by another method such as the Karatsuba method, the Toom-Cook method, or the FFT method instead of the textbook method described above. Normally, when performing multiple-length multiplication, the Karatsuba method is often not effective because the carry-up process becomes complicated with small values such as L = 160 and W = 32. However, in the present invention, the carry is collectively performed at the end, so the Karatsuba method is often effective even with L and W of this size.

さらに、当然のことながら、ステップS11におけるcの初期化処理を省略し、上記のステップS13において0に加算していたaをcの初期値とし、ステップS13における0との加算処理を行わないこととしてもよい。
また、本形態では、乗算手段12及び加算手段13において算出されたaとbの乗算結果を剰余対象cとし、剰余対象入力手段14に入力することとした。しかし、それ以外の値を剰余対象cとすることとしてもよい。
〔第2の実施の形態〕
次に、本発明における第2の実施の形態について説明する。
Furthermore, of course, omit the initialization of c i in step S11, the a s b t which has been added to 0 in step S13 described above as the initial value of c i, the addition of a 0 in the step S13 It is good also as not performing a process.
In this embodiment, the multiplication result of a and b calculated by the multiplying unit 12 and the adding unit 13 is set as a residue target c and input to the residue target input unit 14. However, other values may be used as the remainder object c.
[Second Embodiment]
Next, a second embodiment of the present invention will be described.

本形態は、乗算のKaratsuba処理と、擬メルセンヌ素数を使った縮約の処理により、項を打ち消し、計算量を削減する形態である。
なお、本形態では、Q=2であり、Lが160であり、Wが32であり、wが27であり、uが6であり、法nが2160‐279‐15(=2160‐23・27‐2‐(2‐1))であるものとする。この場合、E=2、p=2(2‐1)、p=1、p=0(h=1,2,4,5)、f(x)=x‐x‐60(=x‐x‐2(2‐1))となる。
This form is a form in which the terms are canceled and the amount of calculation is reduced by the Karatsuba process of multiplication and the reduction process using the pseudo Mersenne prime.
In this embodiment, Q = 2, L is 160, W is 32, w is 27, u is 6, and modulus n is 2 160 -2 79 -15 (= 2 160 -2 3 · 27-2- (2 4 -1)). In this case, E = 2, p 0 = 2 2 (2 4 -1), p 3 = 1, p h = 0 (h = 1,2,4,5), f (x) = x 6 -x 3 −60 (= x 6 −x 3 −2 2 (2 4 −1)).

<原理>
本形態では、

Figure 2005208327
と表現した場合におけるabmod f(x)を計算する。
ここで、
=a+ax+a
=a+ax+a
=b+bx+b
=b+bx+b
X=x
とおくと、
a=AX+A
b=BX+B
f(X)=X‐X‐2(2‐1) …(25)
となる。そのため、
ab=(AX+A)(BX+B
=A+((A+A)(B+B)‐A‐A)X+A
となり、式(25)より導かれる合同式
Figure 2005208327
となる。ここで、第1式から第2式への変換において、第1式のAX(下線部)の項が打ち消しあっている。これにより、演算数を削減できることが分かる。本形態では、この性質を利用し、縮約の処理の一部を乗算処理に組み込み、剰余乗算全体の演算数を低減させ高速化を図る。 <Principle>
In this form,
Figure 2005208327
Abmod f (x) is calculated.
here,
A 0 = a 2 x 2 + a 1 x + a 0 ,
A 1 = a 5 x 2 + a 4 x + a 3 ,
B 0 = b 2 x 2 + b 1 x + b 0 ,
B 1 = b 5 x 2 + b 4 x + b 3 ,
X = x 3 ,
After all,
a = A 1 X + A 0
b = B 1 X + B 0
f (X) = X 2 -X-2 2 (2 4 -1) (25)
It becomes. for that reason,
ab = (A 1 X + A 0 ) (B 1 X + B 0 )
= A 1 B 1 X 2 + ((A 1 + A 0 ) (B 1 + B 0 ) −A 1 B 1 −A 0 B 0 ) X + A 0 B 0
And the congruence derived from equation (25)
Figure 2005208327
It becomes. Here, in the conversion from the first expression to the second expression, the term A 1 B 1 X (underlined portion) in the first expression cancels out. This shows that the number of operations can be reduced. In this embodiment, by utilizing this property, a part of the reduction process is incorporated into the multiplication process, and the number of operations in the entire remainder multiplication is reduced to increase the speed.

<構成>
図14は、公知のコンピュータに所定のプログラムを実行させることにより実現される、本形態における剰余装置200の構成を例示したブロック図である。
図14に例示するように、剰余装置200は、乗算対象入力手段211、縮約手段212及び正規化手段213を有している。また、縮約手段212は、乗算項算出手段212a、乗算項格納手段212b及び係数算出手段212cを有している。
また、より具体的には、本実施例の剰余装置200は、32ビット同士の積64ビットを得る乗算器と、64ビット同士の和を得る加算器によって実現される。ここで、加算器は減算も実行でき、64ビットの値のシフトも効率的に計算可能とする。このような環境の例としてIntel(登録商標)のSSE2がある。もちろん、64ビット同士の加算が直接出来ない場合に、32ビット同士の加算を組み合わせて64ビットの加算を実行するなどの置換えがあってもよい。
<Configuration>
FIG. 14 is a block diagram exemplifying a configuration of the surplus apparatus 200 according to this embodiment, which is realized by causing a known computer to execute a predetermined program.
As illustrated in FIG. 14, the remainder device 200 includes a multiplication target input unit 211, a contraction unit 212, and a normalization unit 213. Further, the contraction unit 212 includes a multiplication term calculation unit 212a, a multiplication term storage unit 212b, and a coefficient calculation unit 212c.
More specifically, the remainder apparatus 200 according to the present embodiment is realized by a multiplier that obtains a product of 32 bits of 64 bits and an adder that obtains a sum of 64 bits. Here, the adder can also perform subtraction, and the shift of a 64-bit value can be calculated efficiently. An example of such an environment is Intel® SSE2. Of course, in the case where 64-bit addition cannot be performed directly, there may be a replacement such as combining 64-bit addition and executing 64-bit addition.

<処理>
図15は、本形態における剰余乗算処理を説明するためのフローチャートである。以下、このフローチャートに沿って本形態における剰余乗算処理を説明する。
図15に例示するように、まず、乗算対象入力手段211において、第1の乗算対象a及び第2の乗算対象bを式(23)(24)によって表現した場合における各係数a及びbの入力を受け付ける(ステップS81)。
入力された各係数a及びbは縮約手段212に送られ、縮約手段212は、これらの係数a及びbを用い、

Figure 2005208327
を満たす係数c’を、各項x間の繰り上がり補正を行うことなく、以下のように算出する(縮約処理)。
すなわち、まず、乗算項算出手段212aにおいて、乗算対象入力手段211から各係数a及びbを取得し、これらを用いて、乗算項Aを算出する(ステップS82)。算出された乗算項Aは乗算項格納手段212bに送られ、そこに格納される(ステップS83)。 <Processing>
FIG. 15 is a flowchart for explaining the modular multiplication process in this embodiment. Hereinafter, the remainder multiplication process in this embodiment will be described with reference to this flowchart.
As illustrated in FIG. 15, first, in the multiplication target input unit 211, each coefficient a s and b t when the first multiplication target a and the second multiplication target b are expressed by Expressions (23) and (24). Is received (step S81).
The inputted coefficients a s and b t are sent to the contracting means 212, which uses these coefficients a s and b t ,
Figure 2005208327
The coefficient c i ′ satisfying the above is calculated as follows (contraction processing) without performing the carry correction between the terms x i .
That is, first, the multiplication term calculation unit 212a obtains the coefficients a s and b t from the multiplication target input unit 211, and uses them to calculate the multiplication term A 0 B 0 (step S82). The calculated multiplication term A 0 B 0 is sent to the multiplication term storage means 212b and stored therein (step S83).

その後、係数算出手段212cにおいて、乗算対象入力手段211から各係数a及びbを取得し、さらに乗算項格納手段212bに格納された乗算項Aを用い、c=((A+A)(B+B)−A)X+A+2(2‐1)A
の演算を行い、当該cの項xに対する係数c’を算出する(ステップS85)。
算出された各係数c’は正規化手段213に送られ、正規化手段213は、この係数の各項間の繰り上がり補正をまとめて行う(ステップS85)。
なお、本発明は上述の実施の形態に限定されるものではなく、その他、本発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。また、上述の各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。
Thereafter, the coefficient calculation means 212c obtains the coefficients a s and b t from the multiplication target input means 211, and further uses the multiplication term A 0 B 0 stored in the multiplication term storage means 212b, and c = ((A 1 + A 0 ) (B 1 + B 0 ) −A 0 B 0 ) X + A 0 B 0 +2 2 (2 4 −1) A 1 B 1
The coefficient c i ′ for the term x i of c is calculated (step S85).
Each calculated coefficient c i ′ is sent to the normalizing means 213, and the normalizing means 213 collectively performs carry correction between the terms of this coefficient (step S85).
Needless to say, the present invention is not limited to the above-described embodiment, and can be appropriately changed without departing from the spirit of the present invention. In addition, the various processes described above are not only executed in time series according to the description, but may be executed in parallel or individually according to the processing capability of the apparatus that executes the processes or as necessary.

また、上述の各実施の形態における構成をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよいが、具体的には、例えば、磁気記録装置として、ハードディスク装置、フレキシブルディスク、磁気テープ等を、光ディスクとして、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)等を、光磁気記録媒体として、MO(Magneto-Optical disc)等を、半導体メモリとしてEEP−ROM(Electronically Erasable and Programmable-Read Only Memory)等を用いることができる。
Further, when the configuration in each of the above-described embodiments is realized by a computer, the processing contents of the functions that each device should have are described by a program. The processing functions are realized on the computer by executing the program on the computer.
The program describing the processing contents can be recorded on a computer-readable recording medium. The computer-readable recording medium may be any medium such as a magnetic recording device, an optical disk, a magneto-optical recording medium, or a semiconductor memory. Specifically, for example, the magnetic recording device may be a hard disk device or a flexible Discs, magnetic tapes, etc. as optical disks, DVD (Digital Versatile Disc), DVD-RAM (Random Access Memory), CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable) / RW (ReWritable), etc. As the magneto-optical recording medium, MO (Magneto-Optical disc) or the like can be used, and as the semiconductor memory, EEP-ROM (Electronically Erasable and Programmable-Read Only Memory) or the like can be used.

また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD−ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。
The program is distributed by selling, transferring, or lending a portable recording medium such as a DVD or CD-ROM in which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of the server computer and transferring the program from the server computer to another computer via a network.
A computer that executes such a program first stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. When executing the process, the computer reads a program stored in its own recording medium and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from a portable recording medium and execute processing according to the program, and the program is transferred from the server computer to the computer. Each time, the processing according to the received program may be executed sequentially. Also, the program is not transferred from the server computer to the computer, and the above-described processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition. It is good. Note that the program in this embodiment includes information that is used for processing by an electronic computer and that conforms to the program (data that is not a direct command to the computer but has a property that defines the processing of the computer).

また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。   In this embodiment, the present apparatus is configured by executing a predetermined program on a computer. However, at least a part of these processing contents may be realized by hardware.

本発明の産業上の利用分野としては、例えば、離散対数問題の困難性に根拠をおく公開鍵暗号や電子署名における多倍長剰余乗算が挙げられる。本発明をこれらに使用することにより、公開鍵暗号等の処理を高速化できる。   The industrial application field of the present invention includes, for example, public key cryptography based on the difficulty of the discrete logarithm problem and multiple-precision modular multiplication in electronic signatures. By using the present invention for these, processing such as public key cryptography can be speeded up.

第1の実施の形態における剰余装置の全体構成を例示したブロック図。The block diagram which illustrated the whole structure of the remainder apparatus in 1st Embodiment. 実施例1における縮約手段の構成を示したブロック図。FIG. 3 is a block diagram showing a configuration of contraction means in the first embodiment. 実施例1における正規化手段の構成を示したブロック図。FIG. 3 is a block diagram showing a configuration of normalization means in the first embodiment. 第1の実施の形態における剰余装置の処理の全体を説明するためのフローチャート。The flowchart for demonstrating the whole process of the remainder apparatus in 1st Embodiment. 実施例1における図4のステップS2の処理を説明するためのフローチャー。4 is a flowchart for explaining the process of step S2 of FIG. 4 in the first embodiment. 実施例1における剰余対象cの係数cとc’の係数c’との関係を説明するための概念図。Conceptual diagram illustrating the relationship between the 'coefficients c i of' coefficients c i and c of the remainder subject c in Example 1. 実施例1におけるステップS4の処理を説明するためのフローチャート。7 is a flowchart for explaining a process of step S4 in the first embodiment. 実施例1におけるステップS5の処理を説明するためのフローチャート。6 is a flowchart for explaining a process of step S5 in the first embodiment. 実施例2における縮約手段の構成を示したブロック図。FIG. 9 is a block diagram showing a configuration of contraction means in the second embodiment. 実施例2における正規化手段の構成を示したブロック図。FIG. 6 is a block diagram showing a configuration of normalization means in the second embodiment. 実施例2における剰余対象cの係数cとc’の係数c’との関係を説明するための概念図。Conceptual diagram illustrating the relationship between the 'coefficients c i of' coefficients c i and c of the remainder subject c in Example 2. 実施例2におけるステップS4の処理を説明するためのフローチャート。9 is a flowchart for explaining a process of step S4 in the second embodiment. 実施例2におけるステップS5の処理を説明するためのフローチャート。9 is a flowchart for explaining a process of step S5 in the second embodiment. 第2の実施の形態における剰余装置の構成を例示したブロック図。The block diagram which illustrated the composition of the remainder device in a 2nd embodiment. 第2の実施の形態における剰余乗算処理を説明するためのフローチャート。The flowchart for demonstrating the remainder multiplication process in 2nd Embodiment.

符号の説明Explanation of symbols

10,200 剰余装置
11,211 乗算対象入力手段
12 乗算手段
13 加算手段
14 剰余対象入力手段
15 乗算係数格納手段
16,212 縮約手段
17,213 正規化手段
10,200 residue device 11,211 multiplication object input means 12 multiplication means 13 addition means 14 remainder object input means 15 multiplication coefficient storage means 16,212 contraction means 17,213 normalization means

Claims (9)

c mod nの剰余演算を行う剰余装置であって、
Figure 2005208327
各係数cの入力を受け付ける剰余対象入力手段と、
mod nの値をLビットとし、ソフトウェアからみた処理単位であるワードのビット数をwとし、uをL/w以上の最小の整数とし、Qを2以上の整数とし、E=uw‐Lとし、
Figure 2005208327
を格納する乗算係数格納手段と、
前記係数cと前記乗算係数pとを用い、
Figure 2005208327
を満たす各係数c’を、各項x間の繰り上がり補正を行うことなく算出する縮約手段と、
全ての前記係数c’の算出後、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行う正規化手段と、
を有することを特徴とする剰余装置。
c mod n is a residue device that performs a residue operation,
Figure 2005208327
Remainder target input means for receiving input of each coefficient c i ;
The value of mod n is L bits, the number of bits of a word as a processing unit as viewed from software is w, u is the smallest integer greater than or equal to L / w, Q is an integer greater than or equal to 2, and E = uw−L ,
Figure 2005208327
Multiplication coefficient storage means for storing
Using said multiplication factor p h and the coefficient c i,
Figure 2005208327
Contraction means for calculating each coefficient c i ′ satisfying without performing carry-over correction between the terms x i ;
After calculating all the coefficients c i ′, normalization means for collectively performing carry correction between the terms x i of the coefficient c i ′ when x = Q w
A surplus device characterized by comprising:
請求項1記載の剰余装置であって、
前記法nは、
前記縮約手段における各演算結果のビット数を、ハードウェアが一度に取り扱うことが可能なビット数未満とする値である、
ことを特徴とする剰余装置。
The surplus device according to claim 1,
The modulus n is
The number of bits of each operation result in the contraction means is a value that is less than the number of bits that can be handled by hardware at one time.
A surplus device characterized by that.
請求項1記載の剰余装置であって、
前記Lは160であり、
前記uは6であり、
前記法nは2160‐279‐15であり、
前記縮約手段は、
i=6,7に対して、c←c+ci+3の演算を行う第1の加算手段と、
前記第1の加算手段における演算後、i=3,4,5に対して、c←c+ci+3の演算を行う第2の加算手段と、
前記第1の加算手段における演算後、i=0,1,…,4に対して、2(2‐1)ci+6の演算を行う多倍算手段と、
前記第2の加算手段及び前記多倍算手段における演算後、i=0,1,…,4に対して、c←c+2(2‐1)ci+6の演算を行う第3の加算手段と、を有し、
前記係数c’(i=0,1,…,4)は、
前記第3の加算手段における演算結果c(i=0,1,…,4)であり、
前記係数c’は、
前記第2の加算手段における演算結果cである、
ことを特徴とする剰余装置。
The surplus device according to claim 1,
L is 160;
U is 6;
The modulus n is 2 160 -2 79 -15,
The contracting means includes
a first adding means for calculating c i ← c i + c i + 3 for i = 6, 7;
A second adding means for calculating c i ← c i + c i + 3 for i = 3, 4, 5 after the calculation in the first adding means;
After the calculation in the first addition means, multiple multiplication means for calculating 2 2 (2 4 −1) c i + 6 for i = 0, 1,..., 4;
After the calculations in the second adding means and the multiple multiplying means, the calculation of c i ← c i +2 2 (2 4 −1) c i + 6 is performed for i = 0, 1,. A third adding means,
The coefficient c i ′ (i = 0, 1,..., 4) is
A calculation result c i (i = 0, 1,..., 4) in the third adding means;
The coefficient c 5 ′ is
The calculation result c 5 in the second addition means.
A surplus device characterized by that.
請求項1記載の剰余装置であって、
前記Lは160であり、
前記uは6であり、
前記法nは2160‐231‐1であり、
前記縮約手段は、
i=0,1,…,4に対して、2i+6の演算を行う第1の多倍算手段と、
前記第1の多倍算手段における演算結果を用い、c←c+2i+6の演算を行う第1の加算手段と、
前記第1の加算手段における演算後、i=1,2,…,5に対して、2i+5の演算を行う第2の多倍算手段と、
前記第2の多倍算手段における演算結果を用い、i=1,2,…,5に対して、c←c+2i+5の演算を行う第2の加算手段と、を有し、
前記係数c’は、
前記第1の加算手段における演算結果cであり、
前記係数c’(i=1,2,…,5)は、
前記第2の加算手段における演算結果c’(i=1,2,…,5)である、
ことを特徴とする剰余装置。
The surplus device according to claim 1,
L is 160;
U is 6;
The modulus n is 2 160 -2 31 -1;
The contracting means includes
first multiplicative means for performing 2 2 c i + 6 operations for i = 0, 1,..., 4;
First addition means for performing a calculation of c i ← c i +2 2 c i + 6 using the calculation result in the first multiple multiplication means;
Second arithmetic means for calculating 2 6 c i + 5 for i = 1, 2,..., 5 after the operation in the first adding means;
Second addition means for performing a calculation of c i ← c i +2 6 c i + 5 for i = 1, 2,..., 5 using the calculation result in the second multiple multiplication means. Have
The coefficient c 0 ′ is
A calculation result c 0 in the first adding means;
The coefficient c i ′ (i = 1, 2,..., 5) is
It is the calculation result c i ′ (i = 1, 2,..., 5) in the second adding means.
A surplus device characterized by that.
請求項1から4の何れかに記載の剰余装置であって、
Figure 2005208327
各係数a及びbの入力を受け付ける乗算対象入力手段と、
0≦s,t≦u‐1の全ての整数s,tに対しaの演算を行う乗算手段と、
前記乗算手段における演算結果を用い、0≦s,t≦u‐1の全ての整数s,tに対し、各項間の繰り上がり補正を行うことなく、cs+t←cs+t+aの演算を行う第4の加算手段と、を有し、
前記剰余対象cの各係数cは、
前記第4の加算手段における最終的な演算結果cs+tである、
ことを特徴とする剰余装置。
The surplus device according to any one of claims 1 to 4,
Figure 2005208327
A multiplication target input means for receiving inputs of the coefficients a s and b t ;
Multiplication means for calculating a s b t for all integers s, t with 0 ≦ s, t ≦ u−1;
Using the calculation result in the multiplication means, c s + t ← c s + t + a s b t is applied to all integers s, t with 0 ≦ s, t ≦ u−1 without performing carry correction between the terms. A fourth addition means for performing a calculation,
Each coefficient c i of the remainder object c is
A final calculation result c s + t in the fourth addition means;
A surplus device characterized by that.
ab mod nの演算を行う剰余装置であって、
mod nの値は160ビットであり、n=2160‐279‐15であり、ソフトウェアからみた処理単位であるワードのビット数をwとした場合における160/w以上の最小の整数は6であり、
Figure 2005208327
各係数a及びbの入力を受け付ける乗算対象入力手段と、
f(x)=x‐x‐2(2‐1) とした場合に、
Figure 2005208327
を満たす係数c’を、各項x間の繰り上がり補正を行うことなく算出する縮約手段と、
全ての前記係数c’の算出後、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行う正規化手段と、
を有し、
前記縮約手段は、
=a+ax+a
=a+ax+a
=b+bx+b
=b+bx+b
X=x
とした場合における、乗算項Aを前記係数a及びbを用いて算出する乗算項算出手段と、
算出された前記乗算項Aを格納する乗算項格納手段と、
前記係数a及びb、及び前記乗算項格納手段に格納された前記乗算項Aを用い、
c=((A+A)(B+B)−A)X+A+2(2‐1)A
の演算を行い、当該cの項xに対する係数c’を算出する係数算出手段と、
を有する、
ことを特徴とする剰余装置。
a remainder device for calculating ab mod n,
The value of mod n is 160 bits, n = 2 160 -2 79 -15, and the minimum integer of 160 / w or more is 6 when the number of bits of a word as a processing unit viewed from software is w. Yes,
Figure 2005208327
A multiplication target input means for receiving inputs of the coefficients a s and b t ;
When f (x) = x 6 −x 3 −2 2 (2 4 −1),
Figure 2005208327
Contraction means for calculating a coefficient c i ′ satisfying the above without performing a carry-over correction between the terms x i ;
After calculating all the coefficients c i ′, normalization means for collectively performing carry correction between the terms x i of the coefficient c i ′ when x = Q w
Have
The contracting means includes
A 0 = a 2 x 2 + a 1 x + a 0 ,
A 1 = a 5 x 2 + a 4 x + a 3 ,
B 0 = b 2 x 2 + b 1 x + b 0 ,
B 1 = b 5 x 2 + b 4 x + b 3 ,
X = x 3 ,
Multiplication term calculation means for calculating the multiplication term A 0 B 0 using the coefficients a s and b t in the case of
Multiplication term storage means for storing the calculated multiplication terms A 0 B 0 ;
Using the coefficients a s and b t and the multiplication term A 0 B 0 stored in the multiplication term storage means,
c = ((A 1 + A 0 ) (B 1 + B 0 ) −A 0 B 0 ) X + A 0 B 0 +2 2 (2 4 −1) A 1 B 1
Coefficient calculation means for calculating the coefficient c i ′ for the term x i of the c,
Having
A surplus device characterized by that.
c mod nの剰余演算を行う剰余方法であって、
mod nの値をLビットとし、ソフトウェアからみた処理単位であるワードのビット数をwとし、uをL/w以上の最小の整数とし、Qを2以上の整数とし、E=uw‐Lとし、
Figure 2005208327
を乗算係数格納手段に格納しておき、
剰余対象入力手段において、
Figure 2005208327
各係数cの入力を受け付け、
縮約手段において、前記係数cと前記乗算係数pとを用い、
Figure 2005208327
を満たす各係数c’を、各項x間の繰り上がり補正を行うことなく算出し、
全ての前記係数c’の算出後、正規化手段において、x=Qとした場合における当該係数c’の各項x間の繰り上がり補正をまとめて行う、
ことを特徴とする剰余方法。
c mod n is a residue method for performing a residue operation,
The value of mod n is L bits, the number of bits of a word as a processing unit as viewed from software is w, u is the smallest integer greater than or equal to L / w, Q is an integer greater than or equal to 2, and E = uw−L ,
Figure 2005208327
Is stored in the multiplication coefficient storage means,
In the remainder object input means,
Figure 2005208327
Accepts input of each coefficient c i ,
In contraction means, using said multiplication factor p h and the coefficient c i,
Figure 2005208327
Each coefficient c i ′ satisfying the above is calculated without performing carry correction between the terms x i
After the calculation of all the coefficients c i ′, the normalization means collectively performs the carry correction between the terms x i of the coefficient c i ′ when x = Q w .
A remainder method characterized by that.
請求項1から6の何れかに記載の剰余装置としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as a surplus apparatus in any one of Claim 1 to 6. 請求項8記載のプログラムを格納したコンピュータ読取り可能な記録媒体。   A computer-readable recording medium storing the program according to claim 8.
JP2004014656A 2004-01-22 2004-01-22 Surplus device, surplus method, program, and recording medium Expired - Lifetime JP4399280B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004014656A JP4399280B2 (en) 2004-01-22 2004-01-22 Surplus device, surplus method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004014656A JP4399280B2 (en) 2004-01-22 2004-01-22 Surplus device, surplus method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2005208327A true JP2005208327A (en) 2005-08-04
JP4399280B2 JP4399280B2 (en) 2010-01-13

Family

ID=34900382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004014656A Expired - Lifetime JP4399280B2 (en) 2004-01-22 2004-01-22 Surplus device, surplus method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4399280B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287489A (en) * 2007-05-17 2008-11-27 Nippon Telegr & Teleph Corp <Ntt> Multiple length arithmetic method, multiple length arithmetic device and program
JP2014021237A (en) * 2012-07-17 2014-02-03 Nippon Telegr & Teleph Corp <Ntt> Contraction device, contraction method and program
JP2014137415A (en) * 2013-01-15 2014-07-28 Nippon Telegr & Teleph Corp <Ntt> Multiple-length integer arithmetic operation device, multiple-length integer arithmetic operation method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287489A (en) * 2007-05-17 2008-11-27 Nippon Telegr & Teleph Corp <Ntt> Multiple length arithmetic method, multiple length arithmetic device and program
JP2014021237A (en) * 2012-07-17 2014-02-03 Nippon Telegr & Teleph Corp <Ntt> Contraction device, contraction method and program
JP2014137415A (en) * 2013-01-15 2014-07-28 Nippon Telegr & Teleph Corp <Ntt> Multiple-length integer arithmetic operation device, multiple-length integer arithmetic operation method, and program

Also Published As

Publication number Publication date
JP4399280B2 (en) 2010-01-13

Similar Documents

Publication Publication Date Title
CN110199339B (en) Secret calculation system, secret calculation device, secret calculation method, and recording medium
CN112805768B (en) Secret sigmoid function computing system and method thereof, secret logistic regression computing system and method thereof, secret sigmoid function computing device, secret logistic regression computing device, program
JPWO2018135563A1 (en) Secret calculation system, secret calculation device, secret calculation method, program
JP7512631B2 (en) Ising machine data input device and method for inputting data into an Ising machine
KR102075848B1 (en) Method, Apparatus and Recording Medium Of Polynomial Operation Optimization Processing
US20230075348A1 (en) Computing device and method using multiplier-accumulator
JP3551113B2 (en) Divider
JP4399280B2 (en) Surplus device, surplus method, program, and recording medium
US8909689B2 (en) Arithmetic device
KR20080050226A (en) Modular multiplication device and design method
JP4856599B2 (en) Pairing arithmetic device, program
JP5840086B2 (en) Reduction device, reduction method, and program
CN116720587A (en) A processing method, device, storage medium and electronic device for data modulus operation tasks
JP6067596B2 (en) Pairing arithmetic device, multi-pairing arithmetic device, program
JP4612698B2 (en) Polynomial multiplier, polynomial multiplication method and program
JPH11282351A (en) Inverse element operation method in security technology, operation device using the method, and recording medium storing program for executing the method
JP6810437B1 (en) Information processing equipment, programs, and information processing methods
AU2020423805B2 (en) Secure selective product computation system, secure selective product computation method, secure computation apparatus, and program
KR20220008460A (en) Apparatus and method for calculating of neural network
JPWO2020090025A1 (en) Arithmetic processing unit and control method of arithmetic processing unit
US20250335155A1 (en) Dilithium modular reduction architecture
JP5010508B2 (en) Elliptic curve cryptographic operation apparatus, method and program, and elliptic curve cryptographic operation system and method
JP2021089737A (en) Information processor, program, and information processing method
CN112068801B (en) An Optimal Signed Binary Fast Computation Method and Modular Exponentiation on Multiplicative Groups
EP3792836A1 (en) Information processing apparatus, method of processing information, and information processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060601

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20070823

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070823

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: 20091013

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: 20091026

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4399280

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131030

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term