JP2002521720A - Circuits and methods for modulo multiplication - Google Patents

Circuits and methods for modulo multiplication

Info

Publication number
JP2002521720A
JP2002521720A JP2000561553A JP2000561553A JP2002521720A JP 2002521720 A JP2002521720 A JP 2002521720A JP 2000561553 A JP2000561553 A JP 2000561553A JP 2000561553 A JP2000561553 A JP 2000561553A JP 2002521720 A JP2002521720 A JP 2002521720A
Authority
JP
Japan
Prior art keywords
value
input
output
data
multiplier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000561553A
Other languages
Japanese (ja)
Inventor
ロバート・アイ・フォスター
ジョン・マイケル・バス
ロドニー・シー・テッシュ
ジェイムス・ダグラス・デュウォーキン
マイケル・ジェイ・トーラ
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Motorola Solutions Inc
Original Assignee
Motorola Inc
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 Motorola Inc filed Critical Motorola Inc
Publication of JP2002521720A publication Critical patent/JP2002521720A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/728Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic using Montgomery reduction

Abstract

(57)【要約】 コプロセッサ44は、データを暗号化し、暗号を解読するためにモジュラ指数等式を計算する数学的アルゴリズムを実行する。パイプライン化乗算器56はA/B RAM72に格納される16ビット・データ値を受信し、部分積を生成する。生成された部分積は加算器58内で、積RAM64内に格納される前回の部分積と合算される。モジューロ換算器60は、合計値の特定のデータ・ビット位置が論理1値を有するとき、バイナリ・データ値Nを合計値に整合し加算する。N RAM70は、モジューロ換算器60内で合計値に加算されたデータ値Nを格納する。コプロセッサ44は、フォスタ−モンゴメリ換算アルゴリズムを計算し、モンゴメリ換算アルゴリズムで必要とされたように↓の値を最初に計算する必要なしに、(A*B mod N)の値を換算する。 (57) Summary The coprocessor 44 executes a mathematical algorithm that encrypts data and calculates a modular exponential equation to decrypt the data. Pipelined multiplier 56 receives the 16-bit data value stored in A / B RAM 72 and generates a partial product. The generated partial product is added in the adder 58 with the previous partial product stored in the product RAM 64. Modulo converter 60 aligns and adds binary data value N to the sum when a particular data bit position of the sum has a logical one value. N RAM 70 stores data value N added to the total value in modulo converter 60. The coprocessor 44 calculates the Foster-Montgomery conversion algorithm and converts the value of (A * B mod N) without having to first calculate the value of ↓ as required by the Montgomery conversion algorithm.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】[Industrial applications]

本発明は、一般に乗算器に関し、さらに詳しくは、暗号化乗算器に関する。 The present invention relates generally to multipliers, and more particularly, to cryptographic multipliers.

【0002】[0002]

【従来の技術】[Prior art]

リベスト−シャミル−エイドルマン(RSA:Rivest-Shamir-Adleman)は、電子
装置間のデジタル・データ転送に関して高度な機密性を提供する、広く用いられ
ている暗号化アルゴリズムである。RSAアルゴリズムのモジュラ累乗法数学は、
ハードウェア乗算器に基づくモジュラ換算のためのモンゴメリ法を利用して効率
的に計算することができる。大きな整数のモジュラ累乗法は、モジュラ乗算を繰
り返すことで効率的に計算することができ、RSA演算全体の効率性は乗算器の速
度に直接的に関わる。ハードウェア乗算器アーキテクチャは、モンゴメリ・アル
ゴリズムの膨大な平衡演算に関するパイプライン化法を利用する。モンゴメリ・
アルゴリズムを計算するパイプライン化ハードウェア乗算器は、速度とシリコン
面積のバランスをとることができ、それにより高性能で費用効果の良い解決策が
得られる。また、パイプライン化整数モジュラ乗算器は、多くの用途で必要とさ
れる電力の軽減を可能にする。
Rivest-Shamir-Adleman (RSA) is a widely used encryption algorithm that provides a high degree of confidentiality for digital data transfer between electronic devices. The modular exponentiation math of the RSA algorithm is
The calculation can be efficiently performed using the Montgomery method for modular conversion based on a hardware multiplier. Large integer modular exponentiation can be computed efficiently by repeating modular multiplication, and the overall efficiency of the RSA operation is directly related to the speed of the multiplier. The hardware multiplier architecture utilizes the Montgomery algorithm's massively balanced pipelined approach. Montgomery
A pipelined hardware multiplier that computes the algorithm can balance speed and silicon area, resulting in a high-performance, cost-effective solution. Also, pipelined integer modular multipliers allow for the reduction of power required in many applications.

【0003】 RSAアルゴリズムにより容易になる暗号システムは、高レベルの機密性を提供
するが、実現には費用がかかる。モジュラ累乗を伴うRSAアルゴリズムの数学は
簡単明瞭であるが効率的ハードウェアの実現は簡単ではない。より高速の暗号化
動作とより高い性能に対する需要が高まるにつれて、ハードウェア・モジュラ乗
算器アーキテクチャの改良が高度な機密性を確保するために必要とされる。
[0003] Cryptographic systems facilitated by the RSA algorithm provide a high level of confidentiality, but are expensive to implement. The math of the RSA algorithm with modular exponentiation is simple and straightforward, but efficient hardware implementation is not. As the demand for faster cryptographic operations and higher performance increases, improvements in hardware modular multiplier architectures are needed to ensure a high degree of confidentiality.

【0004】 従って、集積回路内に内蔵するための高性能,低コストで電力が低いモジュラ
累乗および乗算システムを有すると有利である。従来技術によるシステムよりも
少ないクロック・サイクルでモンゴメリ・アルゴリズムを演算することにより高
性能を達成する乗算システムが必要である。さらに、ビット数の増大したオペラ
ンドに適応することのできる乗算システムが必要である。
Accordingly, it would be advantageous to have a high performance, low cost, low power modular power and multiply system for incorporation within an integrated circuit. There is a need for a multiplication system that achieves high performance by operating the Montgomery algorithm in fewer clock cycles than in prior art systems. Further, there is a need for a multiplication system that can accommodate operands with an increased number of bits.

【0005】[0005]

【好適な実施例の説明】DESCRIPTION OF THE PREFERRED EMBODIMENTS

図1は、データ通信網内で動作するように構築されるスマートカード10のブ
ロック図である。「コンタクト型」のスマートカード構造においては、スマート
カード10は、いくつかのコンタクト点13に接続されるインタフェース(I/F
)ブロック12を備える。コンタクト点13は、端末装置(図示せず)とスマー
トカード10との間の電気信号の転送を可能にする。スマートカード10は、ス
マートカード10内の機能ブロックにエネルギを供給するコンタクト点13のう
ちの1つを通じて、端末装置から動作電位を受信する。コンタクト点13をさら
に利用して、スマートカード10と端末装置との間の入力/出力(I/O)信号の
転送を行う。
FIG. 1 is a block diagram of a smart card 10 constructed to operate in a data communication network. In the “contact type” smart card structure, the smart card 10 has an interface (I / F) connected to several contact points 13.
) Block 12. The contact points 13 enable the transfer of electrical signals between a terminal (not shown) and the smart card 10. The smart card 10 receives an operating potential from a terminal device through one of the contact points 13 that supplies energy to functional blocks in the smart card 10. The input / output (I / O) signal is transferred between the smart card 10 and the terminal device by further utilizing the contact point 13.

【0006】 あるいは、スマートカード10は、端末装置との物理的接触を行わずに、動作
する「コンタクトレス」スマートカードとすることもできる。この場合、スマー
トカード10は、搬送周波数上での入力信号の受信と、被変調出力信号の送信の
両方を行う。たとえば、無線周波数(RF)エネルギがスマートカード10内のコ
イル(図示せず)に放射され、スマートカード10内の機能ブロックの動作を可
能にする動作電位をコイルが供給する。
Alternatively, the smart card 10 can be a “contactless” smart card that operates without making physical contact with the terminal device. In this case, the smart card 10 both receives the input signal on the carrier frequency and transmits the modulated output signal. For example, radio frequency (RF) energy is radiated to a coil (not shown) within the smart card 10 and the coil provides an operating potential that enables operation of functional blocks within the smart card 10.

【0007】 外部端末装置とデータを送受信するI/Fブロック12に加えて、スマートカー
ド10は、汎用非同期式受信機−送信機装置(UART: Universal Asynchronous R
eceiver-Transmitter device)14を備える。UART14は、マイクロプロセッサ
18と端末装置との間のインタフェースとなる。インタフェース・ブロック、す
なわちUART14は、UART14を通じてデータを動的に移動させるボーレート生成
器16から、可調整クロック信号を受信する。システム・バス15は、一般にマ
イクロプロセッサ18を、UART14,ランダム・アクセス・メモリ(RAM)20
,読取専用メモリ(ROM)22、メモリ・アクセス・コントローラ(MAC:Memory
Access controller)24および機密メモリ管理ユニット(SMMU: Secure Memor
y Management Unit)28などの他の機能ブロックに接続する。UART14から受
信されるデータはRAM20に格納され、RAM20の一部は不揮発性であってスマー
トカード10が動作電位を受信していないときに情報を保持する。不揮発性メモ
リの例としては、特に電気的消去可能(E2:Electrically Erasable)メモリま
たは強電性メモリなどがある。ROM22はスマートカード10のオペレーティン
グ・システムのためのデータと命令とを、マイクロプロセッサ18のプログラム
制御のためのシステム・バスを介して提供する。RAM20からのデータはMAC24
を通じてフォスタ−モンゴメリ・ハードウェア・アクセラレータ(FMHA)26に
転送され、そこで数学的演算が行われてデータを暗号化する。FMHA26はモジュ
ラ演算ユニット(MAU: Modular Arithmetic Unit)または暗号化アクセラレータ
・ブロックとも呼ばれる。暗号化されたデータはFMHA26からシステム・バス1
5を介してUART14と端末装置とに転送される。
[0007] In addition to an I / F block 12 for transmitting and receiving data to and from an external terminal device, the smart card 10 includes a universal asynchronous receiver-transmitter device (UART: Universal Asynchronous R).
eceiver-Transmitter device) 14. The UART 14 serves as an interface between the microprocessor 18 and the terminal device. The interface block, UART, receives an adjustable clock signal from a baud rate generator 16 that moves data dynamically through UART. The system bus 15 generally includes a microprocessor 18, a UART 14, a random access memory (RAM) 20.
, Read-only memory (ROM) 22, memory access controller (MAC: Memory)
Access controller (24) and Secure Memory Management Unit (SMMU)
y Management Unit) 28 and other functional blocks. Data received from the UART 14 is stored in a RAM 20, and a portion of the RAM 20 is non-volatile and retains information when the smart card 10 is not receiving an operating potential. Examples of non-volatile memories include, in particular, electrically erasable (E 2 ) memories or high-power memories. ROM 22 provides data and instructions for the operating system of smart card 10 via a system bus for program control of microprocessor 18. Data from RAM 20 is MAC 24
To the Foster-Montgomery Hardware Accelerator (FMHA) 26 where mathematical operations are performed to encrypt the data. The FMHA 26 is also called a modular arithmetic unit (MAU) or a cryptographic accelerator block. The encrypted data is sent from the FMHA 26 to the system bus 1
5 to the UART 14 and the terminal device.

【0008】 図1に示されるスマートカード10は、簡略化された形式にあることに注目さ
れたい。さらに、スマートカード10は「コンタクト」モードにおいても「コン
タクトレス」モードにおいても動作するプラスチック・クレジット・カード内部
に埋め込まれるコンピュータ・チップであることに注目されたい。とりわけシリ
アル通信インタフェース・ブロック,ウォッチドッグ・タイマ,インターバル・
タイマ,割込コントローラなどの別のブロックを機能ブロックとしてスマートカ
ード10に追加することもできる。
Note that the smart card 10 shown in FIG. 1 is in a simplified form. Further, note that smart card 10 is a computer chip embedded inside a plastic credit card that operates in both a "contact" mode and a "contactless" mode. In particular, serial communication interface block, watchdog timer, interval
Other blocks, such as a timer and an interrupt controller, can be added to the smart card 10 as functional blocks.

【0009】 動作中にスマートカード10は、スマートカード10と端末装置との間に送信
されるデータのための安全な通信リンクを開設する。マイクロプロセッサ18の
制御下で、SMMU28,MAC24およびFMHA26が協働し、暗号化キーおよび他の
情報を用いてRAM20に格納されるデータの一部を暗号化するためのモジュラ累
乗等式を計算する数学的アルゴリズムを実行する。例として、RAM20は個人の
健康記録,経済的記録および個人の認証識別子すなわち指紋や網膜アイプリント
などのデータを格納する。個人データはRAM20からシステム・バス15を介し
てMAC24に転送され、MAC24からデータ・ホスト・バス25を介してFMHA26
に転送される。FMHA26は、モジュラ乗算,加算,減算および累乗法を含む関数
を用いてデータ・ホスト・バス25上に受信されるデータを暗号化する。データ
暗号化の後で、暗号化された個人データはFMHA26からUART14およびI/Fブロ
ック12に転送される。暗号化された個人データはコンタクトレス・スマートカ
ードにおいてはRF信号を通じて、またコンタクト型スマートカードにおいては1
組のI/Oピンを通じて端末装置に放出される。
In operation, the smart card 10 opens a secure communication link for data transmitted between the smart card 10 and the terminal. Under the control of the microprocessor 18, the SMMU 28, MAC 24 and FMHA 26 work together to calculate a modular exponentiation equation for encrypting a portion of the data stored in the RAM 20 using the encryption key and other information. Execute a mathematical algorithm. By way of example, RAM 20 stores personal health records, financial records, and personal identification identifiers, such as fingerprints and retinal eyeprints. The personal data is transferred from the RAM 20 to the MAC 24 via the system bus 15 and from the MAC 24 to the FMHA 26 via the data host bus 25.
Is forwarded to FMHA 26 encrypts data received on data host bus 25 using functions including modular multiplication, addition, subtraction and exponentiation. After data encryption, the encrypted personal data is transferred from FMHA 26 to UART 14 and I / F block 12. Encrypted personal data is transmitted via RF signals for contactless smart cards and 1 for contact smart cards.
Released to the terminal through a set of I / O pins.

【0010】 図2は、インターネットを介してFMHAブロックを含む集積回路とやりとりされ
ているデータを示す図である。キーボード30が、中央処理装置(CPU)34へ
のデータ入力を行うためのインタフェースをユーザに提供する。モニタ32は、
ユーザがCPU34に格納されるデータを視覚的に表示することを可能にする。集
積回路36は、フォスタ−モンゴメリ・アルゴリズムを実行する暗号化回路構成
を備える。CPU34に格納されるデータは、データ・バスを介して集積回路36
に転送されて暗号化され、暗号データがインターネット38に転送される。また
、インターネット38を介して受信されるデータは集積回路36に転送され暗号
解読することができる。このように、図2は、インターネットなどの通信網にイ
ンタフェースする暗号化システムを示す。
FIG. 2 is a diagram showing data exchanged with an integrated circuit including an FMHA block via the Internet. A keyboard 30 provides a user with an interface for inputting data to a central processing unit (CPU). The monitor 32 is
It allows a user to visually display data stored in CPU. The integrated circuit 36 has an encryption circuit configuration for executing the Foster-Montgomery algorithm. Data stored in the CPU 34 is transmitted to the integrated circuit 36 via a data bus.
The encrypted data is transferred to the Internet 38. Data received via the Internet 38 can be transferred to the integrated circuit 36 and decrypted. Thus, FIG. 2 illustrates an encryption system that interfaces to a communication network such as the Internet.

【0011】 図3は、図1のFMHA26に含まれる機能ブロックを示すブロック図である。同
じ要素を示すために図面内では同じ参照番号が用いられることに留意されたい。
さらに、フォスタ−モンゴメリ・アルゴリズムはオペランドA,Bの積を形成す
ることに留意されたい。ただし、オペランドA,Bはいずれも1024ビット数
などの大きな整数である。FMHA26が用いるパイプライン化法により、オペラン
ドA,Bをディジットと呼ばれる複数の規則正しい16ビット数に分割すること
ができる。ディジットには16ビットのデータが含まれるが、これは本発明を制
約するものではない。さらに、オペランドAの数の集合内の各々の分割された数
を値Aと呼ぶ。同様に、オペランドBの数の集合内の各々の分割された数を値B
と呼ぶ。値Aの例は、A0,A1,...A63であり、値Bの例はB0,B1,...B63である
。ホスト・インタフェース(I/F)ブロック40が値Aと値BとをRAM20からデ
ータ・ホスト・バス25(図1)を介して受信する。値A,BはA/Bランダム・
アクセス・メモリ(RAM)72に格納される。また、I/Fブロック40は、ホスト
・プロセッサすなわちマイクロプロセッサ18(図1)から制御信号を受信し、
これらの信号はFMHA26内のデータ転送を制御する制御回路74によりホスト制
御信号に変換される。
FIG. 3 is a block diagram showing functional blocks included in the FMHA 26 of FIG. Note that the same reference numbers are used in the drawings to indicate the same elements.
Note further that the Foster-Montgomery algorithm forms the product of operands A and B. However, each of the operands A and B is a large integer such as a 1024-bit number. By the pipeline method used by the FMHA 26, the operands A and B can be divided into a plurality of regular 16-bit numbers called digits. The digits include 16 bits of data, but this is not a limitation of the present invention. Further, each divided number in the set of operand A numbers is referred to as a value A. Similarly, each divided number in the set of operand B numbers is represented by the value B
Call. Examples of the value A are A 0 , A 1 ,... A 63 , and examples of the value B are B 0 , B 1 ,. The host interface (I / F) block 40 receives the value A and the value B from the RAM 20 via the data host bus 25 (FIG. 1). Values A and B are A / B random
It is stored in an access memory (RAM) 72. The I / F block 40 also receives control signals from the host processor or microprocessor 18 (FIG. 1),
These signals are converted to host control signals by a control circuit 74 for controlling data transfer in the FMHA 26.

