KR20030048631A - Crypto Processing apparatus for Elliptic Curve Cryptosystem - Google Patents

Crypto Processing apparatus for Elliptic Curve Cryptosystem Download PDF

Info

Publication number
KR20030048631A
KR20030048631A KR1020010078587A KR20010078587A KR20030048631A KR 20030048631 A KR20030048631 A KR 20030048631A KR 1020010078587 A KR1020010078587 A KR 1020010078587A KR 20010078587 A KR20010078587 A KR 20010078587A KR 20030048631 A KR20030048631 A KR 20030048631A
Authority
KR
South Korea
Prior art keywords
elliptic curve
register
unit
order
polynomial
Prior art date
Application number
KR1020010078587A
Other languages
Korean (ko)
Other versions
KR100423810B1 (en
Inventor
최용제
김호원
김무섭
박영수
정교일
Original Assignee
한국전자통신연구원
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 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR10-2001-0078587A priority Critical patent/KR100423810B1/en
Publication of KR20030048631A publication Critical patent/KR20030048631A/en
Application granted granted Critical
Publication of KR100423810B1 publication Critical patent/KR100423810B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE: An apparatus for encoding an elliptic curve is provided to enhance the security and the performance of electronic commercial transaction, electronic cash, identification and key management of an user, and an approval process system by using various elliptic curve protocols. CONSTITUTION: An elliptic curve encoding apparatus includes a register file portion(200), an elliptic curve processor calculation portion(400), an order comparator portion(500), an NAF(Non Adjacent Format) converter portion(100), and an elliptic curve processor control portion(300). The register file portion stores input data and output data to encode an elliptic curve. The elliptic curve processor calculation portion performs a calculation operation for the elliptic curve by using the stored data of the register file portion. The order comparator portion searches and compares the orders necessary for the calculation operation. The NAF converter portion supports the scalar multiplication calculation. The elliptic curve processor control portion generates a control signal to control a calculation operation mode of the elliptic curve processor.

Description

타원곡선 암호화 장치{Crypto Processing apparatus for Elliptic Curve Cryptosystem}Crypto Processing apparatus for Elliptic Curve Cryptosystem

본 발명은 타원곡선 암호화 장치에 관한 것이다.The present invention relates to an elliptic curve encryption device.

암호 시스템은 크게 비밀키 암호 시스템과 공개키 암호 시스템으로 구분되어진다. 비밀키 암호 시스템은 비밀 채널로 공유된 비밀키를 가지고 상호간의 암호 통신을 하는 방식으로 송, 수신자가 동일한 키에 의하여 암호화 및 복호화 과정을 수행하므로, 키를 안전하게 전송하고 보관함에 어려움이 있다. 이와 같은 키 분배 어려움을 해결한 것이 공개키 암호 알고리즘이다. 공개키 암호는 암호화하는 키와 복호화하는 키가 서로 다른 암호 시스템으로 암호 통신을 원하는 상대의 공개키를 받아서 암호화하여 전송하면 수신측은 자신만의 개인키를 가지고 암호문을 복호화 할 수 있다. 공개키 암호 알고리즘은 키 분배의 문제점을 해결함과 동시의 전자서명의 기능을 제공한다. 하지만 공개키 암호 알고리즘은 암,복호화의 연산량이 매우 큰 단점을 가지고 있기 때문에 데이터 암호화보다는 비밀키 분배나 전자서명 혹은 인증이 필요한 응용에 사용되고 있다.The cryptosystem is largely divided into a secret key cryptosystem and a public key cryptosystem. The secret key cryptosystem has a secret key shared by a secret channel, so that the sender and receiver perform encryption and decryption by the same key in a manner of mutually encrypted communication with each other, thus making it difficult to securely transmit and store the key. The public key cryptographic algorithm solves such a problem of key distribution. In public key cryptography, a cipher system having a different encryption key and a decryption key receives a public key of a counterpart who wants encryption communication, encrypts it, and transmits it. The receiving side can decrypt the cipher text with its own private key. The public key cryptographic algorithm solves the problem of key distribution and provides the function of simultaneous digital signature. However, the public key cryptography algorithm has a disadvantage in that the computation amount of encryption and decryption is very large. Therefore, the public key cryptography algorithm is used for applications requiring secret key distribution, digital signature, or authentication rather than data encryption.

대표적인 공개키 암호 시스템으로 RSA을 들 수 있다. RSA는 현재 가장 많이 사용되고 있는 공개키 암호 시스템이지만, 충분한 안전성을 위하여 큰 비트의 키를 사용하여야 한다는 단점이 있다. 키 길이가 커진다는 말은 그 만큼 필요한 연산 시간과 연산에 필요한 하드웨어가 늘어난다는 것을 의미한다.A representative public key cryptosystem is RSA. RSA is the most commonly used public key cryptosystem, but has a disadvantage of using a large bit of key for sufficient security. Larger key lengths mean more computation time and more hardware.

타원곡선 암호 시스템은 1985년 N. Koblitz와 V. Miller에 의해 제안된 공개키 암호 시스템으로 타원곡선 상에서 이산대수의 어려움에 안전성의 근거를 두고 있다. 타원곡선 상에서 이산대수 문제는 RSA 공개키 암호 시스템의 안전성의 근거인 소인수 분해 문제보다 더욱 어려운 것으로 알려져 있다. 이와 같은 사실은 암호 시스템에서 사용하는 키 길이와 밀접한 관계를 가지는데, 암호 시스템의 안전성이높을수록 짧은 키 값으로도 충분한 안전성을 보장하게 된다. 즉 타원곡선 암호 시스템은 RSA 공개키 암호 시스템에서 사용되는 키 길이보다 훨씬 짧은 키를 가지고도 그와 동등한 안전성을 보장하게 된다. 실제로 160비트의 키 길이를 가지는 타원곡선 암호 시스템은 1024비트의 RSA 암호 시스템과 동등한 안전성을 제공한다. 하지만 타원곡선 암호 시스템 역시 많은 연산량으로 인하여 실시간 암/복호 프로토콜로는 사용되지 못하고, 주로 키 교환과 비밀 메시지 암/복호화, 전자 서명과 인증을 위한 Diffe-Hellman, EC Elgamal, ECDSA 등의 프로토콜이 사용된다. 각 프로토콜은 공통적으로 타원곡선의 스칼라 곱셈(nP) 연산을 주요 연산으로 하며, 빠른 암호 시스템 구현을 위해서는 이를 위한 하드웨어 장치를 필요로 한다. 이에 더하여, 각 프로토콜 마다 조금씩 다른 별도의 타원곡선 연산을 필요로 하는데, 이러한 연산을 지원할 수 있는 하드웨어 장치는 그 만큼 전체적인 암호 시스템 성능을 향상시키게 된다.The elliptic curve cryptographic system is a public key cryptographic system proposed by N. Koblitz and V. Miller in 1985 and is based on the safety of discrete algebraic difficulties on elliptic curves. The discrete algebra problem on the elliptic curve is known to be more difficult than the prime factorization problem, which is the basis of the safety of the RSA public key cryptosystem. This fact is closely related to the key length used in the cryptographic system. The higher the security of the cryptographic system, the shorter the key value is, the more secure it is. That is, the elliptic curve cryptographic system guarantees an equivalent security even if the key is much shorter than the key length used in the RSA public key cryptosystem. In fact, an elliptic curve cryptosystem with a key length of 160 bits provides the same security as an RSA cryptosystem with 1024 bits. However, elliptic curve cryptosystems cannot be used as real-time encryption / decryption protocols due to the large amount of computation, and mainly used protocols such as Diffe-Hellman, EC Elgamal, ECDSA for key exchange and secret message encryption / decryption, digital signature and authentication. do. Each protocol uses scalar multiplication (nP) operations of elliptic curves in common, and a hardware device is required to implement a fast cryptographic system. In addition, slightly different elliptic curve operations are required for each protocol. Hardware devices that can support these operations improve overall cryptographic system performance.

이와 같이, 타원곡선 암호 시스템은 타원곡선 상의 이산대수 문제에 안전성의 근간을 두고 있어, 짧은 길이의 키 값으로 높은 안전성을 보장하며, 짧은 길이의 키 값을 사용한다는 것은 그 만큼 연산에 필요한 하드웨어가 적다는 것을 의미하지만, 타원곡선 연산 자체가 복잡하므로 이를 위한 하드웨어 구현에는 어려움이 있다. 또한 타원곡선 암호 시스템을 이용한 타원곡선 프로토콜들은 각 프로토콜마다 필요한 연산이 조금씩 차이가 있어서, 좀더 효율적인 타원곡선 암호 시스템 구현을 위해서는 이들 프로토콜에서 필요한 다양한 연산을 지원할 수 있는 타원곡선 암호화 장치가 필요한 문제점이 있다.In this way, the elliptic curve cryptographic system is based on the safety of the discrete algebra on the elliptic curve, which ensures high security with short key lengths. It means less, but the elliptic curve calculation itself is complicated, which makes it difficult to implement the hardware. In addition, the elliptic curve protocols using the elliptic curve cryptographic system have a slightly different operation required for each protocol. Therefore, an elliptic curve cryptographic apparatus capable of supporting various operations required by these protocols is required to implement a more efficient elliptic curve cryptographic system. .

본 발명은 이러한 종래의 문제점을 해결하기 위하여 안출된 것으로, 다양한 타원곡선 프로토콜 구현이 용이한 타원곡선 암호화 장치를 제공하는데 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve such a conventional problem, and an object thereof is to provide an elliptic curve encryption device that can easily implement various elliptic curve protocols.

도 1은 본 발명에 따른 타원곡선 암호화 장치의 구성 블록도.1 is a block diagram of an elliptic curve encryption apparatus according to the present invention;

도 2는 도 1의 레지스터 파일부의 구성 블록도.2 is a block diagram illustrating a register file unit of FIG. 1;

도 3은 도 1의 타원곡선 프로세서 연산부의 구성 블록도.3 is a block diagram illustrating an elliptic curve processor of FIG. 1;

도 4는 도 1의 차수 비교부의 구성 블록도.4 is a block diagram illustrating an order comparison unit of FIG. 1.

도 5는 도 1의 NAF 변환부의 구성 블록도.FIG. 5 is a block diagram illustrating a NAF converter of FIG. 1. FIG.

* 도면의 주요 부분에 대한 부호의 설명* Explanation of symbols for the main parts of the drawings

10 : 입출력 데이터 버스100 : NAF 변환부10: I / O data bus 100: NAF converter

200 : 레지스터 파일부300 : 타원곡선 프로세서 제어부200: register file unit 300: elliptic curve processor control unit

400 : 타원곡선 프로세서 연산부500 : 차수 비교부400: elliptic curve processor operation unit 500: order comparison unit

상기 목적을 달성하기 위한 본 발명에 따른 타원곡선 암호화 장치의 일측면에 의하면, 타원곡선 암호화를 위한 입력 데이터와 출력 데이터를 저장하는 레지스터 파일부와, 레지스터 파일부에 저장된 데이터에 대하여 타원곡선의 여러 연산을 수행하는 타원곡선 프로세서 연산부와, 타원곡선 프로세서 연산부의 연산에 필요한 차수 검색과 비교를 수행하는 차수 비교부와, 타원곡선 프로세서 연산부에서의 스칼라 곱셈 연산을 지원하기 위한 NAF 변환부와, 타원곡선 프로세서의 연산 동작모드를 제어하기 위한 제어신호를 발생하는 타원곡선 프로세서 제어부를 포함하여 구성된다.According to one aspect of the elliptic curve encryption device according to the present invention for achieving the above object, a register file portion for storing the input data and output data for the elliptic curve encryption, and a plurality of elliptic curves for the data stored in the register file portion An elliptic curve processor calculating unit performing an operation, an order comparing unit performing an order search and comparison necessary for the operation of the elliptic curve processor calculating unit, an NAF transform unit for supporting a scalar multiplication operation in the elliptic curve processor calculating unit, and an elliptic curve And an elliptic curve processor controller for generating a control signal for controlling the operation mode of the processor.

상술한 목적, 특징들 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이다. 이하 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.The above objects, features and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 타원곡선 암호화 장치의 일실시예 구성도이다.1 is a configuration diagram of an elliptic curve encryption device according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명에 따른 타원곡선 암호화 장치는 입출력 데이터 버스(10)와, 효율적인 스칼라 곱셈 연산을 위한 NAF 변환부(100)와, 타원곡선 연산의 입출력 값을 저장하기 위한 레지스터 파일부(200)와, 각 레지스터 및 연산기들을 제어하기 위한 타원곡선 프로세서 제어부(300)와, 타원곡선의 여러 연산을 수행하기 위한 타원곡선 프로세서 연산부(400)와, 타원곡선 연산에 필요한 차수 검색 및 비교를 위한 차수 비교부(500)를 구비한다.As shown in FIG. 1, an elliptic curve encryption apparatus according to the present invention includes an input / output data bus 10, a NAF converter 100 for efficient scalar multiplication operation, and a register for storing input / output values of an elliptic curve operation. The file unit 200, an elliptic curve processor control unit 300 for controlling each register and an operator, an elliptic curve processor calculating unit 400 for performing various operations of an elliptic curve, and an order search required for an elliptic curve operation. An order comparison unit 500 for comparison is provided.

도 1의 타원곡선 암호화 장치의 동작을 살펴보면, 타원곡선 연산의 입력을 레지스터 파일부(200)에 입력하고 타원곡선 프로세서 제어부(300)의 제어 레지스터에 값을 입력하면 연산을 시작한다. 타원곡선 프로세서 제어부(300)는 동작 모드에 따라 타원곡선 프로세서 연산부(400)와 차수 비교부(500)와, NAF 변환부(100) 등을 스칼라 곱셈 연산, 타원곡선 좌표 덧셈 연산, 다항 곱셈 연산, 다항 역승산 연산, 다항 역함수 연산 등이 수행되도록 동작을 제어한다. 그리고, 연산이 완료되면 최종 결과를 레지스터 파일부(200)에 저장하고 동작이 끝났음을 표시한다.Referring to the operation of the elliptic curve encryption apparatus of FIG. 1, when an input of an elliptic curve operation is input to the register file unit 200 and a value is input to a control register of the elliptic curve processor control unit 300, the operation is started. The elliptic curve processor control unit 300 may perform a scalar multiplication operation, an elliptic curve coordinate addition operation, a polynomial multiplication operation, and the like using the elliptic curve processor operation unit 400, the order comparison unit 500, and the NAF conversion unit 100 according to an operation mode. Controls an operation to perform a polynomial inverse multiplication operation and a polynomial inverse function operation. When the operation is completed, the final result is stored in the register file unit 200 to indicate that the operation is completed.

도 2는 도1에 도시된 레지스터 파일부의 일실시예 구성도이다.FIG. 2 is a diagram illustrating an embodiment of a register file unit shown in FIG. 1.

도 2에 도시된 바와 같이, 본 발명에 따른 레지스터 파일부(200)는 스칼라 곱셈 상수를 저장하기 위한 N 레지스터(202)와 이의 입력을 결정하기 위한 N 다중화기(201), N 레지스터(201)의 값을 한 비트 왼쪽으로 순환(rotate)시키기 위한 Lr 블록(203), 타원곡선 기저점이나 연산의 입력값을 저장하기 위한 X1 레지스터(204)와 Y1 레지스터(205), 타원곡선의 다른 한 좌표의 입력이나 출력을 저장하기 위한 X2 레지스터(207)와 Y2 레지스터(209), 그리고 이들 레지스터의 입력을 결정하기 위한 X2 다중화기(206), Y2 다중화기(208)를 구비한다.As shown in FIG. 2, the register file unit 200 according to the present invention includes an N register 202 for storing a scalar multiplication constant, an N multiplexer 201, and an N register 201 for determining an input thereof. Lr block 203 for rotating the value of a bit left, X1 register 204 and Y1 register 205 for storing the input value of the elliptic curve base point or operation, and another coordinate of the elliptic curve. An X2 register 207 and a Y2 register 209 for storing the inputs or outputs of the X2, and an X2 multiplexer 206 and a Y2 multiplexer 208 for determining the input of these registers.

도 2의 각 블록의 동작을 살펴보면, N 레지스터(202)는 스칼라 곱셈 상수를저장하는 레지스터로서 상위 4비트 만을 출력한다. N 다중화기(201)는 초기 상수 값 입력 시에는 시스템 버스(10)로부터 입력이 N 레지스터(202)의 입력이 되도록 제어하며, 스칼라 곱셈 연산 중에는 N 레지스터(202)의 출력 값이 다시 N 레지스터(202)의 입력이 되도록 제어한다. 이때 N 레지스터(202) 출력값은 한 비트 왼쪽으로 순환(left rotate)되어 입력된다. 이러한 동작은 Lr 블록(203)을 통하여 이루어지는데, Lr 블록(203)은 단순 비트 맵핑으로 구현된다. X1 레지스터(204)와 Y1 레지스터(205)는 스칼라 곱셈 연산을 위한 기저점을 저장하거나 타원곡선 좌표 덧셈 연산을 위한 좌표 값을 저장하기 위한 레지스터이다. 또한 X1 레지스터(204)는 그 외 다항 연산을 위한 입력 레지스터로 사용된다. X2 레지스터(207)와 Y2 레지스터(209)는 스칼라 곱셈 연산 시에는 중간 연산 결과 및 최종 출력 값을 저장하기 위해 사용되며, 타원곡선 좌표 덧셈 연산 시에는 다른 한 좌표의 입력과 최종 출력을 저장하기 위해 사용되는 레지스터이다. X2 레지스터(207)는 그 외 다항 연산 시 입력 또는 출력 레지스터로 사용된다. X2 다중화기(206)와 Y2 다중화기(208)는 동작에 따라 각 레지스터 입력을 결정한다. 본 발명에 따른 타원곡선 암호화 장치는 총 5가지 동작 모드를 가지는데, 각 모드에 따른 암호 프로세서 동작과 레지스터 파일의 입출력은 다음과 같다. 각 동작 모드는 타원곡선 프로세서 제어부(300)의 제어 레지스터 할당 값에 따라 달라진다.Referring to the operation of each block of FIG. 2, the N register 202 outputs only the upper 4 bits as a register that stores a scalar multiplication constant. The N multiplexer 201 controls the input from the system bus 10 to be the input of the N register 202 when the initial constant value is input. During the scalar multiplication operation, the output value of the N register 202 again becomes the N register ( Control to be the input of 202). At this time, the output value of the N register 202 is rotated one bit to the left. This operation is done via Lr block 203, which is implemented with simple bit mapping. X1 register 204 and Y1 register 205 are registers for storing a base point for a scalar multiplication operation or for storing a coordinate value for an elliptic curve coordinate addition operation. The X1 register 204 is also used as an input register for other polynomial operations. The X2 register 207 and the Y2 register 209 are used to store the intermediate result and the final output value during the scalar multiplication operation, and to store the input and final output of the other coordinates during the elliptic curve coordinate addition operation. Is the register used. The X2 register 207 is used as an input or output register in other polynomial operations. X2 multiplexer 206 and Y2 multiplexer 208 determine each register input in accordance with operation. The elliptic curve encryption apparatus according to the present invention has a total of five operation modes, the operation of the cryptographic processor and the input / output of the register file according to each mode are as follows. Each operation mode depends on a control register allocation value of the elliptic curve processor control unit 300.

Mode 1 : 스칼라 곱셈 모드Mode 1: scalar multiplication mode

동작 : Q = nP (n : 임의의 상수, P : 타원곡선 기저점)Behavior: Q = nP (n: random constant, P: elliptic curve base)

입력 : n --> N 레지스터(202), P(x) --> X1 레지스터(204), P(y) --> Y1 레지스터(205)Input: n-> N register 202, P (x)-> X1 register 204, P (y)-> Y1 register (205)

출력 : Q(x) --> X2, Q(y) --> Y2Output: Q (x)-> X2, Q (y)-> Y2

Mode 2 : 타원곡선 좌표 덧셈 연산Mode 2: Elliptic Curve Coordinate Addition

동작 : Q = P + G (P, G : 타원곡선 상의 임의의 점)Behavior: Q = P + G (P, G: any point on the elliptic curve)

입력 : P(x) --> X1 레지스터(204), P(y) --> Y1 레지스터(205),Input: P (x)-> X1 register (204), P (y)-> Y1 register (205),

G(x) --> X2 레지스터(207), G(y) --> Y2 레지스터(209)G (x)-> X2 register (207), G (y)-> Y2 register (209)

출력 : Q(x) --> X2 레지스터(207), Q(y) --> Y2 레지스터(209)Output: Q (x)-> X2 register (207), Q (y)-> Y2 register (209)

Mode 3 : 다항 곱셈 연산Mode 3: Polynomial Multiplication

동작 : c(x) = a(x) * b(x)Behavior: c (x) = a (x) * b (x)

입력 : a(x) --> X1 레지스터(104), b(x) --> X2 레지스터(207)Input: a (x)-> X1 register (104), b (x)-> X2 register (207)

출력 : c(x) --> X2 레지스터(207)Output: c (x)-> X2 register (207)

Mode 4 : 다항 역승산 연산Mode 4: Polynomial Inverse Multiplication

동작 : c(x) = a(x) / b(x)Behavior: c (x) = a (x) / b (x)

입력 : b(x) --> X1 레지스터(204), a(x) --> X2 레지스터(207)Input: b (x)-> X1 register (204), a (x)-> X2 register (207)

출력 : c(x) --> X2 레지스터(207)Output: c (x)-> X2 register (207)

Mode 5 : 다항 역함수 연산Mode 5: Polynomial Inverse Function Operation

동작 : c(x) = a(x)-1Behavior: c (x) = a (x) -1

입력 : a(x) --> X1 레지스터(204)Input: a (x)-> X1 register (204)

출력 : c(x) --> X2 레지스터(207)Output: c (x)-> X2 register (207)

도 3은 도 1에 도시된 타원곡선 프로세서 연산부(400)의 일실시예 구성도이다.3 is a configuration diagram of an elliptic curve processor operation unit 400 shown in FIG. 1.

도 3에 도시된 바와 같이, 본 발명에 의한 타원곡선 프로세서 연산부(400)는 F 레지스터(402), G 레지스터(405), C 레지스터(408), B 레지스터(410) 등 4개의 레지스터, 각 레지스터들의 입력을 제어하기 위한 F 다중화기(401), G 다중화기(404), C 다중화기(407), B 다중화기(409), 다항 덧셈 연산을 위한 ADD0(413), ADD1(417), ADD2(419) 연산 블록과 연산 블록의 입력을 제어하기 위한 다중화기들(415, 416, 418, 420), 비트 곱을 위한 MUL(414) 연산 블록, 한 비트 오른쪽 쉬프트와 왼쪽 쉬프트를 위한 Rs 블록(403)과 Ls 블록(406)을 구비한다. 그리고 내부적으로 최소 다항식 값(411)과 타원곡선 계수인 A 파라미터(412)를 저장하고 있다. 이 두 가지 값은 초기에 시스템 버스로부터 입력받을 수도 있다.As shown in FIG. 3, the elliptic curve processor operation unit 400 according to the present invention includes four registers, such as an F register 402, a G register 405, a C register 408, and a B register 410. F multiplexer 401, G multiplexer 404, C multiplexer 407, B multiplexer 409, ADD0 413, ADD1 417, ADD2 for polynomial addition operations to control their input. (419) operation block and multiplexers 415, 416, 418, 420 for controlling the input of the operation block, MUL 414 operation block for bit product, Rs block 403 for one bit right shift and left shift ) And Ls block 406. Internally, a minimum polynomial value 411 and an A parameter 412 which is an elliptic curve coefficient are stored. These two values may be initially input from the system bus.

