TW200400442A - Apparatus and method for calculating an integer quotient - Google Patents

Apparatus and method for calculating an integer quotient Download PDF

Info

Publication number
TW200400442A
TW200400442A TW92109930A TW92109930A TW200400442A TW 200400442 A TW200400442 A TW 200400442A TW 92109930 A TW92109930 A TW 92109930A TW 92109930 A TW92109930 A TW 92109930A TW 200400442 A TW200400442 A TW 200400442A
Authority
TW
Taiwan
Prior art keywords
reduction
modulus
processing
multiplier
item
Prior art date
Application number
TW92109930A
Other languages
Chinese (zh)
Inventor
Wieland Fischer
Jean-Pierre Seifert
Original Assignee
Infineon Technologies Ag
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 Infineon Technologies Ag filed Critical Infineon Technologies Ag
Publication of TW200400442A publication Critical patent/TW200400442A/en

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/722Modular multiplication

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

An apparatus for calculating an integer quotient of term (T) with regard to a modulus (N), wherein the term comprises a product of a binary multiplier (M) and a multiplicand (C), comprises a processing means (10) for processing the bits of the multiplier in several processing steps. The processing means is formed to calculate an intermediate result (Z) reduced with regard to modulus in a processing step, which depends from one or several bits of the binary multiplier, which are considered in the processing step. The apparatus further comprises a log means for logging reduction information in the respective processing steps and order information about one or several digits of the integer quotient concerned means (14) for evaluating the order information and the reduction information from the processing steps to obtain the integer quotient (Q). By logging the reduction information and the order information in the processing steps, a command for performing a modular multiplication usually implemented in hardware can be supplemented in that it outputs also the output of the DIV operation, which means the integer quotient. This is advantageously possible without interventions into a hard-wired calculating unit (10a) and hardly requires any computing time.

Description

700400442700400442

發明領域 演算法 演算法 特別是,本發明係有關 本發明係有關於計算 於加密應用所需要之計算 習知技術 係持=在==於及密中,金鑰長度 要求亦會持續增加。隨著使二二::=對於安全性的 m方法做為一種非對稱加密概念的^^加’曰使用這種 ,方法’亦可以增加相對於所謂暴Λ疋擊兄,使 (brute—force attack)的安全性。暴力攻擊 =lattack)乃是對於—種加密演算法的攻擊,:中 t i ί乃疋藉由所有可能性的嘗試加以推論。有笋於 此,虽金鑰長度增加時,理論上,暴力攻擊(bak—、 f:r、ce attack)嘗試所有可能性所需要的時間 幅增加。 應該明白指出的是,在這種架構中,使用5 i 2位元金 鑰長度的RSA應用在過去曾經被視為足夠。但是,隨著另 一邊(駭客)的技術及算術進步,隨後的典型RSa】用便 將金鑰長度增加至1024位元。時至現在,各種人士亦主 張:即使是具有1 0 24位元的金鑰長度亦不足以抵抗這種攻 擊。因此,RSA應用的金鑰長度將會再度增加至2〇48位 元0 另一方面,當考量現有加密共處理器(諸如:智慧 卡)的時候’可以理解的是’大部分人當然會希望:iFIELD OF THE INVENTION Algorithm Algorithm In particular, the present invention is related to the present invention. The present invention relates to the calculations required for encryption applications. Known technology Coherence = in = = in and in secret, the key length requirements will continue to increase. With the use of the two-to-two :: = m method for security as an asymmetric encryption concept, plus this method, the method can also increase the relative brute-force attack). The brute force attack (lattack) is an attack on a cryptographic algorithm: zhong t i ί Nai is inferred by all possible attempts. This is why, although the key length increases, theoretically, the time required for a brute force attack (bak—, f: r, ce attack) to try all possibilities increases. It should be clearly noted that in this architecture, RSA applications using 5 i 2-bit key lengths have been considered sufficient in the past. However, with the advancement of technology and arithmetic on the other side (hacker), the typical RSa usage subsequently increased the key length to 1024 bits. From time to time, various people have also argued that even a key length of 10-24 bits is not enough to resist this attack. Therefore, the key length of RSA applications will be increased to 2048 bits again. On the other hand, when considering existing encryption coprocessors (such as smart cards), it is understandable that most people will certainly want : I

900400442 五、發明說明(2) 有舉例來說,20 48位元金鑰長度的RSA應用亦可以執行 於僅此夠處理,舉例來說,丨〇 2 4位元金鑰長度的加密電路 上日因此,現有智慧卡應用的算術共處理器便會出現下列 即·這些現有智慧卡應用通常是針對某特定位元 又進彳J毛展,且無法適用於大部分的目前安全性要求 (,就疋坭,位兀長度過短)。這種現象可能會導致下列 ;ί收^即:舉例來說,具有20 48位元金鑰長度的RSA演 處等…、法在1〇24位元的共處理器上進行有效處理。對於 KbA應用而言,中國剩餘定理(CRT )乃是習知概念,其、 :、’具有大金鑰長度的模數指數可以細分為兩個分別具 半金錄長度的模數指數,據此,這兩個分別呈有一 鑰長f的模數指數結果便可以進行組合。 /、 ^ 取近,部分人士已經證實··中國剩餘定理(CRT 別容易受到差動故障分析攻擊(DFA aUack)的影塑。、 因此,關連許多方法的一問題便是所謂模數乘法的,,a加仵 doubl ing ) ”,其乃是加密計算的核心操作。如此,— 便可以細分為許多模數乘亦即:細分為-呆乍,八中,第一運算元A及第二運算元B之乘 的剩餘類別中進行計算)。#這些運算元a目 :具有位元長度2n ’貝"十算單元通常亦會具有一 ς::由,其長度’這些計算單元通常可以稱為長整數$ #早7L,相對於個人電腦(pc )或工作站 畔 (workstation )處理器所使用的,舉例來說,㈠立元 位元、3 2位元、或6 4位元架構。 700400442 五、發明說明(3) 有鑑於此,本發明的主要目的便是在具有一位元長度 η的計算單元上,實施具有一位元長度2η的整數A、B、及N 的模數乘法A *B mod N。這個模數乘法是非常耗時的,因 為這些整數A、B、及N可能僅會片段地載入,這也是傳統 方法為什麼會需要大量組織且容易出錯的主要原因,若這 些載入片段無法完全捨棄的話。已知,目前有幾種方法可 以解決這個問題。這些方法可以利用下列關鍵字找到,包 括:Montgomery 乘法、正常乘法(^pjW:Karatsuba —900400442 V. Description of the invention (2) For example, RSA applications with 20 48-bit key length can also be executed only for this purpose. For example, the encryption circuit with 4-bit key length is used in the past. Therefore, the arithmetic coprocessor of the existing smart card applications will appear as follows: These existing smart card applications are usually targeted for a specific bit and are not suitable for most of the current security requirements ( Alas, the length is too short). This phenomenon may lead to the following; namely, for example, an RSA algorithm with a 20 48-bit key length, etc., and the method is effectively processed on a 1024-bit coprocessor. For KbA applications, the Chinese Remainder Theorem (CRT) is a conventional concept. Its,:, 'modulus index with a large key length can be subdivided into two modulus indices with a length of half a gold record respectively. The two can be combined by taking the modulus index results of a key length f. /, ^ Get closer, some people have confirmed that the Chinese Remainder Theorem (CRT should not be easily affected by the differential failure analysis attack (DFA aUack).) Therefore, one of the problems related to many methods is the so-called modular multiplication, , A plus 仵 doubl ing ”", which is the core operation of cryptographic calculations. In this way,-can be subdivided into many modular multiplications, that is: subdivided into-dull, eighth, the first operand A and the second operation Calculation in the remaining categories of multiplication of element B). # These operands a: have a bit length of 2n 'because' ten arithmetic units will usually also have a ::: by, its length 'these calculation units can usually be called It is a long integer $ # as early as 7L, as opposed to the one used by a personal computer (pc) or workstation processor, for example, a stand-alone bit, 32-bit, or 64-bit architecture. 700400442 V. Description of the invention (3) In view of this, the main purpose of the present invention is to implement a modular multiplication A of integers A, B, and N having a bit length 2η on a calculation unit having a bit length η. * B mod N. This modular multiplication is very time consuming, Because these integers A, B, and N may only be loaded in fragments, this is also the main reason why traditional methods require a lot of organization and error-prone, if these loading fragments cannot be completely discarded. It is known that there are currently several Methods can solve this problem. These methods can be found using the following keywords, including: Montgomery multiplication, normal multiplication (^ pjW: Karatsuba —