【0012】 制御回路74は、データ・バス41と呼ばれるバスを介して、ホストI/Fブロ
ック40の出力に接続される端末を有する。制御回路74は、ホスト・プロセッ
サから制御信号を受信し、ホストI/Fブロック40とFMHA26内の他のブロック
との間の対話を制御する信号を生成する。
The control circuit 74 has a terminal connected to the output of the host I / F block 40 via a bus called the data bus 41. The control circuit 74 receives control signals from the host processor and generates signals that control interaction between the host I / F block 40 and other blocks in the FMHA 26.

【0013】 ディジット・ネゲーション・ユニット(DNU: Digit Negation Unit)42は、
データ・バス41を介してホストI/Fブロック40の出力に接続される入力を有
する。値BがDNU42の入力においてデータ・バス41上でA/B RAM72から受信
され、コプロセッサ44の端末46に転送されるか、あるいはDNU42により1
の補数の負数に変換され端末46に転送される。また、コプロセッサ44は、デ
ータ・バス41に接続されA/B RAM72から値Aを受信する端末48を有する。
コプロセッサ44の端末50,52は、それぞれ部分積値と値Nとを受信するた
めに結合される。オペランドNは、すべての演算の係数であり、数学的計算が有
効な有限界を定義する。そのため可能な数の範囲は、係数により制限される。
The digit negation unit (DNU: Digit Negation Unit) 42
It has an input connected to the output of the host I / F block 40 via the data bus 41. The value B is received from the A / B RAM 72 on the data bus 41 at the input of the DNU 42 and transferred to the terminal 46 of the coprocessor 44 or
And is transferred to the terminal 46. The coprocessor 44 also has a terminal 48 connected to the data bus 41 for receiving the value A from the A / B RAM 72.
The terminals 50, 52 of the coprocessor 44 are coupled to receive the partial product value and the value N, respectively. Operand N is the coefficient of all operations and defines the bounds for which mathematical calculations are valid. The range of possible numbers is therefore limited by the coefficients.

【0014】 コプロセッサ44は、フォスタ−モンゴメリ・モジュラ換算アルゴリズムを計
算する。コプロセッサ44は、端末46に接続される第1入力と端末48に接続
される第2入力とを有する乗算器56を備える。加算器回路または加算器58は
、乗算器56の出力に接続される第1入力とコプロセッサ44の端末50に接続
される第2入力とを有する。モジューロ換算器60は、加算器58の出力に接続
される第1入力と、コプロセッサ44の端末52に接続される第2入力とを有す
る。ラッチ62は、モジューロ換算器60の出力に接続される入力とコプロセッ
サ44の端末54に接続される出力とを有する。ラッチ62は、コプロセッサ4
4のある実施例に関しては必要とされない場合もあり、端末46,48,50,
52などの入力に含まれる場合も含まれない場合もある。
The coprocessor 44 calculates a Foster-Montgomery modular conversion algorithm. Coprocessor 44 includes a multiplier 56 having a first input connected to terminal 46 and a second input connected to terminal 48. Adder circuit or adder 58 has a first input connected to the output of multiplier 56 and a second input connected to terminal 50 of coprocessor 44. Modulo converter 60 has a first input connected to the output of adder 58, and a second input connected to terminal 52 of coprocessor 44. Latch 62 has an input connected to the output of modulo converter 60, and an output connected to terminal 54 of coprocessor 44. The latch 62 is connected to the coprocessor 4
4 may not be required for certain embodiments, and terminals 46, 48, 50,
52, etc., may or may not be included.

【0015】 コプロセッサ44の出力端末は、積RAM64の入力に接続される。積RAM64は
、コプロセッサ44が生成する中間データ値の一時的な格納場所を提供する。例
として、積RAM64は、2つの別々のRAMすなわち偶数メモリと奇数メモリを有し
、これらにより1回のサイクル内で二重のアクセスを行うことができる。たとえ
ば、1サイクルの間に、偶数メモリは、コプロセッサ44が関与する次の計算中
に必要とされるデータを供給し、奇数メモリは、前回の計算でコプロセッサ44
が生成したデータを格納する。次のサイクルで、奇数メモリは、コプロセッサ4
4が関与する次の計算中に必要なデータを供給し、偶数メモリが前回の計算でコ
プロセッサ44が生成したデータを格納する。このようにして、偶数メモリと奇
数メモリが、各サイクル毎に交代して読取モードと書込モードになり、メモリが
同一サイクルの間に両方とも読取モードまたは書込モードになることはない。積
RAM64の偶数メモリと奇数メモリは両方とも、各々が16ビットのデータ(デ
ィジット)を格納する32の行に編成される。
An output terminal of coprocessor 44 is connected to an input of product RAM 64. Product RAM 64 provides a temporary storage location for intermediate data values generated by coprocessor 44. By way of example, product RAM 64 has two separate RAMs, an even memory and an odd memory, which allow for double access within a single cycle. For example, during one cycle, the even memory supplies the data needed during the next calculation involving the coprocessor 44 and the odd memory stores the coprocessor 44 in the previous calculation.
Stores the data generated by. In the next cycle, the odd memory is
4 provides the necessary data during the next calculation involving, and the even memory stores the data generated by coprocessor 44 in the previous calculation. In this way, the even and odd memories alternate between read and write modes each cycle, and neither memory is in read or write mode during the same cycle. product
Both the even and odd memories of RAM 64 are organized into 32 rows, each storing 16 bits of data (digits).

【0016】 積RAM64の出力は、データ・スイッチ・ユニット(DSU:Data Switch Unit)
68の第1入力に接続される。DSU68の第2入力は、データ・バス41に接続
される。DSU68の出力は、コプロセッサ44の端末50に接続される。かくし
て、データ・バス41からのデータまたは積RAM64からのデータのいずれか一
方が部分積値としてDSU68内で選択され、コプロセッサ44の端末50に転送
される。また、積RAM64からのデータは、データ・バス41にも転送すること
ができる。
The output of the product RAM 64 is a data switch unit (DSU).
68 is connected to a first input. A second input of DSU 68 is connected to data bus 41. The output of DSU 68 is connected to terminal 50 of coprocessor 44. Thus, either the data from data bus 41 or the data from product RAM 64 is selected in DSU 68 as a partial product value and transferred to terminal 50 of coprocessor 44. The data from the product RAM 64 can also be transferred to the data bus 41.

【0017】 N RAM70は、データ・バス41に接続され、コプロセッサ44が用いる数体
系のための係数値を受信する入力を有する。N RAM70は、たとえば、各々が1
6ビットのデータを格納する64の行に編成される。N RAM70の出力は、ディ
ジット比較ユニット(DCU:Digit Compare Unit)66の第1入力に接続される
。DCU66の第2入力は、データ・バス41に接続される。DCU66の出力は、コ
プロセッサ44の端末52に接続される。かくして、データ・バス41からのデ
ータまたはN RAM70からのデータのいずれか一方が、DCU66内で値Nとして選
択され、コプロセッサ44の端末52に転送される。また、データは、N RAM7
0からデータ・バス41を介してDCU66にも転送することができる。
N RAM 70 is connected to data bus 41 and has an input for receiving coefficient values for the number system used by coprocessor 44. N RAM 70 has, for example, 1
It is organized into 64 rows that store 6 bits of data. An output of the N RAM 70 is connected to a first input of a digit compare unit (DCU) 66. A second input of DCU 66 is connected to data bus 41. The output of DCU 66 is connected to terminal 52 of coprocessor 44. Thus, either data from the data bus 41 or data from the N RAM 70 is selected as the value N in the DCU 66 and transferred to the terminal 52 of the coprocessor 44. Data is stored in N RAM7
0 can be transferred to the DCU 66 via the data bus 41.

【0018】 AセクションとBセクションとを有するA/B RAM72は、データ・バス41に
接続され、数学的演算のためのソース・オペランドを受信する。例として、A/B
RAM72は、Aセクション内に1024ビットを有する第1オペランドのディジ
ットのすべて、すなわち被分割オペランドAの値Aの64のディジットを格納す
る。同様に、A/B RAM72は、Bセクション内に1024ビットを有する第2オ
ペランドのディジットのすべて、すなわち被分割オペランドBの値Bの64のデ
ィジットを格納する。このようにして、A/B RAM72は、コプロセッサ44の端
末48に転送される値Aの64ディジットと、DNU42の入力に転送される値B
の64ディジットとを格納する。あるいは、A/B RAM72は、オペランドAを格
納するものとオペランドBを格納するものとの2つの別々のメモリとしてもよい
。さらに、本発明においては、A/B RAM72のBセクションは、暗号化動作が終
了した後のオペランドA,Bの乗算の最終的な積を格納する。積RAM64の出力
は、最終積が計算されると、DSU68内でデータ・バス41に転送される。ホス
トI/Fブロック40は、A/B RAM72のBセクションに格納される最終積すなわち
被暗号化データをデータ・ホスト・バス25に転送することができる。
An A / B RAM 72 having an A section and a B section is connected to the data bus 41 and receives source operands for mathematical operations. For example, A / B
The RAM 72 stores all digits of the first operand having 1024 bits in the A section, that is, 64 digits of the value A of the operand A to be split. Similarly, the A / B RAM 72 stores all of the digits of the second operand having 1024 bits in the B section, ie, 64 digits of the value B of the operand B to be split. In this way, the A / B RAM 72 stores the 64 digits of the value A transferred to the terminal 48 of the coprocessor 44 and the value B transferred to the input of the DNU 42.
And 64 digits are stored. Alternatively, the A / B RAM 72 may be two separate memories, one for storing operand A and one for storing operand B. Further, in the present invention, the B section of the A / B RAM 72 stores the final product of the multiplication of the operands A and B after the end of the encryption operation. The output of product RAM 64 is transferred to data bus 41 in DSU 68 once the final product has been calculated. The host I / F block 40 can transfer the final product, that is, the encrypted data stored in the B section of the A / B RAM 72 to the data host bus 25.

【0019】 FMHA26は、暗号化および暗号解読のためのオペランドA,Bの乗算を実行す
る。オペランドA,Bは、数値データまたはアメリカ規格協会情報交換標準コー
ド(アスキー符号(ASCII:American Standard Code for Information Intercha
nge))または他の変換済みキャラクタ集合を利用する序数詞に変換される通常
のテキスト・ストリングとすることができる。FMHA26は、このデータをバイナ
リ整数全数として扱う。モジュラ乗算のためのモンゴメリ換算アルゴリズムは、
次の形式をとる: (A*R mod N)(B*R mod N)+↓*N ただし:Aは第1オペランドで整数; Bは第2オペランドで整数; Nは奇数値を有する整数; mod Nは、有限界の要素数を定義する(A*B*R)の剰余数; RはNの値より大きな値を有する2の整数べき数;および ↓は、(A*R mod N)(B*R mod N)+↓*Nが上位ビットを失わずにRで除算する
ことができる整数になるように計算される換算値である。
The FMHA 26 performs multiplication of operands A and B for encryption and decryption. Operands A and B are numeric data or an American Standards Code Information Exchange Standard Code (ASCII).
nge)) or any other text string that is converted to an ordinal utilizing another converted character set. The FMHA 26 treats this data as a binary integer whole number. The Montgomery conversion algorithm for modular multiplication is
Takes the form: (A * R mod N) (B * R mod N) + ↓ * N where: A is an integer in the first operand; B is an integer in the second operand; N is an integer having an odd value; mod N is the remainder of (A * B * R) that defines the bounded number of elements; R is an integer power of 2 having a value greater than the value of N; and ↓ is (A * R mod N) (B * R mod N) + ↓ * is a conversion value calculated so that N is an integer that can be divided by R without losing the upper bits.

【0020】 FMHA26の概念を利用するある例においては、2つの1024ビット・オペラ
ンドをパイプライン化法およびコプロセッサ44内の複数のパスまたは回転を用
いて乗算する。このとき、2つの16ビット・バイナリ数が乗算器56により乗
算される。しかし、本発明は1024ビットのオペランドにも、2つの16ビッ
ト・バイナリ数を乗算するハードウェア乗算器にも制約されない。簡単にして説
明を行うために、フォスタ−モンゴメリ・モジュラ換算アルゴリズムを、2つの
小さな数を乗算する以下の例を用いて説明する。モンゴメリ法は、オペランドA
,BをRで予め乗算することによりモンゴメリ形式に変換して、ハードウェア。
モジュラ換算の問題を簡単にする。
In one example utilizing the FMHA 26 concept, two 1024-bit operands are multiplied using a pipelined approach and multiple passes or rotations within coprocessor 44. At this time, the two 56-bit binary numbers are multiplied by the multiplier 56. However, the invention is not limited to 1024-bit operands or hardware multipliers that multiply two 16-bit binary numbers. For simplicity, the Foster-Montgomery modular conversion algorithm will be described using the following example of multiplying two small numbers. The Montgomery method uses operand A
, B are pre-multiplied by R to convert to Montgomery format and hardware.
Simplify modular conversion problems.

【0021】 底2の数を用いて、項(A*R mod N)は、A10=9,R10=16およびN10=13
のとき0001の値を有する。さらに、項(B*R mod N)は、B10=11,R10
16およびN10=13のとき0111の値を有する。以下の例では、フォスタ−
モンゴメリ換算アルゴリズムを(A*R mod N)の乗算、すなわち(0001)と
(B*R mod N)すなわち(0111)に用いる。
Using the base 2 number, the terms (A * R mod N) are: A 10 = 9, R 10 = 16 and N 10 = 13
Has a value of 0001. Further, the term (B * R mod N) is B 10 = 11, R 10 =
It has a value of 0111 when 16 and N 10 = 13. In the following example, the foster
The Montgomery conversion algorithm is used for multiplication of (A * R mod N), that is, (0001) and (B * R mod N), that is, (0111).

【0022】 乗算器56は、2つのデータ値を乗算し、これらのデータ値の積が加算器58
に転送される。加算器58は、前回の部分積と乗算器56から生成される積との
合計値を生成する。フォスタ−モンゴメリ換算アルゴリズムにおいては、合計値
の特定のビット位置の論理値が、合計値が換算されるべきか否かを決定する。最
初は、特定のビット位置が最も右側のビット位置、すなわち第1合計値の最下位
データ・ビットにある。第2データ値のビット位置の値を第1データ値に乗算す
ると、すなわちビット掛け算の後で、特定のビット位置が左側に1ビット位置だ
け移動する。このため、ビット掛け算を生成するたびに、合計値内の特定のビッ
ト位置は左側に1ビット位置だけ移動される。すなわち最下位ビット位置から最
上位ビット位置に向かって移動する。
The multiplier 56 multiplies two data values, and the product of these data values is added to an adder 58
Is forwarded to The adder 58 generates a total value of the previous partial product and the product generated from the multiplier 56. In the Foster-Montgomery conversion algorithm, the logical value of a particular bit position in the sum determines whether the sum should be converted. Initially, a particular bit position is in the rightmost bit position, ie, the least significant data bit of the first sum. Multiplying the value of the bit position of the second data value by the first data value, ie, after bit multiplication, moves the particular bit position one bit position to the left. Thus, each time a bit multiplication is generated, a particular bit position in the sum is shifted one bit position to the left. That is, it moves from the least significant bit position to the most significant bit position.

