KR20070091063A - Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion - Google Patents

Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion Download PDF

Info

Publication number
KR20070091063A
KR20070091063A KR1020060020721A KR20060020721A KR20070091063A KR 20070091063 A KR20070091063 A KR 20070091063A KR 1020060020721 A KR1020060020721 A KR 1020060020721A KR 20060020721 A KR20060020721 A KR 20060020721A KR 20070091063 A KR20070091063 A KR 20070091063A
Authority
KR
South Korea
Prior art keywords
check
variable
fault
scalar
value
Prior art date
Application number
KR1020060020721A
Other languages
Korean (ko)
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 KR1020060020721A priority Critical patent/KR20070091063A/en
Publication of KR20070091063A publication Critical patent/KR20070091063A/en

Links

Images

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/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/004Countermeasures against attacks on cryptographic mechanisms for fault attacks
    • 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

Abstract

A cryptographic method for defending a DFA(Differential Fault Analysis) in a scalar product using a fault diffusion is provided to simplify a cryptographic system by defending the DFA without determining whether a fault is introduced in the scalar product. A basic point(P) and a scalar(k) on an elliptic curve are received(S301). An initializing variable is repeatedly calculated by using the basic point in response to the scalar, such that a scalar product of temperature basic point and the scalar is obtained. A fault diffusion process is performed to defend a possible fault(S303). The scalar product is outputted(S305). The fault diffusion process is performed whenever the variable is repeatedly reset.

Description

폴트 확산을 이용하여 스칼라 곱에서 DFA를 방어할 수 있는 암호화 방법{Cryptographic method and appratus for countering DFA in scalar multiplication using fault diffusion}Cryptographic method and appratus for countering DFA in scalar multiplication using fault diffusion}

본 발명의 상세한 설명에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 간단한 설명이 제공된다. BRIEF DESCRIPTION OF THE DRAWINGS In order to better understand the drawings cited in the detailed description of the invention, a brief description of each drawing is provided.

도 1은 DFA에 대응하는 CT&C 방법의 흐름도이다. 1 is a flowchart of a CT & C method corresponding to DFA.

도 2는 DFA에 대응하는 COP 방법의 흐름도이다. 2 is a flowchart of a COP method corresponding to DFA.

도 3은 본 발명의 실시예에 따른 암호화 방법의 흐름도이다. 3 is a flowchart of an encryption method according to an embodiment of the present invention.

도 4는 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 일실시예이다. FIG. 4 is an embodiment of computing the scalar product of FIG. 3 and performing fault spreading.

도 5는 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 다른 일실시예이다. FIG. 5 is another embodiment of computing the scalar product of FIG. 3 and performing fault spreading.

도 6은 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 또 다른 일실시예이다. FIG. 6 is yet another embodiment of computing the scalar product of FIG. 3 and performing fault spreading.

본 발명은 암호화 방법에 관한 것으로서, 특히 폴트 확산을 이용하여 스칼라 곱에서 DFA를 방어할 수 있는 암호화 방법에 관한 것이다. The present invention relates to an encryption method, and more particularly, to an encryption method capable of defending DFA in a scalar product using fault spreading.

정보화 사회의 도래와 함께 암호 알고리즘 및 암호 프로토콜(Protocol)을 이용한 정보의 보호는 그 중요성을 더해가고 있다. 정보를 보호하는데 사용되는 암호 알고리즘 중에서 RSA(Rivest Shamir Adleman) 암호시스템 및 타원곡선암호시스템(Elliptic Curve Cryptography: ECC)에서 사용되는 공개 키(open key) 암호 알고리즘은, 비밀 키(secrete key) 암호 알고리즘의 단점인 키 분배 문제, 전자서명 문제 등을 해결하면서 인터넷이나 금융망과 같은 여러 분야의 응용에 빠르게 적용이 되어 가고 있다. With the advent of the information society, the protection of information using cryptographic algorithms and cryptographic protocols is increasing in importance. Among the cryptographic algorithms used to protect information, the open key cryptographic algorithms used in the RSA (Rivest Shamir Adleman) encryption system and the Elliptic Curve Cryptography (ECC) are secret key cryptographic algorithms. In order to solve the shortcomings of key distribution, digital signature, etc., it is rapidly being applied to various fields such as internet and financial network.

RSA 공개 키 암호시스템 및 ECC 공개 키 암호시스템에 침입하려고 할 때 사이드 채널 분석(Side Channel Analysis: SCA)이 사용된다. 사이드 채널 분석의 종류로는 타이밍 분석(Timing Analysis), 전력분석(Power Analysis), 전자기 분석(Electro-Magnetic Analysis) 및 폴트 분석(Fault Analysis) 등이 널리 알려져 있다. 사이드 채널 분석은 해석하고자 하는 암호시스템의 하드웨어 구성을 구체적으로 알고 있을 경우에 유효한 공격방법이다. Side Channel Analysis (SCA) is used when attempting to break into RSA public key cryptosystems and ECC public key cryptosystems. Types of side channel analysis include timing analysis, power analysis, electro-magnetic analysis, and fault analysis. Side channel analysis is an effective attack method when the hardware configuration of the cryptographic system to be analyzed is known in detail.

폴트 분석 중에는, 연산되고 있는 변수(들)의 차이 값을 이용하여 암호시스템의 비밀 키를 찾아내는 차등 폴트 분석(Differential Fault Analysis: DFA)이 널리 알려져 있다. DFA는, 폴트를 암호시스템에 투입시키고, 투입된 폴트에 대응되는 연산결과를 분석하여, 암호시스템의 비밀 키를 찾는 방법이다. During fault analysis, differential fault analysis (DFA) is widely used to find the secret key of a cryptographic system using the difference value of the variable (s) being computed. DFA is a method of finding a secret key of a cryptographic system by injecting a fault into the cryptographic system, analyzing the operation result corresponding to the injected fault.

레지스터(Register)에 저장될 또는 저장된 값은 폴트에 의하여 변경된다. 암 호시스템은 소정의 연산을 수행할 때 레지스터에 저장된 값을 참고하기 때문에, 폴트에 의하여 변경된 값에 대응하는 에러가 연산결과에 포함된다. 암호분석가(Crypt-analyst)는 에러가 수반되어 출력되는 연산결과를 해석하여 비밀 키 등에 대한 정보를 얻는다. The value to be stored or stored in the register is changed by a fault. Since the encryption system refers to the value stored in the register when performing a predetermined operation, an error corresponding to the value changed by the fault is included in the operation result. Crypt-analyst interprets the result of operation with error and obtains information about secret key.

DFA에 대응하기 위하여, ECC에서 사용할 수 있는 여러 가지 방법이 제안되었다. To cope with DFA, several methods that can be used in ECC have been proposed.

도 1은 DFA에 대응하는 CT&C 방법의 흐름도이다. 1 is a flowchart of a CT & C method corresponding to DFA.

CT&C(Calculate Twice and Check) 방법(100)은, 먼저 타원 곡선 중의 임의의 한 점 P를 선택한 후(110), P에 임의의 정수 k를 곱하여 제 1 비교 값(Q1)을 구하고(120), P에 정수 k를 곱하여 제 2 비교 값 (Q2)를 구한다(130). The CT & C (Calculate Twice and Check) method 100 first selects an arbitrary point P in an elliptic curve (110), then multiplies P by an arbitrary integer k to obtain a first comparison value Q1 (120). The second comparison value Q2 is obtained by multiplying P by an integer k (130).

그 후 제 1 비교 값(Q1)과 제 2 비교 값(Q2)의 크기를 비교하여(140), 제 1 비교 값(Q1)과 제 2 비교 값(Q2)이 같으면, 곱셈연산에 어떠한 폴트도 유입되지 않았다고 판단하여 제 1 비교 값(Q1)과 제 2 비교 값(Q2) 중에서 하나가 연산결과(Q)로서 출력된다(150). 반면 제 1 비교 값(Q1)과 제 2 비교 값(Q2)이 같지 않으면, 곱셈연산에 폴트가 유입되었다고 판단하여 연산결과(Q) 대신 경고 신호가 출력된다(160). Thereafter, the magnitudes of the first comparison value Q1 and the second comparison value Q2 are compared (140), so that if the first comparison value Q1 and the second comparison value Q2 are the same, no fault is found in the multiplication operation. It is determined that the flow does not flow, and one of the first comparison value Q1 and the second comparison value Q2 is output as the calculation result Q (150). On the other hand, if the first comparison value Q1 and the second comparison value Q2 are not the same, it is determined that a fault is introduced into the multiplication operation, and a warning signal is output instead of the operation result Q (160).