Of man )、以及後續歸約(例如:Barret歸約)。 在”中國剩餘定理(CRT )視窗”中使用Montgomery計 算的另一概念已經發表於:P. Pailler,’,Low—cost double size modular exponent i at i on or how to stretch your cryptocoprocessor丨’ ° 這類概念的計算時間及資料組織全部都很昂貴,也因此, 這種概念的效率並不見得會為各種應用所接受。 這個德國申請案(其具有相同申請日、且發明名稱 為 V 〇 r r i c h t u n g u n d V e r f a h r e n z u in B e r e c h n e n e i n e s Ergebnisses einer modularen Multiplikation” )係揭 路一種概念,其中,具有位元長度2n的運算元的模數乘法 可以轉換為數個所謂的MMD操作,並且,這些mmd操作僅需 要適用於一半位元長度的運算元即可。不同於A*B mod N 的餘數’ MMD操作亦可以提供個別整數除法(亦即·· 〇丨v操 作)的結果’其中,這個結果亦可以稱為整數商q。 通常’這個操作T m〇d N可以產生一餘數r,當一項目Of man), and subsequent reductions (for example: Barret reduction). Another concept using Montgomery calculations in the "China Remainder Theorem (CRT) Window" has been published in: P. Pailler, ', Low-cost double size modular exponent i at i on or how to stretch your cryptocoprocessor 丨' ° The calculation time and data organization of a concept are all expensive, and therefore, the efficiency of this concept may not be acceptable for various applications. This German application (which has the same filing date and the invention name is V 〇rrichtungund V erfahrenzu in Berechneneines Ergebnisses einer modularen Multiplikation ") is a concept that reveals the concept of modular multiplication of operands with a bit length of 2n Into several so-called MMD operations, and these mmd operations only need to be suitable for half-bit length operands. Unlike the remainder of A * B mod N 'MMD operations can also provide individual integer division (ie ... 〇 丨 v operation) result 'where, this result can also be called the integer quotient q. Usually' this operation T m〇d N can produce a remainder r, when an item

700400442700400442

T係相對一模數N進行知約的時候。然而,這個操作了廿i v N卻可以提供相對這個模數N的整數商q,藉以使這個項\ντ 能夠利用Q X N + R進行重建。如此,這個MM]D操作 、 (MultModDiv )乃是用來將任意項目τ轉換為相對模數n 整數商Q及餘數R。 ' ' 在一般模數算術中,其通常是用在加密技術中,我們 通常不需要利用這個D I V操作的結果(亦即:這個整數 商),因此通常也不會將這個結果計算出來。然而,上述 這個概念還是會用到這個D I V資訊,亦即:這個整數商/ 另外’本技術領域亦存在其他申請案,其不僅僅需要 這個MOD操作的結果(亦即:這個餘數),並且亦需要這 個整數商(亦即:這個D I V操作的結果)。 已知,一種計算模數乘法的已知、有效、且經常使用 方法乃是稱為Montgomery乘法,並且,舉例來說,這種方 法已經揭露於下列手冊’’Handbook of Applied Cryptographyf,,Menexes,van Oorschot,Vanstone, CRC press,pp 6 0 0 — 6 0 3 °Montgomery 歸約係一種技 術,其可以得到模數乘法的有效實施方式,而不需要執行 傳統的模數知約步驟。一般而言’在這種M 〇 n t g 〇 JJJ e r y歸約 中,這個除法操作可以表示為幾個簡單的平移操作。 同時,這種Montgomery乘法操作在橢圓主體GF ( 2n ) 上的延伸亦屬於已知。這種延伸已揭露於下列論 文’’Montgomery Multiplication in GF (2n ) n,Koc,T is the time when the contract is made with respect to a modulus N. However, this operation 廿 i v N can provide an integer quotient q relative to this modulus N, so that this term \ ντ can be reconstructed using Q X N + R. In this way, this MM] D operation (MultModDiv) is used to convert any item τ into a relative modulus n integer quotient Q and a remainder R. '' In general modulo arithmetic, which is usually used in encryption technology, we usually do not need to use the result of the DIV operation (that is, the integer quotient), so this result is usually not calculated. However, the above concept will still use this DIV information, that is: the integer quotient / In addition, there are other applications in the technical field, which not only need the result of the MOD operation (ie: the remainder), but also This integer quotient is required (ie: the result of this DIV operation). It is known that a known, efficient, and frequently used method for calculating modulus multiplication is called Montgomery multiplication, and, for example, this method has been disclosed in the following manual `` Handbook of Applied Cryptographyf, Menexes, van Oorschot, Vanstone, CRC press, pp 60 0 — 6 0 3 ° Montgomery reduction is a technique that can obtain an effective implementation of modulo multiplication without performing the traditional modulo reduction step. Generally speaking, in this Monj gj JJJ r y reduction, this division operation can be expressed as several simple translation operations. At the same time, the extension of this Montgomery multiplication operation on the elliptical body GF (2n) is also known. This extension has been revealed in the following thesis ‘’ Montgomery Multiplication in GF (2n) n, Koc,

Azar , Designs , Codes and Cryptography , volume 14 ,Azar, Designs, Codes and Cryptography, volume 14,

第10頁 200400442 五、發明說明(5) 1998,pp 57 — 69。另外,這種延伸更進一步揭露於下列 言备文· 1 A Scalable and Unified Multiplier Architecture for Finite Field Z /NZ and GF (2n )" Erkay Savas u. a. 5 Cryptographic Hardware andPage 10 200400442 V. Description of the invention (5) 1998, pp 57-69. In addition, this extension is further disclosed in the following language: 1 A Scalable and Unified Multiplier Architecture for Finite Field Z / NZ and GF (2n) " Erkay Savas u. A. 5 Cryptographic Hardware and

Embedded Systems (CHESS 2000 ) , pp 281 -289 ,Embedded Systems (CHESS 2000), pp 281 -289,

Springer Lecture Notes 。 在Z/NZ或GF (2n)上的Montgomery乘法會具有下列 缺點’亦即:模數歸約的除法操作(其係難以利用硬體實 施)雖然可以利用平移操作加以避開,但是,這種Springer Lecture Notes. Montgomery multiplication on Z / NZ or GF (2n) will have the following disadvantages, that is, the division operation of the modulus reduction (which is difficult to implement by hardware) Although the translation operation can be used to avoid this,

Montgomery乘法卻沒有利用預看方法來加速硬體中的模數 乘法操作。 、 DE 3 63 1 9 92 C2係揭露一種方法,其中,在z /Nz上的 :數乘法係利用一乘法預看方法、及利用這種乘法預看方 /進仃加速。DE 3 63 1 99 2 C2所述的方法亦稱為ZDN方法, 二^,廷種ZDN方法將配合第6圖詳細說明如下。在這種演 3 ϋ開始步驟9 0 0後’全域變數M、C、N應先予啟始化。 這個步驟的目的係計算下列模數乘法:Montgomery multiplication does not use look-ahead methods to speed up the modulo multiplication operation in hardware. The DE 3 63 1 9 92 C2 system discloses a method in which the number multiplication system at z / Nz uses a multiplication preview method, and uses this multiplication preview method to accelerate the speed. The method described in DE 3 63 1 99 2 C2 is also called the ZDN method. Second, the ZDN method will be described in detail with reference to FIG. 6 as follows. After such a step 3, the global variables M, C, and N should be initialized before step 900. The purpose of this step is to calculate the following modulo multiplication:

Z mod C 其中,M係稱為乘數、C係稱為被乘數 I 、 a 1VT /么你、, .... 的結果、且Ν係稱為模數。 明。;::::f區域變動應給予啟始化,其並不需要詳t 思灸,&種ZDN方法會施加兩種預看方 法預看方法GEN MULT 榎預有万法在k種乘 金Η〆 〜U L丨―LA中’一乘法平移數值S7及一預蒼 數A係利用不同的預羞指目,丨4 ^+ 值2汉頂看 預看規則计异出來(9 1 〇 )。隨即,這$Z mod C Among them, M is called the multiplier, C is called the multiplicand I, a 1VT / Mody, ..., and N is called the modulus. Bright. ; :::: f regional changes should be given initiation, which does not require detailed moxibustion, & ZDN methods will apply two preview methods Preview method GEN MULT Η〆 ~ UL 丨 ―The multiplication method S7 in LA and a premature number A are using different pre-ashamed fingers, and 4 ^ + value 2 Handing looks different according to the preview rule (9 1 0). Immediately, this $

第11頁 700400442 五、發明說明(6) ---- z暫存器的目前内容會執行Sz位元的左移操作(92〇 )。 另外’在執行這種預看方法的同時,一種歸約預看方 法GEN —Mod —LA ( 93 0 )亦會執行,藉以計算一歸約平移數 —歸約參數B。在步驟94()中,這個模數暫存器n的目 A内谷㈢平移s N位元,藉以產生一平移模數數值n,。這個 ZDN方法的主要三運算元操作則是發生在步驟9 5 〇。這裡, 在步,920後,這個中間結果2,會相加至這個被乘數^,其 采以這個乘法預看參數A,並相加至這個平移模數n,,其 乘以這個歸約預看參數B。根據目前的情況,這些預看參 數A及B可能具有下列數值:+ 1、〇、或一1。 / 在一種情況中,這個乘法預看參數A為+ 1、且這個歸 約預看參數B為~ 1,藉以使這個被乘數c能夠相加至平移 中間結果Z’ ,且這個平移模數N,能夠由這個平移中間結果 Z’中減去。特別是,這個乘法預看參數a將會具有一數值 〇,當這個乘法預看方法能夠容許大於預定數目的個別左 f步驟時,亦即··當sz大於其最大容許數值(亦稱為k ) 時。在這個乘法預看參數A等於〇、且這個平移中間結果 2’仍因先前模數歸約而非常小(特別是,小於這個=移模 數Ν’)的情況下,這種方法並不需要進行歸約,因此,這 個歸約預看參數Β等於〇。 一步驟9 10及9 50會持續進行,直到這個被乘數的所有位 70都已經處理完畢(亦即:直到這個乘法預看參數Α亦等 於〇 ),、其表示:這個平移模數Ν,是否大於原始模數Ν、或 即使在這個被乘數的所有位元都已經處理完畢的時候,我Page 11 700400442 V. Description of the invention (6) ---- The current contents of the z register will perform a left shift operation of the Sz bit (92). In addition, while executing this preview method, a reduction preview method GEN —Mod —LA (93 0) will also be executed to calculate a reduction translation number —reduction parameter B. In step 94 (), the valley A of the modulo register n is shifted by s N bits, thereby generating a shifted modulo value n ,. The main three-operand operation of the ZDN method occurs at step 950. Here, after step 920, the intermediate result 2 will be added to the multiplicand ^, which takes the multiplication preview parameter A, and adds to the translation modulus n, which is multiplied by the reduction Preview parameter B. According to the current situation, these preview parameters A and B may have the following values: +1, 0, or -1. / In one case, the multiplication preview parameter A is +1, and the reduction preview parameter B is ~ 1, so that the multiplicand c can be added to the translation intermediate result Z ', and the translation modulus N can be subtracted from this translation intermediate result Z '. In particular, the multiplication preview parameter a will have a value of 0. When the multiplication preview method can tolerate more than a predetermined number of individual left f steps, that is, when sz is greater than its maximum allowable value (also known as k ) Time. In the case where the multiplication preview parameter A is equal to 0 and the translation intermediate result 2 'is still very small due to the previous modulus reduction (especially, less than this = shift modulus N'), this method does not require Reduction is performed, so this reduction preview parameter B is equal to zero. A step 9 10 and 9 50 will continue until all the bits 70 of the multiplicand have been processed (that is, until the multiplication preview parameter A is also equal to 0), which means: the translation modulus N, Is it greater than the original modulus N, or even when all the bits of this multiplicand have been processed, I