도 3의 타원곡선 프로세서 연산기는 각 레지스터와 연산기들을 이용하여 다항 덧셈 연산, 다항 곱셈 연산, 다항 역승산 연산, 다항 역함수 연산 등의 연산을 수행할 수 있다. 또한 이러한 여러 연산들을 조합하여 타원곡선 덧셈 연산을 수행할 수 있다.The elliptic curve processor operator of FIG. 3 may perform operations such as polynomial addition operations, polynomial multiplication operations, polynomial inverse multiplication operations, and polynomial inverse function operations using respective registers and operators. In addition, an elliptic curve addition operation can be performed by combining these various operations.

본 발명에 따른 타원곡선 프로세서 연산부(400)에서의 다항 덧셈 연산은 F 레지스터(402), G 레지스터(405)와 ADD0(413) 연산기를 이용하여 수행되며, 연산 결과는 F 레지스터(402)나 G 레지스터(405)에 저장된다. 또한 C 레지스터(408), B 레지스터(410)와 ADD1(417) 연산기를 이용하여 연산하여, 결과를 다시 C 레지스터(408)나 B 레지스터(410)에 저장할 수도 있다.The polynomial addition operation in the elliptic curve processor operation unit 400 according to the present invention is performed using the F register 402, the G register 405, and the ADD0 413 operator, and the operation result is the F register 402 or the G operator. Stored in register 405. It is also possible to perform calculations using the C register 408, B register 410 and the ADD1 417 operator, and store the result in the C register 408 or the B register 410 again.

본 발명에 따른 타원곡선 프로세서 연산기에서의 다항 곱셈 연산은 비트 단위로 수행되며, G 레지스터(405) 값과 C 레지스터(408) 값을 다항 곱셈 연산하여 B 레지스터(410)로 출력한다. 동작을 자세히 살펴보면, 먼저 G 레지스터(405)와 C 레지스터(408)에 다항 곱셈 연산할 값을 저장하고 B 레지스터(410)를 '0'으로 초기화한다. 그런 후 G 레지스터(205)의 마지막 비트 값과 C 레지스터(208) 값을 MUL(214) 연산기를 이용하여 비트 곱 연산을 수행한 후, 곱 연산의 결과와 B 레지스터(410) 값을 ADD1(417) 연산기를 이용하여 다항 덧셈 연산을 수행한다. ADD1(417)의 결과는 ADD2(419) 연산기에서 최소 다항식 값(411)과 다시 다항 덧셈 연산이 수행된다. 이때 ADD2(419)의 다항 덧셈은 ADD0(413)나 ADD1(417) 연산기에서의 다항 덧셈과 달리 ADD1(417)로부터의 입력값의 최상위 비트 값이 '1'인 경우에만 선택적으로 행해진다. 이때, 연산 결과는 한 비트 오른쪽 쉬프트 되어 출력되며, 이 결과는 다시 B 레지스터(410)에 저장된다. 이와 같은 동작을 레지스터의 비트 길이 만큼 반복하여 다항 곱셈 연산을 수행한다. 연산 종료 후 B 레지스터(410)의 결과 값이 최종 다항 곱셈 연산의 결과가 된다. 다항 곱셈 연산 시 ADD1(417)의 입력 다중화기(415, 416)들은 입력이 MUL(414) 연산기의 출력과 B 레지스터(410)값이 되도록 제어하며, ADD2(419)의 입력 다중화기들(418, 420)은 ADD1(417) 연산기의 출력과 최소 다항식 값이 입력되도록 제어한다. 그리고 G 다중화기(404)는 G 레지스터(405)의 입력이 Gl이 되도록 제어하는데, 이 Gl은 Ls 블록(406)을 통하여 한 비트 쉬프트 된 G 레지스터(405) 값이다. B 다중화기(409)는 B 레지스터(410) 입력이 ADD2(419)가 되도록 제어한다. C 레지스터(408)는 연산 도중 값이 바뀌지 않는다.The polynomial multiplication operation in the elliptic curve processor operator according to the present invention is performed in units of bits. The polynomial multiplication operation of the G register 405 value and the C register 408 value is output to the B register 410. Looking at the operation in detail, first, a value for polynomial multiplication operation is stored in the G register 405 and the C register 408, and the B register 410 is initialized to '0'. Thereafter, after performing the bit multiplication operation using the MUL 214 operator on the last bit value of the G register 205 and the value of the C register 208, the result of the multiplication operation and the value of the B register 410 are ADD1 (417). Perform a polynomial addition operation using the arithmetic operator. The result of ADD1 417 is a minimum polynomial value 411 and again a polynomial addition operation in the ADD2 419 operator. At this time, the polynomial addition of the ADD2 419 is selectively performed only when the most significant bit value of the input value from the ADD1 417 is '1', unlike the polynomial addition in the ADD0 413 or the ADD1 417 operator. At this time, the operation result is shifted by one bit to the right, and the result is stored in the B register 410 again. This operation is repeated by the bit length of the register to perform a polynomial multiplication operation. After the operation ends, the result value of the B register 410 becomes the result of the final polynomial multiplication operation. The input multiplexers 415 and 416 of the ADD1 417 control the input to be the output of the MUL 414 operator and the value of the B register 410 during the polynomial multiplication operation, and the input multiplexers 418 of the ADD2 419. , 420 controls the output of the ADD1 417 operator and the minimum polynomial value to be input. The G multiplexer 404 then controls the input of the G register 405 to be Gl, which is the value of the one bit shifted G register 405 through the Ls block 406. The B multiplexer 409 controls the B register 410 input to be ADD2 419. The C register 408 does not change value during operation.