【0023】 フォスタ−モンゴメリ換算アルゴリズムにおいては、特定のビット位置のデー
タ・ビット値が論理1の値を有するとき、Nの値は、シフト演算により特定のビ
ット位置に整合され、その合計値に加算される。ビット掛け算毎に特定のビット
位置における論理値をチェックし、Nの値を適切に整合および加算することによ
り、コプロセッサ44の出力で生成される各部分積は、コプロセッサ44内の回
転毎に適切に換算される。一方で、Nの値は特定のビット位置のデータ・ビット
値が論理0値を有する場合は、合計値に加算されない。論理0値は、特定のビッ
ト位置の値がすでに換算されており、Nのある倍数が(の成分でないことを示す
In the Foster-Montgomery conversion algorithm, when the data bit value at a particular bit position has a logical 1 value, the value of N is matched to the particular bit position by a shift operation and added to the sum. Is done. By checking the logical value at a particular bit position for each bit multiplication and properly matching and adding the value of N, each partial product produced at the output of coprocessor 44 is Converted appropriately. On the other hand, the value of N is not added to the sum if the data bit value at a particular bit position has a logical zero value. A logical zero value indicates that the value at the particular bit position has already been converted and that some multiple of N is not a component of (.

【0024】 この例では、乗算器56は値(A*R mod N)すなわち(0001)と値(B*R m
od N)すなわち(0111)の積を生成する。値(0001)に(011)の
最下位ビットすなわち論理1値を乗算することにより、第1ビット掛け算が生成
される。ビット掛け算を生成する各乗算毎に、その結果が格納される部分積と合
算される。格納される部分積は最初は0であるので、第1合計値とビット掛け算
とは等しい値を有することに留意されたい。
In this example, the multiplier 56 calculates the value (A * R mod N), that is, (0001) and the value (B * R m
od N), that is, the product of (0111). The first bit multiplication is generated by multiplying the value (0001) by the least significant bit of (011 1 ), that is, a logical 1 value. For each multiplication that produces a bit multiplication, the result is summed with the stored partial product. Note that the first sum value and the bit multiplication have equal values because the stored partial product is initially zero.

【0025】 (1) 0001 ← 初期値(A*R mod N) (2)x0001 ← (B*R mod N)の最下位ビット (3) 0001 ← 第1ビット掛け算 フォスタ−モンゴメリ換算アルゴリズムを用いて、合計値の特定のビット位置
のデータの論理値により、Nの値を合計値に加算して、生成されている部分積を
換算すべきか否かが決まる。この例では、第1ビット掛け算(000)の最下
位ビットは、論理1値を有し、従って、N(4)の値が第1ビット掛け算(3)
に加算される。
(1) 0001 ← Initial value (A * R mod N) (2) Least significant bit of x 0001 ← (B * R mod N) (3) 0001 ← First bit multiplication Using Foster-Montgomery conversion algorithm The logical value of the data at a specific bit position of the total value determines whether the value of N should be added to the total value to convert the generated partial product. In this example, the least significant bit of the first bit multiplication (000 1 ) has a logical one value, so the value of N (4) is the first bit multiplication (3)
Is added to

【0026】 (3) 0001 ← 第1ビット掛け算の積 (4) +1101 ← Nの値 (5) 1110 ← 第1ビット換算後の結果 第2ビット掛け算は、(1)に(B*R mod N)の右から第2番目のビット(0
1)を乗算する。
(3) 0001 ← product of first bit multiplication (4) + 1101 ← value of N (5) 1110 ← result after conversion of first bit The second bit multiplication is performed by adding (B * R mod N) from the right of the second bit (0
Multiply 1 1 1).

【0027】 (1) 0001 ← 初期値 (6) x000 ← (B*R mod N)の右から2番目のビット (7) 0010 ← 第2ビット掛け算の積 第2ビット掛け算の積(7)は、格納された前回の結果(5)と合算されて、
第2合計値(8)を生成する。
(1) 0001 ← Initial value (6) x00 10 ← The second bit from the right of (B * R mod N) (7) 0010 ← Product of second bit multiplication Product (7) ) Is added to the stored previous result (5),
Generate a second sum (8).

【0028】 (7) 0010 ← 第2ビット掛け算の積 (5) 1110 ← 第1ビット換算後の結果 (8) 10000 ← 第2合計値 この場合も、フォスタ−モンゴメリ換算アルゴリズムにおいては、第2合計値
の特定のビット位置の論理値が、第2合計値を換算すべきか否かを決める。この
場合、特定のビット位置は、最下位データ・ビットの左側の位置(1000)
である。第2データ・ビットは論理0値を有し、従って、Nの値は第2合計値に
加算されない。言い換えると、第2合計値はすでに換算されており、シフトされ
るN値の加算を必要としない。
(7) 0010 ← The product of the multiplication of the second bit (5) 1110 ← The result after the conversion of the first bit (8) 10000 ← The second sum value In this case, the second sum is also used in the Foster-Montgomery conversion algorithm The logical value of a particular bit position of the value determines whether to convert the second sum. In this case, the particular bit position is the position to the left of the least significant data bit (100 0 0)
It is. The second data bit has a logical zero value, so the value of N is not added to the second sum. In other words, the second sum has already been converted and does not require the addition of the shifted N values.

【0029】 第3ビット掛け算は、(1)に(B*R mod N)の右から3番目のビット(0
11)に位置する論理値を乗算する。
In the third bit multiplication, (1) is added to the third bit from the right of (B * R mod N) (0 1
Multiply the logical value located in 11).

【0030】 (1) 0001 ← 初期値 (9) x001 ← (B*R mod N)の右から3番目のビット (10) 0100 ← 第3ビット掛け算の積 第3ビット掛け算の後で、第3ビット掛け算の積(10)が前回の結果(8)
に加算されて、第3合計値(11)が得られる。
(1) 0001 ← Initial value (9) x00 0 1 ← Third bit from the right of (B * R mod N) (10) 0100 ← Product of third bit multiplication After the third bit multiplication, The product of the third bit multiplication (10) is the previous result (8)
To obtain a third total value (11).

【0031】 (10) 0100 ← 第3ビット掛け算の積 (8) +10000 ← 前回の結果 (11)010100 ← 第3合計値 第3ビット掛け算の積(10)を前回の結果(8)と加算した後は、第3合計
値の特定のビット位置の論理値が、合計値を換算すべきか否かを決める。この例
では、特定のビット位置は右から3番目のビット位置(01000)である。
第3合計値の特定のビット位置が論理1値を有するとき、Nの値は第3特定ビッ
ト位置に整合され、第3合計値に加算される。一方で、第3合計値の第3特定ビ
ット位置が論理0を有するときは、Nの値は第3合計値には加算されない。この
例では、第3合計値の右から3番目のビット位置(1000)が論理1値を有
し、Nの値は右から3番目のビット位置に整合されて第3合計値に加算される。
(10) 0100 ← The product of the third bit multiplication (8) +10000 ← Previous result (11) 010100 ← Third total value The product (10) of the third bit multiplication is added to the previous result (8) Thereafter, the logical value at a particular bit position in the third sum determines whether the sum should be converted. In this example, the specific bit position is the third bit position from the right (010 1 00).
When a particular bit position of the third sum has a logical one value, the value of N is aligned to the third particular bit position and added to the third sum. On the other hand, if the third specific bit position of the third sum has a logical zero, the value of N is not added to the third sum. In this example, the third bit position (10 1 00) from the right of the third sum has a logical 1 value, and the value of N is aligned with the third bit position from the right and added to the third sum. Is done.

【0032】 (11) 010100 ← 第3合計値 (12)+1101 ← 正しく整合されるNの値 (13)1001000 ← 第3ビット換算の結果 第4ビット掛け算の生成は、(1)に(B*R mod N)の右から4番目のビット
111)に位置する論理値を乗算する。
(11) 010100 ← Third Total Value (12) + 1101 ← Correctly Matched N Value (13) 1001000 ← Result of Third Bit Conversion The generation of the fourth bit multiplication is performed by adding (B) to (1). * R mod N) is multiplied by the logical value located in the fourth bit ( 0 111) from the right.

【0033】 (1) 0001 ← 初期値 (14) x000 ← (B*R mod N)の右から4番目のビット (15) 0000 ← 第4ビット掛け算の積 第4ビット掛け算の後で、第4ビット掛け算の積(15)が前回の結果(13
)に加算されて、第4合計値(16)が得られる。
(1) 0001 ← Initial value (14) x000 0 ← Fourth bit from the right of (B * R mod N) (15) 0000 ← Product of fourth bit multiplication After the fourth bit multiplication, The product of the 4-bit multiplication (15) is the previous result (13
) To obtain a fourth total value (16).

【0034】 (15) 0000 ← 第4ビット掛け算の積 (13)1001000 ← 前回の結果 (16)1001000 ← 第4合計値 第4合計値(16)の第4特定ビット位置が論理1または論理0値であるかチ
ェックされる。この例については、第4合計値(16)の第4特定ビット位置は
、右から4番目のビット位置(100000)である。この例では、右から4
番目のビット位置(100000)は論理1値を有し、従って、Nの値が右か
ら4番目のビット位置に整合され、第4合計値に加算される。
(15) 0000 ← The product of the fourth bit multiplication (13) 1001000 ← Previous result (16) 1001000 ← Fourth total value The fourth specific bit position of the fourth total value (16) is logic 1 or logic 0 The value is checked. For this example, the fourth specific bit position of the fourth sum (16) is the fourth bit position from the right (100 1 000). In this example, 4
The fourth bit position (100 1 000) has a logical 1 value, so the value of N is aligned with the fourth bit position from the right and added to the fourth sum.

【0035】 (16)01001000 ← 第4合計値 (17)+1101 ← 正しく整合されるNの値 (18)10110000 ← 第4ビット換算の結果 (A*R mod N)と(B*R mod N)すなわち(0001)と(0111)の積は、
(A*B*R2 mod N)すなわち(10110000)の値を有する。(A*B*R2 mod N
)をRで除算すると、(A*B*R mod N)すなわち(1011)となる。Rの値は
底2の整数倍として選択されることに注目されたい。言い換えると、Rは21
2,23,...,2Iなどの値しか持たないことになる。ただしIは整数であ
る。この例については、Rは24の値を有するように選択される。通常、Rは2S の値を有するよう選択される。ただしSは係数Nのビット数である。このため、
Rで除算する演算は、I回だけ積を右にシフトさせるという簡単な動作で実行さ
れる。さらに、Rで除算した後の値(A*B*R mod N)はモンゴメリ形式、すなわ
ち(値*R)mod Nの形式にある。モンゴメリ形式の値(A*B*R mod N)は、コプ
ロセッサ44内の複数のパスを可能にする。コプロセッサ44が利用するパイプ
ライン化法は、A,B,R,Nの値が大きいときに(A*R mod N)と(B*R mod N
)とを掛け算するための効率的な方法となる。
(16) 01001000 ← Fourth Total Value (17) + 1101 ← Correctly Matched N Value (18) 10110000 ← Fourth Bit Conversion Result (A * R mod N) and (B * R mod N) ) That is, the product of (0001) and (0111) is
It has a value of (A * B * R 2 mod N), that is, (1010000). (A * B * R 2 mod N
) Divided by R gives (A * B * R mod N), that is, (1011). Note that the value of R is chosen as an integer multiple of base 2. In other words, R is 2 1 ,
2 2, 2 3,. . . , 2 I, etc. Here, I is an integer. For example, R is selected to have a value of 2 4. Usually, R represents is selected to have a value of 2 S. Here, S is the number of bits of the coefficient N. For this reason,
The operation of dividing by R is performed by a simple operation of shifting the product rightward I times. Furthermore, the value (A * B * R mod N) after division by R is in Montgomery format, that is, (value * R) mod N. The value in Montgomery format (A * B * R mod N) allows for multiple passes within coprocessor 44. When the values of A, B, R, and N are large, (A * R mod N) and (B * R mod N)
) Is an efficient way to multiply

【0036】 モンゴメリ換算アルゴリズムとは対照的に、フォスタ−モンゴメリ換算アルゴ
リズムにおける↓の値は、2つのオペランドの乗算前には計算されないが、前述
の例に示されるように、各ビット掛け算が前回の結果に合算された後で換算が行
われる。Nの値は奇数である、すなわちNの値は最下位ビットの位置において論
理1を有することに注目されたい。特定のビット位置の論理値が論理1値を有す
るときに合計値にNを加算することにより、値(A*B*R2 mod N)は、さらに下位
のビット位置にいくつかの0を有して生成される。言い換えると、フォスタ−モ
ンゴメリ換算アルゴリズムは、少なくとも最下位ビット位置の数Iに論理0値を
持たせる。
In contrast to the Montgomery conversion algorithm, the value of ↓ in the Foster-Montgomery conversion algorithm is not calculated before multiplication of the two operands, but as shown in the above example, each bit multiplication is Conversion is performed after summing up the results. Note that the value of N is odd, that is, the value of N has a logical one at the least significant bit position. By adding N to the sum when the logical value at a particular bit position has a logical one value, the value (A * B * R 2 mod N) has some zeros at lower bit positions. Generated. In other words, the Foster-Montgomery conversion algorithm assigns a logical 0 value to at least the number I of the least significant bit position.

【0037】 データが(A*B*R mod N)の形式にあるコプロセッサ44を通じた演算の後で
は、データに関して望ましい最終的形式は(A*B mod N)である。例の(A*B*R m
od N)の値は(1011)である。値(A*B*R mod N)は、Rによる除算に備え
て換算される。(A*B*R mod N)の換算は、Nの最下位ビット位置を(A*B*R mod
N)の値の論理1を有する最も右側のビット位置に整合することである。例とし
て、値(A*B*R mod N)は、最も右側のビット位置に論理1値を有する(101
)。Nの値を正しく整合し、(A*B*R mod N)と合算した後で、第1ビット換
算後の合計値は11000の値を有する。
After the operation through the coprocessor 44 where the data is in the form (A * B * R mod N)
Is the desired final form for the data is (A * B mod N). Example (A * B * R m
od N) is (1011). The value (A * B * R mod N) is ready for division by R
Is converted. To convert (A * B * R mod N), the least significant bit position of N is calculated as (A * B * R mod N).
 N) is to match the rightmost bit position with a logical 1 of the value. As an example
Thus, the value (A * B * R mod N) has a logical 1 value in the rightmost bit position (101
1). After correctly matching the value of N and summing with (A * B * R mod N), the first bit conversion
The calculated sum has a value of 11,000.

【0038】 (19) 1011 ← (A*B*R mod N)の値 (20) +1101 ← Nの値 (21) 11000 ← 第1ビット換算後の新しい合計値 新しい合計値の換算は、Nの最下位ビット位置を論理1値を有する新しい合計
値の最も右側のビット位置(1000)に整合する。第2ビット換算後の値は
(10000000)である。
(19) 1011 ← (A * B * R mod N) value (20) + 1101 ← N value (21) 11000 ← New total value after first bit conversion The conversion of the new total value is N To the rightmost bit position (1 1 000) of the new sum value having a logical 1 value. The value after the second bit conversion is (10000000).

【0039】 (21) 11000 ← 第1ビット換算後の値 (22) +1101 ← Nの値 (23) 10000000 ← 第2ビット換算後の値 最下位ビット位置のビット数Iが論理0値を有するとき、(A*B*R mod N)の
値は換算され、Rによる除算に備える。言い換えると、Rで除算する演算が換算
後の合計値をI回だけ右にシフトする動作に変わる。ただしIはこの例では4で
ある。
(21) 11000 ← value after conversion of first bit (22) +1110 ← value of N (23) 10000000 ← value after conversion of second bit The number of bits I at the least significant bit position has a logical 0 value At this time, the value of (A * B * R mod N) is converted and prepared for division by R. In other words, the operation of dividing by R changes to an operation of shifting the converted total value rightward I times. However, I is 4 in this example.

【0040】 (23) 10000000 ← 第2ビット換算後の値 (24) Rで除算またはI回右にシフトする。(23) 10000000 ← Value after conversion to second bit (24) Divide by R or shift right I times.

【0041】 かくして、Rでの除算後、被暗号化データは(1000)の値を有し、フォス
タ−モンゴメリ換算アルゴリズムは(A*B*R mod N)x(A*B mod N)の乗算に用
いられる。この例の段階19〜24は、Rによる除算を行い、これで値(A*B*R
mod N)が(A*B mod N)に換算される。実際には、この最終的なRによる除算は
、(A*B*R mod N)に1を掛けて換算することにより行われる。
Thus, after division by R, the data to be encrypted has a value of (1000) and the Foster-Montgomery conversion algorithm uses the multiplication of (A * B * R mod N) × (A * B mod N) Used for Steps 19-24 of this example perform a division by R, which yields the value (A * B * R
mod N) is converted to (A * B mod N). In practice, this final division by R is performed by multiplying (A * B * R mod N) by one for conversion.

【0042】 動作中、A/B RAM72は、64の値すなわちA0,A1,...A63を有するオペランド
Aと、64個の値すなわちB0,B1,...B63を有するオペランドBとを伴って、ホス
トI/Fブロック40を通じてロードされる。1024ビット・オペランドAは6
4個のディジットA63〜A0が含まれる。ただし各ディジットは16ビットのデー
タを有する。かくして、A/B RAM64のAセクションには64行があり、102
4ビット・オペランドA全体を格納することができ、またA/B RAM64のBセク
ションには64行があり、1024ビット・オペランドB全体を格納することが
できる。さらに、N RAM70はホストI/Fブロック40を通じてロードされ、N63
〜N0の64ディジットに分割される1024ビットを有する。
In operation, A / B RAM 72 stores operand A having 64 values, ie, A 0 , A 1 ,... A 63 , and 64 values, ie, B 0 , B 1 ,. With the operand B having, it is loaded through the host I / F block 40. 1024-bit operand A is 6
Four digits A 63 -A 0 are included. However, each digit has 16 bits of data. Thus, section A of A / B RAM 64 has 64 rows and 102
The entire 4-bit operand A can be stored, and the B section of the A / B RAM 64 has 64 rows and can store the entire 1024-bit operand B. Further, the N RAM 70 is loaded through the host I / F block 40 and the N 63
Having 1024 bits are divided into 64 digits of to N 0.