第12頁 700400442 五、發明說明(7) 們是否仍需要由中間結果Z中減去這個模數,並執行額外 的歸約步驟。 最後’決定這個中間結果z是否小於〇。若這個中間結 果Z小於0,則這個模數N必須加至這個中間結果z以得到一 最後歸約,藉以得到這個模數乘法的正確結果Z。在步驟 96 0中,結束這種ZDN方法的模數乘法。 這個乘法平移數值sz及這個乘法參數!《,其乃是在步驟 91 0中利用這種乘法預看演算法計算,係來自這個乘法器 的拓撲及來自使用的預看規則,如DE 3631992 C2所述。 如DE 3631992 C2所述,這個歸約平移數值sN及這個歸約 參數B可以利用這個z暫存器的目前内容及一數值2 /3乘以 N的比較以決定。基於這個比較步驟,這種ZDN方法遂得以 命名(ZDN=Zwei Drittl N=two thirds N)。 、這種ZDN方法,如第6圖所述,乃是將這個模數乘法歸 約為一三運算元加法(第6圖之方塊95〇),其中,這種乘 法預看方法及這種歸約預看方法係用來增加計算時效。因 此,相車乂於在Z/NZ上的Montgomery歸約,這種方法將可 達到二倍的計算時間優勢。 、 這種乘法概念的缺點是,這種方法僅僅計 # f采作、但卻不計算DIV操作(亦即:提供這個乘數Ν 及这個被乘數Τ的乘積相對模數Ν的整數商Q的操作),葬 以將這個乘:籍本F } 精 … 石積表不為:CxM=Q?N+Z。然而,如先前所 述^個整數商Q在特定應用中係非常有用,舉例來說, -種應用乃是將具有特定位元長度的模數乘法,執‘於僅Page 12 700400442 V. Description of the invention (7) Do we still need to subtract this modulus from the intermediate result Z and perform an additional reduction step? Finally, 'determines whether this intermediate result z is less than zero. If the intermediate result Z is less than 0, the modulo N must be added to the intermediate result z to obtain a final reduction, thereby obtaining the correct result Z of the modulo multiplication. In step 960, the modulo multiplication of this ZDN method is ended. The multiplication shift value sz and the multiplication parameter! "It is calculated by using this multiplication look-ahead algorithm in step 91 0, which is derived from the topology of this multiplier and from the look-ahead rules used, as described in DE 3631992 C2 Described. As described in DE 3631992 C2, the reduction translation value sN and the reduction parameter B can be determined by using the current contents of the z register and a value of 2/3/3 times N. Based on this comparison step, this ZDN method was named (ZDN = Zwei Drittl N = two thirds N). This ZDN method, as shown in Figure 6, is to reduce this modulo multiplication to a one-three operator addition (box 95 in Figure 6). Among them, this multiplication preview method and this reduction The preview method is used to increase the calculation time. As a result, the similarity is reduced to Montgomery reduction on Z / NZ, this method will achieve twice the computing time advantage. The disadvantage of this concept of multiplication is that this method only counts # f adopted, but does not calculate the DIV operation (that is, provides the integer quotient of the product of this multiplier N and the multiplicand T relative to the modulus N The operation of Q) is multiplied by: the book F} fine ... The stone product table is not: CxM = Q? N + Z. However, as mentioned previously, ^ integer quotients Q are very useful in specific applications. For example, one application is to multiply a modulus with a specific bit length by

200400442 五、發明說明(8) 具有一半位元長度的計算單元上。 有鑑於此,本發明的主要目的便是提供一種概念,藉 以簡易及有效地實施一整數商的計算。 本發明的上述及其他目的係根據申請專利範圍第i項 所述的裝置,及根據申請專利範圍第丨6項所述的方法。 本發明係基於下列瞭解,亦即:在計算乘數及被乘數的乘 積(並選擇性地將這個乘積加上乘以因子2n之第三運算 疋)、,的餘數Z的處理器中,其係在數個處理步驟中依序處 =或”掃描”這個乘數的各個位元,這個整數商的擷取並不200400442 V. Description of the invention (8) On a calculation unit with half bit length. In view of this, the main object of the present invention is to provide a concept by which the calculation of an integer quotient is implemented simply and efficiently. The above and other objects of the present invention are based on the device described in item i of the scope of patent application, and the method described in item 6 of the scope of patent application. The present invention is based on the understanding that, in a processor that calculates the product of a multiplier and a multiplicand (and optionally adds this product to a third operation 乘 multiplied by a factor 2n),, the Is to sequentially scan the bits of this multiplier in several processing steps, the extraction of this integer quotient is not

二要干預這個計算單元本身、甚至亦不需要干擾控制這個 計算單元的控制部件。 在一般的模數算術中,由於缺乏適當的利用,這個整 ^商(這個D I V操作的結果)經常會被忽略。根據本發 廷個整數商係計算一項目相對一模數的餘數以得到, 藉以在這個處理器計算中間結果(其係相對模數以歸約得 3 )>的各個處理步驟中,同時登錄歸約資訊及順序資訊, 其係參考這個整數商的各個位元、並係關連於個別處理步 , 卩現後’利用數個步驟處理乘數位元,並利用個別步驟Second, it is necessary to intervene in the computing unit itself, and it is not even necessary to interfere with the control unit that controls the computing unit. In general modulo arithmetic, this integer quotient (the result of this DIV operation) is often ignored due to the lack of proper utilization. Calculate the remainder of an item relative to a modulus according to this integer integer quotient to obtain the intermediate result (which is the relative modulus to reduce to 3) in this processing step, and log in at the same time The reduction information and sequence information refer to each bit of this integer quotient and are related to individual processing steps. Now, 'multiple bits are processed using several steps, and individual steps are used.

=價登錄的歸約資訊及順序資訊,藉以利用簡易算術操作 得到這個整數商。 一在本發明的較佳實施例中,當這個處理裝置處理乘數 ,兀,時,,錄暫存器必須保留,其中,特定順序(利用 順序資訊決定)的位元會在各個處理步驟後、利用歸約資 訊進仃設定或不加設定。另外,若使用兩個或更多個登錄= The reduction information and order information of the price registration, so that this integer quotient can be obtained using simple arithmetic operations. First, in a preferred embodiment of the present invention, when this processing device processes multipliers, the register must be retained, in which the specific order (determined by the order information) of the bits will be after each processing step 2. Use the reduction information to set or not set. Also, if using two or more logins

第14頁 700400442 五、發明說明(9) _^ 暫存器,則評價裝置亦能夠在處理 相加或相減這些登錄暫存哭 有采數位7L後,簡易 丁货存口口以仔到這個整數商。 本發明概念會特別有利,因 處理裝置輸出的任何f1 ,驻、:種方法亚不需要這類 此,這個整數商可言算這_D操作。因 言),並且,這種方法算時間而 單元。另夕卜,這種方法僅僅需固處理裝置的計算 是在各個處理步驟結束時,經,、—個登錄裝置,其乃 歸約資訊或順序資訊。二纪個控制部件擷取必要的 最後,利用評價裝置以 =計算單元進行任何變動的;匕錄資訊,藉以在不 的、、,°果。 k下,得到這個整數商 這個特徵亦是非常重要, 長整數計算單元,发堂合 ·加密朴管i 士、S Α β t)進仃取仏化。另外,干預,作(諸如:模數乘 吊會具有1 024個或更多個加法哭、長整數計算單元(其通 責、易於出錯、且必須重新測;;;元)㈣計亦非常昂 全性相關的裝置中(其通常合二田斤有功能。特別*,在安 f徵亦是格外重要,因為在密演算法),安全性 極可能會處理到各種敏感資·,::卡及晶片卡時,我們 訊。 = .金錢數量或個人資 另外,本發明方法的優點 a 、 間岔集的方法,其在利用有限沒種方法亦不是計算時 (由於其晶片面積限制),I ,及記憶體資訊的處理哭 一_ 斤叩責加密演算法時,將;Page 14 700400442 V. Description of the invention (9) _ ^ temporary register, the evaluation device can also deal with the addition or subtraction of these registered temporary storage crying numbers 7L, the simple Dingkou port to this Integer quotient. The concept of the present invention will be particularly advantageous, because any f1 output from the processing device does not need this kind of method. Therefore, this integer quotient can be regarded as the _D operation. Because of this), and this method counts time and unit. In addition, this method only requires the calculation of the fixed processing device. At the end of each processing step, a registration device is used, which is reduction information or sequence information. The two control components capture the necessary finally, and use the evaluation device to make any changes to the calculation unit; the information is recorded in order to avoid any consequences. Under k, it is also very important to get this integer quotient. The long integer calculation unit, Fatanghe · Encryption and Management, S Α β t) is obtained and converted. In addition, intervention, such as: modulo multiplication will have 1,024 or more addition crying, long integer calculation units (its general responsibility, error-prone, and must be re-tested;; yuan) The calculation is also very expensive In all-related devices (which are usually functional with Ertian Jin. Especially *, the Anf sign is especially important, because in the secret algorithm), the security is likely to handle all kinds of sensitive information. In the case of chip cards, our newsletter = = the amount of money or personal expenses. In addition, the advantages of the method of the present invention a, the method of bifurcation set, which is not calculated when using a limited number of methods (due to its chip area limitation), I , And the processing of memory information crying _ 叩 叩 叩 blame the encryption algorithm, will;

700400442700400442

特別重要。 較佳實施例之詳細說明very important. Detailed description of the preferred embodiment