여기서, 모든 폴트는 일정한 규칙이 없이(Randomly) 유입되며, 2개의 곱셈연산에 동일한 값을 가지는 폴트가 동시에 유입될 확률은 무시할 만하다고 가정한다. 또한 소정의 정수 k는 비밀 키를 의미하며, 제 1 비교 값(Q1)과 제 2 비교 값(Q2)는 동시에 계산되는 것이 일반적이다. Here, it is assumed that all faults are introduced randomly, and the probability of simultaneously introducing faults having the same value in two multiplication operations is negligible. In addition, the predetermined integer k means a secret key, and the first comparison value Q1 and the second comparison value Q2 are generally calculated at the same time.

도 1에 도시된 CT&C 방법은, 대칭(Symmetric), 비대칭(Asymmetric) 및 스트림(Stream) 등 어떠한 종류의 암호 알고리즘에도 적용될 수 있는 장점이 있다. 그러나 CT&C 방법은 동일한 곱셈계산을 2번이나 하여야 하는 단점이 있으며, 또한 대부분의 스마트 카드(Smart Card) 및 이동기기(Mobile Devices)의 사용영역에서는 폴트 성분이 항상 존재하기 때문에, 스마트 카드나 이동기기에 CT&C 방법이 그대로 적용될 수 없는 단점이 있다. The CT & C method shown in FIG. 1 has an advantage that it can be applied to any type of encryption algorithm such as symmetric, asymmetric, and stream. However, the CT & C method has the disadvantage of having to perform the same multiplication twice. Also, since the fault component is always present in the areas of use of most smart cards and mobile devices, smart cards or mobile devices The CT & C method cannot be applied as it is.

도 2는 DFA에 대응하는 COP 방법의 흐름도이다. 2 is a flowchart of a COP method corresponding to DFA.

COP(Check the Output Point) 방법(200)은, 먼저 타원 곡선 중의 임의의 한 점 P를 선택하고(210), P에 소정의 정수 k를 곱하여 비교 값(Q)을 구한다(220). The COP (Check the Output Point) method 200 first selects any one point P in an elliptic curve (210), multiplies P by a predetermined integer k, and obtains a comparison value (Q) (220).

그 후 비교 값(Q)이 타원 곡선(E)의 한 점인가를 판단하여(230), 비교 값(Q)이 타원 곡선(E)의 한 점이면, 곱셈연산에 어떠한 폴트도 유입되지 않았다고 판단하여 비교 값(Q)이 출력된다(240). 반면 비교 값(Q)이 타원 곡선(E)의 한 점이 아니면, 곱셈연산 중에 폴트가 유입된 경우에 해당한다고 판단하여 비교 값(Q) 대신 경고신호가 출력된다(250). Then, it is determined whether the comparison value Q is one point of the elliptic curve E (230), and if the comparison value Q is one point of the elliptic curve E, it is determined that no fault has been introduced into the multiplication operation. The comparison value Q is output (240). On the other hand, if the comparison value (Q) is not one point of the elliptic curve (E), it is determined that it corresponds to the case where a fault flows during the multiplication operation, and a warning signal is output instead of the comparison value (Q) (250).

여기서, 모든 폴트는 일정한 규칙이 없이 유입되며, 곱셈연산에 투입된 폴트에 영향을 받아 계산된 상기 비교 값(Q)이 타원 곡선(E)의 한 점에 포함될 확률은 무시할 만하다고 가정한다. 또한, 소정의 k 값은 일반적으로 비밀 키를 의미한다. Here, it is assumed that all the faults are introduced without a certain rule, and the probability that the comparison value Q calculated at the point of the elliptic curve E, which is calculated under the influence of the fault input to the multiplication operation, is negligible. Also, a predetermined k value generally means a secret key.

COP 방법(200)은 DFA에 대응하면서도 암호시스템의 수행능력을 감소(Performance Degradation)시키지 않는 장점이 있다. 그러나 COP 방법은 ECC를 기반으로 하는 암호시스템에만 적용될 수 있어 그 적용 범위가 제한적이며, 부호가 변하는 폴트를 이용한 공격에 대응하는 경우에는 시스템의 수행능력이 상당히 감소되는 단점이 있다. The COP method 200 has an advantage in that it does not reduce performance performance of the encryption system while corresponding to DFA. However, the COP method can be applied only to cryptographic systems based on ECC, and its scope of application is limited, and the performance of the system is considerably reduced when responding to attacks using code-changing faults.

또한, CT&C 방법(100)과 COP 방법(200)은 폴트의 존재여부를 체크하기 과정에서 "분기(branching)" 연산을 이용한다. 그러나 분기 연산은 그 자체적으로 약점을 포함하고 있으며, 따라서 CT&C 방법(100)과 COP 방법(200)에서의 체크 과정은 암호 해석가들에게 공격 목표가 될 수 있기 단점이 있다. In addition, the CT & C method 100 and the COP method 200 use a "branching" operation in the process of checking for the presence of a fault. However, the branch operation has its own weaknesses, so the check process in the CT & C method 100 and the COP method 200 may be an attack target for cryptographers.

따라서 분기 연산 없이 체크 과정이 수행되고, 차동 폴트 분석이 예상되는 경우 출력 정보를 무의미하게 할 수 있는 암호시스템의 개발이 필요하다. Therefore, it is necessary to develop a cryptographic system that can make the output information meaningless if the check process is performed without branch operation and a differential fault analysis is expected.

본 발명이 이루고자하는 기술적 과제는 폴트 확산을 이용하여 스칼라 곱에서 DFA를 방어할 수 있는 암호화 방법을 제공하는데 있다. An object of the present invention is to provide an encryption method capable of defending DFA in a scalar product using fault spreading.

상기 기술적 과제를 달성하기 위한 본 발명의 실시예에 따른 암호화 방법은, 타원곡선 상의 기본 포인트 P와 스칼라 k를 수신하는 단계, 상기 스칼라 k에 응답하여 상기 기본 포인트 P를 이용하여 초기화되는 변수 P1을 반복 연산함으로써 상기 기본 포인트 P와 상기 스칼라 k의 곱인 스칼라 곱 Q(=kP)를 계산하며, 유입될 가능성이 있는 폴트를 방어하기 위해 폴트 확산을 수행하는 단계, 및 상기 스칼라 곱 Q를 출력하는 단계를 구비한다. The encryption method according to an embodiment of the present invention for achieving the technical problem, receiving a base point P and a scalar k on an elliptic curve, variable P1 initialized using the base point P in response to the scalar k Calculating a scalar product Q (= kP), which is the product of the base point P and the scalar k by iterative operation, performing fault spreading to protect against potential faults, and outputting the scalar product Q It is provided.

상기 스칼라 곱 Q를 계산하는 단계는, 상기 변수 P1을 상기 기본 포인트 P로 초기화하며, 반복연산변수 i(i는 정수)를 초기값 t-1(t는 정수)로 설정하는 단계로 서, 상기 스칼라 k는 바이너리 비트 (kt-1, … , k1, k0)2로 표시되고 kt-1은 1인, 설정하는 단계, 및 상기 반복연산변수 i가 0보다 작아질 때까지 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상기 변수 P1을 소정의 값으로 반복하여 재설정하는 단계를 구비한다. The calculating of the scalar product Q may include initializing the variable P1 to the basic point P and setting an iteration variable i (i is an integer) to an initial value t-1 (t is an integer). Scalar k is represented by binary bits (kt-1, ..., k1, k0) 2 and kt-1 is 1, and setting the iterative variable i until the iteration variable i is less than zero. Repetitively resetting the variable P1 to a predetermined value in response to the binary bit ki while decreasing.

상기 재설정하는 단계는 상기 바이너리 비트 ki가 1이 아니면 상기 변수 P1을 2배한 값을 상기 변수 P1으로 재설정하고, 상기 ki가 1이면 상기 변수 P1과 상기 기본 포인트 P를 더한 값을 상기 변수 P1으로 재설정한다. The resetting may include resetting the variable P1 doubled to the variable P1 when the binary bit ki is not 1, and resetting the variable P1 plus the basic point P to the variable P1 when ki is 1. do.

상기 폴트 확산은 상기 변수 P1이 반복하여 재설정될 때 마다 수행되거나, 상기 반복하여 재설정하는 단계 이후에 수행되거나, 또는 상기 반복하여 재설정하는 단계 중 임의의 재설정하는 단계에서 수행된다. The fault spreading is performed every time the variable P1 is repeatedly reset, after the step of repeatedly resetting, or in any step of resetting repeatedly.