【0043】 乗算器56は、一度に1つのディジットに関してデータ上で働く。従って、暗
号化または暗号解読のためのオペランドA,Bの乗算は、値A,B,Nの下位デ
ィジットをコプロセッサ44に転送することで始まる。コプロセッサ44の端末
48がディジットA0を、コプロセッサ44の端末46がディジットB0を、コプロ
セッサ44の端末52がディジットN0を受信する。値A0とB0の積が乗算器56に
より計算され、16の最下位データ・ビットが加算器58の入力となる。最上位
の16ビットは、乗算器56の搬送チェーンに一時的に格納される。
Multiplier 56 operates on the data one digit at a time. Thus, the multiplication of operands A and B for encryption or decryption begins by transferring the lower digits of values A, B and N to coprocessor 44. The terminal 48 digits A 0 coprocessor 44, the terminal 46 of the coprocessor 44 is the digit B 0, the terminal 52 of the coprocessor 44 receives the digit N 0. The product of the values A 0 and B 0 is calculated by multiplier 56 and the 16 least significant data bits are input to adder 58. The 16 most significant bits are temporarily stored in the transport chain of the multiplier 56.

【0044】 加算器58は、乗算器56から受信した16のデータ・ビットを積RAM64に
格納される16データ・ビット(当初は0)に加算し、合計値を生成する。モジ
ューロ換算器60は、加算器58から16ビット合計値を、N RAM70からディ
ジットN0を受信する。フォスタ−モンゴメリ換算アルゴリズムにおいては、合計
値の特定のビット位置の論理値により合計値を換算すべきか否かが決まる。モジ
ューロ換算器60は、まず特定のビット位置から最下位ビット位置として始まり
、それに続いてビット掛け算する毎に特定のビット位置が左に1ビット位置ずつ
移動する。言い換えると、特定のビット位置が最下位ビットから始まり、ビット
掛け算毎に最上位ビット位置に向かって指数を付けられる。特定のビット位置の
N0の値を正しく整合し、N0を合計値に加えることにより、値A0とB0とを乗算した
第1部分積が換算され、0の値を有する。モジューロ換算器60が生成した部分
積は積RAM64に格納される。また、↓の16ビット値は、特定のビット位置に
見られる論理値に応じて決定され、モジューロ換算器60内に格納される。
The adder 58 adds the 16 data bits received from the multiplier 56 to the 16 data bits (initially 0) stored in the product RAM 64 to generate a total value. Modulo converter 60 receives the 16-bit sum from adder 58 and digit N 0 from N RAM 70. In the Foster-Montgomery conversion algorithm, the logical value of a specific bit position of the total value determines whether to convert the total value. The modulo converter 60 starts with a particular bit position as the least significant bit position, and then moves the particular bit position one bit position to the left for each subsequent bit multiplication. In other words, a particular bit position starts with the least significant bit and is indexed with each bit multiplication toward the most significant bit position. At a particular bit position
Correctly matching the value of N 0, by adding N 0 to the total value, the first partial product obtained by multiplying the value A 0 and B 0 are converted, it has a value of 0. The partial product generated by the modulo converter 60 is stored in the product RAM 64. The 16-bit value of ↓ is determined according to the logical value found at a specific bit position, and stored in the modulo converter 60.

【0045】 第2部分積を生成するには、新たなバイナリ値B1をA/B RAM72からコプロセ
ッサ44に転送して、値A0と乗算する。乗算器56は、値A0とB1との積を計算し
、16の最下位データ・ビットが加算器58の入力となる。加算器58は、乗算
器56から受信した16データ・ビットを積RAM64に格納される16データ・
ビット(当初は0)に加算し、合計値を生成する。モジューロ換算器60は、加
算器58から16ビット合計値を、N RAM70からディジットN1を受信する。モ
ジューロ換算器60は、第1部分積の生成により決定される↓の前回に導かれた
値とN1の値とを利用して、加算器58からの合計値を換算し、第2部分積を生成
する。第2部分積は、積RAM64に格納される。
To generate a second partial product, the new binary value B 1 is transferred from the A / B RAM 72 to the coprocessor 44 and multiplied by the value A 0 . Multiplier 56 calculates the product of the values A 0 and B 1, and the 16 least significant data bits are input to adder 58. The adder 58 converts the 16 data bits received from the multiplier 56 into 16 data bits stored in the product RAM 64.
Add to the bit (initially 0) to generate the sum. Modulo converter 60 receives the 16-bit sum from adder 58 and digit N 1 from N RAM 70. The modulo converter 60 converts the total value from the adder 58 by using the value of N 1 and the value of ↓ determined by the generation of the first partial product, and converts the total value from the second partial product. Generate The second partial product is stored in the product RAM 64.

【0046】 第1群内の部分積の生成を完了するには、A/B RAM72からの値B2〜B63が、順
次コプロセッサ44に転送され、値A0と乗算される。↓の同値を用いて、モジュ
ーロ換算器60は、N RAM70からN2〜N63の対応する値を用いて残りの部分積を
生成する。部分積は、積RAM64に格納される。
To complete the generation of the partial products in the first group, the values B 2 to B 63 from the A / B RAM 72 are sequentially transferred to the coprocessor 44 and multiplied by the value A 0 . Using the same value of ↓, the modulo converter 60 generates the remaining partial products from the N RAM 70 using the corresponding values of N 2 to N 63 . The partial product is stored in the product RAM 64.

【0047】 A0にディジットB0〜B63を乗算して得られる64の部分積を完成させると、A2
にディジットB0〜B63を乗算して得られる第2群の64の部分積が生成される。A 1 ,B0の部分積を生成するにあたり、A1を含む残りの部分積を生成する際に用い
られる↓の値が決定されることに注目されたい。さらに、部分積の残りの群は、
A2にディジットB0〜B63を、A3にディジットB0〜B63...をA63にディジットB0
〜B63を乗算して生成される。B0に関わる部分積が生成されると↓の値が決まり
各群について設定される。ディジットB0がコプロセッサ44の端末46の値であ
るときに↓の値が決定および設定されること、また、出力54に生成される部分
積は0の値を有するよう換算されることに注目されたい。各群は、N0〜N63の対
応値も利用する。
A0Digit B0~ B63Completing the partial product of 64 obtained by multiplyingTwo
Digit B0~ B63Are multiplied to generate a second group of 64 partial products. A 1 , B0In generating the partial product of, A1Used to generate the remaining partial product containing
Note that the value of ↓ is determined. In addition, the remaining groups of the partial product
ATwoDigit B0~ B63And AThreeDigit B0~ B63. . . A63Digit B0
~ B63Is multiplied by B0When the partial product related to is generated, the value of ↓ is determined
Set for each group. Digit B0Is the value of the terminal 46 of the coprocessor 44.
The value of ↓ is determined and set when the
Note that the product is scaled to have a value of zero. Each group is N0~ N63Pair of
The response value is also used.

【0048】 図4は、モジューロ換算器60の一部分のブロック図である。モジューロ換算
器60は、簡潔に説明するために、4x4アレイの加算器として簡略化された形
態で説明される。好適な実施例においては、モジューロ換算器60は、16行と
16列を有する加算器アレイを備える。加算器アレイの行数が列数に一致するこ
とが本発明を制限するものでないことに留意されたい。コプロセッサ44は、正
方形でないモジューロ換算器60の加算器アレイ内で動作することができる。
FIG. 4 is a block diagram of a part of the modulo converter 60. Modulo converter 60 is described in simplified form as a 4x4 array of adders for simplicity. In the preferred embodiment, the modulo converter 60 comprises an adder array having 16 rows and 16 columns. Note that matching the number of rows in the adder array to the number of columns is not a limitation of the present invention. Coprocessor 44 can operate within the adder array of non-square modulo converter 60.

【0049】 モジューロ換算器60の加算器アレイはX列Y行を有する。ただしXとYは整
数である。列X0が第1列であり、加算器90,92,94,96を備える。X1
第2列であり、加算器100,102,104,106を備える。列X2が第3列
であり、加算器110,112,114,116を備える。列X3が第4列であり
、加算器120,122,124,126を備える。加算器90〜96,100
〜106,110〜116,120〜126の各々は、第1および第2データ入
力,搬送入力(CI:carry input),搬送出力(CO: carry output)および合計
出力(S)を有する。
The adder array of the modulo converter 60 has X columns and Y rows. Here, X and Y are integers. Column X 0 is the first column and includes adders 90, 92, 94 and 96. X 1 is the second column, an adder 100, 102, 104, 106. Column X 2 is the third column, an adder 110, 112, 114. Column X 3 is the fourth column, an adder 120, 122, 124, 126. Adders 90 to 96, 100
Each of -106, 110-116, 120-126 has first and second data inputs, a carry input (CI), a carry output (CO), and a total output (S).

【0050】 列X0の加算器90,92,94,96の第1入力は、それぞれ端末80,82
,84,86に接続される。2入力ANDゲート89,91,93,95は、互い
に接続され、またラッチ128のQ出力に接続される第1入力を有する。ANDゲ
ート89,91,93,95の出力は、それぞれ加算器90,92,94,96
の第2入力に接続される。また、加算器90の搬送出力(CO)は加算器92の搬
送入力(CI)に、加算器92の搬送出力は、加算器94の搬送入力に、加算器9
4の搬送出力は、加算器96の搬送入力に接続される。加算器96の搬送出力は
、ラッチ152のデータ入力に接続される。ラッチ152の出力は、加算器90
の搬送入力に接続される。
The first inputs of adders 90, 92, 94, 96 in column X 0 are terminals 80, 82, respectively.
, 84, 86. Two-input AND gates 89, 91, 93, 95 are connected together and have a first input connected to the Q output of latch 128. Outputs of the AND gates 89, 91, 93, and 95 are added to adders 90, 92, 94, and 96, respectively.
Is connected to the second input. The transport output (CO) of the adder 90 is supplied to the transport input (CI) of the adder 92, and the transport output of the adder 92 is supplied to the transport input of the adder 94.
The transport output of 4 is connected to the transport input of adder 96. The carry output of adder 96 is connected to the data input of latch 152. The output of the latch 152 is
Is connected to the transport input.

【0051】 列X1の加算器100,102,104,106の第1入力は、列X0の加算器9
0,92,94,96の個々の出力に接続される。2入力ANDゲート99,10
1,103,105は、互いに接続され、またラッチ132のQ出力に共通して
接続される第1入力を有する。ANDゲート99,101,103,105の出力
は、加算器100,102,104,106の第2入力にそれぞれ接続される。
また、加算器100の搬送出力は加算器102の搬送入力に、加算器102の搬
送出力は加算器104の搬送入力に、加算器104の搬送出力は加算器106の
搬送入力に接続される。加算器106の搬送出力は、ラッチ156のデータ入力
に接続される。ラッチ156の出力は、加算器100の搬送入力に接続される。
The first input of the adders 100, 102, 104, 106 of column X 1 is the adder 9 of column X 0
0, 92, 94, 96 are connected to the individual outputs. 2-input AND gate 99, 10
1, 103 and 105 are connected together and have a first input commonly connected to the Q output of the latch 132. Outputs of the AND gates 99, 101, 103, and 105 are connected to second inputs of adders 100, 102, 104, and 106, respectively.
The transport output of the adder 100 is connected to the transport input of the adder 102, the transport output of the adder 102 is connected to the transport input of the adder 104, and the transport output of the adder 104 is connected to the transport input of the adder 106. The carry output of adder 106 is connected to the data input of latch 156. The output of latch 156 is connected to the carry input of adder 100.

【0052】 列X2の加算器110,112,114,116の第1入力は、列X1の加算器1
00,102,104,106の個々の出力に接続される。2入力ANDゲート1
09,111,113,115は、互いに接続され、またラッチ136のQ出力
に共通して接続される第1入力を有する。ANDゲート109,111,113,
115の出力は、加算器110,112,114,116の第2入力にそれぞれ
接続される。また、加算器110の搬送出力は加算器112の搬送入力に、加算
器112の搬送出力は加算器114の搬送入力に、加算器114の搬送出力は、
加算器116の搬送入力に接続される。加算器116の搬送出力はラッチ160
のデータ入力に接続される。ラッチ160の出力は、加算器110の搬送入力に
接続される。
[0052] The first input of the adder 110, 112, 114, 116 columns X 2 includes an adder 1 column X 1
00, 102, 104, 106. 2-input AND gate 1
09, 111, 113, and 115 are connected together and have a first input commonly connected to the Q output of latch 136. AND gates 109, 111, 113,
The output of 115 is connected to second inputs of adders 110, 112, 114, 116, respectively. The transport output of the adder 110 is the transport input of the adder 112, the transport output of the adder 112 is the transport input of the adder 114, and the transport output of the adder 114 is
Connected to the transport input of adder 116. The transport output of adder 116 is latch 160
Connected to the data input. The output of latch 160 is connected to the transport input of adder 110.

【0053】 列X3の加算器120,122,124,126の第1入力は、列X2の加算器1
10,112,114,116の個々の出力に接続される。2入力ANDゲート1
19,121,123,125は、互いに接続され、またラッチ140のQ出力
に共通して接続される第1入力を有する。ANDゲート119,121,123,
125の出力は、加算器120,122,124,126の第2入力にそれぞれ
接続される。また、加算器120の搬送出力は加算器122の搬送入力に、加算
器122の搬送出力は加算器124の搬送入力に、加算器124の搬送出力は加
算器126の搬送入力に接続される。加算器126の搬送出力は、ラッチ162
のデータ入力に接続される。ラッチ162の出力は、加算器120の搬送入力に
接続される。加算器120,122,124,126の出力Sは、個々の出力端
末164,166,168.170に接続される。
The first input of the adders 120, 122, 124, 126 of column X 3 is the adder 1 of column X 2
10, 112, 114, 116 are connected to the individual outputs. 2-input AND gate 1
19, 121, 123, and 125 are connected together and have a first input commonly connected to the Q output of latch 140. AND gates 119, 121, 123,
The output of 125 is connected to second inputs of adders 120, 122, 124, 126, respectively. The transport output of the adder 120 is connected to the transport input of the adder 122, the transport output of the adder 122 is connected to the transport input of the adder 124, and the transport output of the adder 124 is connected to the transport input of the adder 126. The carry output of the adder 126 is
Connected to the data input. The output of latch 162 is connected to the carrier input of adder 120. The outputs S of the adders 120, 122, 124, 126 are connected to individual output terminals 164, 166, 168.170.

【0054】 さらに、ANDゲート89,101,113,125の第2入力は互いに接続さ
れ、また入力端末81に共通接続される。ANDゲート91,103,115の第
2入力は互いに接続され、さらにラッチ158の入力と入力端末83とに共通接
続される。ANDゲート93,105の第2入力は互いに接続され、さらにラッチ
154の入力と入力端末85とに共通接続される。ANDゲート95の第2入力は
、ラッチ150の入力と入力端末87とに共通接続される。ANDゲート99,1
11,123の第2入力は、互いに接続され、ラッチ150の出力に共通接続さ
れる。ANDゲート109,121の第2入力は互いに接続され、さらにラッチ1
54の出力に共通接続される。ANDゲート119の第2入力は、ラッチ158の
出力に接続される。
Further, the second inputs of the AND gates 89, 101, 113, and 125 are connected to each other and commonly connected to the input terminal 81. The second inputs of the AND gates 91, 103, and 115 are connected to each other, and are further commonly connected to the input of the latch 158 and the input terminal 83. The second inputs of the AND gates 93 and 105 are connected to each other, and are further commonly connected to the input of the latch 154 and the input terminal 85. A second input of the AND gate 95 is commonly connected to the input of the latch 150 and the input terminal 87. AND gate 99,1
The second inputs of 11 and 123 are connected to each other and commonly connected to the output of the latch 150. The second inputs of the AND gates 109 and 121 are connected to each other.
Commonly connected to 54 outputs. A second input of AND gate 119 is connected to the output of latch 158.

【0055】 ラッチ128,132,136,140は、それぞれセット入力(S),リセ
ット入力(R)および出力(Q)を有する。ラッチ128,132,136,1
40は、信号Tが高であり、出力Qの信号が入力Sの信号と同じ値を持つときに
イネーブルになる。出力Qの信号は、信号Tが高論理値から低論理値へと移行す
るとラッチされる。入力Rの信号は、出力Qの信号をリセットする。ラッチ12
8,132,136,140のリセット入力Rは、互いに、また端末79に共通
接続される。端末79は、リセット信号Rを受信するよう結合される。2入力AN
Dゲート130は、ラッチ128のセット入力に接続される出力を有する。ANDゲ
ート130の第1入力は加算器90の第1入力に接続される。2入力ANDゲート
134は、ラッチ132のセット入力に接続される出力を有する。ANDゲート1
34の第1入力は加算器102の第1入力に接続される。2入力ANDゲート13
8は、ラッチ136のセット入力に接続される出力を有する。ANDゲート138
の第1入力は加算器114の第1入力に接続される。2入力ANDゲート142は
、ラッチ140のセット入力に接続される出力を有する。ANDゲート142の第
1入力は加算器126の第1入力に接続される。ANDゲート130,134,1
38,142の第2入力は互いに接続され、また端末78に共通接続される。端
末78は、信号Tを受信するよう結合される。
Each of the latches 128, 132, 136, and 140 has a set input (S), a reset input (R), and an output (Q). Latches 128, 132, 136, 1
40 is enabled when signal T is high and the signal at output Q has the same value as the signal at input S. The signal at output Q is latched when signal T transitions from a high logic value to a low logic value. The signal at input R resets the signal at output Q. Latch 12
The reset inputs R of 8, 132, 136, 140 are commonly connected to each other and to the terminal 79. Terminal 79 is coupled to receive reset signal R. 2-input AN
D-gate 130 has an output connected to the set input of latch 128. A first input of AND gate 130 is connected to a first input of adder 90. Two-input AND gate 134 has an output connected to the set input of latch 132. AND gate 1
A first input of 34 is connected to a first input of adder 102. 2-input AND gate 13
8 has an output connected to the set input of latch 136. AND gate 138
Is connected to the first input of adder 114. Two-input AND gate 142 has an output connected to the set input of latch 140. A first input of AND gate 142 is connected to a first input of adder 126. AND gate 130, 134, 1
The second inputs of 38, 142 are connected together and are commonly connected to terminal 78. Terminal 78 is coupled to receive signal T.