본 발명에 따른 타원곡선 프로세서에서 다항 역함수 연산은 다음과 같은 수정된 준 역수(Modified Almost Inverse Algorithm) 구현된다.In the elliptic curve processor according to the present invention, polynomial inverse arithmetic operations are implemented as modified modified most inverse algorithms.

입력 : a ( F2m , a ( 0.Input: a (F2m, a (0.

출력 : a(1 mod f (x)(최소 다항식).Output: a (1 mod f (x) (minimum polynomial).

1. B <-- 1, C <-- 0, F <-- a, G <-- f1.B <-1, C <-0, F <-a, G <-f

2. While x divides F do :While x divides F do:

2.1 F <-- F / x.2.1 F <-F / x.

2.2 If x divides B then B <-- B / x, else B <-- (B + f) / x.2.2 If x divides B then B <-B / x, else B <-(B + f) / x.

3. If F = 1 the return (B).3.If F = 1 the return (B).

4. If deg(F) < deg(G) then : F " G, B " C.4.If deg (F) <deg (G) then: F "G, B" C.

5. F <-- F + G, B <-- B + C.5.F <-F + G, B <-B + C.

6. Goto step 2.6.Goto step 2.

여기서 F, G, B, C는 각각 F 레지스터(402), G 레지스터(405), C레지스터(408), B 레지스터(410)를 의미하며, a는 다항 역함수 연산의 입력값이고, f(x)는 최소 다항식을 의미한다.Where F, G, B, and C represent the F register 402, the G register 405, the C register 408, and the B register 410, respectively, a being the input value of the polynomial inverse function operation, and f (x ) Means the minimum polynomial.

타원곡선 프로세서 연산기에서 위와 같은 알고리즘의 동작을 자세히 살펴보면, 먼저 알고리즘의 단계 1과 같이 역함수를 구하고자 하는 값을 F 레지스터(202)에 저장하고 B 레지스터(410)와 C 레지스터(408), 그리고 G 레지스터(405)를 각자 '1', '0', 'f'로 초기화 한다. 그런 다음 단계 2의 While 구문의 조건 검색을 위하여 F 레지스터(402) 값의 최하위 비트가 '0'인가를 검색한다. 만약 이 F 레지스터(402)의 최하위 비트 값이 '0'인 경우에는 단계 2.1과 같이 F 레지스터(402) 값을 한 비트 오른쪽으로 쉬프트 한다. 이러한 동작은 Rs 블록(403)을 통한 F 레지스터(402) 출력 값이 다시 F 레지스터(402)에 저장되도록 F 다중화기(401)를 제어함으로써 이루어진다. 단계 2.2 연산은 ADD2(419) 연산기에서 B 레지스터(410) 출력의 최하위 값이 '0'인 경우에만 선택적으로 최소 다항식과의 다항 덧셈 연산을 수행함으로써 이루어진다. 이때 연산 결과는 한 비트 오른쪽으로 쉬프트 되어 출력되며, 이 결과는 다시 B 레지스터(410)에 저장된다. 단계 4와 단계 5는 동시에 수행되며, 단계 4를 위한 F 레지스터(402)와 G 레지스터(405)의 차수 비교는 차수 비교기(15)에서 이루어진다. F 레지스터(402)의 차수가 큰 경우에는 F 레지스터(402)의 입력이 F 레지스터(402)와 G 레지스터(405) 다항 덧셈 결과인 ADD0(413)가 되도록 F 다중화기(401)를 제어하며, 그렇지 않은 경우에는 G 레지스터(405)의 값이 입력이 되도록 F 다중화기(401)를 제어한다. 마찬가지로 F 레지스터(402)의 차수가 큰 경우 B 레지스터(410) 입력은 B 레지스터(410)와 C레지스터(408)의 다항 덧셈 결과인 ADD1(417) 값이 되며, 그렇지 않은 경우에는 C 레지스터(408) 값이 입력이 되도록 B 다중화기(409)를 제어한다. G 레지스터(405)와 C 레지스터(408)의 입력은 비교 결과에 상관없이 F 레지스터(402)와 B 레지스터(410) 값이 되도록 G 다중화기(404)와 C 다중화기(407)를 제어한다. 이러한 일련의 동작들은 단계 3에서와 같이 F 레지스터(402) 값이 '1'이 될 때까지 반복하며, 이때 F 레지스터(402)가 '1'이 되었는가는 차수 비교부(500)를 통하여 검색한다. 다항 역함수 연산이 완료되었을 때 B 레지스터(410) 값이 다항 역함수 출력 값이 된다.Looking at the operation of the above algorithm in the elliptic curve processor operator, first, the value to be inversed is stored in the F register 202, the B register 410, the C register 408, and the G as in step 1 of the algorithm. The register 405 is initialized to '1', '0', and 'f', respectively. Then, to search for the condition of the While statement of Step 2, it is searched whether the least significant bit of the value of the F register 402 is '0'. If the least significant bit value of the F register 402 is '0', the value of the F register 402 is shifted one bit to the right as in step 2.1. This operation is accomplished by controlling the F multiplexer 401 such that the F register 402 output value through the Rs block 403 is stored in the F register 402 again. Step 2.2 The operation is performed by selectively performing a polynomial addition operation with the minimum polynomial only if the lowest value of the B register 410 output in the ADD2 419 operator is '0'. At this time, the operation result is shifted one bit to the right, and the result is stored in the B register 410 again. Steps 4 and 5 are performed simultaneously, and an order comparison of the F register 402 and the G register 405 for step 4 is made in the order comparator 15. When the order of the F register 402 is large, the F multiplexer 401 is controlled so that the input of the F register 402 becomes ADD0 413, which is the result of the polynomial addition of the F register 402 and the G register 405. Otherwise, the F multiplexer 401 is controlled so that the value of the G register 405 is input. Similarly, if the order of the F register 402 is large, the B register 410 input becomes the value of ADD1 417, which is the result of the polynomial addition of the B register 410 and the C register 408, otherwise the C register 408 The B multiplexer 409 is controlled so that the value is input. The inputs of the G register 405 and the C register 408 control the G multiplexer 404 and the C multiplexer 407 to be the values of the F register 402 and the B register 410 regardless of the comparison result. These series of operations are repeated until the value of the F register 402 becomes '1' as in step 3, where the order comparison unit 500 searches whether the F register 402 becomes '1'. . When the polynomial inverse operation is completed, the value of the B register 410 becomes the polynomial inverse function output value.

다항 역승산 연산은 이러한 다항 역함수 연산과 다항 곱셈 연산의 조합으로 이루어지는데, 먼저 다항 역함수 연산을 수행하여 결과를 C 레지스터(408)에 저장한 후, 곱해야 할 값을 G 레지스터(405)에 입력하여 다항 곱셈 연산을 수행한다. 최종 다항 역승산 연산의 결과는 B 레지스터(410)로 출력된다.A polynomial inverse multiplication operation is a combination of such a polynomial inverse operation and a polynomial multiplication operation. First, a polynomial inverse operation is performed to store a result in the C register 408, and then a value to be multiplied is input to the G register 405. Performs a polynomial multiplication operation. The result of the final polynomial inverse multiplication operation is output to the B register 410.

본 발명에 따른 타원곡선 프로세서 곱셈기에서 타원곡선 덧셈 연산은 위에서 언급한 연산들의 조합으로 구현된다. 타원곡선 덧셈 연산은 입력 값에 따라 타원곡선 두배 연산과 타원곡선 좌표 덧셈 연산으로 구분되며, 다음의 타원곡선 덧셈 연산 알고리즘과 같이 다항 곱셈 연산과 다항 역승산 연산, 그리고 다항 덧셈 연산으로 구현된다.In the elliptic curve processor multiplier according to the present invention, the elliptic curve addition operation is implemented by a combination of the above-mentioned operations. The elliptic curve addition operation is divided into elliptic curve double operation and elliptic curve coordinate addition operation according to the input value, and is implemented by polynomial multiplication operation, polynomial inverse multiplication operation, and polynomial addition operation like the following elliptic curve addition operation algorithm.

입력 : P1= (x1, y1) , P2= (x2, y2).Input: P 1 = (x 1 , y 1 ), P 2 = (x 2 , y 2 ).

출력 : P3= P1+ P2= (x3, y3).Output: P 3 = P 1 + P 2 = (x 3 , y 3 ).

1. If P1= P2(타원곡선 두배 연산)1.If P 1 = P 2 (double elliptic operation)

x3= (λ2+ λ + a, y3= x1 2+ (λ + 1) x3 x 3 = (λ 2 + λ + a, y 3 = x 1 2 + (λ + 1) x 3

where (λ = x1+ y1/ x1)where (λ = x 1 + y 1 / x 1 )

2. Else if P1( P2(타원곡선 좌표 덧셈 연산)2.Else if P 1 (P 2 (add elliptic curve coordinates)

x3= (2 + λ + x1+ x2+ a, y3= λ(x1+ x3) + x3+ y1 x 3 = (2 + λ + x 1 + x 2 + a, y 3 = λ (x 1 + x 3 ) + x 3 + y 1

where (λ = ( y2+ y1) / ( x2+ x1) )where (λ = (y 2 + y 1 ) / (x 2 + x 1 ))

3. Return (x3, y3)3.Return (x 3 , y 3 )

여기서 P1= (x1, y1) , P2= (x2, y2)는 레지스터 파일부(200)의 X1, Y1, X2, Y2 레지스터(204, 205, 207, 209)들과 상관없이 단순히 알고리즘의 입력으로서의 의미만을 가진다.Where P 1 = (x 1 , y 1 ), P 2 = (x 2 , y 2 ) correlate with the registers X 1, Y 1, X 2 , and Y 2 of the register file unit 200 (204, 205, 207, 209). It simply has the meaning as an input to the algorithm.

타원곡선 두배 연산과 타원곡선 좌표 덧셈 연산 모두 λ을 구하여 x3값 부터 계산하며, 그 후 λ과 x3값을 이용하여 y3값을 계산한다. 이때 연산 중간 결과 값들은 바로 다음 연산에 이용되거나 연산에 이용되고 있지 않는 레지스터에 저장되어, 필요할 때 다시 사용되게 된다. 최종 결과는 레지스터 파일의 X2 레지스터(207)와 Y2 레지스터(209)에 저장된다.Both the elliptic curve doubling operation and the elliptic curve coordinate addition operation calculate λ and compute the value from x 3 , and then calculate the y 3 value using λ and x 3 . The intermediate result values are stored in registers that are used for the next operation or are not used for the operation, and are used again when needed. The final result is stored in X2 register 207 and Y2 register 209 of the register file.

타원곡선 두배 연산은 스칼라 곱셈 연산 모드일 경우에만 수행되며, 레지스터 파일의 X2 레지스터(207)와 Y2 레지스터(209) 값의 두배 연산을 수행하여 결과를 다시 X2 레지스터(207)와 Y2레지스터에 저장한다. 이를 위해 먼저 X2 레지스터(207) 값을 F 레지스터(402)에 가져와 다항 역함수 연산을 수행한다. 다항 역함수 연산 결과를 B 레지스터(410)에서 C 레지스터(408)로 옮기고 Y2 레지스터(209) 값을 G 레지스터(405)로 가져와 C 레지스터(408) 값과의 다항 곱셈 연산을 수행한 후, X2 레지스터(207) 값을 C 레지스터(408)에 저장하고 다항 곱셈 결과와 다항 덧셈 연산을 수행하면 알고리즘의 λ값이 계산된다. 이 λ값을 G 레지스터(405)와 C 레지스터(408)로 저장하고 다시 다항 곱셈 연산을 수행하면 λ2이 계산된다. 이때, 다항 곱셈 연산 중 C 레지스터(408) 값은 변하지 않으므로 C 레지스터(408)에는 λ값이 그대로 남아있게 된다. 따라서 B 레지스터(410)와 C 레지스터(408)의 다항 덧셈 연산을 수행하면 (λ2+ λ)이 계산되고, 마지막으로 A 파라미터 값을 ADD2(219) 연산기를 이용하여 다항 덧셈 연산을 수행하여 x3을 얻게 된다. B 레지스터(210)의 x3 값은 X2 레지스터(207)로의 출력과 y3계산을 위하여 F 레지스터(402)와 G 레지스터(405)로 옮기고, B 레지스터(410)는 '1'로 초기화 한다. 그런 후 C 레지스터(408)와 B 레지스터(410)의 다항 덧셈 연산을 수행하고 이를 C 레지스터(408)에 저장한다. 이 C 레지스터(408) 값과 G 레지스터(405)의 다항 곱셈 연산을 수행하면, 알고리즘의 (λ + 1) x3을 얻을 수 있다. 이 결과를 F 레지스터(402)에 다시 저장한다. 이때 F 레지스터(402)에 저장된 x3는 X2 레지스터(207)로 저장되며, X2 레지스터(207) 값은 x1 2계산을 위하여 G 레지스터(405)와 C 레지스터(408)로 저장된다. G 레지스터(405)와 C 레지스터(408)의 다항 곱셈 연산을 수행 후 연산 결과인 x1 2을 G 레지스터(405)로 옮기고, F 레지스터(402)와 다항 덧셈 연산을 수행하여 G 레지스터(405)에 저장하면 최종적인 y3이 계산된다. 이 다항 덧셈 연산 결과를 Y2 레지스터(209)에 저장하면 타원곡선 두배 연산이 완료된다.The elliptic curve double operation is performed only in the scalar multiplication operation mode, and performs the double operation of the values of the X2 register 207 and Y2 register 209 of the register file, and stores the result in the X2 register 207 and the Y2 register. . To this end, first, the value of the X2 register 207 is brought into the F register 402 to perform a polynomial inverse function operation. Move the result of the polynomial inverse function from the B register 410 to the C register 408, bring the Y2 register 209 value into the G register 405, perform a polynomial multiplication operation with the value of the C register 408, and then register the X2 register. When the value is stored in the C register 408 and the polynomial multiplication result and the polynomial addition operation are performed, the lambda value of the algorithm is calculated. Saving this λ value G in the register 405 and the C register 408 and again performs a polynomial multiplication operation is calculated λ 2. At this time, since the value of the C register 408 does not change during the polynomial multiplication operation, the lambda value remains in the C register 408. Therefore, when the polynomial addition operation of the B register 410 and the C register 408 is performed, (λ 2 + λ) is calculated, and finally, the A parameter value is multiplied using the ADD2 219 operator to perform x3 You get The x3 value of the B register 210 is moved to the F register 402 and the G register 405 for output to the X2 register 207 and y 3 calculation, and the B register 410 is initialized to '1'. Then a polynomial addition operation of the C register 408 and the B register 410 is performed and stored in the C register 408. By performing the polynomial multiplication operation of the value of the C register 408 and the G register 405, (λ + 1) x 3 of the algorithm can be obtained. The result is stored in the F register 402 again. At this time, x 3 stored in the F register 402 is stored in the X2 register 207, and the value of the X2 register 207 is stored in the G register 405 and the C register 408 for x 1 2 calculation. Transferred to a G register 405, and then performs a polynomial multiplication operation result of the operation of x 1 2 G register 405, the C register 408, performs the F register 402 and polynomial addition operation to G register 405 If you store at, the final y 3 is computed. When the result of the polynomial addition operation is stored in the Y2 register 209, the elliptic curve doubling operation is completed.

타원곡선 좌표 덧셈 연산도 타원곡선 두배 연산과 거의 유사한 방법으로 계산된다. 단 다항 곱셈 연산이나 다항 역함수 연산 전에 두 좌표의 덧셈을 위한 다항 덧셈 연산이 더 수행된다. 타원곡선 두배 연산이나 좌표 덧셈 연산에 필요한 일련의 동작들은 타원곡선 프로세서 제어기에서 각 다중화기들과 레지스터 로드신호를 제어함으로써 이루어진다. 그리고, 본 발명에 따른 타원곡선 프로세서 연산기는 다양한 연산과 데이터 패스를 제공하기 때문에 타원곡선 덧셈 연산은 위에 기술된 방법 외에 다른 절차로도 수행이 가능하다.Elliptic curve coordinate addition is computed in much the same way as an elliptic curve doubling operation. However, before the polynomial multiplication operation or the polynomial inverse function operation, a polynomial addition operation for addition of two coordinates is performed. The series of operations required for elliptic curve doubling or coordinate addition is accomplished by controlling the multiplexers and register load signals in the elliptic curve processor controller. In addition, since the elliptic curve processor operator according to the present invention provides various operations and data paths, the elliptic curve addition operation may be performed by other procedures in addition to the above-described method.

도 4는 도 1에 도시된 차수 비교부의 일실시예 구성도이다4 is a diagram illustrating an embodiment of a degree comparison unit illustrated in FIG. 1.

도 4에 도시된 바와 같이, 본 발명에 의한 차수 비교기는 F 레지스터(402) 값의 차수를 저장하기 위한 F 차수 레지스터(502)와 F 차수 레지스터(502)의 입력을 선택하기 위한 다중화기(501), G 레지스터(405) 값의 차수를 저장하기 위한 G 차수 레지스터(503), 입력값의 차수를 검색하기 위한 차수 검색기(504), 그리고 두레지스터 차수를 비교하기 위한 비교기(505)로 구성된다.As shown in Fig. 4, the order comparator according to the present invention is a multiplexer 501 for selecting an input of the F order register 502 and the F order register 502 for storing the order of the value of the F register 402. ), A G order register 503 for storing the order of the value of the G register 405, an order finder 504 for searching the order of the input value, and a comparator 505 for comparing the two register orders. .

차수 비교 연산 블록은 다항 역함수 연산을 수행할 때 F 레지스터(402) 값의 차수와 G 레지스터(405) 값의 차수를 비교하기 위해서 사용된다. 또한 다항 역함수 연산의 동작 완료를 판단하거나, 타원곡선 덧셈 연산 결과의 무한 원점 검사에도 이용된다.The order comparison operation block is used to compare the order of the value of the F register 402 and the order of the value of the G register 405 when performing a polynomial inverse function operation. It is also used to determine the completion of an operation of a polynomial inverse function or to check the infinite origin of an elliptic curve addition operation.

이 차수 비교기(505)의 동작을 자세히 살펴보면, 다항 역함수 연산이 시작되면, F 레지스터(402) 값의 차수를 차수 검색기(504)에서 검색하여 F 차수 레지스터(502)에 저장되며, G 차수 레지스터(503)는 G 레지스터(405) 값의 차수로 초기화 된다. 이 G 레지스터(405)의 차수는 구현하고자 하는 타원곡선 암호 시스템의 파라미터들이 선택될 때 미리 결정된다. 연산이 진행되면서 비교기(505)는 두 가지 출력을 가지는데, comp 신호는 F 레지스터(402) 차수와 G 레지스터(405) 차수의 비교 결과로 '1'인 경우 G 레지스터(405) 차수가 더 큼을 나타낸다. 이는 타원곡선 프로세서 제어기로 입력되어 제어기 동작에 영향을 미친다. 비교기(505)의 다른 한 출력은 실제 F 차수 레지스터(502) 값에서 G 차수 레지스터(503) 값의 뺄셈 연산 결과로서 comp 신호에 따라 F 차수 레지스터(302)는 이 출력 값으로 갱신된다. 또한 F 레지스터(402)가 한 비트 오른쪽 쉬프트 동작을 수행할 때 이 비교기(505) 출력으로 F 레지스터(402)의 차수 값에서 '1'이 빼진 값이 출력되어 F 차수 레지스터(402) 값을 갱신한다. 다항 역함수 연산 완료 및 무한 원점 체크는 차수 검색기(504)의 결과로 이루어진다. 차수 검색기(504)의 두 출력 중 D_F 신호는 입력 값의 차수 결과로서 이 값이 '0'인 경우 다항 역함수 연산을 완료하게 된다. Zero 신호는 차수 검색기(504)의 입력 값이 '0'인가를 판단하는 신호로 이 신호로 무한 원점을 판단한다.Looking in detail at the operation of the order comparator 505, when the polynomial inverse function operation is started, the order of the value of the F register 402 is retrieved from the order finder 504 and stored in the F order register 502, and the G order register ( 503 is initialized to the order of the value of the G register 405. The order of this G register 405 is predetermined when the parameters of the elliptic curve cryptosystem to be implemented are selected. As the operation progresses, the comparator 505 has two outputs, and the comp signal is higher than the G register 405 order when the value is '1' as a result of comparing the F register 402 order and the G register 405 order. Indicates. It is input to an elliptic curve processor controller to affect controller operation. The other output of the comparator 505 is the result of the subtraction of the G order register 503 value from the actual F order register 502 value, so that the F order register 302 is updated with this output value in accordance with the comp signal. In addition, when the F register 402 performs a one-bit right shift operation, the comparator 505 outputs a value obtained by subtracting '1' from the order value of the F register 402 to update the value of the F order register 402. do. Completion of the polynomial inverse operation and infinite origin check result from the order finder 504. The D_F signal of the two outputs of the order finder 504 completes the polynomial inverse function operation when this value is '0' as the order result of the input value. The zero signal is a signal for determining whether the input value of the order finder 504 is '0' and determines the infinite origin using this signal.

도 5는 도 1의 NAF 변환부의 일실시예 구성도이다.FIG. 5 is a diagram illustrating an embodiment of a NAF converter of FIG. 1. FIG.

도 5에 도시된 바와 같이, 본 발명에 따른 NAF 변환부는 동작 모드 설정부(101)와 변환부(102)로 구성된다.As shown in FIG. 5, the NAF conversion unit according to the present invention includes an operation mode setting unit 101 and a conversion unit 102.

만약 타원곡선 좌표 연산에서 '-'에 대하여 정의할 수 있다면, 7(1112)P는 8(10002)P + (-P)로 연산할 수 있다. 7(1112)P 인 경우 2번의 타원곡선 두배 연산과 3번의 타원곡선 좌표 덧셈연산으로 계산되며, 8P + (-P)로 연산하는 경우 3번의 타원곡선 두배 연산과 1번의 타원곡선 좌표 뺄셈연산으로 계산할 수 있다. 타원곡선의 한 점 P의 좌표가 (x, y)인 경우 '- P'는 (x, x + y)로 정의되며, 타원곡선 doubling 연산과 타원곡선 덧셈연산의 연산량이 비슷하기 때문에, 결과적으로 7P보다는 8P + (-P)로 연산하는 것이 전체적인 연산량을 줄일 수 있다. 이와 같이 연속된 '1'이 있는 경우 '-1'이 있는 형태로 수의 표현을 바꾸는 기법을 NAF(Non Adjacent Format) 변환이라 하며, 이러한 표현 기법에 의한 연산은 연속된 '1'이 많을수록 연산 효율이 더욱 좋아진다는 장점이 있다. 특히 본 발명에 따른 타원곡선 프로세서 연산기는 타원곡선 좌표 뺄셈 연산을 타원곡선 좌표 덧셈 연산과 거의 동일한 과정으로 수행할 수 있다. 단지 λ를 계산할 때와 y3을 계산할 때 한번의 다항 덧셈 연산이 더 들어갈 뿐이다.If elliptic curve coordinates can be defined for '-', 7 (111 2 ) P can be calculated as 8 (1000 2 ) P + (-P). In the case of 7 (111 2 ) P, two elliptic curve double operations and three elliptic curve coordinate addition operations are performed.In the case of 8P + (-P), three elliptic curve double operations and one elliptic curve coordinate subtraction operation are performed. Can be calculated as If the coordinate of one point P of the elliptic curve is (x, y), '-P' is defined as (x, x + y), and as a result, the operation amount of the elliptic curve doubling operation and the elliptic curve addition operation is similar. 8P + (-P) rather than 7P can reduce the overall computation. The technique of changing the representation of numbers in the form of '-1' when there is a continuous '1' is called non-adjacent format (NAF) transformation. The advantage is better efficiency. In particular, the elliptic curve processor operator according to the present invention can perform an elliptic curve coordinate subtraction operation in substantially the same process as an elliptic curve coordinate addition operation. It only involves one more polynomial addition operation when calculating λ and when calculating y3.

이를 위한 NAF 변환부의 동작을 살펴보면, 동작 모드 설정부(101)은 NAF 변환을 위한 모드를 저장하는 블록으로 동작 모드가 '0'인 경우에는 변환부의 출력이 '0'과 '1'로 수가 표현되고, 동작 모드가 '1'인 경우에는 변환부에서 NAF 변환이 이루어진다. NAF 변환 모드에서는 수의 표현이 '0', '1', '-1'등 3가지 값으로 표현된다. 이 동작 모드 설정부(101)은 이러한 모드 값을 저장하고 있기 위해서 순차 회로로 구성되며, 동작 모드가 '0'이면서 새로운 입력의 하위 3비트가 연속된 '1'일 경우 모드를 '1'로 반전시키고, 모드가 '1'이면서 두번째 비트가 '0'인 경우 모드를 반전시킨다. 그리고 이러한 동작 모드 설정부(101)는 타원곡선 프로세서 제어기의 상태에 따라서 동작의 시작과 끝이 결정된다. 변환부(102)는 동작 모드 설정부(101)로부터의 모드 값을 참조하여 N 레지스터로부터의 값을 NAF 형태의 수로 변환시켜 출력하는데, 동작 모드가 '0'에서 '1'로 반전되는 상태일 때 '1'을 출력하고, 동작 모드가 '1'에서 '0'으로 반전될 때 '-1'을 출력한다. 동작 모드가 '1'이면서 그 외의 경우에는 '0'을 출력하고, 동작 모드가 '0'인 경우에는 입력값을 그대로 출력한다. 본 발명에서 보인 NAF 변환부(100)는 연속된 '1'이 3개 이상일 경우 수를 변환시키도록 구현되어있다. 하지만, NAF 변화 기법은 연속된 '1'이 2개일 경우에도 유효하며, 이의 구현도 위와 거의 유사하다.Referring to the operation of the NAF converter for this purpose, the operation mode setting unit 101 is a block that stores the mode for NAF conversion, when the operation mode is '0', the output of the converter is expressed as '0' and '1' If the operation mode is '1', the NAF conversion is performed in the conversion unit. In the NAF conversion mode, the representation of numbers is represented by three values: '0', '1', and '-1'. The operation mode setting unit 101 is composed of a sequential circuit to store these mode values. When the operation mode is '0' and the lower 3 bits of the new input are consecutive '1', the mode is set to '1'. The mode is inverted when the mode is '1' and the second bit is '0'. The operation mode setting unit 101 determines the start and end of the operation according to the state of the elliptic curve processor controller. The conversion unit 102 converts the value from the N register into a NAF number by referring to the mode value from the operation mode setting unit 101, and outputs the NAF. The operation mode is inverted from '0' to '1'. '1' is output when the operation mode is reversed from '1' to '0' and '-1' is output. If the operation mode is '1' and '0' otherwise, the output value is output as it is. The NAF converter 100 shown in the present invention is implemented to convert the number when there are three or more consecutive '1's. However, the NAF change technique is valid even when there are two consecutive '1's, and its implementation is almost similar to the above.

상기와 같은 구조로 개발한 타원곡선 암호화 장치는 다음과 같은 효과를 가진다.The elliptic curve encryption device developed in the above structure has the following effects.

첫째, 본 발명에서 제안하는 방법으로 타원곡선 암호시스템은 전자 상거래,전자화폐, 사용자 신분 확인, 사용자 키 관리, 결재 시스템 등에서 높은 안전도와 고성능을 제공한다.First, the elliptic curve cryptographic system proposed by the present invention provides high security and high performance in electronic commerce, electronic money, user identification, user key management, payment system, and the like.

둘째, 본 발명에서 제안하는 방법으로 구현된 타원곡선 암호화 장치는 IC카드 및 PDA, 휴대용 단말기 등과 같이 제한된 메모리 용량 및 저성능 프로세서 컴퓨팅 환경에서, 효율적인 키 교환, 서명, 사용자 인증 등의 용도에서 효율적으로 사용될 수 있다.Second, the elliptic curve encryption device implemented by the method proposed in the present invention can be efficiently used for efficient key exchange, signature, user authentication, etc. in a limited memory capacity and low-performance processor computing environment such as IC card, PDA, portable terminal, etc. Can be used.

셋째, 본 발명에서 제안한 타원곡선 암호화 장치는 타원곡선 암호 알고리즘 처리에 많은 시간을 요하는 스칼라 곱셈 연산, 타원곡선 좌표 덧셈 연산, 다항 곱셈 연산, 다항 역승산 연산, 다항 역함수 연산 등을 하드웨어적인 방법으로 고속으로 처리할 수 있어서, 응용 시스템의 타원곡선 프로토콜 구현에 필요로 하는 실시간 처리 요건을 만족시킨다.Third, the elliptic curve encryption apparatus proposed by the present invention uses a scalar multiplication operation, an elliptic curve coordinate addition operation, a polynomial multiplication operation, a polynomial inverse multiplication operation, and a polynomial inverse function operation that require a lot of time to process an elliptic curve encryption algorithm. Processing at high speed meets real-time processing requirements for implementing elliptic curve protocols in application systems.

넷째, 본 발명에서 제안한 타원곡선 암호화 장치는 기존의 RSA 비대칭키 암호알고리즘보다 적은 메모리를 사용하면서도 고속의 암호화 및 복호화, 키 교환, 서명, 인증을 수행 할 수 있다.Fourth, the elliptic curve encryption device proposed in the present invention can perform fast encryption and decryption, key exchange, signing, and authentication while using less memory than the conventional RSA asymmetric key encryption algorithm.

다섯째, 본 발명에서 제안한 타원곡선 암호화 장치는 응용 시스템의 안전성과 성능에 따라 확장이 용이하다.Fifth, the elliptic curve encryption device proposed in the present invention can be easily extended according to the safety and performance of the application system.

Claims (7)

타원곡선 암호화 장치에 있어서,In the elliptic curve encryption device, 타원곡선 암호화를 위한 입력 데이터와 출력 데이터를 저장하는 레지스터 파일부와,A register file section for storing input data and output data for elliptic curve encryption, 상기 레지스터 파일부에 저장된 데이터에 대하여 타원곡선의 여러 연산을 수행하는 타원곡선 프로세서 연산부와,An elliptic curve processor calculating unit which performs various operations of an elliptic curve on the data stored in the register file unit; 상기 타원곡선 프로세서 연산부의 연산에 필요한 차수 검색과 비교를 수행하는 차수 비교부와,An order comparison unit for performing order search and comparison required for the operation of the elliptic curve processor operation unit; 상기 타원곡선 프로세서 연산부에서의 스칼라 곱셈 연산을 지원하기 위한 NAF 변환부와,A NAF converter for supporting a scalar multiplication operation in the elliptic curve processor calculator; 상기 타원곡선 프로세서의 연산 동작모드를 제어하기 위한 제어신호를 발생하는 타원곡선 프로세서 제어부를 포함하는 타원곡선 암호화 장치.And an elliptic curve processor controlling unit for generating a control signal for controlling an operation mode of the elliptic curve processor. 제 1항에 있어서, 상기 레지스터 파일부는,The method of claim 1, wherein the register file unit, 스칼라 곱셈 상수를 저장하기 위한 제 1 레지스터부와,A first register section for storing a scalar multiplication constant; 상기 제 1 레지스터부의 입력을 결정하기 위한 제 1 다중화부와,A first multiplexing unit for determining an input of the first register unit; 상기 제 1 레지스터부의 값을 한 비트 왼쪽으로 순환시키기 위한 순환부와,A cycler for cycling the value of the first register portion one bit to the left; 타원곡선 기저점이나 연산의 입력값을 저장하기 위한 제 2, 제 3 레지스터부와,Second and third register portions for storing an elliptic curve base point or an input value of an operation; 타원곡선의 다른 한 좌표의 입력이나 출력을 저장하기 위한 제 4, 5 레지스터부와,Fourth and fifth register portions for storing inputs and outputs of other coordinates of the elliptic curve, 상기 제 4, 5 레지스터부의 입력을 각각 결정하기 위한 제 2, 제 3 다중화부를 포함하는 타원곡선 암호화 장치.And an elliptic curve encryption device including second and third multiplexers for determining inputs of the fourth and fifth registers, respectively. 제 1항에 있어서, 상기 타원곡선 프로세서 연산부는,The method of claim 1, wherein the elliptic curve processor calculation unit, 타원곡선 암호화를 위한 입력 데이터와 출력 데이터를 저장하기 위한 다수개의 레지스터부와,A plurality of registers for storing input data and output data for elliptic curve encryption; 각 레지스터들의 입력을 제어하기 위한 다수개의 다중화부와,A plurality of multiplexers for controlling the input of each register, 상기 레지스터부에 입력된 데이터에 대하여 다항 덧셈 연산을 수행하기 위한 다항 덧셈 연산부와,A polynomial addition operation unit for performing a polynomial addition operation on the data input to the register unit; 상기 다항 덧셈 연산부의 입력을 제어하기 위한 다중화부와,A multiplexer for controlling the input of the polynomial addition operator; 비트 곱연산을 수행하기 위한 다항 곱연산부와,A polynomial multiplication unit for performing bit multiplication, 한 비트 좌우 쉬프트를 위한 쉬프트부를 포함하는 타원곡선 암호화 장치.Elliptic curve encryption device including a shift unit for one bit left and right shift. 제 1항에 있어서, 상기 차수 비교부는,The method of claim 1, wherein the order comparison unit, 상기 타원곡선 프로세서 연산부내의 제 1 레지스터에 저장된 값의 차수를 저장하는 제 1 차수 레지스터부와,A first order register section for storing an order of values stored in a first register in the elliptic curve processor computing section; 상기 제 1 차수 레지스터부의 입력을 선택하기 위한 제 1 다중화부와,A first multiplexer for selecting an input of the first order register section; 상기 타원곡선 프로세서 연산부내의 제 2 레지스터에 저장된 값의 차수를 저장하는 제 2 차수 레지스터와,A second order register for storing an order of values stored in a second register in the elliptic curve processor; 상기 제 1, 2 차수 레지스터부에 입력되는 입력값의 차수를 검색하기 위한 차수 검색부와,An order searching unit for searching an order of input values inputted to the first and second order registers; 상기 제 1, 2 차수 레지스터부에 저장된 차수를 서로 비교하기 위한 비교부를 포함하는 타원곡선 암호화 장치.And an comparing unit for comparing the orders stored in the first and second order registers with each other. 제 1항에 있어서, 상기 NAF 변환부는,The method of claim 1, wherein the NAF conversion unit, NAF 변환을 위한 모드를 저장하는 동작 모드 설정부와,An operation mode setting unit for storing a mode for NAF conversion; 상기 동작 모드 설정부에 설정된 동작 모드가 '0'인 경우에는 출력이 '0'과 '1'로 수가 표현되고, 상기 동작 모드가 '1'인 경우에는 NAF 변환을 수행하는 변환부를 포함하는 타원곡선 암호화 장치.When the operation mode set in the operation mode setting unit is '0', the output is represented by '0' and '1', and when the operation mode is '1', an ellipse including a conversion unit that performs NAF conversion. Curved encryption device. 제 5항에 있어서, 상기 동작 모드 설정부는,The method of claim 5, wherein the operation mode setting unit, 동작 모드가 '0'이면서 새로운 입력의 하위 3비트가 연속된 '1'일 경우 모드를 '1'로 반전시키고, 모드가 '1'이면서 두번째 비트가 '0'인 경우 모드를 반전시키는 타원곡선 암호화 장치.An elliptic curve that inverts the mode to '1' when the operation mode is '0' and the lower 3 bits of the new input are consecutive '1', and when the mode is '1' and the second bit is '0'. Encryption device. 제 1항에 있어서, 상기 제어부의 제어신호는,The method of claim 1, wherein the control signal of the controller, 상기 타원곡선 프로세서 연산부에서 스칼라 곱셈 모드, 타원곡선 좌표 덧셈 연산 모드, 다항 곱셈 연산 모드, 다항 역승산 연산 모드, 다항 역함수 연산 모드 중 하나의 동작모드를 수행하도록 제어하는 타원곡선 암호화 장치.And an elliptic curve encryption apparatus controlling the elliptic curve processor to perform one of a scalar multiplication mode, an elliptic curve coordinate addition operation mode, a polynomial multiplication operation mode, a polynomial inverse multiplication operation mode, and a polynomial inverse function operation mode.
KR10-2001-0078587A 2001-12-12 2001-12-12 Crypto Processing apparatus for Elliptic Curve Cryptosystem KR100423810B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0078587A KR100423810B1 (en) 2001-12-12 2001-12-12 Crypto Processing apparatus for Elliptic Curve Cryptosystem

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0078587A KR100423810B1 (en) 2001-12-12 2001-12-12 Crypto Processing apparatus for Elliptic Curve Cryptosystem

Publications (2)

Publication Number Publication Date
KR20030048631A true KR20030048631A (en) 2003-06-25
KR100423810B1 KR100423810B1 (en) 2004-03-22

Family

ID=29574501

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0078587A KR100423810B1 (en) 2001-12-12 2001-12-12 Crypto Processing apparatus for Elliptic Curve Cryptosystem

Country Status (1)

Country Link
KR (1) KR100423810B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100431029B1 (en) * 2002-02-28 2004-05-10 학교법인연세대학교 Scalar multiplier using booth algorithm
CN103942031A (en) * 2014-04-28 2014-07-23 山东华芯半导体有限公司 Elliptic domain curve operational method and elliptic domain curve arithmetic unit
KR20150107784A (en) * 2013-01-18 2015-09-23 인사이드 씨큐어 Cryptography method comprising an operation of multiplication by a scalar or an exponentiation
CN113806771A (en) * 2021-09-01 2021-12-17 上海兆芯集成电路有限公司 Processor with elliptic curve cryptographic algorithm and processing method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100431029B1 (en) * 2002-02-28 2004-05-10 학교법인연세대학교 Scalar multiplier using booth algorithm
KR20150107784A (en) * 2013-01-18 2015-09-23 인사이드 씨큐어 Cryptography method comprising an operation of multiplication by a scalar or an exponentiation
CN103942031A (en) * 2014-04-28 2014-07-23 山东华芯半导体有限公司 Elliptic domain curve operational method and elliptic domain curve arithmetic unit
WO2015164996A1 (en) * 2014-04-28 2015-11-05 山东华芯半导体有限公司 Elliptic domain curve operational method and elliptic domain curve operational unit
CN113806771A (en) * 2021-09-01 2021-12-17 上海兆芯集成电路有限公司 Processor with elliptic curve cryptographic algorithm and processing method thereof

Also Published As

Publication number Publication date
KR100423810B1 (en) 2004-03-22

Similar Documents

Publication Publication Date Title
Amara et al. Elliptic curve cryptography and its applications
US6876745B1 (en) Method and apparatus for elliptic curve cryptography and recording medium therefore
US5982900A (en) Circuit and system for modulo exponentiation arithmetic and arithmetic method of performing modulo exponentiation arithmetic
US7961874B2 (en) XZ-elliptic curve cryptography with secret key embedding
US6282290B1 (en) High speed modular exponentiator
US6434585B2 (en) Computationally efficient modular multiplication method and apparatus
CN109039640B (en) Encryption and decryption hardware system and method based on RSA cryptographic algorithm
US6202076B1 (en) Scheme for arithmetic operations in finite field and group operations over elliptic curves realizing improved computational speed
EP1160661B1 (en) Method of calculating multiplication by scalars on an elliptic curve and apparatus using same
US20130016831A1 (en) Method and Apparatus For Computing A Shared Secret Key
CN1841443B (en) Calculation method, calculation equipment
EP0952697B1 (en) Elliptic curve encryption method and system
JP3794266B2 (en) Elliptic curve scalar multiplication method and apparatus, and storage medium
US8014520B2 (en) Exponentiation ladder for cryptography
JP4690819B2 (en) Scalar multiplication calculation method and scalar multiplication calculation apparatus in elliptic curve cryptography
Moon et al. Fast VLSI arithmetic algorithms for high-security elliptic curve cryptographic applications
US7177422B2 (en) Elliptic curve encryption processing method, elliptic curve encryption processing apparatus, and program
KR100423810B1 (en) Crypto Processing apparatus for Elliptic Curve Cryptosystem
Jacobson et al. An improved real-quadratic-field-based key exchange procedure
Nedjah et al. Efficient parallel modular exponentiation algorithm
JPH1152854A (en) Arithmetic unit device on finite field and group computing device on elliptic curve
KR20020086005A (en) Inverse operator for elliptic curve cryptosystems
Saju et al. Design and execution of highly adaptable elliptic curve cryptographic processor and algorithm on FPGA using Verilog HDL
JP5179933B2 (en) Data processing device
KR100399048B1 (en) Apparatus of Elliptic Curve Cryptosystem

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20090303

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee