KR100480996B1 - Apparatus for operating an inverse number in limited gf and method thereof - Google Patents
Apparatus for operating an inverse number in limited gf and method thereof Download PDFInfo
- Publication number
- KR100480996B1 KR100480996B1 KR10-2002-0082202A KR20020082202A KR100480996B1 KR 100480996 B1 KR100480996 B1 KR 100480996B1 KR 20020082202 A KR20020082202 A KR 20020082202A KR 100480996 B1 KR100480996 B1 KR 100480996B1
- Authority
- KR
- South Korea
- Prior art keywords
- value
- register
- order
- input
- inverse
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods 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/72—Methods 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/724—Finite field arithmetic
- G06F7/726—Inversion; Reciprocal calculation; Division of elements of a finite field
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2207/00—Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F2207/72—Indexing scheme relating to groups G06F7/72 - G06F7/729
- G06F2207/7214—Calculation via prime subfield, i.e. the subfield being GF(p) with p an integer prime > 3; e.g. GF(p**k) via GF(p)
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Complex Calculations (AREA)
Abstract
본 발명은 유한체 GF(2m)에서 하드웨어 구현에 효율적인 역수 연산 장치 및 방법에 관한 것으로, GF(2m)의 두 원소 a(x)와 f(x)에서, 모듈러 f(x)에 대한 a(x)의 역수 a-1(x)를 계산한다. 이를 위해 본 발명의 역수 연산 장치에서는 u=a(x), v=f(x), c=0, b=1을 설정하고, u=1이 될 때까지 반복하는 연산에서 u의 하위값과 b의 하위값을 2 비트 이상 동시에 처리하는 단계와, u와 v, c, b를 동시에 병렬로 처리하는 단계와, u와 v의 차수를 비교하는 처리와 u의 하위값 처리가 동시에 이루어지는 단계가 첨가되도록 수정된 MAIA 알고리즘을 구현하며, 이러한 알고리즘의 하드웨어 구현을 위하여 역수 연산의 입력값 및 중간 연산 결과를 저장하기 위한 4개의 u, v, c, b 연산 레지스터와, u, v 연산 레지스터의 입력값 연산 및 선택을 위한 2개의 u, v 입력처리기와, 차수를 검색하기 위한 차수 검색기와, 차수 비교 및 새로운 차수 생성을 위한 차수 비교 생성기와, u, v의 차수 값을 저장하기 위한 du, dv 차수 레지스터와, du 차수 레지스터의 입력값 선택을 위한 du 입력 처리기, 그리고 이들 모든 블록들을 제어하기 위한 제어기를 포함하는 역수 연산 장치를 구현한다. 본 발명은 이와 같이 기존의 MAIA를 변형하여 이를 하드웨어로 구현하였으며, 이를 통하여 많은 시간이 소요되는 유한체 GF(2m)에서의 역수 연산을 효율적으로 빠르게 수행할 수 있도록 하는 이점이 있다.The present invention relates to an apparatus and method for inverting an efficient hardware implementation in a finite field GF (2 m ). For two elements a (x) and f (x) of GF (2 m ), Calculate the inverse a -1 (x) of a (x). To this end, the inverse arithmetic unit of the present invention sets u = a (x), v = f (x), c = 0, b = 1, and repeats a lower value of u in a repeating operation until u = 1. processing the lower value of b at least two bits simultaneously, processing the u, v, c, and b in parallel simultaneously, comparing the order of u and v and processing the lower value of u simultaneously Implement the modified MAIA algorithm to be added, and for the hardware implementation of this algorithm, four u, v, c, b operation registers for storing the inverse operation and the intermediate operation result, and the inputs of the u, v operation register Two u and v input processors for value computation and selection, an order finder to retrieve orders, an order comparison generator for order comparisons and new order generation, and du and dv for storing order values of u and v Du input to select order register and input value of du order register Implement a reciprocal computing device that includes a processor and a controller to control all these blocks. The present invention is modified to implement the existing MAIA in hardware as described above, there is an advantage that can be efficiently and quickly perform the inverse operation in the finite field GF (2 m ) that takes a lot of time.
Description
본 발명은 유한체 GF(2m)연산에 관한 것으로, 특히 유한체 GF에서 하드웨어 구현에 효율적인 역수 연산 장치 및 방법에 관한 것이다.TECHNICAL FIELD The present invention relates to the finite field GF (2 m ) operation, and more particularly, to an apparatus and method for inverting arithmetic efficient for hardware implementation in a finite field GF.
통상적으로 유한체 GF(2m)에서의 역수 연산은 통신 시스템이나 공개키 암호 알고리즘 수행 등에 필요한 연산으로 반복적으로 수행되는 연산이 많기 때문에 시스템 구현시 전체 시스템의 성능 저하의 주된 요인이 된다.In general, the reciprocal operation in the finite field GF (2 m ) is a necessary operation for performing a communication system or a public key cryptographic algorithm, and thus many operations are repeatedly performed, which is a major factor in the performance degradation of the entire system.
이를 해결하기 위해 통신 시스템의 경우 계산되는 수의 크기가 크기 않은 점을 이용하여 예상되는 모든 역수 값을 메모리에 저장하여 구현함으로써 성능을 높이고 있다. In order to solve this problem, the communication system increases performance by storing all expected reciprocal values in memory by using the calculated number of numbers.
하지만, 공개키 암호 알고리즘에서는 연산되어지는 수의 크기가 보통 수백 비트이므로 메모리에 미리 역수 값을 저장하는 것은 거의 불가능하며, 항상 새로운 입력에 대하여 연산을 수행하여야 한다. 이러한 역수 연산 방법으로는 보통 EEA(Extended Euclidean Algorithm)와 AIA(Almost Inverse Algorithm) 알고리즘이 많이 사용되고 있다. However, in public key cryptographic algorithms, the size of the calculated number is usually hundreds of bits, so it is almost impossible to store the inverse value in memory in advance. As the reciprocal calculation method, EEA (Extended Euclidean Algorithm) and AIA (Almost Inverse Algorithm) algorithms are commonly used.
상기 AIA는 EEA 알고리즘에 비해 반복 연산 수는 적지만, 추가적인 리덕션(Reduction) 연산이 필요한 단점이 있다. 이러한 추가적인 리덕션 연산은 도 1에 도시된 바와 같은 MAIA(Modified Almost Inverse Algorithm) 알고리즘으로 연산 중간에 수행될 수 있다. 상기 MAIA알고리즘에서 단계 2.2가 상기 리덕션 연산을 나타낸 것이다. The AIA has a smaller number of repetitive operations than the EEA algorithm, but has a disadvantage of requiring additional reduction operations. This additional reduction operation may be performed in the middle of the operation using a Modified Almost Inverse Algorithm (MAIA) algorithm as shown in FIG. 1. Step 2.2 in the MAIA algorithm represents the reduction operation.
그러나 상기한 MAIA 알고리즘은 EEA와 AIA알고리즘 보다는 하드웨어 구현이 용이하지만, 여전히 반복적으로 수행되어야 하는 연산이 많아 역수 연산에 상당한 연산 시간이 소요되는 문제점이 있었다.However, the above-described MAIA algorithm is easier to implement hardware than the EEA and AIA algorithms, but there are still many problems that need to be performed repeatedly.
따라서, 본 발명의 목적은 유한체 GF에서 하드웨어 구현에 효율적인 역수 연산 장치 및 방법을 제공함에 있다. Accordingly, an object of the present invention is to provide an apparatus and method for inverting arithmetic that is effective for hardware implementation in a finite field GF.
상술한 목적을 달성하기 위한 본 발명은 유한체 지.에프에서 역수를 연산하는 장치 및 방법에 있어서, 역수 연산의 초기 입력값(a(x)) 및 중간 연산 결과를 저장하는 다수의 저장수단과; 상기 저장수단에 저장된 입력값에 대한 연산 수행 및 선택을 위한 다수의 입력 처리 수단과; 상기 연산 결과값의 차수를 검색하기 위한 차수 검색 수단과; 상기 차수 검색 수단을 통해 검색된 차수의 비교 및 새로운 차수 생성을 위한 차수 비교 생성 수단과; 상기 역수 연산을 위한 각 수단들의 동작을 제어하는 제어수단;을 포함하는 역수 연산 장치를 구현하며, GF(2^m)에서의 초기 입력값 a(x)와 초기 최소 다항식 f(x)에 대하여 모듈라 f(x)에 대한 a(x)의 역수 a-1(x)를 계산함에 있어서,(a)역수 연산을 위한 변수 u=a(x), v=f(x), b=1, c=0으로 설정하고 u와 v의 차수는 줄이며, b와 c의 차수는 늘이며 역수를 연산하는 단계와; (b)상기 u 값의 차수가 '0'이 될 때까지 상기 역수 연산을 반복 수행하는 단계와; (c)상기 역수 연산의 반복 수행시 상기 u와 b의 하위값을 두 비트 이상 동시에 처리하는 단계와; (d)상기 u,v,c,b를 동시에 병렬로 처리하는 단계와; (e)상기 u, v간 차수 비교 처리와 u의 하위값 처리를 동시에 수행하는 단계와; (f)상기 u의 최하위 값이 '1'인 경우 상기 u에 v를 가산하여 새로운 u값으로 하고, 상기 b 값에는 c 값을 가산하여 새로운 b값으로 하여, 새로운 u값의 최하위 비트값 '0'을 소거함과 동시에 새로운 b값에 리덕션 연산을 수행하는 단계;를 포함하는 역수 연산 방법을 구현하는 것을 특징으로 한다.In order to achieve the above object, the present invention provides an apparatus and method for calculating a reciprocal in a finite field G. F, comprising: a plurality of storage means for storing an initial input value (a (x)) and an intermediate arithmetic result of a reciprocal operation; ; A plurality of input processing means for performing an operation and selecting an input value stored in said storage means; Order retrieving means for retrieving the order of the operation result value; Order comparison generating means for comparing the orders retrieved through said order retrieving means and for generating new orders; And a control means for controlling the operation of the means for the inverse operation. The apparatus for implementing a reciprocal calculation includes: an initial input value a (x) and an initial minimum polynomial f (x) in GF (2 ^ m). In calculating the inverse a −1 (x) of a (x) with respect to the modular f (x), (a) the variables u = a (x), v = f (x), b = 1, setting c = 0 and decreasing the orders of u and v, increasing the orders of b and c and calculating the inverse; (b) repeating the inverse operation until the degree of the u value becomes '0'; (c) simultaneously processing the lower values of u and b for two or more bits at the same time when the inverse operation is repeated; (d) simultaneously processing the u, v, c, and b in parallel; (e) simultaneously performing the order comparison processing between u and v and lower value processing of u; (f) If the lowest value of u is '1', add v to u to make a new u value, add c to b and make it a new b value, and add the least significant bit value of the new u value. And performing a reduction operation on the new b-value while erasing 0 '.
이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시 예의 동작을 상세하게 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail the operation of the preferred embodiment according to the present invention.
도 2는 본 발명의 실시 예에 따른 MAIA 알고리즘을 도시한 것이다.2 illustrates a MAIA algorithm according to an embodiment of the present invention.
이하 상기 도 2의 MAIA알고리즘을 상기 도 1의 MAIA알고리즘과 비교하면, 상기 도 1의 MAIA 단계 3은 수정된 도 2의 MAIA 알고리즘에서는 단계 2 전체 조건문으로 바뀌었음을 알 수 있다. 이는 하드웨어 구현시 연산이 끝났음을 판단하기 위하여 별도의 연산 시간을 할당하지 않고 다른 연산들과 동시에 처리하도록 하기 위함이다.When comparing the MAIA algorithm of FIG. 2 with the MAIA algorithm of FIG. 1, it can be seen that the MAIA step 3 of FIG. 1 is changed to the entire conditional step 2 in the modified MAIA algorithm of FIG. 2. This is to allow simultaneous processing with other operations without allocating a separate operation time to determine that the operation is completed in the hardware implementation.
상기 도 2의 수정된 알고리즘에서는 단계 2가 크게 단계 2.1과 2.2로 구분되어 동작하는데, 2.1은 상기 도 1의 단계 2와 동일한 연산을 수행한다. 이때, 종래 도 1의 MAIA에서와 같이 한 비트씩 처리하지 않고 4 비트를 동시에 처리하게 된다. In the modified algorithm of FIG. 2, step 2 is divided into steps 2.1 and 2.2, and 2.1 performs the same operation as step 2 of FIG. In this case, as in the MAIA of FIG. 1, four bits are processed simultaneously instead of one bit.
이는 확률적으로 연속된 '0'이 나오는 경우가 많기 때문에 연산시간을 대폭 줄일 수 있으며, 한 번에 병렬로 처리하는 비트 수는 구현하는 시스템의 조건에 따라서 높일 수 있다. This can reduce the computation time drastically because there are many cases of probable consecutive '0', and the number of bits processed in parallel at once can be increased according to the condition of the implementing system.
하지만, 8비트 이상은 연속된 '0'이 나오는 경우가 거의 없기 때문에 효율성이 떨어진다. 단계 2.1의 모든 구문은 한 클럭에 수행된다. 단계 2.2는 종래 도 1의 단계 4와 단계 5를 처리하기 위한 구문이다. 종래 도 1의 MAIA에서 단계 4와 단계 5는 하드웨어 구현시 동시에 수행이 가능하며, 단계 5의 결과는 무조건 단계 2를 수행하도록 되어 있었다. 따라서 상기 도 2의 수정된 MAIA에서는 단계 2.2 연산에서 수행될 연산까지 처리할 수 있도록 수정되었으며, 특히 단계 2.1에서 같이 다중 비트를 동시에 처리할 수 있도록 하였다. 이와 같이 수정된 알고리즘은 많은 경우 단계 2.2 연산만을 수행하게 되어 빠른 연산 속도를 얻을 수 있게 된다.However, more than 8 bits are not efficient because they rarely produce consecutive '0's. All statements in step 2.1 are performed on one clock. Step 2.2 is a syntax for processing steps 4 and 5 of the prior art FIG. In the MAIA of FIG. 1, steps 4 and 5 may be simultaneously performed in hardware implementation, and the result of step 5 is to perform step 2 unconditionally. Therefore, the modified MAIA of FIG. 2 is modified to process operations to be performed in step 2.2 operation, and in particular, to process multiple bits simultaneously as in step 2.1. In many cases, the modified algorithm performs only step 2.2 operation to obtain a fast calculation speed.
도 3은 상기 도 2의 MAIA 알고리즘을 구현한 본 발명의 실시 예에 따른 역수 연산 장치의 하드웨어 블록 구성을 도시한 것이다. 상기 도 3을 참조하면, 역수 연산 장치는 입력값과 중간 연산 결과를 저장하기 위한 u 레지스터(400)와, u 레지스터(400)의 입력값 연산 및 선택을 위한 u 입력 처리기(100)와, 초기 최소 다항식 f(x) 및 중간 연산 결과 저장을 위한 v 레지스터(500)와, 중간 연산 결과와 최종 출력값을 저장하기 위한 b 레지스터(600)와, b 레지스터(600)의 입력값 연산 및 선택을 위한 b 입력 처리기(200)와, 중간 연산 결과를 저장하기 위한 c 레지스터(700)와, 차수 검색을 위한 차수 검색기(800)와, u 값과 차수를 저장하기 위한 du 레지스터(c00)와, du 레지스터(c00)의 입력값 선택을 위한 du 입력처리기(a00)와, v 값의 차수를 저장하기 위한 dv레지스터(b00) 및 이들 모든 블록들을 제어하기 위한 제어기(300)로 구성된다.FIG. 3 is a block diagram illustrating a hardware block configuration of the reciprocal arithmetic unit according to the embodiment of the present invention, which implements the MAIA algorithm of FIG. 2. Referring to FIG. 3, the inverse calculation apparatus includes a u register 400 for storing an input value and an intermediate operation result, a u input processor 100 for calculating and selecting an input value of the u register 400, and an initial value. V register 500 for storing the minimum polynomial f (x) and intermediate operation results, b register 600 for storing intermediate operation results and final output values, and for calculating and selecting input values of the b register 600. b input processor 200, c register 700 for storing intermediate calculation results, order finder 800 for order searching, du register c00 for storing u values and orders, du register du input processor (a00) for input value selection (c00), dv register (b00) for storing the order of the v value, and controller (300) for controlling all these blocks.
도 6은 상기 도 3의 차수 검색기의 상세 블록 구성을 도시한 것이다. 이하 상기 도 6을 참조하면, 본 발명의 차수 검색기(800)는 기본적으로 룩업(Look-up) 테이블을 이용하여 차수를 검색한다. 상기 도 6에서는 16비트 입력에 대한 메모리 테이블(802)을 이용하여 차수를 검색하도록 되어 있다. 상기에서 시스템 요구 사양에 따라서 메모리 테이블(802)의 크기는 가변될 수 있다. 한편, 이를 위해 입력값(u_out)은 16비트씩 나뉘어 다중화기0(801)에 입력되며, 상기 다중화기0(801)에 입력된 값들은 상위 비트값부터 16비트 테이블(802)에 입력된다.FIG. 6 illustrates a detailed block configuration of the order finder of FIG. Hereinafter, referring to FIG. 6, the degree finder 800 of the present invention basically searches for an order using a look-up table. In FIG. 6, the order is retrieved using the memory table 802 for a 16-bit input. The size of the memory table 802 may vary depending on the system requirements. Meanwhile, for this purpose, the input value u_out is divided into 16 bits and input to the multiplexer 0 801, and the values input to the multiplexer 0 801 are input to the 16-bit table 802 from the upper bit value.
이때 16비트 테이블(802)의 출력값은 두 가지인데, 입력에 대한 차수 정보(degree_u)와 입력값이 '0'인가를 판단하는 정보(not_zero)이다. 상기 not_zero 신호는 다시 제어기(300)로 입력되어 만약 상위 비트 값들이 계속 '0'으로 판단되는 경우에는 다음 상위 16비트가 입력되도록 다중화기0(801)의 제어신호가 조정된다. 16비트 테이블(802)에서 차수가 검색되면, 테이블(802)의 출력과 다중화기0(801)의 제어신호(sel_u_word)의 조합으로 차수 정보가 출력된다. 검색된 차수 정보는 du 레지스터(c00)에 저장된다. 이와 동시에 dv 레지스터(b00)에는 f(x)의 차수가 저장된다. At this time, there are two output values of the 16-bit table 802, order information (degree_u) for the input and information (not_zero) for determining whether the input value is '0'. The not_zero signal is input to the controller 300 again, and if the upper bit values are continuously determined to be '0', the control signal of the multiplexer 0 801 is adjusted to input the next higher 16 bits. When the order is retrieved from the 16-bit table 802, the order information is output by combining the output of the table 802 and the control signal sel_u_word of the multiplexer 0 801. The retrieved order information is stored in the du register c00. At the same time, the order of f (x) is stored in the dv register b00.
이때 상기 f(x)의 차수는 미리 결정되기 때문에 별도의 검색 절차가 필요없게 되며, 차수가 검색되어 저장되는 경우에는 상기 도 2의 MAIA에서의 단계 2.1과 단계 2.2가 반복되도록 동작한다. 상기 단계 2.1과 단계 2.2는 u 레지스터(400)의 최하위 값이 '0' 또는 '1'인지에 따라 달라지는데, u 레지스터(400)의 최하위 값이 '0'이면 단계 2.1이 수행되고, u 레지스터(400)의 최하위 값이 '1'이면 단계 2.2가 수행된다. 상기 단계 2.1과 단계 2.2에서의 주된 연산은 u 레지스터(400)값과 b 레지스터(600)의 값을 연산하는 것으로, 이러한 연산들은 u 입력 처리기(100)와 b 입력처리기(200)에서 수행된다.In this case, since the order of f (x) is determined in advance, a separate search procedure is not required. When the order is searched and stored, steps 2.1 and 2.2 in the MAIA of FIG. 2 are repeated. Steps 2.1 and 2.2 are different depending on whether the lowest value of the u register 400 is '0' or '1'. If the lowest value of the u register 400 is '0', step 2.1 is performed and the u register ( If the lowest value of 400) is '1', step 2.2 is performed. The main operations in the above steps 2.1 and 2.2 are the operation of the value of the u register 400 and the value of the b register 600, and these operations are performed in the u input processor 100 and the b input processor 200.
도 4는 상기 도 3의 u 레지스터(400)의 입력값을 연산하고 선택하기 위한 u 입력 처리기(100)의 하드웨어 상세 블록 구성도이다. 상기 도 4를 참조하면, u 입력 처리기(100)는 GF(2m) 덧셈기(XOR)(101)와, 한 비트 오른쪽 쉬프트기인 SR1(102,106)과, 두 비트 오른쪽 쉬프트기인 SR2(103,107)와, 세 비트 오른쪽 쉬프트기인 SR3(104,108)와, 네 비트 오른쪽 쉬프트기인 SR4(105,109)와, 다중화기(110,111,112,113)로 구성되며, 상기 도 2의 MAIA에서의 단계 2.1과 단계 2.2의 u 레지스터 입력값에 대한 연산을 수행한다. 상기 단계 2.1 연산의 경우에는 u 레지스터(400)의 출력(u_out)이 SR1(102), SR2(103), SR3(104), SR4(105)에서 각각 쉬프트 연산된 후 다중화기0(110)으로 입력된다. 이때 다중화기0(110)은 u 레지스터(400) 하위 4비트(u_out[3:0])로 제어되는데, 연속된 '0'의 개수에 따라서 출력이 선택된다. 상기 단계 2.2 연산의 경우에는 u 레지스터(400) 값(u_out)과 v 레지스터(500) 값(v_out)을 덧셈기(101)에서 연산한 후, 상기 덧셈기(101)의 출력에 대하여 단계 2.1의 경우와 동일한 연산을 수행한다. 이때 다중화기1(111)는 상기 덧셈기(101) 출력의 하위 4비트 값(uv_out[3:0])으로 제어된다. 다중화기2(112)는 u 레지스터(400) 최하위 값(u_out[0])으로 제어되는데, 최하위 값이 '0'인 경우에는 단계 2.1의 결과가 출력되며, '1'인 경우에는 단계 2.2의 결과가 출력되도록 한다. 다중화기3(113)은 내부 연산 결과를 출력할지, 시스템으로의 입력을 출력할지를 결정하며, 최종 출력은 u 레지스터(400)로 입력된다.4 is a detailed block diagram of the hardware of the u input processor 100 for computing and selecting an input value of the u register 400 of FIG. 3. Referring to FIG. 4, the u input processor 100 includes a GF (2 m ) adder (XOR) 101, SR1 (102, 106), which is a one-bit right shifter, SR2 (103, 107), which is a two-bit right shifter, It consists of three bit right shifter SR3 (104,108), four bit right shifter SR4 (105,109), and multiplexers (110,111, 112,113). Perform the operation. In the case of the above step 2.1 operation, the output u_out of the u register 400 is shifted in the SR1 102, the SR2 103, the SR3 104, and the SR4 105, respectively, and then the multiplexer 0 110 is performed. Is entered. At this time, the multiplexer 0 110 is controlled by the lower 4 bits u_out [3: 0] of the u register 400, and an output is selected according to the number of consecutive '0's. In the case of the above step 2.2 operation, after the u register 400 value u_out and the v register 500 value v_out are calculated by the adder 101, the output of the adder 101 is different from that of step 2.1. Perform the same operation. In this case, the multiplexer 1 111 is controlled by the lower four-bit value uv_out [3: 0] of the adder 101 output. The multiplexer 2 112 is controlled by the lowest value u_out [0] of the u register 400. When the lowest value is '0', the result of Step 2.1 is outputted. Causes the output to be printed The multiplexer 3 113 determines whether to output an internal operation result or an input to the system, and the final output is input to the u register 400.
도 5는 상기 도 3의 b 레지스터(600)의 입력값을 연산하고, 선택하기 위한 b 입력처리기(200)의 하드웨어 상세 블록 구성도이다. 상기 도 5를 참조하면, b 입력 처리기(200)는 GF(2m)덧셈기(201,202,210,211,214,215,218,219,222,223)와, 한 비트 오른쪽 쉬프트기인 SR1(212,213,216,217,220,221,224,225)과, 다중화기(226,227,228)로 구성되며, 상기 도 4의 u 입력처리기(100)에서와 마찬가지로 상기 도 2의 MAIA에서의 단계 2.1과 단계 2.2의 b 레지스터(600) 입력값에 대한 연산을 수행한다. 상기 단계 2.1 연산의 경우에는 b 레지스터(600)의 하위 4비트 값들은 각각 f(x)와 곱셈기들(AND)(206,207,208,209)에서 연산된 후, 상기 도 5에서 보여지는 바와 같이 차례대로 덧셈 연산과 쉬프트 연산이 수행된다. 각각의 출력은 다중화기1(227)에 입력되고, u 레지스터(400) 하위 4비트(u_out[3:0])값에 따라 달리 선택된다. 상기 단계 2.2연산의 경우에는 b 레지스터(600) 출력(b_out)과 c 레지스터 출력(c_out)을 덧셈기(201)에서 더한 후, 이 출력값에 대하여 단계 2.1의 경우와 동일한 연산을 수행한다. 다중화기0(226)과 다중화기1(227)의 출력은 다중화기2(228)에서 u-out[0]값에 따라 선택되어 최종 출력된다.FIG. 5 is a detailed block diagram of the hardware of the b input processor 200 for calculating and selecting an input value of the b register 600 of FIG. 3. Referring to FIG. 5, the b input processor 200 includes a GF (2 m ) adder 201, 202, 210, 211, 214, 215, 218, 219, 222, 223, SR1 (212, 213, 216, 217, 220, 221, 224, 225) and a multiplexer 226, 227, 228. As in the input processor 100, the operation of the input values of the register b of step 2.1 and step 2.2 in the MAIA of FIG. 2 is performed. In the case of the above step 2.1 operation, the lower 4 bit values of the b register 600 are calculated by f (x) and multipliers (AND) 206, 207, 208, and 209, respectively, and then the addition operation is sequentially performed as shown in FIG. Shift operation is performed. Each output is input to multiplexer 1 227 and is selected differently according to the value of the lower 4 bits u_out [3: 0] of the u register 400. In the case of the operation 2.2, the register b (600) output (b_out) and the c register output (c_out) are added in the adder 201, and then the same operation is performed on the output value as in the step 2.1. The outputs of the multiplexer 0 226 and the multiplexer 1 227 are selected and finally outputted according to the u-out [0] value in the multiplexer 2 228.
v 레지스터(500)와 c 레지스터(700)는 상기 단계 2.2.1에서 v 레지스터(500)의 차수가 u 레지스터(400)의 차수보다 큰 경우 별다른 연산 없이 각각 u 레지스터(400)와 b 레지스터(600) 값이 저장된다. 상기 단계 2.2.1의 연산은 단계 2.2.2∼단계 2.2.5와 관계없이 병렬로 수행된다. 상기 단계 2.2.1을 위한 차수 비교와 단계 2.1와 단계 2.2 연산에 따른 u 레지스터(400) 차수 계산은 차수 비교 생성기(900)에서 수행된다.The v register 500 and the c register 700 are the u register 400 and the b register 600 without any operation when the order of the v register 500 is greater than the order of the u register 400 in step 2.2.1. ) Value is stored. The operation of step 2.2.1 is performed in parallel regardless of steps 2.2.2 to 2.2.5. The order comparison for step 2.2.1 and the order calculation of the u register 400 according to the operations of steps 2.1 and 2.2 are performed in the order comparison generator 900.
도 7은 상기 도 3의 차수 비교 생성기(900)의 하드웨어 상세 블록 구성도이다. 상기 도 7을 참조하면, 차수 비교 생성기(900)는 u 레지스터(400)와 v 레지스터(500) 차수값 비교를 위한 비교기(905)와, u 레지스터(400) 하위 4비트 출력과 v 레지스터(500) 하위 4비트 출력의 덧셈 연산을 위한 덧셈기(903), 연산 수행에 따른 u 레지스터(400) 및 v 레지스터(500) 차수 변화를 계산하기 위한 정수 뺄셈기(904,906,907) 그리고 여러 입력들을 선택하기 위한 다중화기들(901,902,908,909)로 구성된다. 차수 비교 생성기(900)는 두 가지 동작을 수행하는데, 첫째는 u 레지스터(400)의 차수와 v 레지스터(500)의 차수 비교이고, 두 번째는 연산에 따른 새로운 u 레지스터(400)의 차수 생성이다. 차수 비교는 비교기(905)에서 수행되어 출력된다. 새로운 차수값 계산은 역수 연산이 수행되는 과정 내내 수행되는데, 단계 2.1의 경우 u 레지스터(400) 차수값에서 쉬프트되어지는 비트 길이가 뺄셈기(904)에서 뺄셈 연산되어 새로운 차수가 생성된다. 쉬프트되어지는 비트 길이는 다중화기0(901)에서 선택되어진다. 단계 2.2의 경우에는 다중화기1(902)에서 쉬프트 되어지는 비트 길이가 선택되고, u 레지스터(400)의 차수 또는 v 레지스터(500)의 차수 값과 뺄셈기(906,907)에서 연산되어 새로운 차수가 생성된다. 이때 비교기(905)의 결과에 따라서 v 레지스터(400)의 차수가 큰 경우에는 v 레지스터(400)의 차수값이 선택되고, 그렇지 않은 경우에는 u 레지스터(400)의 차수값이 선택된다. 다중화기3(909)에서는 u 레지스터(400) 최하위 값(u_out[0])에 의해 최종 출력이 선택된다. 출력된 값은 du입력 처리기(a00)로 입력되며, u 차수 선택 신호(sel_deg_u)에 의해 선택적으로 du 레지스터(b00)에 입력된다.7 is a detailed block diagram of the hardware of the order comparison generator 900 of FIG. 3. Referring to FIG. 7, the order comparison generator 900 includes a comparator 905 for comparing the order values of the u register 400 and the v register 500, a lower 4-bit output of the u register 400, and a v register 500. Adder 903 for the addition operation of the lower 4 bit output, an integer subtractor 904, 906, 907 for calculating the order change of the u register 400 and the v register 500 as the operation is performed, and multiple inputs for selecting multiple inputs. Firearms 901, 902, 908, and 909. The order comparison generator 900 performs two operations: first, order comparison of the u register 400 and order of the v register 500, and second, order generation of a new u register 400 according to the operation. . The order comparison is performed in the comparator 905 and output. The new order value calculation is performed throughout the process of the inverse operation. In step 2.1, the bit length shifted in the u register 400 order value is subtracted by the subtractor 904 to generate a new order. The bit length to be shifted is selected in the multiplexer 0 (901). In the case of step 2.2, the bit length shifted in the multiplexer 1 902 is selected, and the order of the u register 400 or the order value of the v register 500 and the subtractor 906 and 907 are generated to generate a new order. do. At this time, if the order of the v register 400 is large according to the result of the comparator 905, the order value of the v register 400 is selected, otherwise the order value of the u register 400 is selected. In multiplexer 3 909, the final output is selected by u register 400 least significant value u_out [0]. The output value is input to the du input processor a00 and selectively input to the du register b00 by the u-order selection signal sel_deg_u.
제어기(300)는 역수 연산 시작 신호(start_inv)가 입력되면, 위와 같은 동작이 반복되도록 각 하드웨어를 제어하며, 최종 u 레지스터(400)의 차수가 '0'이 되면 동작 완료신호(done_inv)를 출력하며, v 레지스터로 최종 역수 연산 결과를 출력하게 된다. When the inverse arithmetic start signal start_inv is input, the controller 300 controls each hardware such that the above operation is repeated, and outputs an operation completion signal done_inv when the degree of the last u register 400 becomes '0'. And outputs the result of the last inverse operation to the v register.
한편 상술한 본 발명의 설명에서는 구체적인 실시 예에 관해 설명하였으나, 여러 가지 변형이 본 발명의 범위에서 벗어나지 않고 실시될 수 있다. 따라서 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 특허청구범위에 의해 정하여져야 한다.Meanwhile, in the above description of the present invention, specific embodiments have been described, but various modifications may be made without departing from the scope of the present invention. Therefore, the scope of the invention should be determined by the claims rather than by the described embodiments.
이상에서 설명한 바와 같이, 본 발명은 유한체 GF(2m)에서 효율적인 역수 연산에 있어서, GF(2m)의 두 원소 a(x)와 f(x)에 대하여 모듈라 f(x)에 대한 a(x)의 역수 a-1(x)를 계산하여 역수 연산을 수행함으로서, 역수 연산장치의 하드웨어 구현 및 확장이 용이하며, 높은 성능을 얻을 수 있는 이점이 있다. 또한 타원 곡선 암호화 장치의 역수 연산 장치로 사용될 수 있으며, 타원곡선 암호화 장치의 고속처리를 가능하게 하는 이점이 있다.As it described above, the present invention provides an efficient reciprocal operation in the finite field GF (2 m), to the modulo f (x) with respect to the two elements a (x) and f (x) in GF (2 m) a By performing the inverse operation by calculating the inverse a- 1 (x) of (x), hardware implementation and expansion of the inverse operation apparatus is easy, and there is an advantage that high performance can be obtained. In addition, it can be used as the inverse calculation device of the elliptic curve encryption device, there is an advantage that enables the high-speed processing of the elliptic curve encryption device.
도 1은 종래 역수 연산을 위한 MAIA 처리 흐름도,1 is a flow diagram of a MAIA process for a conventional inverse operation,
도 2는 본 발명의 실시 예에 따른 역수 연산을 위한 MAIA 처리 흐름도,2 is a flowchart of an MAIA processing for inverse calculation according to an embodiment of the present invention;
도 3은 본 발명의 실시 예에 따른 역수 연산 장치 블록 구성도,3 is a block diagram of a reciprocal calculation apparatus according to an embodiment of the present invention;
도 4는 본 발명의 실시 예에 따른 u 입력처리기 내부 블록 구성도,4 is a block diagram illustrating an internal input processor according to an exemplary embodiment of the present invention;
도 5는 본 발명의 실시 예에 따른 b 입력처리기 내부 블록 구성도,5 is a block diagram illustrating an internal configuration of an input processor according to an embodiment of the present invention;
도 6은 본 발명의 실시 예에 따른 차수 검색기 내부 블록 구성도,6 is a block diagram illustrating an internal order finder according to an embodiment of the present invention;
도 7은 본 발명의 실시 예에 따른 차수 비교 생성기 내부 블록 구성도.7 is a block diagram illustrating an internal order comparison generator according to an embodiment of the present invention.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2002-0082202A KR100480996B1 (en) | 2002-12-21 | 2002-12-21 | Apparatus for operating an inverse number in limited gf and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2002-0082202A KR100480996B1 (en) | 2002-12-21 | 2002-12-21 | Apparatus for operating an inverse number in limited gf and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20040055509A KR20040055509A (en) | 2004-06-26 |
KR100480996B1 true KR100480996B1 (en) | 2005-04-07 |
Family
ID=37348180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR10-2002-0082202A KR100480996B1 (en) | 2002-12-21 | 2002-12-21 | Apparatus for operating an inverse number in limited gf and method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100480996B1 (en) |
-
2002
- 2002-12-21 KR KR10-2002-0082202A patent/KR100480996B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR20040055509A (en) | 2004-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6049815A (en) | Method and apparatus for finite field multiplication | |
US8238557B2 (en) | Method and apparatus for key expansion to encode data | |
JP5116770B2 (en) | Module reduction using folding | |
US20050213756A1 (en) | Round key generation for aes rijndael block cipher | |
EP0963047B1 (en) | Reed Solomon coding apparatus and Reed Solomon coding method | |
US10768898B2 (en) | Efficient modulo calculation | |
JP2004534266A (en) | Method and apparatus for efficiently performing arithmetic operations in hardware | |
CN114063973B (en) | Galois field multiplier and erasure coding and decoding system | |
JP4767266B2 (en) | Arithmetic unit, error correction decoding circuit, and error position polynomial calculation method | |
JP2008304921A (en) | Improved modular reduction operator | |
US20120047355A1 (en) | Information Processing Apparatus Performing Various Bit Operation and Information Processing Method Thereof | |
KR100480996B1 (en) | Apparatus for operating an inverse number in limited gf and method thereof | |
US7295672B2 (en) | Method and apparatus for fast RC4-like encryption | |
US7039186B2 (en) | Encryption key generation circuit | |
US7590235B2 (en) | Reduction calculations in elliptic curve cryptography | |
US5999953A (en) | Method for the production of a parameter Jo associated with the implementation of a modular operation according to the Montgomery method | |
KR100564764B1 (en) | Finite field polynomial multiplier and Method thereof | |
KR100564765B1 (en) | Finite field polynomial divider and Method thereof | |
KR100427672B1 (en) | Method for embodying a shift register in software | |
JPH08202533A (en) | Division processor | |
JP2833327B2 (en) | Address generation method and address generation circuit | |
JP4142299B2 (en) | Address generator for annular address buffer and integrated circuit having the same | |
CN114626537A (en) | Irreducible polynomial and quantum secure hash value calculation method based on x86 platform SIMD | |
US20040081317A1 (en) | Encryption circuit achieving higher operation speed | |
JP2000048005A (en) | Method for multiplying galois field |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20100323 Year of fee payment: 6 |
|
LAPS | Lapse due to unpaid annual fee |