【0056】 動作中は、モジューロ換算器60は、加算器58(図3)を介して乗算器56
から入力を受信し、換算された部分積を生成する。前述の例では、数字0001
と0111とが、フォスタ−モンゴメリ換算アルゴリズムを用いて乗算される。
前述の如く、特定のビット位置の論理値により、Nの値が合計値に整合され加算
されるか否かが決まる。特定のビット値の論理値が論理1値を有するとき、モジ
ューロ換算器60のアーキテクチャがNの値を合計値に整合し、さらにそれに加
算されるようシフトする。これにより、モジューロ換算器60のアーキテクチャ
によって、↓の値を決定して、ラッチ128,132,136,140に格納す
ることができる。言い換えると、↓の値はディジットA,Bの乗算前には決まら
ず、A,Bの特定のディジットの乗算中に決定される。
In operation, modulo converter 60 provides a multiplier 56 via adder 58 (FIG. 3).
Receives input from and generates a reduced partial product. In the example above, the number 0001
And 0111 are multiplied using the Foster-Montgomery conversion algorithm.
As described above, the logical value of a particular bit position determines whether the value of N is matched to the sum and added. When the logic value of a particular bit value has a logic one value, the architecture of the modulo converter 60 shifts the value of N to match and add to the sum value. Thus, the value of ↓ can be determined and stored in the latches 128, 132, 136, 140 according to the architecture of the modulo converter 60. In other words, the value of ↓ is not determined before the multiplication of digits A and B, but is determined during the multiplication of specific digits of A and B.

【0057】 ラッチ128,132,136,140は、信号Rによりリセットされて、Q
出力に論理0値を有する。値0111が乗算器56により生成されて、加算器5
8を介して端末80,82,84,86に転送される。ANDゲート130は、端
末80から合計値の最下位データ・ビットを受信し、論理1値の信号Tと共にラ
ッチ128をセットさせる。すなわち、Q出力の信号が論理1値を有する。信号
Tは、B0が乗算器46に供給されN0の値がモジューロ換算器60に供給される間
は、論理1値を有することに注目されたい。信号Tが論理1力論理0値に移行す
ると、ラッチ128,132,136,140内のデータの論理値がラッチされ
る。N0の値が端末81,83,85,87において供給され、前述の例ではN0
1101の値を有する。N0の最下位データ・ビットが端末81において供給され
る。
The latches 128, 132, 136 and 140 are reset by the signal R,
The output has a logical zero value. The value 0111 is generated by the multiplier 56 and
8 to the terminals 80, 82, 84, 86. AND gate 130 receives the least significant data bit of the sum from terminal 80 and causes latch 128 to be set with a logic one signal T. That is, the signal of the Q output has a logical 1 value. Note that signal T has a logical 1 value while B 0 is provided to multiplier 46 and the value of N 0 is provided to modulo converter 60. When the signal T transitions to a logic one force logic zero value, the logic values of the data in the latches 128, 132, 136, 140 are latched. The value of N 0 is provided at terminals 81, 83, 85, 87, where N 0 has a value of 1101 in the above example. N 0 least significant data bits are provided at terminal 81.

【0058】 ANDゲート89,91,93,95は、論理1値を有する、ラッチ128のQ
出力における信号によりイネーブルになる。このため、端末81,83,85,
87において受信されるN0の値がそれぞれ、加算器90,92,94,96の第
2入力に転送される。第1および第2入力において論理1を有する加算器90は
、論理0値を有する、出力Sにおける合計出力信号を与える。さらに、加算器9
0は、出力COにおいて搬送信号を生成する。加算器92は、端末83の論理0値
に応答して、第1入力において論理0値を受信する。論理1値が加算器92の第
2入力に受信され、論理1値が入力CIにおいて搬送信号に関して受信されると、
出力Sの合計信号は論理0値を有し、出力COの搬送信号は論理1値を有する。
The AND gates 89, 91, 93 and 95 are connected to the Q of the latch 128 having a logical 1 value.
It is enabled by a signal at the output. Therefore, the terminals 81, 83, 85,
The values of N 0 received at 87 are forwarded to the second inputs of adders 90, 92, 94, 96, respectively. Adder 90 having a logic one at the first and second inputs provides a sum output signal at output S having a logic zero value. Further, the adder 9
0 generates a carrier signal at the output CO. Adder 92 receives a logical zero value at a first input in response to the logical zero value of terminal 83. When a logical one value is received at the second input of adder 92 and a logical one value is received for the carrier signal at input CI,
The sum signal at output S has a logic zero value and the carrier signal at output CO has a logic one value.

【0059】 加算器94は、第1入力においてANDゲート93から論理1を、また第2入力
において端末84から論理1を受信する。加算器94の合計出力Sは論理1値を
有し、搬送出力信号は搬送出力COにおいて論理1値を有する。同様に、加算器9
6は、第1入力においてANDゲート95から論理1を、また第2入力において端
末86から論理1を受信する。加算器96の合計出力Sは論理0値を有し、搬送
出力COの搬送信号は論理1値を有する。かくして、加算器90〜96は、加算器
58を通じて乗算器56の合計値を受信することに応答して、0100の値を生
成した。さらに、特定のビット位置、すなわち最下位ビット位置が論理1値を有
し、値1は、フォスタ−モンゴメリ換算アルゴリズムにより、合計値に整合およ
び加算された。
Adder 94 receives a logic one from AND gate 93 at a first input and a logic one from terminal 84 at a second input. The sum output S of the adder 94 has a logic one value, and the carrier output signal has a logic one value at the carrier output CO. Similarly, adder 9
6 receives a logic one from the AND gate 95 at a first input and a logic one from the terminal 86 at a second input. The sum output S of the adder 96 has a logical 0 value, and the carry signal of the carry output CO has a logical 1 value. Thus, adders 90-96 produced a value of 0100 in response to receiving the sum of multiplier 56 through adder 58. Further, a particular bit position, the least significant bit position, has a logical one value, and the value one has been matched and added to the sum by the Foster-Montgomery conversion algorithm.

【0060】 列X1における加算器により生成されるデータは、特定のデータ・ビット位置に
おいてデータに依存する値を有する。この場合の特定のデータ・ビット位置は、
加算器92の出力Sに対応する。ANDゲート134は加算器92の出力Sにおい
て合計信号から論理0値を受信することに注目されたい。ラッチ132はセット
されず、ラッチ132のQ出力は論理0値のままになる。ANDゲート99,10
1,103,105は、それぞれ、加算器100,102,104,106の第
2入力において論理0値を生成する。加算器100は、第1および第2入力の両
方において論理0値を有し、出力Sに論理0値を生成する。同様に、加算器10
2は、第1および第2入力の両方において論理0値を有し、出力Sに論理0値を
生成する。加算器104は、第1入力に論理0値を、第2入力に論理1値を有し
、出力Sに論理1値を生成する。加算器106は、第1および第2入力の両方に
おいて論理0値を有し、出力Sに論理0値を生成する。かくして、列X1内の加算
器は値0100を生成する。
The data generated by the adder in column X 1 has a data-dependent value at a particular data bit position. The specific data bit position in this case is
This corresponds to the output S of the adder 92. Note that AND gate 134 receives a logical zero value from the sum signal at output S of adder 92. Latch 132 is not set and the Q output of latch 132 remains at a logic zero value. AND gate 99, 10
1, 103 and 105 generate logic 0 values at the second inputs of the adders 100, 102, 104 and 106, respectively. Adder 100 has a logic zero value at both the first and second inputs and produces a logic zero value at output S. Similarly, the adder 10
2 has a logic zero value at both the first and second inputs and produces a logic zero value at the output S. The adder 104 has a logical 0 value at a first input and a logical 1 value at a second input, and generates a logical 1 value at an output S. Adder 106 has a logical zero value at both the first and second inputs and produces a logical zero value at output S. Thus, the adder in column X 1 produces the value 0100.

【0061】 列X2における加算器により生成されるデータも、特定のデータ・ビット位置に
おいてデータに依存する値を有する。ANDゲート138は加算器104の出力S
において合計信号から論理1値を受信することに注目されたい。ラッチ136が
セットされ、ラッチ136のQ出力は論理1値を有する。ANDゲート109,1
11,113,115は、ラッチ136により生成される論理1値によりイネー
ブルになる。すなわち、加算器100,102,104,106の出力のデータ
が加算器110,112,114,116の第1入力にそれぞれ転送される。加
算器110は、第1および第2入力の両方において論理0値を有し、出力Sに論
理0値を生成する。同様に、加算器112は、第1および第2入力の両方におい
て論理0値を有し、出力Sに論理0値を生成する。加算器114は、第1および
第2入力の両方において論理1値を有し、出力Sに論理0値を、また出力COの搬
送出力信号について論理1値を生成する。加算器116は、第1および第2入力
の両方において論理0値を、搬送入力に論理1を有し、出力Sに論理1値を生成
する。かくして、列X2内の加算器は値1000を生成する。
The data generated by the adder in column X 2 also has a data-dependent value at a particular data bit position. The AND gate 138 outputs the output S of the adder 104.
Note that a logic one value is received from the sum signal at. Latch 136 is set and the Q output of latch 136 has a logic one value. AND gate 109, 1
11, 113 and 115 are enabled by a logic 1 value generated by latch 136. That is, the output data of the adders 100, 102, 104, and 106 are transferred to the first inputs of the adders 110, 112, 114, and 116, respectively. Adder 110 has a logical zero value at both the first and second inputs and produces a logical zero value at output S. Similarly, adder 112 has a logical zero value at both the first and second inputs and produces a logical zero value at output S. Adder 114 has a logic one value at both the first and second inputs, produces a logic zero value at output S, and a logic one value for the carrier output signal at output CO. Adder 116 has a logical 0 value at both the first and second inputs, a logical 1 at the carry input, and produces a logical 1 value at output S. Thus, the adder in column X 2 generates the value 1000.

【0062】 列X3における加算器により生成されるデータも、特定のデータ・ビット位置に
おいてデータに依存する値を有する。この場合の特定のデータ・ビットは、加算
器116の出力における論理値であることに注目されたい。ANDゲート142は
加算器116の出力Sにおいて合計信号から論理1値を受信する。ラッチ140
がセットされ、ラッチ140のQ出力は論理1値を有する。ANDゲート109,
111,113,115は、ラッチ140により生成される論理1値によりイネ
ーブルになる。すなわち、加算器110,112,114,116の出力のデー
タが加算器120,122,124,126の第1入力にそれぞれ転送される。
加算器120は、第1および第2入力の両方において論理0値を有し、出力Sに
論理0値を生成する。同様に、加算器122は、第1および第2入力の両方にお
いて論理0値を有し、出力Sに論理0値を生成する。加算器124も、第1およ
び第2入力の両方において論理0値を有し、出力Sに論理0値を生成する。加算
器126は、第1および第2入力の両方において論理1値を有し、搬送出力にお
いて搬送出力として論理1値を生成する。かくして、列X3内の加算器は値000
0を生成する。
The data generated by the adder in column X 3 also has a data-dependent value at a particular data bit position. Note that the particular data bit in this case is a logical value at the output of adder 116. AND gate 142 receives a logical 1 value from the sum signal at output S of adder 116. Latch 140
Is set, and the Q output of latch 140 has a logical 1 value. AND gate 109,
111, 113, and 115 are enabled by the logic 1 value generated by the latch 140. That is, the output data of the adders 110, 112, 114, and 116 are transferred to the first inputs of the adders 120, 122, 124, and 126, respectively.
Adder 120 has a logical zero value at both the first and second inputs and produces a logical zero value at output S. Similarly, adder 122 has a logic zero value at both the first and second inputs and produces a logic zero value at output S. Adder 124 also has a logic zero value at both the first and second inputs and produces a logic zero value at output S. Adder 126 has a logic one value at both the first and second inputs and produces a logic one value at the carry output as the carry output. Thus, the adder in the column X 3 is the value 000
Generate 0.

【0063】 列X0,X1,X2,X3内の加算器がAのディジット,ディジットB0およびN0の値
に関する部分積値を換算した後は、↓の値が後の乗算で用いるために決定される
ことに注目されたい。詳しくは、各群の第1部分積が0の値を持つようにさせる
換算プロセスの間に、適切なラッチ128,132,136,140がセットさ
れ、↓に関する値を有する。第1部分積の0への換算後、信号Tは論理1から論
理0値に移行し、↓の値をラッチ128,132,136,140に格納する。
格納された↓の値とN1〜N63の対応する値とが、Aのディジットが乗算器56に
おいてディジットB1〜B63により乗算されるときに用いられる。
After the adders in columns X 0 , X 1 , X 2 , and X 3 have converted the partial product values for the digits of A, digits B 0 and N 0 , the value of ↓ is Note that it is determined to be used. Specifically, during the conversion process that causes the first partial product of each group to have a value of zero, the appropriate latches 128, 132, 136, 140 are set and have a value for ↓. After the conversion of the first partial product to 0, the signal T transitions from a logical 1 to a logical 0 value and stores the value of ↓ in the latches 128, 132, 136, 140.
The stored value of ↓ and the corresponding value of N 1 to N 63 are used when the digit of A is multiplied by the digits B 1 to B 63 in the multiplier 56.

【0064】 例として、デジットA0,B0の積に関する16の最下位データ・ビットを、値N0 を用いてモジューロ換算器60により論理0の16ビットに換算する。モジュー
ロ換算器60は、第1部分積を0値に換算する↓値を決定し格納する。乗算器5
6が値A0,B1に関わる次の部分積を生成する際に用いられる最上位データ・ビッ
トを格納する。モジューロ換算器60は、↓の被格納値とN1の値とを用いて、第
2部分積を生成する。A0とB2〜B63に関する他の積が乗算器56により生成され
、↓の被格納値およびN2〜N63の値とを用いてモジューロ換算器60内で換算さ
れる。
As an example, the 16 least significant data bits for the product of digits A 0 and B 0 are converted to 16 logic zero bits by modulo converter 60 using the value N 0 . The modulo converter 60 determines and stores a ↓ value for converting the first partial product to a zero value. Multiplier 5
6 stores the most significant data bit used in generating the next partial product for the values A 0 and B 1 . Modulo conversion unit 60 uses the value of the stored value and N 1 of ↓, generating a second partial product. Another product for A 0 and B 2 -B 63 is generated by multiplier 56 and converted in modulo converter 60 using the stored value of ↓ and the values of N 2 -N 63 .

【0065】 モジューロ換算器60は、第2群の第1部分積、すなわちA1とB0の積を0値に
換算させる↓の新しい値を決定し格納する。↓のこの新しい値は、A1にB0〜B63
を乗算した部分積の群を生成する際に利用される。これにより、ある群内のすべ
ての部分積の生成に続いて、↓の新しい値が次の群のためにモジューロ換算器6
0により決定される。各群に関して生成される第1部分積は、↓の新しい値によ
り0値を有するよう換算されることに注目されたい。
The modulo converter 60 determines and stores a first partial product of the second group, that is, a new value of ↓ that causes the product of A 1 and B 0 to be converted to a zero value. This new value of ↓ is B 0 to B 63 in A 1
Is used to generate a group of partial products multiplied by. Thus, following the generation of all partial products in one group, the new value of ↓
Determined by 0. Note that the first partial product generated for each group is scaled to have a zero value by the new value of ↓.

【0066】 図5は、図3のコプロセッサで用いられる乗算器56と組み合わせたモジュー
ロ換算器60の部分のブロック図である。乗算器構造または合併型フォスタ−モ
ンゴメリ(F-M)乗算器171は、簡単に説明するために4x4アレイの加算器
として、簡略化された形で説明される。合併型F-M乗算器171は、同数の行と
列を有する加算器アレイとして説明されるが、これは本発明を制約するものでは
ない。図3の乗算器56,加算器58およびモジューロ換算器60の主な機能が
共に、合併型F-M乗算器171により実行されることに注目されたい。
FIG. 5 is a block diagram of a portion of a modulo converter 60 combined with a multiplier 56 used in the coprocessor of FIG. The multiplier structure or merged Foster-Montgomery (FM) multiplier 171 is described in simplified form as a 4x4 array of adders for simplicity. The merged FM multiplier 171 is described as an adder array having the same number of rows and columns, but this is not a limitation of the present invention. Note that the main functions of multiplier 56, adder 58, and modulo converter 60 of FIG. 3 are all performed by merged FM multiplier 171.

【0067】 図5に示される合併型F-M乗算器171の形態は、図4に示されるモジューロ
換算器60の形態と同様である。合併型F-M乗算器171もモジューロ換算器6
0も、列X0内に加算器90,92,94,96を、列X1内に加算器100,10
2,104,106を、列X2内に加算器110,112,114,116を、列
X3内に加算器120,122,124,126を有する。また、ラッチ152,
156,160,162は、次の部分積を生成する際に用いられる搬送出力信号
を格納する。列X0〜X3内の各加算器の入力に接続される出力を有するモジューロ
換算器60のANDゲートは、合併型F-M乗算器171においてはマルチプレクサに
よって置き換えられている。マルチプレクサは加算器の第1入力に接続される出
力を有して図示されるが、代替に、マルチプレクサの出力を加算器の第2入力に
接続することもできる。
The form of the merged FM multiplier 171 shown in FIG. 5 is the same as the form of the modulo converter 60 shown in FIG. Combined FM multiplier 171 is also modulo converter 6
0. The adders 90, 92, 94, 96 in column X 0, the adder in the column X 1 100, 10
2 , 104, 106, adders 110, 112, 114, 116 in column X2,
An adder 120, 122, 124, 126 in the X 3. Latch 152,
156, 160 and 162 store the carrier output signals used when generating the next partial product. AND gates modulo conversion unit 60 having an output connected to an input of each adder in the column X 0 to X 3 is replaced by the multiplexer in the merged type FM multiplier 171. Although the multiplexer is shown with an output connected to a first input of the adder, alternatively, the output of the multiplexer can be connected to a second input of the adder.

【0068】 合併型F-M乗算器171のマルチプレクサ(mux)は、それぞれ4つの入力と、
1つの出力と、2つのセレクタ入力とを有する。詳しくは、mux172,174
,176,178は、それぞれ加算器90〜96に接続される出力を有する。mu
x182,184,186,188は、それぞれ加算器100〜106に接続さ
れる出力を有する。mux192,194,196,198は、それぞれ加算器1
10〜116に接続される出力を有する。mux202,204,206,208
は、それぞれ加算器120〜126に接続される出力を有する。さらに、mux1
72〜178の第1セレクタ入力は共に接続され、mux172〜178の第2セ
レクタ入力は共に接続されて、各muxの4つの入力における4つの信号のうちの
1つを加算器90〜96の対応する第1入力に転送する。同様に、mux182〜
188の第1セレクタ入力は共に接続され、mux182〜188の第2セレクタ
入力は共に接続されて、各muxの4つの入力における4つの信号のうちの1つを
加算器100〜106の対応する第1入力に転送する。mux192〜198の第
1セレクタ入力は共に接続され、mux192〜198の第2セレクタ入力は共に
接続されて、各muxの4つの入力における4つの信号のうちの1つを加算器11
0〜116の対応する第1入力に転送する。mux202〜208の第1セレクタ
入力は共に接続され、mux202〜208の第2セレクタ入力は共に接続されて
、各muxの4つの入力における4つの信号のうちの1つを加算器120〜126
の対応する第1入力に転送する。
The multiplexer (mux) of the merged FM multiplier 171 has four inputs,
It has one output and two selector inputs. For details, mux 172, 174
, 176, 178 have outputs connected to adders 90-96, respectively. mu
x182, 184, 186, 188 have outputs connected to adders 100-106, respectively. mux 192, 194, 196, and 198 are adders 1 respectively.
It has an output connected to 10-116. mux 202, 204, 206, 208
Have outputs connected to adders 120-126, respectively. Furthermore, mux1
The first selector inputs 72-178 are connected together, and the second selector inputs mux 172-178 are connected together to provide one of the four signals at the four inputs of each mux to the corresponding one of adders 90-96. To the first input. Similarly, mux182-
188 are connected together, and the second selector inputs of muxes 182 to 188 are connected together to output one of the four signals at the four inputs of each mux to the corresponding one of the adders 100 to 106. Transfer to one input. The first selector inputs of muxes 192-198 are connected together, and the second selector inputs of muxes 192-198 are connected together to add one of the four signals at the four inputs of each mux to adder 11
Forward to corresponding first inputs 0-116. The first selector inputs of muxes 202-208 are connected together and the second selector inputs of muxes 202-208 are connected together to add one of the four signals at the four inputs of each mux to adders 120-126.
To the corresponding first input.

【0069】 mux172〜178,182〜188,192〜198および202〜208
の4つの入力のうち第1入力が、論理0値を受信するよう結合される。mux17
2〜178の第2入力はディジットBの値を受信し、mux172〜178の第3
入力がNの値を受信する。例として、ディジットA0,B0,N0が合併型F-M乗算器
171に供給される。ディジットB0の最下位データ・ビット、すなわち信号B(
ビット0)がmux172の第2入力に供給される。同様に、ディジットN0の最下
位データ・ビット、すなわち信号N(ビット0)がmux172の第3入力に供給
される。mux172の第4入力は、ビットN0およびB0の最下位データ・ビットの
論理合計値、すなわち信号N+B(ビット0)を受信する。
Mux 172 to 178, 182 to 188, 192 to 198 and 202 to 208
Of the four inputs are coupled to receive a logical zero value. mux17
A second input of 2 to 178 receives the value of digit B and a third input of mux 172 to 178.
The input receives the value of N. As an example, the digits A 0 , B 0 , N 0 are supplied to a merged FM multiplier 171. Least significant data bits of the digit B 0, i.e. signal B (
Bit 0) is provided to the second input of mux 172. Similarly, the least significant data bit of digit N 0 , signal N (bit 0), is provided to the third input of mux 172. fourth input of mux172 the bit N 0 and logic sum of the least significant data bits B 0, that is, receives the signal N + B (bit 0).

【0070】 ディジットB0の次に下位のデータ・ビット、すなわち信号B(ビット1)がmu
x174の第2入力に供給される。同様に、ディジットN0の次に下位のデータ・
ビット、すなわち信号N(ビット1)がmux174の第3入力に供給される。mux
174の第4入力は、ビットN0およびB0の次に下位のデータ・ビットの論理合計
値、すなわち信号N+B(ビット)1を受信する。ディジットB0の次のデータ・ビ
ット、すなわち信号B(ビット2)がmux176の第2入力に供給される。同様
に、ディジットN0の次のデータ・ビット、すなわち信号N(ビット2)がmux1
76の第3入力に供給される。mux176の第4入力は、ビットN0およびB0の次
のデータ・ビットの論理合計値、すなわち信号N+B(ビット2)を受信する。同
様に、合併型F-M乗算器171が4ビットx4ビットの乗算を行うこの例では、
ディジットB0の最上位データ・ビット、すなわち信号B(ビット3)がmux17
8の第2入力に供給される。同様に、ディジットB0の最上位データすなわち信号
B(ビット3)がmux178の第3入力に供給される。mux178の第4入力は、
muxの第2および第3入力に供給される値の論理合計値、すなわちディジットN0
,B0の最上位データ・ビットの和を受信する。各muxの第4入力は、そのmuxの第
2および第3入力に供給される値の論理合計値を受信することに注目されたい。
The next lower data bit after digit B 0 , that is, signal B (bit 1)
x174 is provided to the second input. Similarly, the lower the data of the next digit N 0
A bit, signal N (bit 1), is provided to a third input of mux 174. mux
Fourth input of 174 bits N 0 and the next lower data bits of the logical sum of B 0, that is, receives the signal N + B (bits) 1. Next data bit of the digit B 0, that is, the signal B (bit 2) is supplied to the second input of Mux176. Similarly, the next data bit of the digit N 0, i.e. the signal N (bit 2) is mux1
76 is provided to a third input. The fourth input of mux 176 receives the logical sum of the data bits next to bits N 0 and B 0 , signal N + B (bit 2). Similarly, in this example where the merged FM multiplier 171 performs a 4-bit by 4-bit multiplication,
Most significant data bit of the digit B 0, that is, the signal B (bit 3) is mux17
8 to a second input. Similarly, the top-level data or signals B of the digit B 0 (bit 3) is supplied to the third input of Mux178. The fourth input of mux 178 is
The logical sum of the values supplied to the second and third inputs of mux, ie, digit N 0
, To receive the sum of the most significant data bits of B 0. Note that the fourth input of each mux receives the logical sum of the values provided to the second and third inputs of that mux.

【0071】 mux172〜178の第1セレクタ入力信号が、ラッチ212から受信される
。ラッチ212は、信号Tが論理1から論理0値に移行すると、論理回路210
からデータ信号をラッチする。論理回路210が生成するデータ信号は、信号A
(ビット0)とB(ビット0)の積をP(0)で排他的論理和演算したものであ
る。ただしP(0)は、以前の部分積値の最下位ビットである。mux172〜1
78は、第2セレクタ入力において信号A(ビット0)を受信する。
The first selector input signals of mux 172-178 are received from latch 212. Latch 212 activates logic circuit 210 when signal T transitions from a logic one to a logic zero value.
Latch the data signal. The data signal generated by the logic circuit 210 is a signal A
Exclusive OR operation of the product of (bit 0) and B (bit 0) with P (0). Here, P (0) is the least significant bit of the previous partial product value. mux 172-1
78 receives the signal A (bit 0) at the second selector input.

【0072】 mux182〜188の第1セレクタ入力信号が、ラッチ216から受信される
。ラッチ216は、信号Tが論理1から論理0値に移行すると、論理回路214
からデータ信号をラッチする。論理回路214が生成するデータ信号は、信号A
(ビット1)とB(ビット1)の積を加算器92の合計出力信号で排他的論理和
演算したものである。mux182〜188は、第2セレクタ入力において信号A
(ビット1)を受信する。
The first selector input signals of mux 182-188 are received from latch 216. When the signal T transitions from logic 1 to logic 0, the latch 216 activates the logic circuit 214.
Latch the data signal. The data signal generated by the logic circuit 214 is a signal A
The exclusive OR operation is performed on the product of (bit 1) and B (bit 1) with the total output signal of the adder 92. mux 182-188 provide signal A at the second selector input.
(Bit 1) is received.

【0073】 mux192〜198の第1セレクタ入力信号が、ラッチ220から受信される
。ラッチ220は、信号Tが論理1から論理0値に移行すると、論理回路218
からデータ信号をラッチする。論理回路218が生成するデータ信号は、信号A
(ビット2)とB(ビット2)の積を加算器104の合計出力信号で排他的論理
和演算したものである。mux192〜198は、第2セレクタ入力において信号
A(ビット2)を受信する。
The first selector input signals of mux 192-198 are received from latch 220. Latch 220 activates logic circuit 218 when signal T transitions from a logic one to a logic zero value.
Latch the data signal. The data signal generated by the logic circuit 218 is a signal A
It is obtained by performing an exclusive OR operation on the product of (bit 2) and B (bit 2) with the total output signal of the adder 104. mux 192-198 receive signal A (bit 2) at the second selector input.

【0074】 mux202〜208の第1セレクタ入力信号が、ラッチ224から受信される
。ラッチ224は、信号Tが論理1から論理0値に移行すると、論理回路222
からデータ信号をラッチする。論理回路222が生成するデータ信号は、信号A
(ビット3)とB(ビット3)の積を加算器116の合計出力信号で排他的論理
和演算したものである。mux202〜208は、第2セレクタ入力において信号
A(ビット3)を受信する。
The first selector input signals of mux 202-208 are received from latch 224. When the signal T transitions from a logic 1 to a logic 0 value, the latch 224
Latch the data signal. The data signal generated by the logic circuit 222 is a signal A
It is obtained by performing an exclusive OR operation on the product of (bit 3) and B (bit 3) with the total output signal of the adder 116. Muxes 202-208 receive signal A (bit 3) at the second selector input.

【0075】 第1および第2セレクタ入力が00の個別論理値を受信すると、mux172〜
178の第1入力の信号が対応するmuxの出力に転送される。第1および第2セ
レクタ入力が01の個別論理値を受信すると、mux172〜178の第2入力の
信号が対応するmuxの出力に転送される。第1および第2セレクタ入力が10の
個別論理値を受信すると、mux172〜178の第3入力の信号が対応するmuxの
出力に転送される。第1および第2セレクタ入力が11の個別論理値を受信する
と、mux172〜178の第4入力の信号が対応するmuxの出力に転送される。
When the first and second selector inputs receive the individual logical value of 00, mux 172-
The signal of the first input at 178 is transferred to the output of the corresponding mux. When the first and second selector inputs receive the individual logical value of 01, the signals of the second inputs of muxes 172 to 178 are transferred to the corresponding mux outputs. When the first and second selector inputs receive ten individual logical values, the signals of the third inputs of muxes 172 to 178 are transferred to the corresponding mux outputs. When the first and second selector inputs receive 11 individual logical values, the signals of the fourth inputs of muxes 172 to 178 are transferred to the corresponding mux outputs.

【0076】 合併型F-M乗算器171のアーキテクチャにより、↓の値を決定し、ラッチ2
12,216,220,224内に格納することができることに注目されたい。
言い換えると、↓値はAとBの乗算前には計算されず、ディジットA0,B0の乗算
中に合併型F-M乗算器171のアーキテクチャにより↓の第1値が決定されてラ
ッチ212,216,220,224に格納されることになる。すなわち、A0
B0の積を計算するために用いられるのと同じ乗算サイクルが↓の値を決定するた
めに用いられる。↓の第1値は、他のディジットB1〜B63とA0の乗算中に用いら
れる。↓の第2値は、ラッチ212,216,220,224内にラッチされて
、ディジットB1〜B63とA1との乗算中に用いられる。このように、↓の新しい値
はAとB0の各ディジットの乗算中に決定される。
According to the architecture of the merged FM multiplier 171, the value of ↓ is determined, and
Note that it can be stored within 12,216,220,224.
In other words, the value of ↓ is not calculated before the multiplication of A and B, the first value of ↓ is determined by the architecture of the merged FM multiplier 171 during the multiplication of the digits A 0 , B 0 and the latches 212, 216 , 220, and 224. That is, A 0 ,
The same multiplication cycle used to calculate the product of B 0 is used to determine the value of ↓. The first value of ↓ is used during the multiplication of A 0 with other digits B 1 -B 63 . The second value of ↓ is latched in the latch 212,216,220,224, used during the multiplication of the digit B 1 .about.B 63 and A 1. Thus, the new value of ↓ is determined in the multiplication of each digit of A and B 0.

【0077】 図6は、フォスタ−モンゴメリ換算アルゴリズムで用いられる(R2 mod N)の
値を決定する方法の流れ図である。フォスタ−モンゴメリ換算アルゴリズムのオ
ペランドA,Bは、(A*R mod N)および(B*R mod N)の形を持ち、乗算され
て積(A*B*R2 mod N)が生成される。積(A*B*R2 mod N)は、値Rにより合併型
F-M乗算器171(図5)内で換算され、合併型F-M乗算器171により生成され
る出力が(A*B*R mod N)の値を有するようになる。値(R2 mod N)の生成は、
合併型F-M乗算器171の入力値として、データ・ホスト・バス(図3)を介し
て受信されるオペランドAの初期値を、(A*R mod N)の正しい形に変換し、オ
ペランドBの初期値を(B*R mod N)の正しい形に変換するために必要とされる
。これにより、オペランドA,Bの初期値がモンゴメリ形式に変換される。たと
えば、合併型F-M乗算器171においてオペランドAに値(R2 mod N)を乗算す
ると、換算された出力値を有し、(A*R mod N)となる。同様に、合併型F-M乗
算器171においてオペランドBに値(R2 mod N)を乗算すると、これも換算さ
れた出力値を有し、(B*R mod N)となる。
FIG. 6 is a flowchart of a method for determining the value of (R 2 mod N) used in the Foster-Montgomery conversion algorithm. Operands A and B of the Foster-Montgomery conversion algorithm have the form (A * R mod N) and (B * R mod N), and are multiplied to generate a product (A * B * R 2 mod N). . The product (A * B * R 2 mod N) is merged with the value R
The output converted by the FM multiplier 171 (FIG. 5) and generated by the merged FM multiplier 171 has a value of (A * B * R mod N). The generation of the value (R 2 mod N) is
The input value of the merged FM multiplier 171 is converted from the initial value of the operand A received via the data host bus (FIG. 3) to the correct form of (A * R mod N), and Required to convert the initial values to the correct form of (B * R mod N). As a result, the initial values of the operands A and B are converted to the Montgomery format. For example, when the operand A is multiplied by the value (R 2 mod N) in the merged FM multiplier 171, it has a converted output value and becomes (A * R mod N). Similarly, when the operand B is multiplied by the value (R 2 mod N) in the merged FM multiplier 171, this also has a converted output value and becomes (B * R mod N).

【0078】 図6は、値(R2 mod N)を生成する方法を示す流れ図230である。値(R2 m
od N)は、(R mod N)とRの成分とを有する。ただし、Rは216*Iまたは2
の整数乗である。Rは、Nを表すディジット数よりも1ディジット多い大きさを
有するものとして選択される。ブロック232は、値(R mod N)に関する初期
値Pを有する変数の生成を示す。Pの値は、Rの値をNの値から減ずることによ
り計算される。初期値Pの生成に続き、ブロック236では、Pの値がNの値と
比較される。P値がN値より大きい場合は、ブロック240で乗数A値が計算さ
れる。ただし乗数A値はN値がP値により乗算され、依然としてP値よりも小さ
い2の最大べき数である。ブロック242で、乗数Aの値がN値により乗算され
、その積(A*N)がP値から減じられて、新しいP値が得られる。ブロック23
6で、N値がP値よりも大きい場合は、Pがシフトされた回数がブロック244
に示される。P値がRの最下位ビット内で0の数だけシフトされると、計算は終
了して、ブロック238のP値は所望の値(R2 mod N)となる。あるいは、ブロ
ック244で、P値についてさらにシフトが必要な場合には、ブロック234に
示すようにPを整数回だけシフトさせる。この整数値は、システムのディジット
寸法として選択され、値「1」を有するPの最上位ビットを適切な回数だけ左に
シフトさせると、値Rが得られる。
FIG. 6 is a flowchart 230 illustrating a method of generating a value (R 2 mod N). Value (R 2 m
od N) has (R mod N) and an R component. Where R is 2 16 * I or 2
To the power of an integer. R is selected as having a size one digit greater than the number of digits representing N. Block 232 illustrates the generation of a variable having an initial value P for the value (R mod N). The value of P is calculated by subtracting the value of R from the value of N. Following the generation of the initial value P, at block 236, the value of P is compared to the value of N. If the P value is greater than the N value, a multiplier A value is calculated at block 240. However, the multiplier A value is the maximum power of two, the N value being multiplied by the P value and still smaller than the P value. At block 242, the value of multiplier A is multiplied by the N value, and the product (A * N) is subtracted from the P value to obtain a new P value. Block 23
At 6, if the N value is greater than the P value, the number of times P has been shifted is
Is shown in When the P value has been shifted by the number of zeros in the least significant bits of R, the calculation is finished and the P value of block 238 is the desired value (R 2 mod N). Alternatively, if further shifting of the P value is needed at block 244, P is shifted an integer number of times, as shown at block 234. This integer value is selected as the digit size of the system, and shifting the most significant bit of P with the value "1" to the left an appropriate number of times gives the value R.

【0079】 ブロック240に示されるAの計算は、2つの異なる方法で実行することがで
きる。第1の方法は、Aの値がN値をP値で乗算してなおかつPの値よりも小さ
い値を有するような2の最大べき数となるようにAを生成することである。第2
の方法は、Pの最上位ディジットをNの最上位ディジットで除算した結果の整数
よりも1小さくなるようにAを計算する。流れ図230においては、A値を求め
る第1方法を行うと、A値を計算する第2方法よりも、ブロック236,240
,242のループを数回多く実行することになる。しかし、第2方法に必要とさ
れる回路構成は、第1方法に必要とされる回路構成よりも複雑である。
The calculation of A shown in block 240 can be performed in two different ways. The first method is to generate A such that the value of A is the largest power of 2 such that the value of N is multiplied by the value of P and still has a value less than the value of P. Second
Calculates A so that it is one less than the integer resulting from dividing the most significant digit of P by the most significant digit of N. In flow chart 230, performing the first method for determining the A value is greater than the second method for calculating the A value, as shown in blocks 236 and 240.
, 242 are executed several times. However, the circuit configuration required for the second method is more complicated than the circuit configuration required for the first method.

【0080】 図7は、図6に説明される値(R2 mod N)の生成を示すブロック図である。ま
ず、mux240がRの値をmux240の第1入力から減算器244の入力に転送す
る。また、A値を最初は0として、乗算器242が減算器244の他方の入力に
A値を生成するようにする。減算器244は、mux246の第1入力に値(R-N)
またはPを与える(図6のブロック232参照)。mux246は、P値を、デー
タを16桁シフトさせる、すなわちデータを216倍するシフト回路248に転送
する(図6のブロック234参照)。比較器250が、シフトされたデータがN
値よりも大きな値を有するか否かを確認する(図6のブロック236参照)。例
として、比較器250は、PSHIFTED値とN値の差を与える減算器である。比較
器250は、PSHIFTED値とN値のビット幅の比較を行う排他的論理和ゲートを
備えることもできる。
FIG. 7 is a block diagram showing the generation of the value (R 2 mod N) described in FIG. First, mux 240 transfers the value of R from the first input of mux 240 to the input of subtractor 244. Further, the A value is initially set to 0, so that the multiplier 242 generates the A value at the other input of the subtractor 244. The subtractor 244 inputs a value (RN) to the first input of the mux 246.
Or P (see block 232 of FIG. 6). mux246 is the P value, is the data the 16-digit shift, i.e. to transfer data to 2 16 multiplying shift circuit 248 (see block 234 of FIG. 6). Comparator 250 determines that the shifted data is N
Check if it has a value greater than the value (see block 236 in FIG. 6). As an example, the comparator 250 is a subtractor that provides a difference between the P SHIFTED value and the N value. The comparator 250 may include an exclusive OR gate for comparing the bit width of the P SHIFTED value with the bit width of the N value.

【0081】 Pのシフトされた値、すなわちPSHIFTEDがN値よりも大きな値を持たない場
合は、PSHIFTED値をmux246の第2入力に転送し、新しいPSHIFTED値を生成
する。新しいPSHIFTED値は、シフト回路248によりさらに16桁シフトされ
たデータを有する。シフト回路248内でデータをシフトするたびに、比較器2
50内で新たなシフト値がN値と比較される。新たなPSHIFTED値がN値よりも
大きな値を有するときは、値(R2 mod N)が生成される。mux240は、新たな
SHIFTED値を減算器244の第1入力に転送する。乗算器242が生成したA
とNの積が、減算器244の第2入力に転送される。ただし、AはNの値で乗算
された結果が新しいPSHIFTED値よりも小さい値を有する積になる2の整数の最
大べき数である。(PSHIFTED−A*N)の差値が所望の値(R2 mod N)に関して減
算器244により生成される。
If the shifted value of P, P SHIFTED , does not have a value greater than the N value, then transfer the P SHIFTED value to the second input of mux 246 to generate a new P SHIFTED value. The new P SHIFTED value has data shifted further 16 digits by shift circuit 248. Each time data is shifted in the shift circuit 248, the comparator 2
Within 50, the new shift value is compared to the N value. If the new P SHIFTED value has a value greater than the N value, a value (R 2 mod N) is generated. mux 240 forwards the new P SHIFTED value to the first input of subtractor 244. A generated by the multiplier 242
And N are forwarded to a second input of subtractor 244. Where A is the largest power of two integers resulting in the product multiplied by the value of N resulting in a product having a value less than the new P SHIFTED value. A difference value of (P SHIFTED -A * N) is generated by subtractor 244 for the desired value (R 2 mod N).

【0082】 値(R2 mod N)を決定する代替の方法には、(2)nなどの値を有するRの値を
選択する段階が含まれる。ただし、「n」は整数である。言い換えるとRは22
,24,28,...,2256などの値を有するよう選択される。バイナリ表現に
おいては、Rの値は最上位データ・ビットに関しては論理1を有し、それに0の
列が続く。Nのバイナリ値の最上位データ・ビット、すなわちNの最も左側の論
理1ビット位置が、Rの値の論理1に隣接する論理0の値に整合される。Nの整
合された値、NALIGNEDがRから減じられてR−NALIGNEDの差値が求められる。
N値の最も左側の論理1を差値内で論理1値を有する最上位データ・ビットに隣
接する論理0値に整合する段階が、値(R mod N)が得られるまで繰り返される
。言い換えると、N値より小さい値を有する差値は、値(R mod N)に等しい。
An alternative method of determining the value (R 2 mod N) includes: (2) selecting a value of R having a value such as 2 n . Here, “n” is an integer. In other words, R is 2 2
, 24 , 28 ,. . . , 2 256 and so on. In the binary representation, the value of R has a logical one for the most significant data bit, followed by a sequence of zeros. The most significant data bit of the binary value of N, the leftmost logical one bit position of N, is matched to a logical zero value adjacent to the logical one of the value of R. The aligned value of N, N ALIGNED, is subtracted from R to determine the difference value of R-N ALIGNED .
The process of matching the left most logic one of the N values to the logic zero value adjacent to the most significant data bit having a logic one value in the difference value is repeated until a value (R mod N) is obtained. In other words, the difference value having a value smaller than the N value is equal to the value (R mod N).

【0083】 値(R mod N)を左に1ビット位置シフトさせて、必要に応じて、N値を値(R
mod N)から減ずることにより、値(2R mod N)が得られる。値(2R mod N)は
、乗算器56(図3参照)のオペランドA,Bの両方に関して用いられる。新た
に求められる値(22R mod N)を乗算器56のオペランドA,Bの両方に関して
用いて、コプロセッサ44の出力に値(24R mod N)を生成する。コプロセッサ
44から新たに生成される値は、新しい値が(2)2nR mod N)を有するまで新し
い値の生成において、オペランドA,Bの両方に関する値として繰り返し利用さ
れる。ただし(2)2nは、Rの値に等しい。これにより、値(R2 mod N)が求めら
れる。
The value (R mod N) is shifted to the left by one bit position, and the N value is changed to the value (R
mod N) gives the value (2R mod N). The value (2R mod N) is used for both operands A and B of multiplier 56 (see FIG. 3). The newly determined value (2 2 R mod N) is used for both operands A and B of multiplier 56 to generate a value (2 4 R mod N) at the output of coprocessor 44. The value newly generated from the coprocessor 44 is repeatedly used as a value for both the operands A and B in generating a new value until the new value has (2) 2 n R mod N). However, (2) 2 n is equal to the value of R. Thereby, a value (R 2 mod N) is obtained.

【0084】 以上、本発明は集積回路内に構築するための高性能で低価格および低電力を実
現する暗号化乗算システムを提供することが理解頂けよう。フォスタ−モンゴメ
リ・ハードウェア・アクセラレータは、フォスタ−モンゴメリ換算アルゴリズム
を計算し、従来技術によるシステムよりも少ないクロック・サイクル内で大きな
オペランドの乗算を実行することにより高性能を実現する。本方法および回路構
成は、ビット数を増大させたオペランドに適用可能である。
Thus, it can be seen that the present invention provides a high performance, low cost and low power cryptographic multiplication system for construction in an integrated circuit. The Foster-Montgomery hardware accelerator achieves high performance by computing the Foster-Montgomery conversion algorithm and performing large operand multiplications in fewer clock cycles than prior art systems. The method and circuitry are applicable to operands with an increased number of bits.

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

【図1】 フォスタ−モンゴメリ・ハードウェア・アクセラレータ(FMHA:
Foster-Montgomery Hardware Accelerator)ブロックを備えるスマートカードの
ブロック図である。
[Figure 1] Foster-Montgomery Hardware Accelerator (FMHA:
1 is a block diagram of a smart card including a Foster-Montgomery Hardware Accelerator) block.

【図2】 FMHAブロックを備える集積回路からインターネット上に転送され
るデータを示す図である。
FIG. 2 is a diagram showing data transferred from an integrated circuit having an FMHA block to the Internet.

【図3】 図1のFMHAブロックに含まれる機能ブロックを示すブロック図で
ある。
FIG. 3 is a block diagram showing functional blocks included in the FMHA block of FIG. 1;

【図4】 モジューロ換算器の部分のブロック図である。FIG. 4 is a block diagram of a modulo converter.

【図5】 図1のFMHAで用いられる乗算器と組み合わせたモジューロ換算器
の部分のブロック図である。
FIG. 5 is a block diagram of a part of a modulo converter combined with a multiplier used in the FMHA of FIG. 1;

【図6】 フォスタ−モンゴメリ換算アルゴリズムで用いられる値(R2 mod
N)を生成する方法を示す流れ図230である。
FIG. 6 shows a value (R 2 mod) used in the Foster-Montgomery conversion algorithm.
N) is a flowchart 230 illustrating a method of generating N).

【図7】 図6に説明される値(R2 mod N)の生成を示すブロック図で
ある。
FIG. 7 is a block diagram illustrating generation of a value (R 2 mod N) illustrated in FIG. 6;

───────────────────────────────────────────────────── フロントページの続き (81)指定国 EP(AT,BE,CH,CY, DE,DK,ES,FI,FR,GB,GR,IE,I T,LU,MC,NL,PT,SE),OA(BF,BJ ,CF,CG,CI,CM,GA,GN,GW,ML, MR,NE,SN,TD,TG),AP(GH,GM,K E,LS,MW,SD,SZ,UG,ZW),EA(AM ,AZ,BY,KG,KZ,MD,RU,TJ,TM) ,AL,AM,AT,AU,AZ,BA,BB,BG, BR,BY,CA,CH,CN,CU,CZ,DE,D K,EE,ES,FI,GB,GE,GH,GM,HR ,HU,ID,IL,IN,IS,JP,KE,KG, KP,KR,KZ,LC,LK,LR,LS,LT,L U,LV,MD,MG,MK,MN,MW,MX,NO ,NZ,PL,PT,RO,RU,SD,SE,SG, SI,SK,SL,TJ,TM,TR,TT,UA,U G,UZ,VN,YU,ZW (72)発明者 ロドニー・シー・テッシュ アメリカ合衆国 アリゾナ州 85020 フ ェニックス ノース・13ス・ストリート 7026 (72)発明者 ジェイムス・ダグラス・デュウォーキン アメリカ合衆国 アリゾナ州 85226 チ ャンドラー ウェスト・シャノン・ストリ ート6802 (72)発明者 マイケル・ジェイ・トーラ アメリカ合衆国 アリゾナ州 85226 チ ャンドラー ウェスト・デル・リオ・スト リート5301 Fターム(参考) 5B022 AA05 BA04 CA03 CA04 FA01 5B056 AA01 FF01 FF02 FF05 FF16 5J104 AA22 NA18 ──────────────────────────────────────────────────続 き Continuation of front page (81) Designated country EP (AT, BE, CH, CY, DE, DK, ES, FI, FR, GB, GR, IE, IT, LU, MC, NL, PT, SE ), OA (BF, BJ, CF, CG, CI, CM, GA, GN, GW, ML, MR, NE, SN, TD, TG), AP (GH, GM, KE, LS, MW, SD, SZ, UG, ZW), EA (AM, AZ, BY, KG, KZ, MD, RU, TJ, TM), AL, AM, AT, AU, AZ, BA, BB, BG, BR, BY, CA, CH, CN, CU, CZ, DE, DK, EE, ES, FI, GB, GE, GH, GM, HR, HU, ID, IL, IN, IS, JP, KE, KG , KP, KR, KZ, LC, LK, LR, LS, LT, LU, LV, MD, MG, MK, MN, MW, MX, NO, NZ, PL, PT, RO, RU, SD, SE, SG, SI, SK, SL, TJ, TM, TR, TT, UA, UG, UZ, VN, YU, ZW (72) Inventor Rodney Sea Tesh 85020 Phoenix, Arizona USA 13th Street, Phoenix 7026 (72) Inventor James Douglas Duwalkin Arizona, U.S.A. 85226 Chandler West Shannon Street 6802 (72) Inventor Michael J. Tora, U.S.A. 5301 F-term (Reference) 5B022 AA05 BA04 CA03 CA04 FA01 5B056 AA01 FF01 FF02 FF05 FF16 5J104 AA22 NA18

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 モジューロ乗算を行うデータ処理システム(26)であって
: バイナリ・データ値A,Bを受信する入力(48,46)を有する乗算器(5
6); 前記乗算器の出力に結合される第1入力と、部分積を受信するために結合され
る第2入力(50)と、合計値を供給する出力とを有する加算器(58);およ
び 前記加算器(58)の前記出力に結合される第1入力と、バイナリ・データ値
Nを受信するために結合される第2入力(52)と、(A*B/R mod N)の形式を
有するデータ値を供給する出力とを有するモジューロ換算器(60)であって、
前記合計値の所定のビット位置が第1論理状態を有するときに、前記バイナリ・
データ値Nを整合し、前記バイナリ・データ値Nを前記合計値に加算することに
より、換算値↓の最下位データ・ビットが生成されるモジューロ換算器(60)
; によって構成されることを特徴とするデータ処理システム。
1. A data processing system (26) for performing modulo multiplication comprising: a multiplier (5) having inputs (48, 46) for receiving binary data values A and B;
6); an adder (58) having a first input coupled to the output of the multiplier, a second input coupled to receive the partial product, and an output providing a sum value; And a first input coupled to the output of the adder (58), a second input (52) coupled to receive a binary data value N, and (A * B / R mod N). An output providing a data value having a format.
When a predetermined bit position of the sum has a first logic state,
A modulo converter (60) that matches the data value N and adds the binary data value N to the sum to produce the least significant data bit of the reduced value ↓
A data processing system comprising:
【請求項2】 前記換算値↓の全ビットが決定されると、前記データ値がゼ
ロ値に換算されることを特徴とする請求項1記載のデータ処理システム。
2. The data processing system according to claim 1, wherein when all bits of the conversion value ↓ are determined, the data value is converted to a zero value.
【請求項3】 スマートカード(10)であって: 前記スマートカードの出力(13)にデータを転送するデータ・バス(15)
;および 前記データ・バスに結合され、第1ディジット(A*R mod N)と第2ディジッ
ト(B*R mod N)とを乗算し、積(A*B*R mod N)を生成して、この積が乗算中に
Rの値により除算されることにより換算されるモジューロNであるコプロセッサ
(26) であって、AとBは整数値であり、Nはモジューロ計数で奇数の整数値であり、
Rは整数値であり、前記モジューロ乗算は、(↓*N)に基づいて行われ、↓は
第1および第2ディジットを乗算する際に決定されるコプロセッサ(26); によって構成されることを特徴とするスマートカード。
3. A smart card (10) comprising: a data bus (15) for transferring data to an output (13) of said smart card.
And coupled to the data bus, multiplying a first digit (A * R mod N) by a second digit (B * R mod N) to produce a product (A * B * R mod N) A coprocessor (26), the product of which is reduced by dividing the product by the value of R during multiplication, where A and B are integer values, and N is an odd integer value in modulo count. And
R is an integer value, and the modulo multiplication is performed based on (↓ * N), where ↓ is a coprocessor (26) determined when multiplying the first and second digits. A smart card.
【請求項4】 前記コプロセッサ(26)が: 前記データ・バスに結合されて前記データを受信する乗算器(56)であって
、前記データが前記乗算器の第1入力(46)において受信される第1オペラン
ドと、前記乗算器の第2入力(48)において受信される第2オペランドとを備
え、前記第1および第2オペランドから積を生成する乗算器(56); 前記乗算器に結合されて前記積を受信する第1入力と、前回の部分積を受信す
るために結合される第2入力(50)と、前記積と前記前回の部分積との和を提
供する出力とを有する加算器回路(58);および 前記加算器回路の前記出力に結合される第1入力と、前記バイナリ値Nを受信
するために結合される第2入力(52)と、偶数値を有する被換算積を供給する
出力とを有するモジューロ換算器(60); によって構成されることを特徴とする請求項3記載のスマートカード。
4. The multiplier (56) coupled to the data bus for receiving the data, the coprocessor (26) receiving the data at a first input (46) of the multiplier. A multiplier (56) comprising: a first operand to be obtained and a second operand received at a second input (48) of the multiplier, the multiplier generating a product from the first and second operands (56); A first input coupled to receive the product, a second input coupled to receive a previous partial product, and an output providing a sum of the product and the previous partial product. A first input coupled to the output of the adder circuit; a second input coupled to receive the binary value N; A module having an output for providing a conversion product. 4. The smart card according to claim 3, wherein the smart card is constituted by:
【請求項5】 インターネットにインタフェースする暗号化システム(10
)であって: データを転送するデータ・バス(15)を有する中央処理装置(18);およ
び 前記データ・バスに結合されて第1ディジット(A*R mod N)と第2ディジッ
ト(B*R mod N)とを乗算し、前記第1および第2ディジットの乗算中にRの値
で除算することにより換算されるモジューロNである積(A*B*R mod N)を生成
する暗号化アクセラレータ・ブロック(26)であって、AとBとは整数値であ
り、Nはモジューロ計数で奇数の整数値であり、Rは整数値であり、モジューロ
乗算が値(↓*N)に基づいて行われ、さらに↓は前記第1および第2ディジッ
トを乗算する際に決定される暗号化アクセラレータ・ブロック(26); によって構成されることを特徴とする暗号化システム(10)。
5. An encryption system (10) for interfacing with the Internet.
A central processing unit (18) having a data bus (15) for transferring data; and a first digit (A * R mod N) and a second digit (B *) coupled to said data bus. R mod N) to generate a product (A * B * R mod N) that is a modulo N converted by dividing by the value of R during multiplication of the first and second digits. An accelerator block (26), where A and B are integer values, N is an odd integer value in modulo counting, R is an integer value, and modulo multiplication is based on the value (↓ * N) And an encryption accelerator block (26) determined when multiplying the first and second digits by an encryption accelerator block (26).
【請求項6】 前記暗号化アクセラレータ・ブロック(26)が: 前記データ・バスに結合されて前記データを受信する乗算器(56)であって
、前記データが前記乗算器の第1入力(46)において受信される第1値と、前
記乗算器の第2入力(48)において受信される第2値とを備え、前記第1およ
び第2値から積を生成する乗算器(56); 前記乗算器の出力に結合される第1入力と、前回の部分積を受信するために結
合される第2入力(50)と、前記積と前記前回の部分積との和を提供する出力
とを有する加算器回路(58);および 前記加算器回路の前記出力に結合される第1入力と、前記整数値Nを受信する
ために結合される第2入力(52)と、被換算積を供給する出力とを有するモジ
ューロ換算器(60); によって構成されることを特徴とする請求項5記載の暗号化システム(10)
6. The encryption accelerator block (26) is: a multiplier (56) coupled to the data bus for receiving the data, the data being a first input (46) of the multiplier. A) comprising a first value received at a second input of the multiplier and a second value received at a second input of the multiplier, the multiplier generating a product from the first and second values; A first input coupled to the output of the multiplier, a second input coupled to receive a previous partial product, and an output providing a sum of the product and the previous partial product. An adder circuit (58) having a first input coupled to the output of the adder circuit, a second input coupled to receive the integer value N, and a reduced product. A modulo converter (60) having an output Encryption system according to claim 5, characterized in that it is made (10)
.
【請求項7】 前記モジューロ換算器(60)の前記出力に結合される入力
と、前記加算器回路の前記第2入力に結合される出力とを有するメモリ(64)
をさらに備えることを特徴とする請求項6記載の暗号化システム(10)。
7. A memory (64) having an input coupled to the output of the modulo converter (60) and an output coupled to the second input of the adder circuit.
The encryption system (10) according to claim 6, further comprising:
【請求項8】 前記データ・バスに結合されて前記第1値を受信する入力と
、前記乗算器の前記第1入力(46)に結合されて前記第1値の2の負の補数を
供給する出力とを有するディジット・ネゲーション・ユニット(42)をさらに
備えることを特徴とする請求項6記載の暗号化システム(10)。
8. An input coupled to the data bus for receiving the first value and coupled to the first input of the multiplier to provide a two's negative complement of the first value. The encryption system (10) according to claim 6, further comprising a digit negation unit (42) having an output to output.
【請求項9】 数学的演算が実行されるフォスタ−モンゴメリ・ハードウェ
ア・アクセラレータ(FMHA)(44)のためのアーキテクチャであって: オペランドA,Bをそれぞれ受信するために結合される第1および第2入力(
48,46)と、部分積を供給する出力とを有する乗算器(56); 前記乗算器の前記出力に結合される第1入力と、前回の被換算部分積を受信す
るために結合される第2入力(50)と、合計値を供給する出力とを有する加算
器(58);および 前記加算器の前記出力に結合される第1入力と、係数を受信するために結合さ
れる第2入力(52)と、被換算部分積を供給する出力とを有するモジューロ換
算器(60); によって構成されることを特徴とするアーキテクチャ。
9. An architecture for a Foster-Montgomery hardware accelerator (FMHA) (44) on which mathematical operations are performed, comprising: a first and a second combined to receive operands A and B, respectively. The second input (
A multiplier having an output for providing a partial product; a first input coupled to the output of the multiplier; and a first input coupled to receive a previous reduced partial product. An adder (58) having a second input (50) and an output for providing a sum value; and a first input coupled to the output of the adder, and a second input coupled to receive coefficients. An architecture comprising: a modulo converter (60) having an input (52) and an output for providing a reduced partial product.
【請求項10】 データを転送するデータ・バス(41); 前記データ・バスに結合され、前記オペランドA,Bを格納する第1メモリ(
72); 前記データ・バス(41)に結合される第1入力と、前記被換算部分積を受信
するために結合される第2入力とを有し、前記被換算部分積を格納して、前記前
回の被換算部分積を提供する第2メモリ(64);および 前記データ・バス(41)に結合される入力と、前記モジューロ換算器の前記
第2入力に結合される出力とを有し、前記係数を格納する第3メモリ(70); によってさらに構成されることを特徴とする請求項9記載のアーキテクチャ。
10. A data bus (41) for transferring data; a first memory coupled to said data bus and storing said operands A and B;
72) having a first input coupled to the data bus (41), and a second input coupled to receive the reduced partial product, storing the reduced partial product; A second memory (64) for providing the previous reduced partial product; and an input coupled to the data bus (41); and an output coupled to the second input of the modulo converter. 10. The architecture of claim 9, further comprising: a third memory (70) for storing the coefficients.
JP2000561553A 1998-07-22 1999-01-13 Circuits and methods for modulo multiplication Pending JP2002521720A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US09/120,835 1998-07-22
US09/120,835 US6182104B1 (en) 1998-07-22 1998-07-22 Circuit and method of modulo multiplication
PCT/US1999/000826 WO2000005645A1 (en) 1998-07-22 1999-01-13 Circuit and method of modulo multiplication

Publications (1)

Publication Number Publication Date
JP2002521720A true JP2002521720A (en) 2002-07-16

Family

ID=22392822

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000561553A Pending JP2002521720A (en) 1998-07-22 1999-01-13 Circuits and methods for modulo multiplication

Country Status (5)

Country Link
US (1) US6182104B1 (en)
JP (1) JP2002521720A (en)
CN (1) CN1248102C (en)
AU (1) AU2228199A (en)
WO (1) WO2000005645A1 (en)

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324592B1 (en) * 1997-02-25 2001-11-27 Keystone Aerospace Apparatus and method for a mobile computer architecture and input/output management system
EP0938790B1 (en) * 1997-09-16 2007-02-07 Koninklijke Philips Electronics N.V. A method and device for executing a decrypting mechanism through calculating a standardized modular exponentiation for thwarting timing attacks
FR2796736B1 (en) * 1999-07-20 2001-11-30 St Microelectronics Sa METHOD FOR PERFORMING ACCUMULATION MULTIPLICATION IN A GALOIS BODY
AU7813600A (en) * 1999-10-20 2001-04-30 Accelerated Encryption Processing Limited A cryptographic accelerator
FR2800952B1 (en) * 1999-11-09 2001-12-07 Bull Sa ARCHITECTURE OF AN ENCRYPTION CIRCUIT IMPLEMENTING DIFFERENT TYPES OF ENCRYPTION ALGORITHMS SIMULTANEOUSLY WITHOUT LOSS OF PERFORMANCE
US7240204B1 (en) * 2000-03-31 2007-07-03 State Of Oregon Acting By And Through The State Board Of Higher Education On Behalf Of Oregon State University Scalable and unified multiplication methods and apparatus
US7062657B2 (en) * 2000-09-25 2006-06-13 Broadcom Corporation Methods and apparatus for hardware normalization and denormalization
US20020061107A1 (en) * 2000-09-25 2002-05-23 Tham Terry K. Methods and apparatus for implementing a cryptography engine
US6914983B2 (en) * 2000-12-19 2005-07-05 International Business Machines Corporation Method for checking modular multiplication
US7194088B2 (en) * 2001-06-08 2007-03-20 Corrent Corporation Method and system for a full-adder post processor for modulo arithmetic
US6973470B2 (en) * 2001-06-13 2005-12-06 Corrent Corporation Circuit and method for performing multiple modulo mathematic operations
JP3904432B2 (en) * 2001-11-16 2007-04-11 株式会社ルネサステクノロジ Information processing device
KR100560770B1 (en) * 2003-09-15 2006-03-13 삼성전자주식회사 Contactless integrated circuit card with real-time protocol switching function and card system including the same
US20050141095A1 (en) * 2003-12-29 2005-06-30 Youngtack Shim Reflecting sheet
US7602905B2 (en) * 2004-09-01 2009-10-13 Texas Instruments Incorporated Processes, circuits, devices, and systems for encryption and decryption and other purposes, and processes of making
DE102006025569A1 (en) * 2005-10-28 2007-05-03 Infineon Technologies Ag Modular multiplication process for cryptography uses multiplicand in three bit segments in an multiplication addition operation
DE102006025673B9 (en) 2005-10-28 2010-12-16 Infineon Technologies Ag Calculator for reducing an input number with respect to a module
DE102006025677B4 (en) * 2005-10-28 2020-03-12 Infineon Technologies Ag Device and method for calculating a result of a sum with an arithmetic unit with a limited word length
DE102006025713B9 (en) * 2005-10-28 2013-10-17 Infineon Technologies Ag Cryptographic device and cryptographic method for calculating a result of a modular multiplication
US7725624B2 (en) * 2005-12-30 2010-05-25 Intel Corporation System and method for cryptography processing units and multiplier
US7805479B2 (en) * 2006-03-28 2010-09-28 Michael Andrew Moshier Scalable, faster method and apparatus for montgomery multiplication
US7849125B2 (en) 2006-07-07 2010-12-07 Via Telecom Co., Ltd Efficient computation of the modulo operation based on divisor (2n-1)
US7755766B1 (en) 2007-03-27 2010-07-13 Itt Manufacturing Enterprises, Inc. Telescope interferometric maintenance evaluation tool
US8417756B2 (en) 2007-11-29 2013-04-09 Samsung Electronics Co., Ltd. Method and apparatus for efficient modulo multiplication
US8392489B2 (en) * 2008-02-15 2013-03-05 International Business Machines Corporation ASCII to binary floating point conversion of decimal real numbers on a vector processor
US20100088526A1 (en) * 2008-10-02 2010-04-08 Mcm Portfolio Llc System and Method for Modular Exponentiation
EP2276194B1 (en) * 2009-07-17 2014-11-26 Certicom Corp. System and method for reducing the computation and storage requirements for a Montgomery-style reduction
CN102520907A (en) * 2011-12-13 2012-06-27 杭州晟元芯片技术有限公司 Software and hardware integrated accelerator and implementation method for same
CN109271137B (en) * 2018-09-11 2020-06-02 网御安全技术(深圳)有限公司 Modular multiplication device based on public key encryption algorithm and coprocessor
TWI784406B (en) * 2020-06-04 2022-11-21 熵碼科技股份有限公司 Modular operation circuit adopting iterative calculations
US11508263B2 (en) 2020-06-24 2022-11-22 Western Digital Technologies, Inc. Low complexity conversion to Montgomery domain
US11468797B2 (en) 2020-06-24 2022-10-11 Western Digital Technologies, Inc. Low complexity conversion to Montgomery domain
CN112989269B (en) * 2021-03-26 2023-07-25 上海西井科技股份有限公司 Accelerator and on-chip computing module for accelerator
CN116540977B (en) * 2023-07-05 2023-09-12 北京瑞莱智慧科技有限公司 Modulo multiplier circuit, FPGA circuit and ASIC module

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4658094A (en) * 1985-03-28 1987-04-14 Itt Corporation Encryption apparatus and methods for raising a large unsigned integer to a large unsigned integer power modulo a large unsigned integer
US5513133A (en) * 1992-11-30 1996-04-30 Fortress U&T Ltd. Compact microelectronic device for performing modular multiplication and exponentiation over large numbers
JPH0720778A (en) * 1993-07-02 1995-01-24 Fujitsu Ltd Remainder calculating device, table generating device, and multiplication remainder calculating device
FR2724741B1 (en) * 1994-09-21 1996-12-20 Sgs Thomson Microelectronics ELECTRONIC CIRCUIT FOR MODULAR CALCULATION IN A FINISHED BODY
FR2726668B1 (en) * 1994-11-08 1997-01-10 Sgs Thomson Microelectronics METHOD OF IMPLEMENTING MODULAR REDUCTION ACCORDING TO THE MONTGOMERY METHOD
JP3277089B2 (en) * 1995-02-14 2002-04-22 株式会社東芝 Multiplier and product-sum operation unit
US5784305A (en) * 1995-05-01 1998-07-21 Nec Corporation Multiply-adder unit
JP3504050B2 (en) * 1996-01-26 2004-03-08 株式会社東芝 Power-residue calculation method and apparatus

Also Published As

Publication number Publication date
WO2000005645A1 (en) 2000-02-03
AU2228199A (en) 2000-02-14
CN1248102C (en) 2006-03-29
US6182104B1 (en) 2001-01-30
CN1310816A (en) 2001-08-29

Similar Documents

Publication Publication Date Title
JP2002521720A (en) Circuits and methods for modulo multiplication
US6356636B1 (en) Circuit and method for fast modular multiplication
EP0801345B1 (en) Circuit for modulo multiplication and exponentiation arithmetic
US7277540B1 (en) Arithmetic method and apparatus and crypto processing apparatus for performing multiple types of cryptography
US6671709B2 (en) Multiplier cell and method of computing
US7424504B2 (en) Arithmetic processor for accomodating different field sizes
JP4955182B2 (en) Integer calculation field range extension
US20050198093A1 (en) Montgomery modular multiplier
US5745398A (en) Method for the implementation of modular multiplication according to the Montgomery method
JP4554239B2 (en) Montgomery type modular multiplication apparatus and method
US7206410B2 (en) Circuit for the inner or scalar product computation in Galois fields
KR100436814B1 (en) apparatus for RSA Crypto Processing of IC card
US6963644B1 (en) Multi-word arithmetic device for faster computation of cryptosystem calculations
US6341299B1 (en) Modular arithmetic coprocessor enabling the performance of non-modular operations at high speed
US6424987B1 (en) Method for the implementation of a specific modular multiplication operation relating to the montgomery method
JP2001034167A (en) Arithmetic unit and cryptogram processor
WO2000038047A1 (en) Circuit and method of cryptographic multiplication
EP1818810B1 (en) Circuit and method for multiplying long integer values
CN115270155A (en) Method for obtaining maximum common divisor of big number expansion and hardware architecture
JP2000207387A (en) Arithmetic unit and cipher processor
US5999953A (en) Method for the production of a parameter Jo associated with the implementation of a modular operation according to the Montgomery method
JP3904421B2 (en) Remainder multiplication arithmetic unit
US20050165875A1 (en) Arithmetic device
Ozturk Low Power Elliptic Curve Cryptography
KR100399048B1 (en) Apparatus of Elliptic Curve Cryptosystem

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20041217

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20050411

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090828

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100201