상기 반복하여 재설정하는 단계 중 임의의 재설정하는 단계에서 상기 폴트 확산은 수행되는 경우, 상기 설정하는 단계는 체크 레이트 RATE를 더 설정하며, 상기 재설정하는 단계는, 랜덤하게 발생되는 체크 값 CHECK을 수신하는 단계, 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상기 변수 P1을 소정의 값으로 재설정하는 단계, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 이하이면 폴트 확산을 수행한 후 상기 반복연산변수 i가 0보다 작은지 확인하고, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 보다 크면 상기 반복연산변수 i가 0보다 작은지 확인하는 단계, 및 상기 반복연산변수 i가 0보다 작지 않으면 상기 체크 값 CHECK을 수신하는 단계로 진행하는 단계를 구비한다. If the fault spreading is performed in any of the repeatedly resetting steps, the setting further sets a check rate RATE, and the resetting step includes receiving a randomly generated check value CHECK. Resetting the variable P1 to a predetermined value in response to the binary bit ki while reducing the iteration variable i. If the check value CHECK is less than or equal to the check rate RATE, performing a fault spreading and then performing the iteration variable. checking i is less than 0, checking if the iteration value i is less than 0 if the check value CHECK is greater than the check rate RATE, and checking the check value CHECK if the iteration variable i is not less than zero It proceeds to the step of receiving.

상기 폴트 확산을 수행하는 단계는 소정의 폴트 검출 함수를 유도하는 단계, 및 상기 폴트 검출 함수와 상기 스칼라 k를 배타적 논리합 연산하는 단계를 구비할 수도 있다. Performing the fault spread may include deriving a predetermined fault detection function, and performing an exclusive OR operation on the fault detection function and the scalar k.

또한 상기 폴트 확산을 수행하는 단계는, 소정의 폴트 검출 함수를 유도하는 단계, 및 상기 폴트 검출 함수와 상기 스칼라 곱 Q를 배타적 논리합 연산하는 단계를 구비할 수도 있다. In addition, performing the fault spreading may include deriving a predetermined fault detection function, and performing an exclusive OR operation on the fault detection function and the scalar product Q.

상기 기술적 과제를 달성하기 위한 본 발명의 다른 실시예에 따른 암호화 방법은, 타원곡선 상의 기본 포인트 P와 스칼라 k, 및 체크 레이트 RATE를 수신하는 단계, 변수 P1을 상기 기본 포인트 P로 초기화하며, 반복연산변수 i(i는 정수)를 초기값 t-1(t는 정수)로 설정하는 단계로서, 상기 스칼라 k는 바이너리 비트 (kt-1, … , k1, k0)2로 표시되고 kt-1은 1인, 설정하는 단계, 랜덤하게 발생되는 체크 값 CHECK을 수신하는 단계, 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상기 변수 P1을 소정의 값으로 재설정하는 단계, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 이하이면 폴트 확산을 수행한 후 상기 반복연산변수 i가 0보다 작은지 확인하고, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 보다 크면 상기 반복연산변수 i가 0보다 작은지 확인하는 단계, 및 상기 반복연산변수 i가 0보다 작지 않으면 상기 체크 값 CHECK을 수신하는 단계로 진행하고 상기 반복연산변수 i가 0보다 작으면 마지막으로 재설정된 상기 변수 P1을 스칼라 곱 Q로서 출력하는 단계를 구비한다. The encryption method according to another embodiment of the present invention for achieving the technical problem, receiving a base point P and a scalar k, and a check rate RATE on the elliptic curve, initializes the variable P1 to the base point P, and repeat Setting an operation variable i (i is an integer) to an initial value t-1 (t is an integer), wherein the scalar k is represented by binary bits (kt-1, ..., k1, k0) 2 and kt-1 is represented by 1, setting, receiving a randomly generated check value CHECK, resetting the variable P1 to a predetermined value in response to the binary bit ki while decreasing the iterative variable i, the check value CHECK If it is less than the check rate RATE, check whether the iteration variable i is smaller than 0 after performing a fault spread, and if the check value CHECK is greater than the check rate RATE, check whether the iteration variable i is less than zero. Proceeds to receiving the check value CHECK if the iteration variable i is not less than zero and outputting the last reset variable P1 as a scalar product Q if the iteration variable i is less than zero. It is provided.

본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도 면 및 도면에 기재된 내용을 참조하여야 한다. DETAILED DESCRIPTION In order to fully understand the present invention, the operational advantages of the present invention, and the objects attained by the practice of the present invention, reference should be made to the accompanying drawings which illustrate preferred embodiments of the present invention.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써, 본 발명을 상세히 설명한다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Like reference numerals in the drawings denote like elements.

ECC에서는, 임의의 타원곡선(Elliptic Curve) E와 타원곡선 E 상의 한 점 P가 시스템 파라미터로서 선택된다. 암호화 통신을 원하는 사용자 1은 무작위(Random)로 정수 d를 생성시키고, d와 P를 곱하여 Q(=dㅧ P)를 생성시킨다. 사용자 1은 Q를 공개 키로 공개하고, d를 사용자 1의 비밀 키로 안전하게 저장한다. In ECC, an arbitrary elliptic curve E and a point P on the elliptic curve E are selected as system parameters. User 1 who wants encrypted communication randomly generates an integer d and multiplies d by P to generate Q (= d ㅧ P). User 1 publishes Q as a public key and securely stores d as user 1's private key.

반대로 사용자 1에게 메시지 M을 비밀리에 전송하고자 하는 사용자 2는, 먼저 무작위로 정수 k를 생성시키고, 시스템 파라미터 중의 하나인 P와 정수 k를 곱하여 A(=kㅧ P)를 생성시킨다. 사용자 1이 제공한 공개키 Q와 보내고자 하는 메시지 M을 사용하여 B(= M + kQ)를 생성시킨다. 마지막으로 사용자 2는 최종 결과 암호문 A,B를 사용자 1에게 전송한다. On the contrary, user 2 who wants to secretly send message M to user 1 first generates random integer k and multiplies integer P by one of the system parameters to generate A (= k k P). B (= M + kQ) is generated using the public key Q provided by user 1 and the message M to be sent. Finally, User 2 sends the final resulting ciphertexts A and B to User 1.

사용자 2로부터 암호문 A,B를 전달받은 사용자 1은 자신의 비밀키 d를 사용하여 dA를 계산한 후, 다음 식 (1)과 같은 연산을 수행하여 메시지 M을 복원한다. User 1 receives ciphertexts A and B from user 2, calculates dA using his private key d, and then restores message M by performing an operation as shown in Equation (1) below.

M=B-dA (1)M = B-dA (1)

식 (1)을 참조하면, ECC 공개키 암호시스템에서 가장 중요한 연산은 덧셈연산과 스칼라 곱셈연산임을 알 수 있다. Referring to equation (1), it can be seen that the most important operations in the ECC public key cryptosystem are addition and scalar multiplication.

타원곡선 E 상의 임의의 한 점(x,y)은 다음 식 (2)를 만족한다. Any one point (x, y) on the elliptic curve E satisfies the following equation (2).

Figure 112006015681562-PAT00001
(2)
Figure 112006015681562-PAT00001
(2)

암호(cryptographic)의 응용분야에서, 소수 유한 필드(Prime Finite Field) GF(p) 또는 이진 유한 필드(Binary Finite Field) GF(2n)의 연산에 식 (2)에 표시한 타원곡선의 특성을 사용할 수 있다. In cryptographic applications, the characteristics of the elliptic curves shown in equation (2) are calculated for the operation of prime finite field GF (p) or binary finite field GF (2 n ). Can be used.

소수 유한 필드는 구성요소(Element)의 개수가 소수(Prime Number) p로 한정된 영역(Field)을 의미한다. p가 3보다 큰 홀수인 소수이면 구성요소의 수가 p개인 소수 유한 필드 GF(p)는 하나만 존재한다. The fractional finite field refers to a field in which the number of elements is limited to a prime number p. If p is an odd prime number greater than 3, there is only one prime finite field GF (p) having the number of components p.

한편 2진 유한 필드 GF(2n)는 구성요소의 수가 2의 지수승인 유한필드를 의미한다. n이 1이상이면, 구성요소가 2n개인 이진 유한 필드 GF(2n)는 하나만 존재한다. On the other hand, the binary finite field GF (2 n ) means a finite field whose number of components is an exponential power of 2. When n is greater than or equal to 1, the configuration will be 2 n elements there is only one individual is a binary finite field GF (2 n).