第1圖係表示本發明裝置之方塊圖,藉以計算一項目τ 相對模數N之一整數商,其中,這個項目係包括一二進 位乘數Μ及一二進位被乘數c之一乘積。這個裝置係包括一 處理裝置1 0,其切割為一計算單元丨〇 a及一控制部件丨〇 b。 通常:這個=算單元係包括一長整數加法器,其具有二個 或更^個運算元,而這個控制部件i 〇b則會形成以控制這 個計算單元,藉以依序處理這些乘數位元、並在所有乘數 位π處理完畢後,最後提供這個項目的模數歸約的結果 Ζ ’其包括這個乘積C?M。FIG. 1 is a block diagram of the device of the present invention for calculating an integer quotient of an item τ relative modulus N, where the item is a product of a binary multiplier M and a binary multiplicand c. This device comprises a processing device 10, which is cut into a computing unit 丨 a and a control unit 丨 0b. Normally: the arithmetic unit includes a long integer adder, which has two or more operands, and the control unit i 0b will be formed to control the arithmetic unit, thereby sequentially processing these multiplier bits, And after all the multipliers π have been processed, the result of the modulus reduction of the item Z ′ is finally provided, which includes the product C? M.

另外,本發明裝置亦包括一登錄裝置12,藉以在個別 處理步驟中登錄歸約資訊、及登錄個別處理步驟所關連的 整數商的一個或數個位元的順序資訊。這個登錄裝置丨2可 以有效地麵接至這個控制部件l〇b,藉以擷取各個處理步 驟的登錄資訊。當這個控制部件1 Ob發送信號至額外提供 的評價裝置14時(其係用以處理所有乘數位元、並產生/最 終結果Z),這個評價裝置14會存取這個登錄妒晉以坪 價這個歸約資訊及這個順序資訊,藉以最後輸&出這個整數 商Q。 就硬體而論,這個模數歸約最好能夠利用這個模數的 減去以達成,炎真,在一處理步驟中,根據這個計曾單元 l〇a的實施方式,本發明亦可以執行一次或數次模數^去 動作。如下文所述,若本發明同時採用乘法預看演算法及In addition, the device of the present invention also includes a registration device 12 for registering reduction information in individual processing steps, and registering sequence information of one or several bits of integer quotients associated with the individual processing steps. The registration device 2 can be effectively connected to the control unit 10b to retrieve the registration information of each processing step. When the control unit 1 Ob sends a signal to the additionally provided evaluation device 14 (which is used to process all multiplier bits and generate / final result Z), the evaluation device 14 will access the login envy and price this The reduction information and the sequence information are used to finally & output the integer quotient Q. As far as hardware is concerned, this modulus reduction can best be achieved by subtracting this modulus. It is true that in a processing step, the present invention can also be implemented according to the implementation of this accounting unit 10a. One or several times modulo ^ to go. As described below, if the present invention uses a multiplication preview algorithm and

700400442 五 發明說明(11) 其他歸約預蒼、A » 能會加入這個类則if個處理步驟中,-模數亦可 -模數或加果;;個?約資m(其表示是否減去 C)可以在各個處理步驟中KVt數亦不加 連的整數商;:順序::乃是用來對照個別處理步驟所關 始處理或d。因=2些乘數位元通常是由上面開 較簡易的乘法演=中”“元開始。在 -處理步驟中數:序資訊可以直接對應於在 ::用乘法預看演算法,則在一處J牛=卜’ *本發明僅 成個位7L將予,乂考量及處理。在二:I,故個乘數的 訊將取決於這個乘數的這幾個位元”中’ 4個順序資 法及歸約預看演算法的情況中,J個2接乘法預看演算 於在-處理步驟中考量的這個乘=順序資訊係間接取決 連,如典型的預看演瞀法,一位70的順序。這個關 一方面則是由歷史資^決定。 係關連於資料本身、另 在本發明的較佳實施例中, 性,這個登錄裝置可以設計為具二硬體的可簡易實施 存器組,其係逐步說明、並在2個二個或數個暫存器的暫 這個評價裝置進行適當評價(諸如聚數處理完成後,利用 得到這個整數商Q。 ·加入或減去),藉以 在下文中,一種簡易的乘法、、言… 說明如下,其亦可以稱為”教科奎、:法係配合第2圖詳細 algor i thm ) π。這種演算法係接玲/秀异法(text —book ’、收這個模數N、這個被乘700400442 V. Description of the invention (11) Other reduction plans, A »If you can add this class, if there are processing steps,-modulus can also-modulus or add fruit; a? The integer m (which indicates whether or not C is subtracted) can be an integer quotient without the KVt number added in each processing step;: sequence:: is used to compare the processing or d relative to the individual processing steps. Because = 2 some multiplier bits usually start with the simpler multiplication calculation above = "" yuan. In the -processing step, the number: sequence information can directly correspond to the preview algorithm in the multiplication :: then J Niu = Bu '* This invention will only be a single digit 7L, so consider and deal with it. In the case of two: I, the number of multipliers will depend on the number of bits in this multiplier. In the case of '4 sequential data methods and reduction look-ahead algorithms, J two-by-multiple look-ahead calculations The multiplication = sequence information considered in the -processing step depends indirectly on the connection, such as the typical preview method, a sequence of 70. This aspect is determined by historical resources. The relationship is related to the data itself. In addition, in a preferred embodiment of the present invention, this registration device can be designed as a simple implementable register group with two hardware, which is explained step by step, and is implemented in two, two, or several registers. For the time being, the evaluation device performs an appropriate evaluation (such as after the polynumerization process is completed, and uses the integer quotient Q to add or subtract), so that in the following, a simple multiplication, language, ... is described below, which can also be called " Teaching Ke Kui: The law system cooperates with Figure 2 in detail algor i thm) π. This algorithm is based on the Ling / Xiu Yi method (text — book ′), accepts this modulus N, and this multiplied

700400442 五、發明說明(12) ^ (根據定義,必須小於模數N)、這個乘數 3位乘數位元M。(LSB)至Mra—! (MSB),且大於 輸入。這種演算法係提供Z=Cx M m〇d N以做 代為^ :啟始步驟中,這個乘數i的順序會啟始為^ 。在第 廷個Z暫存器(其乃是在處理期間做為中間結果 : ,f最後做為最終結果暫存器)亦會加以啟始子%、 夂步驟中’測試這個乘數的目前考量位元Mi是否J:。, =1。右这個位兀等於0 ’則僅需要執行與這個因子^乘 1、或僅需要將這個Z暫存器向左平移一個位元(如方J 一23所不)、然而’若這個位元等於】,則這個暫存哭的内 谷必須向左平移一位元(其對應於因子2的乘法),然 再加上這個被乘數C (如方塊22b所示)。接著,杆、、、 模數歸約:首先,在步驟23中,測試這個中間結果暫:哭 的内容是否大於或等於N。若這個問題的答案為π 9,,,^ 由這個中間結果暫存器Ζ中減去這個模數Ν 一次(2 4 )。麸 後,再度測試這個中間結果暫存器ζ的目前内容是否於、、 或等於Ν ( 2 5 )。若這個問題的答案仍然為,,是,,,則再二 由廷個中間結果暫存器ζ中減去這個模數Ν ( 2 6 )。 人+ 驟會重覆進行,直到i等於〇 (在方塊27中進行測試)σ。ς 這個問題的答案為,,是",則這個演算法便會結束。然 若這個問題的答案為,,否”,則i必須在方塊28中遞減、、、,700400442 V. Description of the invention (12) ^ (according to the definition, it must be less than modulo N), this multiplier is 3 multiplier bits M. (LSB) to Mra !! (MSB) and greater than the input. This algorithm provides Z = Cx M mOd N as the replacement ^: In the initial step, the order of this multiplier i will start as ^. In the first Z register (which is used as an intermediate result during processing:, f is used as the final result register), the starter% and the current considerations of 'testing this multiplier in step 亦 will also be added. Bit Mi J :. , = 1. The right bit is equal to 0 ', then you only need to perform a multiplication by this factor ^ 1, or you need to shift the Z register to the left by one bit (as in square J-23), but' if this bit Is equal to], then the temporarily crying inner valley must be shifted to the left by one bit (which corresponds to the multiplication of the factor 2), and then the multiplicand C is added (as shown in block 22b). Next, the rod,, and modulus are reduced: first, in step 23, test this intermediate result temporarily: whether the content of crying is greater than or equal to N. If the answer to this question is π 9 ,,, ^ subtract the modulus N from the intermediate result register Z once (2 4). After the bran, test again whether the current content of the intermediate result register ζ is equal to, or equal to N (2 5). If the answer to this question is still, yes, then, subtract this modulus N (2 6) from the intermediate result register ζ. The person + step is repeated until i is equal to 0 (tested in box 27) σ. The answer to this question is, if yes, then the algorithm will end. However, if the answer to this question is "No", then i must be decremented in box 28 ,,,,

進行方塊21至27之另一次遞迴。 I 在下文中,第3圖所示演算法的本發明延伸(其係 不第1圖登錄裝置1 2及第1圖評價裝置丨4的功能)係配合第Perform another recursion of blocks 21 to 27. I In the following, the extension of the invention of the algorithm shown in FIG. 3 (which is not the function of the registration device 12 in FIG. 1 and the evaluation device in FIG. 1) is coordinated with the first

第18頁 700400442 五、發明說明(13) " 3圖,詳細說明如下。第3圖的元件,若與第2圖的元件具 有相同的圖式符號,則會具有相同功能且不再詳細說明。 在本發明的較佳實施例中,這個登錄裝置具有兩個輔助暫 存器Q及Q’ ,其分別在步驟2〇,中加以啟始化,藉以用於第 2圖所示的已知,,教科書演算法”的延伸。根據方塊23問題 的答案(其表示:利用步驟2 2a及221)得到的這個中間結果 ^是否大於或等於N),第一輔助暫存器Qi或第二輔助ί存 器Q^i中、順序i的位元會描述為,,〇,,。這個歸約資訊係包 括這些0 ,其係輸入至這個順序資訊決定的這個暫存哭 的位元i。若這個中間結果Z小於N,如方塊23所決定,^ 不需要執行其他模數減法,其表示:這些個別輔助暫存写 位疋均會設定為0。然而,若執行一模數減法(如步驟24 所不),則這個第一辅助暫存的位元i將會設定為15 且這個第二輔助暫存器Q,的位元i將會設定為〇,如方塊 3 0 b所示。 若執行第二次模數減法(如第3圖的方塊26所示), 則這個第一輔助暫存器Q的位元i及這個第二輔助暫存器 Q的位元i均會設定為1,如方塊3 〇 c所示。這個程序會在 各個處理步驟中執行’直到方塊2 7決定i等於0。隨後,第 1圖所示的評價裝置1 4便會成為主動,藉以相加這兩個輔 助暫存器Q及Q’ ,如方塊32所示,進而得到這個整數商Q以 做為結果。如此’這個登錄裝置的功能便玎以利用第1圖 的評價裝置14、在第3圖的方塊32中實施。 由第3圖可知,這個演算法並不需要執行任何變動以Page 18 700400442 V. Description of the invention (13) " 3 pictures, detailed description is as follows. The components of FIG. 3 have the same drawing symbols as those of FIG. 2 and will have the same functions and will not be described in detail. In a preferred embodiment of the present invention, this registration device has two auxiliary registers Q and Q ′, which are initialized in step 20, respectively, for the known use shown in FIG. 2, , Textbook algorithm "extension. According to the answer to the question in block 23 (which means: use step 2 2a and 221) whether the intermediate result ^ is greater than or equal to N), the first auxiliary register Qi or the second auxiliary ί The bits of the sequence i in the register Q ^ i will be described as, 0, .... The reduction information includes these 0s, which are input to the temporary crying bit i determined by the sequence information. If this The intermediate result Z is less than N. As determined by block 23, ^ does not need to perform other modulo subtraction, which means that these individual auxiliary temporary write bits 疋 will be set to 0. However, if a modulo subtraction is performed (as in step 24) No), the bit i of the first auxiliary register will be set to 15 and the bit i of the second auxiliary register Q, will be set to 0, as shown in block 3 0 b. If executed The second modulo subtraction (as shown in box 26 in Figure 3), then this first auxiliary Bit i of register Q and bit i of this second auxiliary register Q will be set to 1, as shown in block 3 0c. This program will be executed in each processing step 'until block 2 7 determines i It is equal to 0. Then, the evaluation device 14 shown in Fig. 1 becomes active, and the two auxiliary registers Q and Q 'are added, as shown in block 32, and then the integer quotient Q is obtained as Result. In this way, the function of this registration device is implemented by using the evaluation device 14 of FIG. 1 and implemented in block 32 of FIG. 3. As can be seen from FIG. 3, this algorithm does not need to perform any changes to

第19頁 700400442Page 700 700 442

五、發明說明(14) 取得這個整數商資訊。請參考第丨圖·,這表示:這個 裝置10的計算單元1〇a及控制部件1〇b均不需要改變,~理 亦不要進行設計或重新測試,藉以用於這個整數商教且 算。 J叶 次另外,由第3圖可知,登錄這個歸約資訊及這個 資訊並不需要一額外的計算步驟。另外,在這種方法、序 僅有相加兩個輔助暫存器的評價裝置需要一額外的加: ,期。不過丨相較於這些數值N、c、M所具有的,舉例器 w兒,1 0 2 4位元,其表示:第3圖的遞迴步驟必須要執行Λ 1 〇 2 4次,這個周期便顯得微不足道。 丁 工 另外’第3圖所示的演算法不僅可以延伸以處理這個 =目C X Μ,並且亦可以延伸以處理這個項目c χ M + D X以。 思個延伸可严在步驟2〇,中,不要將這個中間結果Z啟始為 、而是將這個中間結果2啟始為D而輕易得到。因此,第^ ==路所執行的操作亦可以稱為啟動M〇操作,當這個中 果暫存二C 在弟一次遞迴步驟前啟始為數值d的時 ,。在這,架構中,MMD即是MultM〇dDiv,藉以表示:第3 ,所不演算法可以同時提供這個項目的模數歸約結果及這 固項目的整數商C X μ + β X 2n,其中,當D等於0,這種演算 法即是一般的乘法結果。 第4圖係表示第6圖(已知ZDN演算法,且已經說明如 上)的局部縮減圖。一啟始方塊4〇乃是用來啟始這些數值 1 ’ Z、及C ’其對於本發明係非常重要。再一次,z可以啟 始為0或D ’藉以執行MMD操作或啟動MMI)操作。V. Description of the invention (14) Obtain this integer quotient information. Please refer to Figure 丨, which means that the calculation unit 10a and control unit 10b of this device 10 do not need to be changed, and the design or retesting is not required for this integer business education and calculation. J Leaf In addition, as shown in Fig. 3, registering this reduction information and this information does not require an additional calculation step. In addition, in this method, the evaluation device that only adds the two auxiliary registers requires an additional addition:, period. However, compared with these values N, c, and M, the example is w 1024 bits, which means: the recursive step in Figure 3 must be performed Λ 1 〇 2 4 times, this cycle It seems trivial. Ding Gong In addition, the algorithm shown in Figure 3 can not only be extended to deal with this = mesh C X Μ, but also can be extended to deal with this item c χ M + D X. An extension can be thought of strictly in step 20, instead of starting the intermediate result Z as D, but getting the intermediate result 2 as D and getting it easily. Therefore, the operation performed by the ^ == way can also be referred to as starting the M0 operation. When the second temporary C is started with the value d before the step of recursive steps. In this architecture, the MMD is MultM0dDiv, which means: No. 3, the algorithm can provide the modulus reduction result of this item and the integer quotient CX μ + β X 2n of this fixed item, where, When D is equal to 0, this algorithm is the result of general multiplication. Figure 4 shows a partial reduction of Figure 6 (known ZDN algorithm and already explained above). A starting block 40 is used to start these values 1'Z, and C ', which are very important for the present invention. Once again, z can start at 0 or D 'to perform MMD operation or start MMI operation.

第20頁 700400442 五、發明說明(15) 如後績方塊所示,第6圖的ZDN裝置910、920、930係 ^乘法平移數值sz (其通常大於^),一乘數位元數值、 二一表示:在一預看步驟中處理的乘數位元數目),這個 平移^數值%,以及這個乘法預看參數A及這個歸約預看 ς β。這個乘數位元數目〗會在各個處理步驟後降低 ^固數值C乃是表示··這個模數的逗號,這個原始模數的 有效位元(LSB),是位在這個模數的緩衝器的那一 凡。在各個處理步驟後,這個數值C會變更為c +、。 暫存中,執行模數平移,其可以制這個模數 9 5 0中°° 、舊=容與這個因子2SN的乘法加以表示。在步驟 這此半’峨執>订三運算元加法,其已經配合第6圖進行說明, 所;持續進行,直到1等於0且c亦等於〇 (如方塊42 中間妹莩7右e1等於〇且c亦等於〇,則在步驟44中,檢查這個 上這個桓盍3否小於〇。若這個中間結果z小於0,則再度加 數2必/、 (如步驟46所示),因為這個模數乘法的餘 一次遞、回於。然而,若方塊42的答案為,,是",則執行另 個乘元藉以根據這個乘數的預看特性,處理一個或數 伸係ί ^ ^,第4及6圖所示的已知ZDN演算法的本發明延 係矣-σ 5圖詳細說明如下。第4及5圖的相同圖式符號 次,表厂、、 件。因此,這些元件將不再詳細說明。再一 sN、Α、I為,塊91 0、92 0、930的ZDN處理器係提供Sz、 j ( 1 P 心即,在啟始方塊40,中啟始的整數商順序數值 始為m )便可以在方塊5 0中,利用這個乘法平Page 20, 700, 400, 442 5. Description of the invention (15) As shown in the last performance box, the ZDN device 910, 920, and 930 in Figure 6 ^ multiply translation value sz (which is usually greater than ^), one multiplier bit value, two one Represents: the number of multiplier bits processed in a preview step), the translation ^ value%, and the multiplication preview parameter A and the reduction preview β. The number of multiplier bits will be reduced after each processing step. The fixed value C is a comma representing the modulus. The effective bit (LSB) of the original modulus is located in the buffer of this modulus. That one. After each processing step, this value C will be changed to c + ,. In the temporary storage, a modulo shift is performed, which can be expressed by multiplying the modulo 9 50 in °°, old = capacity and the factor 2SN. In this step, "Echi"> order the three operator addition, which has been described in conjunction with Figure 6, so; continue until 1 equals 0 and c is equal to 0 (such as box 42 middle sister 7 right e1 equals 〇 and c is also equal to 〇, then in step 44, check whether this 桓 盍 3 is less than 〇. If the intermediate result z is less than 0, then add 2 again / (as shown in step 46), because this The remainder of the modulo multiplication is repeated and returned. However, if the answer to block 42 is, yes, then another multiplier is executed to process one or the number extension system based on the preview characteristics of this multiplier. ^ ^ The extended Z-σ 5 diagram of the present invention with the known ZDN algorithm shown in Figs. 4 and 6 is described in detail below. The same diagram symbols in Figs. 4 and 5 are used. Therefore, these components It will not be described in detail. Another sN, A, and I are that the ZDN processors of blocks 9 10, 9 0, and 930 provide Sz, j (1 P), that is, the starting integer quotient in starting block 40, The ordinal value starts with m), then you can use this multiplication in block 50

200400442 五、發明說明(16) ϊίΓ:巧個歸約平移數值〜的差異進行歸約。若、 乘法預看演算法(其係g主^加+ 邱、习右廷個 個中間結果將平移至上、面貝(;:;法:二多數值、)*定這 動),則在這個登錄袭置的順序資二:=元移 不),這個整數商的較低有 ϋ50所 此,目前步驟的整數商你1^將會具有“關連。如 整數商暫存器位元順序達7:、_5將)會低於先前步驟的個別 扯 $ 、bZ 一 SN j 位 7C。 ,而,若出現一正歸約平移 數暫存器N的内容將會2SN伴女私土、,土L⑴表不.現個模 加"模數,其乃是由會·/: 财步驟。若減去這類,,增 在這個順序資訊中(方 ^ ) &成,則 高有效位元將合1女4 A -數j ) ’這個整數商的較 Ί: 有較高關㊣,相較於先前的遞迴步驟 在第5圖的方塊52中,這個歸約資訊乃是二^表驟。 $式。另外’這個登錚奘罟 為表才。 Q’,其中,這雨是利用兩個辅助暫存器Q及 參數B。若ZD”置麥:Ϊ :=疋數值乃是取決於這個歸約 歸約。因個參數’則*需要執行任何 兩暫存及Q,的順序j位元均會設定為〇 運曾二 =這個歸約參數β等於1,則這個模數必須在-作中加至這個目前中間結果。在方塊52中Ϊ; 二暫存則,的個別位元j設定為1,並將第:: 別位元j設定為〇。然』,若減去一模數輔 _ 不.只際執行一歸約,且利用歸約參數"—i ”矣 :)’則在這兩個輔助暫存器巾二 別位元]設定為1,而第二輔助暫存器Q,的個::;=: 200400442 五、發明說明(17) " ' —------ =為0在方塊54中’執行一校正步驟’如參數b等於】的 情況。在方塊44中’若這個中間結果c在 理後小於0,則表示已經多執行一次歸約。因&, 46中,Z必須增加N。在歸約資訊中,在方塊54 鍤 助暫存器Q’的最低有效位元9、係設定為丨。 弟一辅 。隨後,第1圖的評價裝置14將會啟動以由第一輔助 存器Q中減去第二輔助暫存器Q,(方塊56),藉以得到二 進位的整數商。關於方塊56的減去,這個存; -計數,用於三運算元操作的所有實際執行模數^去、,有其 中,當z小於0時(方塊44),這個數目會過高,藉以 個第二輔助暫存器Q,的内容(特別是最低有效位元,其在 ^塊54中設定)必須再度減去。這個歸約參數8等於i /時亦 ^同樣情況。這裡,我們並不需要減去模數,而是要加上 杈f。另外,在這個整數商中,我們亦必須重新考量將這 個第二輔助暫存器由第一輔助暫存器中。熟習此技術者可 知^當第二輔助暫存器Q,的位元設定為” _Γ、而非,,+ Γ’時,在方塊56中,評價裝置係執行加法、而非減法。 綜上所述,熟習此技術者當明白,本發明概念係特別 適用於硬體實現方式。這乃是由於MMD命令的軟體實現將 會需要額外的效能及管理工作。因此,本發明概念將可以 取代軟體的實現方式。特別是,本發明概念亦可以整合在 現有的加密處理器中,因為,我們可以僅需要變動加密控 制器的VHDL,便可以將這個登錄裝置及這個評價裝置同時 加入現有的處理裝置中。因此,現有的模數乘法命令將可200400442 V. Description of the invention (16) ϊίΓ: Reduce the difference between the reduction and translation values ~. If, the multiplication preview algorithm (which is g + ^ plus + Qiu, Xi Youting will be translated to the upper and lower shell (;:; method: two more values,) * fixed this move), then here The order of login registration is two: = yuan shift is not), the lower of this integer quotient is ϋ50, the integer quotient of the current step 1 ^ will have "relationship. For example, the integer quotient register bit order reaches 7 :, _5 will) will be lower than the individual steps in the previous steps, $, bZ, SN j, and 7C. However, if a positive reduction translation number register N appears, 2SN will be the female private land, and soil L⑴ It means that there is a modulo plus quotient, which is from the step of… /: financial steps. If you subtract this type and add it to the sequence information (方 ^) & Cheng, the most significant bit will be Combine 1 female 4 A-number j) 'Comparison of this integer quotient: there is a higher correlation, compared to the previous recursive step in box 52 in Figure 5, this reduction information is two table steps . $ Type. In addition, 'this board is a table talent. Q', where the rain is using two auxiliary registers Q and parameter B. If ZD "is set: Ϊ: = 疋 The value depends on This Reduction reduction. Because of the parameter 'then * need to perform any two temporary storage and Q, the order of j bits will be set to 0. The second parameter = this reduction parameter β is equal to 1, then this modulus must be added to this Intermediate results. In block 52, two temporary storage rules, the individual bit j is set to 1, and the second :: other bit j is set to 0. However, if you subtract a modulo auxiliary _ no. I only perform a reduction, and use the reduction parameter " -i "矣 :) 'then set two bits in these two auxiliary registers] Is 1, and the second auxiliary register Q, is ::; =: 200400442 V. Description of the invention (17) " '------- = 0 is' perform a correction step' in block 54 For example, if the parameter b is equal to []. In box 44 'If this intermediate result c is less than 0 after processing, it means that the reduction has been performed more than once. Because &, 46, Z must increase by N. In the reduction information At block 54, the least significant bit 9 of the auxiliary register Q 'is set to 丨. Yi Yifu. Subsequently, the evaluation device 14 of FIG. 1 will be activated to subtract from the first auxiliary register Q. The second auxiliary register Q, (block 56), to obtain the integer quotient of the binary. With regard to the subtraction of block 56, this is stored; Among them, when z is less than 0 (block 44), this number will be too high, so the content of the second auxiliary register Q, especially the least significant bit, which is ^ Set in block 54) must be subtracted again. The reduction parameter 8 is equal to i / h. ^ The same is true. Here, we do not need to subtract the modulus, but add the f. In addition, in this integer quotient In the second auxiliary register, we must reconsider that the second auxiliary register is included in the first auxiliary register. Those skilled in the art will know that when the second auxiliary register Q is set to "_Γ" instead of When + Γ ′, in block 56, the evaluation device performs addition, not subtraction. In summary, those skilled in the art should understand that the concept of the present invention is particularly applicable to hardware implementations. This is because software implementation of MMD commands will require additional performance and management tasks. Therefore, the inventive concept can replace software implementations. In particular, the concept of the present invention can also be integrated into an existing encryption processor, because we can only need to change the VHDL of the encryption controller to add this registration device and this evaluation device to the existing processing device at the same time. Therefore, existing modulo multiplication commands will be available

第23頁 200400442 五、發明說明(18) 以輕易增補,並由於D I V操作的結果(整數商)而幾乎不 會出錯。 IB· 第24頁 200400442 圖式簡單說明 第1圖係表示本發明計算整數商之裝j 第2圖係表示簡易模數乘法演算法之:ί 第3圖係表示第2圖所示簡易乘法演算 用不同於DVI操作之模數操作。 第4圖係已知ZDN演算法之總括流程圖 第5圖係已知ZDN演算法額外計算整數 第6圖係已知ZDN演算法之詳細流程圖 元件符號說明 10 處理裝置 10a 計算單元 10b 控制部件 12 登錄裝置 14 評價裝置 20 啟始步驟 20’ 啟始 21 位元檢查步驟 22a,22b 中間結果計算 23 第一模數比較 2 4 第一模數減法 25 第二模數比較 26 第二模數減法 27 指標檢查 i之方塊圖。 L程圖。 法之流程圖其同時應 商之流程圖。Page 23 200400442 V. Description of the invention (18) It is easy to add, and due to the result of the DIV operation (integer quotient), there are almost no errors. IB · Page 24,200400442 Brief description of the diagram. The first diagram shows the calculation of the integer quotient of the present invention. The second diagram shows the simple modular multiplication algorithm. The third diagram shows the simple multiplication algorithm shown in the second diagram. Operate with a different modulus than DVI operation. Figure 4 is a generalized flowchart of the known ZDN algorithm. Figure 5 is an additional integer calculation of the known ZDN algorithm. Figure 6 is a detailed flowchart of the known ZDN algorithm. Symbol description 10 Processing device 10a Calculation unit 10b Control unit 12 Registration device 14 Evaluation device 20 Start step 20 'Start 21 bit check steps 22a, 22b Intermediate result calculation 23 First modulus comparison 2 4 First modulus subtraction 25 Second modulus comparison 26 Second modulus subtraction 27 Block diagram of indicator check i. L 程 图. The flow chart of the law is also the flow chart of the consultation.

200400442 圖式簡單說明 28 指 標 遞 增 3 0a 模 數 減 法 之 歸 約 資 訊 30b 模 數 減 法 後 之 歸 約 資 訊 30c 兩 模 數 減 法 後 之 歸 約 資訊 32 輔 助 暫 存 器 之 加 法 40 , 40’ 啟 始 42 重 覆 檢 查 44 中 間 結 果 檢 查 46 模 數 加 法 50 順 序 資 訊 計 算 52 歸 約 資 訊 計 算 54 歸 約 資 訊 校 正 56 輔 助 暫 存 器 之 減 法 900 開 始ZDN演算法 910 乘 法 預 看 演 算 法 920 中 間 結 果 平 移 930 歸 約 預 看 演 算 法 940 模 數 平 移 950 二 運 算 元 操 作 960 結 束ZDN > 寅算法200400442 Brief description of the drawing 28 Index increment 3 0a Reduction information after modulo subtraction 30b Reduction information after modulo subtraction 30c Reduction information after two modulo subtraction 32 Addition of auxiliary register 40, 40 '40 Repeat check 44 Intermediate result check 46 Modulus addition 50 Sequential information calculation 52 Reduction information calculation 54 Reduction information correction 56 Subtraction of auxiliary register 900 Start ZDN algorithm 910 Multiplication preview algorithm 920 Intermediate result translation 930 Reduction Preview algorithm 940 Modulus translation 950 Two operand operations 960 End ZDN > algorithm

第26頁Page 26

Claims (1)

200400442 六、申請專利範圍 1 · 一種用以計算一項目(T )相對一模數(N )之一整數商 的裝置,其中,該項目係包括一二進位乘數(M)及一被 乘數(C)之一乘積,該裝置係包括: 處理裝置(1 0 ),用以在複數步驟中處理該乘數(Μ )之 位元,其中,該處理裝置(1 0 )係形成以在一處理步驟 中,計算相對該模數以歸約之一中間結果(Ζ ),其係取 決於該二進位乘數之該一或該等位元,其係在該處理步驟 中進行考量;200400442 VI. Scope of patent application 1. A device for calculating an integer quotient of an item (T) relative to a modulus (N), wherein the item includes a binary multiplier (M) and a multiplicand (C) a product, the device includes: a processing device (1 0) for processing the bits of the multiplier (M) in a plurality of steps, wherein the processing device (1 0) is formed to In the processing step, calculating an intermediate result (Z) relative to the modulus to reduce, which depends on the one or more bits of the binary multiplier, which is considered in the processing step; 裝置(1 2 ),用以在該處理步驟中登錄歸約資訊、及用以 登錄該處理步驟所考慮之該整數商之一或複數位元之順序 資訊;以及 評價裝置(1 4 ),用以評價該等處理步驟之該歸約資訊及 該順序資訊,藉以得到該整數商(Q )。 2. 如申請專利範圍第1項所述之裝置, 其中,該處理裝置(10)係包括一固線計算單元 (1 Oa ),用以計算該模數歸約中間結果(Ζ ); 其中,該處理裝置更包括一控制部件(1 Ob ),用以控制 該固線計算單元(1 0 a );以及A device (1 2) for registering reduction information in the processing step and sequence information for one or more of the integer quotient considered in the processing step; and an evaluation device (1 4) for The reduction information and the sequence information of the processing steps are evaluated to obtain the integer quotient (Q). 2. The device according to item 1 of the scope of patent application, wherein the processing device (10) includes a fixed line calculation unit (1 Oa) for calculating the intermediate result of the modulus reduction (Z); wherein, The processing device further includes a control unit (1 Ob) for controlling the fixed-line computing unit (1 0a); and 其中,一登錄裝置係耦接至該控制部件(1 Ob ),用以由 該控制部件得到該歸約資訊及該順序資訊。 3. 如申請專利範圍第1項所述之裝置, 其中,一中間結果暫存器(Z )係啟始為0 ( 2 0 ’ ; 4 0 ’), 藉以使該項目T等於該第一運算元及該第二運算元之乘 積0A registration device is coupled to the control unit (1 Ob), and is used to obtain the reduction information and the sequence information from the control unit. 3. The device as described in item 1 of the scope of patent application, wherein an intermediate result register (Z) starts at 0 (2 0 '; 4 0'), so that the item T is equal to the first operation Product of the second operand and the second operand 0 第27頁 900400442 六、申請專利範圍 4·如申請專利範圍第1項所述之裝置, iI管一:二結果暫存器(2 〇,; 4 0,)係可以啟始為一苐 :1 2數:藉以使該項目等於Cx M +Dx 2n,其中,C 一 口甘士 Ψ %係該乘數、其中,D係該第三運算 兀、且其中,η係A、B、及〇之_旧 ^ 5 ·如申明專利範圍第1項所述之裝置, 其中,該處理裝晉# 5田M七 (1 0 )係形成以由一最高有效乘法器位 凡至一取低有效乘法器位元開始操作。 。位 6 ·如申請專利範圍第1項所述之裝置, 其中該處理裝置係形成以在各個處理步驟中處理一位 元; 八中該豆錄裝置(30a,3〇b,30c)係包括暫存器裝 置’其具有一或複數輔助暫存 (q,q,)· ,中,該歸約資訊(3。,3二[心^ 疋否在該暫存器裝置中設定;以及 其中’該順序資訊係決定那—或那些位 中加以考慮;以及 、慝理步驟 其中,該評價裝置(32 )係形成以評價 以輸出該整數商。 节仔的裝置,用 7 ·如申清專利範圍第1項所述之裝置, 二中,”理裝置(10)係形成以在各 處理該乘數(28 )之一位元; 处埋步驟中· 根據於該乘數位元(22a,22b )計算一中n · 測試該計算中間結果(2 3 ),用以決# 3 1結果; 用以决疋該計算中間結果是Page 27 900400442 VI. Patent Application Scope 4. The device described in item 1 of the scope of patent application, iI tube one: two result register (20 ,; 40,) can start as one: 1 2 number: by which the item is equal to Cx M + Dx 2n, where C is a mouthful of%, which is the multiplier, where D is the third operation, and where η is A, B, and 0 of _ Old ^ 5 · The device as described in claim 1 of the patent scope, wherein the processing device is formed to # 5 田 M 七 (1 0) is formed from a highest effective multiplier bit to a low effective multiplier bit The meta begins operation. . Bit 6 · The device as described in item 1 of the scope of patent application, wherein the processing device is formed to process one bit in each processing step; the bean recording device (30a, 30b, 30c) in the eighth includes a temporary Register device 'which has one or more auxiliary temporary storage (q, q,) ·, where the reduction information (3., 3 2 [心 ^ 疋 is set in the register device; and where The sequence information determines which—or those bits to consider; and, in a logical step, the evaluation device (32) is formed to evaluate to output the integer quotient. Jie Zi ’s device uses 7 The device described in item 1, the second, and the "processing device (10)" are formed to process each bit of the multiplier (28); in the embedding step, calculation is based on the multiplier bits (22a, 22b) One in n · test the intermediate result of the calculation (2 3) to determine the result of # 3 1; to determine the intermediate result of the calculation is 700400442 六、申請專利範圍 否大於該模數; 若該中間結果大於該模數,由該中間結果減去該模數,用 以計算一新中間結果(2 4 ); 測試該新中間結果(2 5 ),用以決定該新中間結果是否大 於該模數;以及 若該新中間結果大於該模數,再由該新中間結果減去該模 數,用以計算(2 6 )另一新中間結果。 8·如申請專利範圍第7項所述之裝置,700400442 6. Whether the scope of patent application is greater than the modulus; if the intermediate result is greater than the modulus, subtract the modulus from the intermediate result to calculate a new intermediate result (2 4); test the new intermediate result (2 5) to determine whether the new intermediate result is greater than the modulus; and if the new intermediate result is greater than the modulus, subtract the modulus from the new intermediate result to calculate (2 6) another new intermediate result. 8. The device described in item 7 of the scope of patent application, 其中,該登錄裝置(1 2 )係形成以利用該模數之減去之數 目做為歸約資訊,及利用該先前處理乘數位元之一順序 (1 )做為順序資訊。 9 ·如申請專利範圍第7項所述之裝置, 其中,該登錄裝置(12)你衫成以設定(3〇a) —位元, 其具有一順序在第一次減去(24 )該模數時,等於一第一 輔助暫存器之該處理乘數位元之一順序,; 其中,該登錄裝置(丨2 )孫形成以設定(3 0 c ) —位元, 其具有—順序,等於一第 > 輔助暫存器(Q,)之該先前處 理乘數位元之一順序,當第二次減去該模數(26)時;以 及Among them, the registration device (12) is formed by using the subtraction of the modulus as reduction information, and using one of the previously processed multiplier bits (1) as sequence information. 9 The device as described in item 7 of the scope of patent application, wherein the registration device (12) is set to (30a) -bits, which has a sequence of subtracting (24) the first time The modulus is equal to one order of the processing multiplier bits of a first auxiliary register, wherein the registration device (2) is formed by setting (3 0 c) -bits, which has-order, A sequence of the previously processed multiplier bits equal to a first > auxiliary register (Q,) when the modulus (26) is subtracted a second time; and 其中,該評價裝置(丨4 )係形成以相加該第一辅助暫存器 及該第二輔助暫存器,用以取得該整數商。 W 1 〇 ·如申晴專利範圍第1項戶斤述之裝置: 其中,該處理裝置(1 〇 )係形成以執行一乘法預看演算法 (91〇),藉以在一處理夕賻中考量複數乘數位元,當該 200400442 六、申請專利範圍 等乘數位元1右 箱看演算法之一特性;以 i中,兮八::有取決於該預y成以在該歸約資訊及 二宁,該登錄裝置(i 2 )係形成> 及 該順序 — ,、及1 L丄z」你… 資訊中考量該乘法預看演算法 1 1 ,^ 裝置 91〇 ) 之 11 ·如申凊專利範圍第1 0項所述、 其中’該處理裳置π 0 )係形成以 (91〇)以外利用一歸約預看演算法(93°);以及 其中,該登錄裝置(12)係形成以在該歸約貧訊及 資訊中考量該歸約預看演算法(910 )。 12 ·如申請專利範圍第11項所述之裝置, 其中,該處理裝置(1 0 )係形成以利用一二運异元 計算該歸約中間結果(ζ),其中,一第一運算元1 一先前處理步驟之一中間结果、一第一運异元係該 _(C)、、且一第三運算元係該模數(Ν),其中,該 元之一運异元係利用因子在該三運异元中加權’其 一因子2而隨個別平移數值(Sz,sN )之冪次加權, 中’該模數(N)係具有一歸約預看參數(b); 其中,該%約預看參數(b )係y以具有數值f 0 ’’、 1 H Μ 1 香I _ 在該乘法預看演算法 該順序 加法, :Z )係 被乘數 三運算 係藉著 且其,+ -Γ 以及 其中,該登錄裝置(1 2 )係形成以基於一平移數值(sz, sN )決定該順序資訊(5〇 ),及基於該歸約預看參數(b ) 決定該歸約資訊(52 )。 1 3 ·如申請專利範圍第1 2項所述之裝置’ 其中,該登錄裝置(12)係包枯二輔助暫存器(Q, Q ),其中,利用該順序資訊,該至少一暫存器之特定位The evaluation device (4) is formed to add the first auxiliary register and the second auxiliary register to obtain the integer quotient. W 1 〇 · The device described in the first item of Shen Qing's patent scope: Among them, the processing device (1 〇) is formed to execute a multiplication preview algorithm (91 〇), so as to consider in a processing night Complex multiplier bit, when the 200400442 VI, patent application range and other multiplier bit 1 right box one of the algorithms of the algorithm; in i, Xi eight :: depends on the pre-y to be used in the reduction information and two Rather, the registration device (i 2) is formed > and the order — ,, and 1 L 丄 z ”you ... consider the multiplication preview algorithm 1 1 in the information, ^ device 91〇) 11 · Ru Shen 凊As described in item 10 of the patent scope, where 'the processing clothes π 0) is formed using a reduction preview algorithm (93 °) other than (91 °); and wherein the registration device (12) is formed The reduction look-ahead algorithm is considered in the reduction message and information (910). 12 · The device according to item 11 of the scope of patent application, wherein the processing device (1 0) is formed to calculate the reduction intermediate result (ζ) by using a two-way difference element, wherein a first operand 1 An intermediate result of a previous processing step, a first heterogeneous element is the _ (C), and a third arithmetic element is the modulus (N), wherein one of the elements is a heterogeneous element using a factor in In the three-way heteroelement, the weighting is 'a factor of 2 and is weighted with the power of the individual translation values (Sz, sN), where' the modulus (N) has a reduction preview parameter (b); where, the The approximation preview parameter (b) is that y has the values f 0 '', 1 H Μ 1 and I _ in this multiplication preview algorithm, the order addition,: Z) is by the multiplier three operation system and its + -Γ and wherein the registration device (12) is formed to determine the order information (50) based on a translation value (sz, sN), and to determine the reduction based on the reduction preview parameter (b). Information (52). 1 3 · The device as described in item 12 of the scope of the patent application, wherein the registration device (12) is a secondary storage register (Q, Q), and using the sequence information, the at least one temporary storage Specific bit 900400442 六、申請專利範圍 #訊: 元(j )係設定做為以下歸約負" 當b等於1,則Q j·等於0,Q 當b等於〇,則Qj等於Q,j等於0 m ·々々 a,; #於1 乂及 n,彳#於〇 當b等於一 1,則Q j等於1 ,Q J , 〇 i ^ ^ ^ ^ 其中,b係該歸約預看#數,其争第^ ,暫存 器⑷之-位元】,且其中,QJ係該第-辅助暫存器 (0’)之一位元:1·。 梦晉, 1 4 ·如申請專利範圍第1 2頊所述之、 其中,一歸約平移數值(Sn)係關連該模數(N); 其中,一乘法平移數值(Sz )係關連該中間結果;以及 其中,該登錄裝置(丨2 )係形成以由一先前步驟之順序資 g “乘法平移數值(SZ )及該歸约平移數值(SN )間差、 〇之一差異,決定該第一輔助暫 之位元之-順序⑴做為 f -及該第―辅助暫存器 1 5·如申請專利範圍第! 3項所貝s 。 置(Η )係形成以由該第―魅地之裝置,其中,該評價裝 輔助暫存器(Q,),用以在::暫存器(Q)減去該第二 數位元後,取得該整數商。理裝置(10)處理該等乘 種用以計算一項目( 商的方法,其中,該項目 2對一模數(N)之一 ;乘數⑷之一乘積,該=括,二進位乘數(Μ):ί 在複數步驟中處理(1 〇 )診 係包括: f理裝置(10)係形成以:二J (Μ)之位元,其中,誃 數以歸約之一中間結果(2),處理步驟中’計算相對該模 /、係取決於該二進位乘數 700400442 六、申請專利範圍 之該一或該等位元,其係在該處理步驟中進行考量; 在該一處理步驟中登錄(1 2 )歸約資訊、及該處理步驟所 考慮之該整數商之一或複數位元之順序資訊;以及 評價(1 4 )該等處理步驟之該歸約資訊及該順序資訊,藉 以得到該整數商(Q )。900400442 VI. Patent Application Range # News: Yuan (j) is set as the following reduction negative " When b equals 1, then Q j · equals 0, Q When b equals 0, Qj equals Q, j equals 0 m · 々々A ,; # 于 1 乂 and n, 彳 # 于 〇 When b is equal to 1, then Q j is equal to 1, QJ, 〇i ^ ^ ^ ^ where b is the number of reductions to look at, Fight for ^, register--bit], and QJ is a bit of the-auxiliary register (0 '): 1 ·. Meng Jin, 1 4 · As described in No. 12 of the scope of patent application, wherein a reduction translation value (Sn) is related to the modulus (N); wherein a multiplication translation value (Sz) is related to the middle The result; and wherein, the registration device (丨 2) is formed by a difference between the "multiplication shift value (SZ)" and the reduction shift value (SN) in the sequence of a previous step to determine the first The order of the auxiliary temporary bits is f-and the "secondary register 15", such as the scope of the patent application! Item 3 贝. Placement (Η) is formed by the third "charm" A device, wherein the evaluation is provided with an auxiliary register (Q,) for obtaining the integer quotient after: the register (Q) subtracts the second digit. The processing unit (10) processes the The method of multiplication is used to calculate an item (quotient method), in which the item 2 is one of a modulus (N); a product of a multiplier ⑷, the = bracket, a binary multiplier (Μ): ί in the plural step The middle treatment (10) diagnosis system includes: The physical management device (10) is formed with: two J (M) bits, wherein the number is reduced to one Result (2), in the processing step, the calculation relative to the modulo / depends on the binary multiplier 700400442 6. The one or more bits in the scope of the patent application, which are considered in the processing step; in the Register (1 2) reduction information in a processing step, and sequence information of one or more of the integer quotient considered by the processing step; and evaluate (1 4) the reduction information of the processing steps and the Order information to get the integer quotient (Q). 第32頁Page 32
TW92109930A 2002-04-29 2003-04-28 Apparatus and method for calculating an integer quotient TW200400442A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE2002119164 DE10219164B4 (en) 2002-04-29 2002-04-29 Device and method for calculating an integer quotient

Publications (1)

Publication Number Publication Date
TW200400442A true TW200400442A (en) 2004-01-01

Family

ID=29264906

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92109930A TW200400442A (en) 2002-04-29 2003-04-28 Apparatus and method for calculating an integer quotient

Country Status (4)

Country Link
AU (1) AU2003224137A1 (en)
DE (1) DE10219164B4 (en)
TW (1) TW200400442A (en)
WO (1) WO2003093970A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI786841B (en) * 2020-10-21 2022-12-11 熵碼科技股份有限公司 Device and method of handling a modular multiplication

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
DE102006025713B9 (en) 2005-10-28 2013-10-17 Infineon Technologies Ag Cryptographic device and cryptographic method for calculating a result of a modular multiplication
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3631992A1 (en) * 1986-03-05 1987-11-05 Holger Sedlak Cryptography method and cryptography processor to carry out the method
JPH0786826B2 (en) * 1988-07-19 1995-09-20 日本電気株式会社 Integer division circuit
US5710730A (en) * 1995-03-31 1998-01-20 International Business Machines Corporation Divide to integer
FR2768245B1 (en) * 1997-09-09 1999-10-15 Sgs Thomson Microelectronics METHOD FOR PRODUCING A WHOLE DIVISION WITH A MODULAR ARITHMETIC CO-PACKER
FR2777098B1 (en) * 1998-04-02 2001-04-13 Sgs Thomson Microelectronics METHOD FOR IMPROVED IMPLEMENTATION OF AN ENTIRE DIVISION
SE0003757L (en) * 2000-10-17 2002-04-09 Novacatus Invest Ab Method and device for module multiplication and use of method for asymmetric encryption / decryption

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI786841B (en) * 2020-10-21 2022-12-11 熵碼科技股份有限公司 Device and method of handling a modular multiplication

Also Published As

Publication number Publication date
DE10219164A1 (en) 2003-11-20
WO2003093970A2 (en) 2003-11-13
AU2003224137A1 (en) 2003-11-17
WO2003093970A3 (en) 2004-07-15
DE10219164B4 (en) 2004-12-02

Similar Documents

Publication Publication Date Title
EP0801345B1 (en) Circuit for modulo multiplication and exponentiation arithmetic
JP4067818B2 (en) Elliptic curve cryptography apparatus, elliptic curve cryptography program, and elliptic curve cryptography calculation method
TW550498B (en) Method and apparatus for modular multiplying and calculating unit for modular multiplying
US8176109B2 (en) Calculating unit for reducing an input number with respect to a modulus
US20040105541A1 (en) Cryptography processor
US7831650B2 (en) Method for modular multiplication
Wook Chung et al. Fast implementation of elliptic curve defined over GF (pm) on CalmRISC with MAC2424 coprocessor
KR100436814B1 (en) apparatus for RSA Crypto Processing of IC card
US8417760B2 (en) Device and method for calculating a multiplication addition operation and for calculating a result of a modular multiplication
Bosmans et al. A tiny coprocessor for elliptic curve cryptography over the 256-bit NIST prime field
US8364740B2 (en) Device and method for calculating a result of a modular multiplication with a calculating unit smaller than the operands
TW200400442A (en) Apparatus and method for calculating an integer quotient
US7558817B2 (en) Apparatus and method for calculating a result of a modular multiplication
US8364737B2 (en) Device and method for calculating a result of a sum with a calculating unit with limited word length
TW200404224A (en) Device and method for converting a term
RU2520379C2 (en) Elliptic curve cryptography
US7590235B2 (en) Reduction calculations in elliptic curve cryptography
WO2005013243A1 (en) Calculator, method, and program for calculating conversion parameter of montgomery multiplication remainder
Arazi et al. On calculating multiplicative inverses modulo $2^{m} $
Fischer et al. Scalable rsa processor in reconfigurable hardware-A soc building block
KR100449491B1 (en) Modular multiply apparatus
JP3863021B2 (en) Ellipse addition / subtraction device and program thereof
JP2002304122A (en) Device for discriminating element on partial group of rational point group on curve, program thereof, and recording medium thereof
CN118297168A (en) Quantum circuit-based ECC ciphertext decryption method and device, medium and electronic device
CN118192934A (en) Modular multiplication operation method, device, chip, board card and vehicle-mounted system