한편, 위와 같은 "Weierstrass Affine" 표현 이외에도, EC 상의 포인트(점)를 나타내는 여러 가지 표현들이 있다. "Ordinary Projective", "Jacobian Projective", "Lopez-Dahab Projective", 및 "Hessian" 등이다. 이러한 포인트 표현들은 스컬러 곱 연산의 최대 효율을 얻을 수 있도록 사용될 것이다. 그러나 이들 중 몇 가지 방법들은 SCA와 같은 종류의 공격에 대한 대응에 있어서 효율적인 특성을 갖는다. 표 1에 몇 가지 포인트 표현(Point representation)들에 대한 EC 방정식(EC equation)이 예시된다. On the other hand, in addition to the above "Weierstrass Affine" expression, there are various expressions representing points on the EC. "Ordinary Projective", "Jacobian Projective", "Lopez-Dahab Projective", and "Hessian". These point representations will be used to obtain the maximum efficiency of the scalar product operation. However, some of these methods are effective in responding to attacks of the same kind as SCA. Table 1 illustrates the EC equation for several point representations.

[표 1]TABLE 1

Figure 112006015681562-PAT00002
Figure 112006015681562-PAT00002

표 1에서, WA는 Weierstrass Affine, WP는 Weierstrass ordinary projective, WJ는 Weierstrass Jacobian projective, 그리고 WL은 Weierstrass Lopez-Dahab projective를 의미한다. In Table 1, WA stands for Weierstrass Affine, WP stands for Weierstrass ordinary projective, WJ stands for Weierstrass Jacobian projective, and WL stands for Weierstrass Lopez-Dahab projective.

본 발명에서는 위에서 설명한 "Weierstrass Affine" 형태의 포인트 표현에 대하여 고려할 것이지만, 이에 한정되지 않고 본 발명에 따른 스칼라곱 장치 및 방법은 어떠한 다른 형태의 유한 필드와 포인트 표현에 대하여도 적용될 수 있다. In the present invention, the point representation of the "Weierstrass Affine" type described above will be considered, but the present invention is not limited thereto, and the scalar apparatus and method according to the present invention can be applied to any other type of finite field and point representation.

ECC에서의 메인(main) 연산은 Q = kㆍP = P + P + ... + P(k times)을 계산하는 스칼라 포인트 곱(scalar point multiplication)이다. k는 비밀키이다. 스칼라 포인트 곱은 위의 수학식들과 같이 유한 필드 연산들을 기반으로 한 포인트 연산들로 이루어진다. 이와 관련된 이산 대수(discrete logarithm) 연산에서는, P와 Q=kㆍP로부터 k를 계산한다. The main operation in ECC is a scalar point multiplication that calculates Q = k.P = P + P + ... + P (k times). k is the secret key. A scalar point product consists of point operations based on finite field operations as in the above equations. In the discrete logarithm operation associated with this, k is calculated from P and Q = k · P.

DFA의 기본 원리는 스마트 카드 또는 다른 암화 장치들 내에서의 암호화 과정에 비트에러를 인가한 후 폴트가 있는 출력들과 폴트가 없는 출력들을 분석하여 비밀 키에 대한 정보를 분석하는 것이다. The basic principle of DFA is to apply a bit error to the encryption process in a smart card or other encryption device, and then analyze the information about the secret key by analyzing the outputs with and without the faults.

ECC 기반 공개 키 암호시스템에 DFA를 적용하기 위한 첫 번째 정보는 상술한 타원 방정식의 파라미터 a6는 계산에 사용되지 않는다는 것이다. 이러한 가정은 이진 필드에 대한 몽고메리 전력 래더의 로페즈-다하브(Lopez-Dahab)에서의 스칼라 곱 알고리즘과 같은 다른 구현들에 대해서도 적용될 수 있다. 단지 EC 정의의 a6 만이 계산 과정에 포함된다. The first information for applying DFA to an ECC-based public key cryptosystem is that parameter a6 of the elliptic equation described above is not used in the calculation. This assumption can be applied to other implementations, such as the scalar product algorithm at Lopez-Dahab of Montgomery Power Ladder for Binary Field. Only a6 of the EC definition is included in the calculation.

계산되는 동안 EC 영역 파라미터들 중 단지 하나만이 사용될 수 있으므로, 특정 포인트

Figure 112006015681562-PAT00003
를 입력시키는 것이 가능하다.
Figure 112006015681562-PAT00004
가 약한 것, 즉 낮은 차수인 것으로 가정하면 이산 대수의 문제가 해결될 수 있다. Since only one of the EC region parameters can be used during the calculation,
Figure 112006015681562-PAT00003
It is possible to enter
Figure 112006015681562-PAT00004
Assuming weak, that is, low order, the problem of discrete algebra can be solved.

실제 응용되는 프로토콜들 대부분은 소정의 기본 포인트 P를 사용하며, 기본 포인트 P는 암호화 장치의 비휘발성 메모리에 저장된다. 따라서 기본 포인트 P에 폴트를 인가하는 폴트 분석 모델이 고려될 수 있다. 그러나 이러한 모델에서는 기본 포인트 P에 단지 몇 비트만이 삽입될 수 있으므로 실현가능성이 매우 낮다. Most of the practical protocols use a predetermined base point P, which is stored in the nonvolatile memory of the encryption apparatus. Therefore, a fault analysis model for applying a fault to the base point P may be considered. However, in this model, only a few bits can be inserted into the base point P, so the feasibility is very low.

한편으로는, 기본 포인트 P와 영역 파라미터들 모두에 일시적이면서도 영구적인 폴트를 인가하는 폴트 분석 모델이 고려될 수도 있으나, 이러한 모델 또한 NAF-표현의 비밀 키에만 적용될 수 있다는 한계가 있다. On the one hand, a fault analysis model that applies temporary and permanent faults to both the base point P and the region parameters may be considered, but there is a limitation that such a model can also be applied only to the secret key of the NAF-expression.

따라서 DFA를 수행하는 암호 분석가들은 암호학적으로 강한 타원 곡선 E 상에서의 스칼라 곱 Q=kp 결과에서 비밀 키 k를 복원하는 것을 목표로 한다. 이를 위해서는 많은 수의 폴트가 포함된 출력들

Figure 112006015681562-PAT00005
이 필요하며, 이 출력들은 약한 타원 곡선
Figure 112006015681562-PAT00006
에 대응된다. 그 후 비밀 키 k를 복원하는 이산 대수 문제는 약한 타원 곡선
Figure 112006015681562-PAT00007
상에서 쉽게 해결될 수 있다. Therefore, cryptographic analysts performing DFA aim to restore the secret key k from the scalar product Q = kp on the cryptographically strong elliptic curve E. To do this, outputs containing a large number of faults
Figure 112006015681562-PAT00005
This output requires a weak elliptic curve
Figure 112006015681562-PAT00006
Corresponds to. The discrete algebra problem then restoring the secret key k is a weak elliptic curve
Figure 112006015681562-PAT00007
Can be easily solved.

따라서 본 발명에서는, DFA 방어 방법에서 다음과 같은 폴트 모델을 가정한다. Therefore, in the present invention, the following fault model is assumed in the DFA defense method.

1. 영역 파라미터들(곡선, 유한 필드 정의들, 기본 포인트 P)은 CRC 검출 방법 또는 이와 유사한 방법에 의해 수정된 것으로 가정한다. 1. The region parameters (curve, finite field definitions, base point P) are assumed to have been modified by the CRC detection method or the like.

2. 유한 필드 연산들은 낮은 레벨 에러 체크 방법에 의해 수정된 것으로 가정한다. 2. Finite field operations are assumed to be modified by a low level error check method.

3. 계산 과정 동안의 폴트들은 랜덤하고 예측 불가능한 것으로 가정한다. 3. Faults during the calculation process are assumed to be random and unpredictable.

이하에서는 이진 스칼라 곱셈 알고리즘들을 변형에 의한 일반적인 스칼라 곱셈 알고리즘에 대해 설명한다. 이하에서의 스칼라 곱셈 알고리즘음 설명의 편의를 위한 것으로, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 다른 알려진 스칼라 곱셈 알고리즘들에 대해서도 적용될 수 있음을 알 것이다. Hereinafter, a general scalar multiplication algorithm by transforming binary scalar multiplication algorithms will be described. For the sake of convenience of explanation of the scalar multiplication algorithm below, it will be appreciated by those skilled in the art that the present invention may be applied to other known scalar multiplication algorithms.

도 3은 본 발명의 실시예에 따른 암호화 방법의 흐름도이다. 도 3을 참조하면, 본 발명의 실시예에 따른 암호화 방법(300)에서 입력은 기본 포인트 P와 스칼라 k이며, 출력은 스칼라 곱 Q(=kP)이다. 여기서 기본 포인트 P는 임의의 타원곡선 상의 포인트이다. 3 is a flowchart of an encryption method according to an embodiment of the present invention. Referring to FIG. 3, in the encryption method 300 according to the embodiment of the present invention, an input is a base point P and a scalar k, and an output is a scalar product Q (= kP). Here the base point P is a point on any elliptic curve.

암호화 방법(300)에서는 먼저 기본 포인트 P와 스칼라 k가 수신된다(S301). 그 후 스칼라 k에 응답하여 기본 포인트 P를 이용하여 초기화되는 변수 P1을 반복 연산함으로써 기본 포인트 P와 상기 스칼라 k의 곱인 스칼라 곱 Q(=kP)이 계산된다. 또한 스칼라 곱 Q를 계산하는 동안에 혹은 계산한 후에 유입될 가능성이 있는 폴트를 방어하기 위해 폴트 확산을 수행된다(S303). 마지막으로 스칼라 곱 Q가 계산되고 폴트 확산이 수행된 후 스칼라 곱 Q가 출력된다(S305). In the encryption method 300, a base point P and a scalar k are first received (S301). The scalar product Q (= kP), which is the product of the base point P and the scalar k, is then calculated by iteratively calculating the variable P1 initialized using the base point P in response to the scalar k. In addition, fault spreading is performed to prevent faults that may be introduced during or after calculating the scalar product Q (S303). Finally, the scalar product Q is calculated and after the fault spreading is performed, the scalar product Q is output (S305).

이하 도 4 내지 6을 참조하여 반복적으로 스칼라 곱 연산을 수행하여 스칼라 곱 Q를 계산하고, 폴트 확산을 수행하는 동작에 대해 설명한다. 본 발명에서는 폴트 유입 여부를 체크하는 과정 대신 폴트 확산을 이용한다. 따라서 폴트 확산이 수행되는 위치에 따라 최종 체크, 정기 체크, 및 랜덤 체크 방법을 이용하는 실시예가 제공될 수 있다. Hereinafter, an operation of repeatedly performing a scalar multiplication operation to calculate a scalar product Q and performing fault spreading will be described with reference to FIGS. 4 to 6. In the present invention, fault diffusion is used instead of checking whether a fault is introduced. Therefore, embodiments using the final check, regular check, and random check methods may be provided depending on the location where fault spreading is performed.

최종 체크를 이용하는 실시예는 반복적인 스칼라 곱 연산이 모두 수행된 후에 폴트 확산이 수행되는 방법이다(도 4). 정기 체크를 이용하는 실시예는 스칼라 곱 연산이 반복될 때마다 폴트 확산이 수행되는 방법이다(도 5). 랜덤 체크를 이용하는 실시예는 반복되는 스칼라 곱 연산 중 특정한 스칼라 곱 연산에 대해서만 폴트 확산이 수행되는 방법이다(도 6). An embodiment using the final check is a method in which fault spreading is performed after all of the iterative scalar product operations are performed (FIG. 4). An embodiment using periodic checks is a method in which fault spreading is performed whenever a scalar product operation is repeated (FIG. 5). An embodiment using a random check is a method in which fault spreading is performed only for a specific scalar product operation among repeated scalar product operations (FIG. 6).

도 4는 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 일실시예로서 최종 체크를 이용하는 실시예이다. 도 4에 적용된 알고리즘은 다음과 같다. 4 is an embodiment of using the final check as an embodiment of the step of computing the scalar product of FIG. 3 and performing fault spreading. The algorithm applied to FIG. 4 is as follows.

Figure 112006015681562-PAT00008
Figure 112006015681562-PAT00008

상기 알고리즘 및 도 4를 참조하면, 일반적인 암호화 방법과 달리 본 발명의 실시예에서는 "브랜치(branch)" 연산을 이용하여 스칼라 곱에 폴트가 유입되었는지 확인하는 방법을 이용하지 않는다. 그 대신 본 발명의 실시예에서는 폴트 확산 동작을 수행한다. Referring to the algorithm and FIG. 4, unlike the general encryption method, an embodiment of the present invention does not use a method of checking whether a fault is introduced into a scalar product using a "branch" operation. Instead, the embodiment of the present invention performs a fault spreading operation.

먼저 스칼라 곱 Q를 계산하는 과정을 설명한다. 본 발명의 실시예에서는 반복적인 스칼라 곱 연산을 수행하여 스칼라 곱 Q를 계산하기 위해서 변수 P1와 반복연산변수 i를 도입한다. First, the process of calculating the scalar product Q is described. In an embodiment of the present invention, the variable P1 and the iterative variable i are introduced to calculate the scalar product Q by performing an iterative scalar product operation.

단계 S301에서 기본 포인트 P와 스칼라 k를 수신한 후, 변수 P1을 기본 포인트 P로 초기화하고 반복연산변수 i(i는 정수)를 초기값 t-1(t는 정수)로 설정한다(S401). 이 때 스칼라 k는 바이너리 비트 (kt-1, … , k1, k0)2로 표시되며, kt-1은 1로 설정된다. After receiving the basic point P and the scalar k in step S301, the variable P1 is initialized to the basic point P and the iteration operation variable i (i is an integer) is set to an initial value t-1 (t is an integer) (S401). At this time, scalar k is represented by binary bits (kt-1, ..., k1, k0) 2 , and k t-1 is set to one.

반복연산변수 i가 0보다 작아질 때까지(S411) 반복연산변수 i를 감소시키면서(S403) 바이너리 비트 ki에 응답하여 스칼라 곱 연산을 반복해서 수행한다. 즉 바이너리 비트 ki에 응답하여 변수 P1이 소정의 값으로 반복하여 재설정된다. The scalar multiplication operation is repeatedly performed in response to the binary bit ki while reducing the iteration variable i (S403) until the iteration variable i becomes smaller than 0 (S411). In other words, in response to the binary bit ki, the variable P1 is repeatedly reset to a predetermined value.

구체적으로 설명하면, 바이너리 비트 ki가 1이 아니면 변수 P1을 2배한 값이 변수 P1으로 재설정된다(S405). 반면 바이너리 비트 ki가 1이면 변수 P1과 상기 기본 포인트 P를 더한 값이 상기 변수 P1으로 재설정된다(S407). Specifically, if the binary bit ki is not 1, the value doubled by the variable P1 is reset to the variable P1 (S405). On the other hand, if the binary bit ki is 1, the value obtained by adding the variable P1 and the basic point P is reset to the variable P1 (S407).

도 4의 실시예에서, 폴트 확산은 반복하여 재설정하는 단계 이후에 수행된다(413). 즉 바이너리 비트 ki에 응답하여 변수 P1을 2배한 값 또는 변수 P1과 상기 기본 포인트 P를 더한 값이 상기 변수 P1으로 재설정된 후(S407 또는 S409) 반복연산변수 i가 0보다 작은지 판단한다(S411). In the embodiment of FIG. 4, fault spreading is performed 413 after the step of repeatedly resetting. That is, in response to the binary bit ki, it is determined whether the value of doubling the variable P1 or the sum of the variable P1 and the basic point P is reset to the variable P1 (S407 or S409) and then the iterative variable i is smaller than 0 (S411). ).

반복연산변수 i가 0보다 작지 않으면 스칼라 곱 연산을 반복하여 스칼라 곱 Q를 계산하는 단계가 완료되지 않는 경우이므로, 계속해서 스칼라 곱 연산을 수행한다. 그러나 반복연산변수 i가 0보다 작으면 스칼라 곱 Q를 계산하는 단계가 완료된 경우이므로 폴트 확산이 수행된다. 폴트 확산에 대해서는 이후에 상세히 설명한다. If the iteration variable i is not less than 0, the step of calculating the scalar product Q by repeating the scalar product operation is not completed. Therefore, the scalar product operation is continuously performed. However, if the iteration variable i is less than 0, the fault diffusion is performed because the step of calculating the scalar product Q is completed. Fault diffusion is described in detail later.

상술한 바와 같이 도 4의 실시예는 스칼라 곱 Q가 계산된 폴트 확산이 수행되므로, 성능의 저하는 거의 무시할 만하다. 그러나 폴트 확산이 수행되는 위치가 알려져 있고 시간 영역에서 예측 가능하기 때문에 공격을 받을 가능성이 여전히 존재하는 단점이 있다. As described above, the embodiment of Fig. 4 is almost negligible because the fault spread calculated with the scalar product Q is performed. However, there is a disadvantage that the possibility of attack still exists because the location where the fault spreading is performed is known and predictable in the time domain.

도 5는 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 다른 일실시예로서 정기 체크를 이용하는 실시예이다. 도 5에 적용된 알고리즘은 다음과 같다. FIG. 5 is an embodiment using periodic checks as another embodiment of calculating the scalar product of FIG. 3 and performing fault spreading. The algorithm applied to FIG. 5 is as follows.

도 5를 참조하면, 도 5의 실시예에서 폴트 확산은 변수 P1이 반복하여 재설정될 때 마다 수행된다. 즉, 반복해서 스칼라 곱 연산이 수행될 때마다 폴트 확산이 수행된다. 도 5의 다른 연산들은 도 4의 연산들과 동일하므로 이에 대한 설명은 생략한다. Referring to FIG. 5, in the embodiment of FIG. 5, fault spreading is performed whenever the variable P1 is repeatedly reset. That is, a fault spread is performed every time a scalar product operation is performed repeatedly. Since other operations of FIG. 5 are the same as those of FIG. 4, description thereof will be omitted.

도 5의 실시예는 폴트가 유입되는 경우 바로 제거할 수 있으며, 즉각적인 대응을 할 수 있으므로, 보안 수준을 가장 높게 유지할 수 있다. 반면 도 5의 실시예에서는 성능 저하가 발생할 수 있는 단점이 있다. 그러나 도 5의 실시예에서의 성능 저하는 일반적인 "Compute Twice and Check" 방법에서의 성능 저하보다 더 나은 결과를 나타낼 것이다. The embodiment of Figure 5 can be immediately removed if a fault is introduced, and can immediately respond, it is possible to maintain the highest security level. On the other hand, in the embodiment of FIG. 5, there is a disadvantage that a performance degradation may occur. However, the degradation in the embodiment of FIG. 5 will yield better results than the degradation in the general "Compute Twice and Check" method.

Figure 112006015681562-PAT00009
Figure 112006015681562-PAT00009

도 6은 도 3의 스칼라 곱을 연산하고 폴트 확산을 수행하는 단계에 대한 또 다른 일실시예로서, 랜덤 체크를 이용하는 실시예이다. 도 6에 적용되는 알고리즘은 다음과 같다. FIG. 6 illustrates another example of computing the scalar product of FIG. 3 and performing fault spreading. FIG. 6 illustrates a random check. The algorithm applied to FIG. 6 is as follows.

Figure 112006015681562-PAT00010
Figure 112006015681562-PAT00010

도 6에 도시된 바와 같이, 폴트 확산은 반복하여 재설정하는 연산 중 특정 연산 후에 단계에서 수행된다. 즉 스칼라 곱 연산이 반복하여 수행될 때마다 소정의 조건이 만족되는지를 판단하여 폴트 확산을 수행할지 여부가 결정된다. 이하에서 도 6의 실시예에 대해 설명한다. As shown in FIG. 6, fault spreading is performed in a step after a particular operation of the repeatedly resetting operation. That is, whenever a scalar product operation is repeatedly performed, it is determined whether a predetermined condition is satisfied or not to perform fault spreading. Hereinafter, the embodiment of FIG. 6 will be described.

먼저, 암호화 방법(600)에서 사용될 매개변수들을 설정하고 초기화하는 과정에서 체크 레이트 RATE를 함께 설정한다(S601). 또한 변수 P1을 재설정하는 과정에서 반복연산변수 i를 감소시키기 전에 해당 반복연산변수에 대한 연산에서 적용될 체크 값 CHECK을 수신한다(S603). 여기서 체크 값 CHECK은 랜덤하게 발생되는 값이다. First, the check rate RATE is set together in the process of setting and initializing parameters to be used in the encryption method 600 (S601). In addition, in the process of resetting the variable P1, before reducing the iteration variable i, a check value CHECK to be applied in operation on the iteration variable is received (S603). Here, the check value CHECK is a randomly generated value.

P1을 소정의 값으로 반복적으로 재설정하는 과정, 즉 반복적으로 스칼라 곱 연산을 수행하는 과정은 도 4에서의 과정과 동일하다. The process of repeatedly resetting P1 to a predetermined value, that is, the process of repeatedly performing a scalar product operation is the same as the process of FIG. 4.

P1을 소정의 값으로 반복적으로 재설정하는 과정(S607 내지 S611) 이후 체크 값 CHECK과 체크 레이트 RATE를 비교하여 폴트 확산을 수행할지 여부를 결정한다. After repetitively resetting P1 to a predetermined value (S607 to S611), it is determined whether to perform fault spreading by comparing the check value CHECK and the check rate RATE.

즉 체크 값 CHECK이 체크 레이트 RATE 이하이면 폴트 확산을 수행하지만, 체크 값 CHECK이 체크 레이트 RATE 보다 작으면 폴트 확산을 수행하지 않는다. That is, if the check value CHECK is less than or equal to the check rate RATE, the fault spread is performed. However, if the check value CHECK is less than the check rate RATE, the fault spread is not performed.

이후 반복연산변수 i가 0보다 작은지 확인하여 스칼라 곱 연산을 반복적으로 수행할 것인지 결정하는 과정은 도 4의 과정과 동일하다. Thereafter, the process of determining whether to perform the scalar product operation repeatedly by checking whether the iteration variable i is smaller than 0 is the same as the process of FIG. 4.

본 발명의 실시예에서 체크 레이트 RATE는 폴트 확산을 수행할지 여부를 체크하는 빈도를 결정하는 값으로서, 도 6을 참조하면 체크 레이트 RATE는 암호화 방법(600)에서 사용되는 매개변수들이 초기화되거나 설정되는 단계에서 함께 설정될 수 있다(S603). 한편 체크 값 CHECK은 랜덤하게 발생되는 값이다. In an embodiment of the present invention, the check rate RATE is a value for determining whether to perform fault spreading. Referring to FIG. 6, the check rate RATE is a parameter in which the parameters used in the encryption method 600 are initialized or set. It may be set together in step (S603). On the other hand, the check value CHECK is a randomly generated value.

예를 들어, 체크 값 CHECK과 체크 레이트 RATE 모두 0~100의 값을 가질 수 있고, 체크 레이트 RATE가 70으로 설정된다면, 랜덤하게 발생되는 체크 값 CHECK이 70 이하이면 폴트 확산을 수행하게 되고, 체크 값 CHECK이 70보다 크면 폴트 확산을 수행하지 않는다. For example, both the check value CHECK and the check rate RATE may have a value between 0 and 100. If the check rate RATE is set to 70, if the randomly generated check value CHECK is 70 or less, fault spreading is performed. If the value CHECK is greater than 70, no fault spreading is performed.

다른 방법으로, 체크 값 CHECK과 체크 레이트 RATE 모두 랜덤하게 결정되는 이진 값(0 또는 1)일 수 있으며, 이 경우에는 체크 값 CHECK과 체크 레이트 CHECK가 같은 값을 가질 때(또는 다른 값을 가질 때) 폴트 확산을 수행하고 다른 값을 가질 때(또는 같은 값을 가질 때) 폴트 확산을 수행하지 않을 수도 있다. Alternatively, both check value CHECK and check rate RATE can be randomly determined binary values (0 or 1), in which case when check value CHECK and check rate CHECK have the same value (or have different values) ) May perform a fault spread and not have a different value (or have the same value).

본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 상술한 방법 이외에도 다양한 방법으로 랜덤 체크 방법을 적용할 수 있을 것이며, 또한 체크 값 CHECK이 수신되는 단계와 체크 레이트 RATE가 설정되는 단계 또한 암호화 방법(600)의 다른 위치에 놓여질 수 있음도 알 것이다. 도 6의 다른 동작들은 도 4와 동일하므로 구체적인 설명은 생략한다. Those skilled in the art will be able to apply the random check method in various ways in addition to the above-described method, and also, the step of receiving the check value CHECK and the setting of the check rate RATE. It will also be appreciated that it may be placed in another location of 600). Since other operations of FIG. 6 are the same as those of FIG. 4, a detailed description thereof will be omitted.

이하에서는 폴트 확산을 수행하는 방법에 대해 설명한다. 폴트 확산을 수행함으로써 폴트가 유입된 데이터를 암호화 데이터 내부로 확산시킴으로써 DFA를 무용지물로 만들 수 있다. Hereinafter, a method of performing fault spreading will be described. By performing fault spreading, it is possible to make the DFA useless by spreading the data into which the fault has flowed into the encrypted data.

폴트 확산이 수행되기 전에 먼저 폴트 검출이 수행되어야 한다. 본 발명의 실시예에서는 폴트 검출을 위해서 소정의 폴트 검출 함수(fault detection function) f(x,y,z,a4,a6)가 이용된다. 폴트 검출 함수 f(x,y,z,a4,a6)는 표 1에 예시한 EC 방정식을 이용하여 쉽게 유도할 수 있다. Fault detection must first be performed before fault spreading can be performed. In an embodiment of the present invention, a predetermined fault detection function f (x, y, z, a4, a6) is used for fault detection. The fault detection function f (x, y, z, a4, a6) can be easily derived using the EC equation illustrated in Table 1.

다음 표 2에 소수 필드에서 서로 다른 포인트 표현들에 대한 폴트 검출 함수가 예시되어 있으며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 이진 필드뿐만 아니라 다른 포인트 및 곡선 표현들에 대해서도 표 2에 예시된 것과 유사한 방법으로 폴트 검출 함수를 구할 수 있을 것이다. The fault detection function for different point representations in decimal fields is illustrated in the following Table 2, and those of ordinary skill in the art will be shown in Table 2 not only for binary fields but also for other point and curve representations. The fault detection function may be obtained in a manner similar to that illustrated.

[표 2]TABLE 2

Figure 112006015681562-PAT00011
Figure 112006015681562-PAT00011

표 2를 살펴보면, 이러한 폴트 검출을 수행하기 위한 계산상의 오버헤드(Computational overhead)는 받아들일 수 있을 정도임을 알 수 있다. Looking at Table 2, it can be seen that the computational overhead for performing such fault detection is acceptable.

본 발명에서는 폴트 검출 함수를 이용하여 폴트 검출이 수행된 후 2가지 방법의 폴트 확산이 수행될 수 있다. 2가지 폴트 확산 방법은 비밀 키 폴트 확산 방법과 계산된 포인트 폴트 확산 방법이다. In the present invention, two methods of fault spreading may be performed after fault detection is performed using a fault detection function. Two fault spreading methods are the secret key fault spreading method and the calculated point fault spreading method.

비밀 키 폴트 확산 방법은, 폴트가 유입된 경우 원래의 비밀 키 값을 폴트가 유입된 비밀 키 값으로 변경시키는 방법이다. 이 때 폴트가 유입된 비밀 키 값은 예측불가능한 값일 것이다. 폴트 확산은 다음 수학식 (3)을 이용하여 수행된다. The secret key fault spreading method is a method of changing an original secret key value to a secret key value to which a fault is introduced when a fault is introduced. At this time, the faulted secret key value may be unpredictable. Fault diffusion is performed using the following equation (3).

Figure 112006015681562-PAT00012
(3)
Figure 112006015681562-PAT00012
(3)

식 (3)을 살펴보면, 계산 중에 폴트가 유입되지 않은 경우에 폴트 검출 함수는 0이므로 비밀 키 값 k는 변경되지 않는다. 반면 계산 중에 폴트가 유입되는 경우에 폴트 검출 함수는 0이 아니므로 비밀 키 값 k는 예측불가능한 값으로 변경될 것이다. Looking at Eq. (3), the secret key value k is not changed since the fault detection function is 0 when no fault is introduced during the calculation. On the other hand, if a fault is introduced during the calculation, the fault detection function is not zero, so the secret key value k will change to an unpredictable value.

스칼라 곱의 마지막 단에서 결과 포인트 Q(=kP)는 상위 레벨로 출력되므로, 암호 분석가들은 결과 포인트에 대해 이산 대수 문제를 풀 수는 있을 것이다. 그러나 폴트가 유입된 경우 결과 포인트 또한 폴트가 유입된 값이며, 따라서 이산 대수 문제가 풀린 경우에도 암호분석가는 원래의 비밀 키가 아닌 폴트가 유입된 비밀 키를 얻게 될 것이다. In the last step of the scalar product, the result point Q (= kP) is output at a higher level, so cryptoanalysts will be able to solve discrete algebra problems for the result point. However, if a fault is introduced, the resulting point is also the value at which the fault was introduced, so even if the discrete algebra problem is solved, the cryptographer will get the secret key with the fault, not the original secret key.

폴트가 랜덤하게 발생됨을 고려할 때, 폴트가 유입된 경우 암호분석가가 얻은 비밀 키가 원래의 비밀 키일 가능성은 무시할 정도로 작다. Given that the faults occur randomly, the probability that the cryptographer obtains the original secret key if the fault is introduced is small enough to ignore it.

몇몇의 경우 새로운 비밀 키 값이 이전에 이용되었던 비밀 키 값과 동일한 경우가 발생할 수도 있다. 이러한 경우에도 임시로 존재하는 값 뿐만 아니라 EEPROM 등에 재기록되어 저장되는 값에 대해 키 변경이 적용될 수 있을 것이다. In some cases it may occur that the new secret key value is the same as the previously used secret key value. In such a case, the key change may be applied to the value that is rewritten and stored in the EEPROM as well as the temporarily existing value.

비밀 키 폴트 확산 방법은 도 4 내지 도 6에 도시된 본 발명의 실시예에 대해 모두 적용이 가능할 것이다. 여기서 비밀 키 k는 스칼라 k이다. The secret key fault spreading method may be applicable to the embodiments of the present invention shown in FIGS. 4 to 6. Where the secret key k is a scalar k.

다음으로 계산된 포인트 폴트 확산 방법에 대해 설명한다. 계산된 포인트 폴트 확산 방법은 비밀 키 대신 계산된 포인트, 즉 스칼라 곱 Q를 변경시키는 점을 제외하고 비밀 키 폴트 확산 방법과 동일하므로, 구체적인 설명은 생략한다. 계산된 포인트 폴트 확산은 다음 식 (4)를 이용하여 수행된다. Next, the calculated point fault spreading method will be described. The calculated point fault spreading method is the same as the secret key fault spreading method except that the calculated point, that is, the scalar product Q is changed instead of the secret key, and thus a detailed description thereof will be omitted. The calculated point fault spread is performed using the following equation (4).

Figure 112006015681562-PAT00013
(4)
Figure 112006015681562-PAT00013
(4)

본 명세서에서 개시된 방법 및 장치에서 사용되는 기능은 컴퓨터로 읽을 수 있는 기록 매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있으며 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한, 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. The functions used in the methods and apparatus disclosed herein can be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). do. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상에서와 같이 도면과 명세서에서 최적 실시예가 개시되었다. 여기서 특정 한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다. As described above, optimal embodiments have been disclosed in the drawings and the specification. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not intended to limit the scope of the present invention as defined in the claims or the claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

상술한 바와 같이 본 발명에 따른 암호화 방법은 폴트 확산을 이용하여 스칼라 곱에 폴트가 유입되었는지 체크하는 과정 없이 DFA를 방어할 수 있으며, 체크하는 과정이 없으므로 분기 연산 없이 암호화 시스템을 구현할 수 있는 장점이 있다. As described above, the encryption method according to the present invention can protect the DFA without checking whether a fault is introduced into the scalar product using fault spreading, and there is no checking process, so that an encryption system can be implemented without branching. have.

Claims (12)

타원곡선 상의 기본 포인트 P와 스칼라 k를 수신하는 단계; Receiving a base point P and a scalar k on an elliptic curve; 상기 스칼라 k에 응답하여 상기 기본 포인트 P를 이용하여 초기화되는 변수 P1을 반복 연산함으로써 상기 기본 포인트 P와 상기 스칼라 k의 곱인 스칼라 곱 Q(=kP)를 계산하며, 유입될 가능성이 있는 폴트를 방어하기 위해 폴트 확산을 수행하는 단계; 및 Iteratively computes the variable P1 initialized using the base point P in response to the scalar k to calculate a scalar product Q (= kP), which is the product of the base point P and the scalar k, and defends against possible faults. Performing a fault spread to achieve; And 상기 스칼라 곱 Q를 출력하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And outputting the scalar product Q. 제 1 항에 있어서, 상기 스칼라 곱 Q를 계산하는 단계는, The method of claim 1, wherein calculating the scalar product Q comprises: 상기 변수 P1을 상기 기본 포인트 P로 초기화하며, 반복연산변수 i(i는 정수)를 초기값 t-1(t는 정수)로 설정하는 단계로서, 상기 스칼라 k는 바이너리 비트 (kt-1, … , k1, k0)2로 표시되고 kt-1은 1인, 설정하는 단계; 및 Initializing the variable P1 to the basic point P, and setting an iteration variable i (i is an integer) to an initial value t-1 (t is an integer), wherein the scalar k is a binary bit (kt-1,... , k1, k0) 2 and kt-1 is 1; And 상기 반복연산변수 i가 0보다 작아질 때까지 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상기 변수 P1을 소정의 값으로 반복하여 재설정하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And resetting the variable P1 to a predetermined value in response to the binary bit ki while decreasing the iteration variable i until the iteration variable i becomes smaller than zero. 제 2 항에 있어서, 상기 재설정하는 단계는, The method of claim 2, wherein the resetting comprises: 상기 바이너리 비트 ki가 1이 아니면 상기 변수 P1을 2배한 값을 상기 변수 P1으로 재설정하고, 상기 ki가 1이면 상기 변수 P1과 상기 기본 포인트 P를 더한 값을 상기 변수 P1으로 재설정하는 것을 특징으로 하는 암호화 방법. If the binary bit ki is not 1, the value of doubling the variable P1 is reset to the variable P1, and if ki is 1, the value obtained by adding the variable P1 and the base point P is reset to the variable P1. Encryption method. 제 2 항에 있어서, 상기 폴트 확산은, The method of claim 2, wherein the fault diffusion, 상기 변수 P1이 반복하여 재설정될 때 마다 수행되는 것을 특징으로 하는 암호화 방법. And is performed whenever the variable P1 is repeatedly reset. 제 2 항에 있어서, 상기 폴트 확산은, The method of claim 2, wherein the fault diffusion, 상기 반복하여 재설정하는 단계 이후에 수행되는 것을 특징으로 하는 암호화 방법. And after the step of repeatedly resetting. 제 2 항에 있어서, 상기 폴트 확산은, The method of claim 2, wherein the fault diffusion, 상기 반복하여 재설정하는 단계 중 임의의 재설정하는 단계에서 수행되는 것을 특징으로 하는 암호화 방법. And performing the resetting of any of the steps of repetitively resetting. 제 6 항에 있어서, The method of claim 6, 상기 설정하는 단계는 체크 레이트 RATE를 더 설정하며, The setting step further sets a check rate RATE, 상기 재설정하는 단계는, The resetting step, 랜덤하게 발생되는 체크 값 CHECK을 수신하는 단계; Receiving a randomly generated check value CHECK; 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상 기 변수 P1을 소정의 값으로 재설정하는 단계; Resetting the variable P1 to a predetermined value in response to the binary bit ki while decreasing the iteration variable i; 상기 체크 값 CHECK이 상기 체크 레이트 RATE 이하이면 폴트 확산을 수행한 후 상기 반복연산변수 i가 0보다 작은지 확인하고, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 보다 크면 상기 반복연산변수 i가 0보다 작은지 확인하는 단계; 및 If the check value CHECK is less than or equal to the check rate RATE, check whether the iteration variable i is smaller than 0 after performing fault spreading; if the check value CHECK is greater than the check rate RATE, the iteration variable i is smaller than 0 Confirming that; And 상기 반복연산변수 i가 0보다 작지 않으면 상기 체크 값 CHECK을 수신하는 단계로 진행하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And if the iteration operation variable i is not less than zero, proceeding to receiving the check value CHECK. 제 5 항 내지 제 7 항 중 어느 한 항에 있어서, 상기 폴트 확산을 수행하는 단계는, The method of any one of claims 5 to 7, wherein performing the fault diffusion comprises: 소정의 폴트 검출 함수를 유도하는 단계; 및 Deriving a predetermined fault detection function; And 상기 폴트 검출 함수와 상기 스칼라 k를 배타적 논리합 연산하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And an exclusive-OR operation on the fault detection function and the scalar k. 제 6 항에 있어서, 상기 폴트 확산을 수행하는 단계는, The method of claim 6, wherein performing the fault spreading comprises: 소정의 폴트 검출 함수를 유도하는 단계; 및 Deriving a predetermined fault detection function; And 상기 폴트 검출 함수와 상기 스칼라 곱 Q를 배타적 논리합 연산하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And an exclusive-OR operation on the fault detection function and the scalar product Q. 타원곡선 상의 기본 포인트 P와 스칼라 k, 및 체크 레이트 RATE를 수신하는 단계; Receiving a base point P and a scalar k on an elliptic curve, and a check rate RATE; 변수 P1을 상기 기본 포인트 P로 초기화하며, 반복연산변수 i(i는 정수)를 초기값 t-1(t는 정수)로 설정하는 단계로서, 상기 스칼라 k는 바이너리 비트 (kt-1, … , k1, k0)2로 표시되고 kt-1은 1인, 설정하는 단계; Initializing a variable P1 to the basic point P and setting an iteration variable i (i is an integer) to an initial value t-1 (t is an integer), wherein the scalar k is a binary bit (kt-1,... setting k1, k0) 2 and kt-1 is 1; 랜덤하게 발생되는 체크 값 CHECK을 수신하는 단계; Receiving a randomly generated check value CHECK; 상기 반복연산변수 i를 감소시키면서 상기 바이너리 비트 ki에 응답하여 상기 변수 P1을 소정의 값으로 재설정하는 단계; Resetting the variable P1 to a predetermined value in response to the binary bit ki while reducing the iteration variable i; 상기 체크 값 CHECK이 상기 체크 레이트 RATE 이하이면 폴트 확산을 수행한 후 상기 반복연산변수 i가 0보다 작은지 확인하고, 상기 체크 값 CHECK이 상기 체크 레이트 RATE 보다 크면 상기 반복연산변수 i가 0보다 작은지 확인하는 단계; 및 If the check value CHECK is less than or equal to the check rate RATE, check whether the iteration variable i is smaller than 0 after performing fault spreading; if the check value CHECK is greater than the check rate RATE, the iteration variable i is smaller than 0 Confirming that; And 상기 반복연산변수 i가 0보다 작지 않으면 상기 체크 값 CHECK을 수신하는 단계로 진행하고 상기 반복연산변수 i가 0보다 작으면 마지막으로 재설정된 상기 변수 P1을 스칼라 곱 Q로서 출력하는 단계를 구비하는 것을 특징으로 하는 암호화 방법. And if the iteration variable i is not less than zero, proceeding to receiving the check value CHECK and if the iteration variable i is less than zero, outputting the last reset variable P1 as a scalar product Q. An encryption method characterized by the above-mentioned. 제 1 항의 방법에 구비된 단계들을 수행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 매체. A computer readable medium having recorded thereon a program for performing the steps provided in the method of claim 1. 제 11 항의 매체를 이용한 암호화 장치. An encryption device using the medium of claim 11.
KR1020060020721A 2006-03-04 2006-03-04 Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion KR20070091063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060020721A KR20070091063A (en) 2006-03-04 2006-03-04 Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060020721A KR20070091063A (en) 2006-03-04 2006-03-04 Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion

Publications (1)

Publication Number Publication Date
KR20070091063A true KR20070091063A (en) 2007-09-07

Family

ID=38689127

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060020721A KR20070091063A (en) 2006-03-04 2006-03-04 Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion

Country Status (1)

Country Link
KR (1) KR20070091063A (en)

Similar Documents

Publication Publication Date Title
KR100850202B1 (en) Cryptographic method for countering DFA using ECC fast Montgomery power ladder algorithm
CA2792787C (en) System and method for protecting cryptographic assets from a white-box attack
US7853013B2 (en) Cryptographic method and system for encrypting input data
US8290149B2 (en) Method of obscuring cryptographic computations
Shoufan et al. A timing attack against Patterson algorithm in the McEliece PKC
US20080260143A1 (en) Xz-elliptic curve cryptography with secret key embedding
US8495373B2 (en) Method of generating a cryptographic key, network and computer program therefor
US20100166175A1 (en) Cryptographic hash functions using elliptic polynomial cryptography
KR100652377B1 (en) A modular exponentiation algorithm, a record device including the algorithm and a system using the algorithm
KR100874909B1 (en) Encryption Method Using Montgomery Power Ladder Algorithm Against DFA
US20100329447A1 (en) Encryption apparatus, decryption apparatus, key generation apparatus, and program
US9590805B1 (en) Ladder-based cryptographic techniques using pre-computed points
US20120275593A1 (en) Apparatus for performing a fault detection operation and method thereof
KR100817048B1 (en) Method and apparatus of Different Faults AnalysisDFA countermeasure based on different point representation for Elliptic Curve CryptographyECC
KR20080012633A (en) Method and apparatus of adding points in prime finite field for implementation of fault detecting operation used in fast montgomery power ladder algorithm
Frunza et al. Improved RSA encryption algorithm for increased security of wireless networks
US20140270155A1 (en) Method and a device for fault-resistant exponentiation in cryptographic systems
Nykolaychuk et al. Residue Number System Asymmetric Cryptoalgorithms
CN109450625B (en) Safe outsourcing method of large-scale polynomial expansion Euclidean algorithm
Khachatrian et al. Permutation polynomials and a new public-key encryption
KR20070091063A (en) Cryptographic method and appratus for countering dfa in scalar multiplication using fault diffusion
Ravikumar et al. Secure multiparty electronic payments using ECC algorithm: A comparative study
KR20070049823A (en) Operation methods for modular exponentiation and scalar multiplication stable for power attack
KR20090093141A (en) Method and Apparatus of digital signature using bit arithmetic based on CRT-RSA and Recording medium using by the same
WO2004070681A2 (en) Elliptic curve scalar multiple calculation method and device

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination