KR100937869B1 - SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method - Google Patents

SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method Download PDF

Info

Publication number
KR100937869B1
KR100937869B1 KR1020070106211A KR20070106211A KR100937869B1 KR 100937869 B1 KR100937869 B1 KR 100937869B1 KR 1020070106211 A KR1020070106211 A KR 1020070106211A KR 20070106211 A KR20070106211 A KR 20070106211A KR 100937869 B1 KR100937869 B1 KR 100937869B1
Authority
KR
South Korea
Prior art keywords
value
recording
exponential
secret key
bit
Prior art date
Application number
KR1020070106211A
Other languages
Korean (ko)
Other versions
KR20080052364A (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 한국전자통신연구원
Publication of KR20080052364A publication Critical patent/KR20080052364A/en
Application granted granted Critical
Publication of KR100937869B1 publication Critical patent/KR100937869B1/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/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation

Abstract

고정된 연산 패턴을 지원하는 비밀키에 대한 부호 없는 리코딩 과정과 지수승 과정을 하나로 통합하여 리코딩 된 결과를 따로 저장하지 않고도, 단순전력분석에 안전한 Left-to-Right 리코딩을 이용한 지수승 방법이 개시되어 있다. 이진법으로 표현된 비밀키 k를 {1,2}를 이용해 Left-to-Right 방향으로 리코딩한다. 상기 리코딩 단계를 활용하여, 주어진 비밀키 k와 밑 g에 대한 지수승 gk를 계산하는 과정에서, 상기 리코딩 단계와 지수승 과정을 분리해서 처리하지 아니하고 Left-to-Right 방향으로 리코딩과정을 동시에 수행하여 지수승 결과 값을 산출한다.The exponential multiplication method using left-to-right recording, which is safe for simple power analysis, is started without integrating the unsigned recording process and exponential multiplication process for a secret key supporting a fixed operation pattern without storing the recorded results separately. It is. The binary secret key k is recorded in the left-to-right direction using {1,2}. In the process of calculating the exponential power g k for a given secret key k and the base g by using the recording step, the recording process is performed simultaneously in the left-to-right direction without separately processing the recording step and the exponential power process. To calculate the exponential result.

Left-to-Right 리코딩, 지수승 방법 Left-to-right recording, exponential method

Description

단순전력분석에 안전한 Unsigned Left-to-Right 리코딩 방법 및 통합된 지수승 알고리즘 방법{SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method}SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method for Simple Power Analysis

본 발명은 RSA 암호시스템 및 전자서명 DSA에 관한 것으로, 더욱 상세하게는 이진법으로 표현된 비밀키를 부채널 공격에 안전한 고정된 패턴의 연산이 수행되도록 리코딩하는 방법들과 이 방법을 지수승 알고리즘에 적용할 경우 리코딩 과정과 스칼라 곱셈 과정을 동시에 수행하는 Left-to-Right 지수승 방법에 관한 것이다. The present invention relates to an RSA cryptosystem and a digital signature DSA, and more particularly, to a method of recording a secret key represented by a binary method so that a fixed pattern of operations that are secure against side channel attacks is performed and the method is applied to an exponential multiplication algorithm. When applied, it relates to the Left-to-Right exponential method that simultaneously performs the recording process and the scalar multiplication process.

본 발명은 정보통신부 및 정보통신연구진흥원의 IT차세대핵심기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2005-S-088-02, 과제명: 안전한 RFID/USN을 위한 정보보호 기술 개발].The present invention is derived from a study conducted as part of the next generation core technology development project of the Ministry of Information and Communication and the Ministry of Information and Communication Research and Development. [Task Management Number: 2005-S-088-02, Title: Information for Secure RFID / USN] Protection technology development].

대표적인 공개키 암호 시스템과 응용 프로토콜은 RSA와 전자서명 DSA이다. 이 두 시스템에서 비밀키가 사용되어서 이루어지는 공통적인 연산은 지수승 연산으로 키 k와 밑 g에 대해 gk를 계산하는 것이다. 대표적인 지수승 알고리즘은 다음과 같다. Representative public key cryptosystems and application protocols are RSA and digital signature DSA. A common operation that involves the use of secret keys in these two systems is the exponential power operation, which computes g k for the key k and the base g. Representative exponential power algorithms are as follows.

이진 Left-to-Right 방법 Binary Left-to-Right Method 입력:

Figure 112007075413292-pat00001
출력: gk input:
Figure 112007075413292-pat00001
Output: g k 1. Q[0] ← g. 2. For i = n-2 to 0 by -1 do: 2.1 Q[0] = (Q[0])2. 2.2 if ki = 1 then Q[0]= Q[0]ㆍg. 3. Return Q[0].1. Q [0] ← g. For i = n-2 to 0 by -1 do: 2.1 Q [0] = (Q [0]) If k i = 1 then Q [0] = Q [0] .g. 3. Return Q [0].

이진 Right-to-Left 방법 Binary Right-to-Left Method 입력:

Figure 112007075413292-pat00002
출력 gk input:
Figure 112007075413292-pat00002
Output g k 1. Q[0] ← g, Q[1] ← 1. 2. For i = 0 to n-1 by 1 do: 2.1 if ki = 1 then Q[1] ← Q[0]ㆍ Q[1] 2.2 Q[0] ← (Q[0])2. 3. Return Q[1].1. Q [0] ← g, Q [1] ← 1. 2. For i = 0 to n-1 by 1 do: 2.1 if k i = 1 then Q [1] ← Q [0] · Q [1 2.2 Q [0] ← (Q [0]) 2. 3. Return Q [1].

계산 능력이나 메모리 같은 자원이 제한된 환경(예를 들면, 스마트 카드, 모바일 폰, 센서 노드)에서 지수승 연산을 구현하기 위해서 효율성을 증대시키기 위한 많은 방법들이 제안되었다. 그러나 이러한 제한된 환경에서 암호 알고리즘을 구동하는 장비에서 발생되는 다양한 부가정보를 활용해 내부에 숨겨진 비밀 정보를 알아내는 부채널 공격(Side Channel Attacks)이 가능하다. 부채널 공격 중 전력분석 공격은 크게 단순전력분석 (SPA)과 차분전력분석(DPA)으로 구분되며, SPA는 전력소모량의 통계적인 분석 없이 전력소모량으로부터 직접적으로 비밀 정보를 찾아낼 수 있기 때문에 간단하면서도 쉬운 공격이다. DPA는 여러 개의 전력 소모량의 표본으로부터 비밀 정보와 전력 소모량의 상관관계를 찾기 때문에 SPA에 안전하게 만들어진 암호 시스템의 공격에도 사용할 수 있다. 비밀키가 사용되는 환경에 따라서는, 예를 들어 DPA의 경우, SPA에만 안전하게 대응방법이 고려되어 지면된다. 그리고 DPA 까지 고려해야 하는 환경에서 만약 SPA에 대한 대응법을 고려하지 않는다면 DPA 대응법은 큰 의미를 갖지 못하게 된다. 따라서 비밀키가 적용되는 어떤 환경에 대해서도 SPA에 대한 대응법은 반드시 고려되어 져야 한다. Many methods have been proposed to increase the efficiency to implement exponential operations in environments with limited resources such as computing power or memory (eg smart cards, mobile phones, sensor nodes). However, in this limited environment, Side Channel Attacks can be used to find secret information hidden inside by utilizing various additional information generated by the equipment that runs the encryption algorithm. The power analysis attacks among the sub-channel attacks are divided into simple power analysis (SPA) and differential power analysis (DPA). SPA is simple because it can find secret information directly from power consumption without statistical analysis of power consumption. It's an easy attack. DPA finds a correlation between secret information and power consumption from multiple power consumption samples and can be used to attack cryptosystems built securely on SPA. Depending on the environment in which the private key is used, for example, in the case of DPA, only the SPA needs to be considered safe. And in an environment where DPA needs to be considered, DPA countermeasures don't have much meaning unless you consider how to respond to SPA. Therefore, for any environment where a private key applies, the response to SPA must be considered.

일반적으로 곱셈 연산과 제곱 연산을 계산할 때 소모되는 전력의 차이가 발생하고 이런 정보를 이용하여 지수승에서 사용된 키를 찾는 것이 가능하다. 앞에서 설명한 두개의 지수승 알고리즘 방법들도 비밀키 k의 각 비트 (또는 digit)에 의존하여 곱셈 연산이 선택적으로 수행되도록 하는 조건 분기 문이 포함되어 있다. 따라서 곱셈의 전력 소모량이 관찰되어지는 비트가 0인지 아닌지에 의존하여 다르게 나타나므로 SPA에 취약함을 알 수 있다. In general, there is a difference in the power consumed when calculating the multiplication and square operations, and it is possible to use this information to find the key used in the exponential power. The two exponential algorithm methods described above also include conditional branch statements that allow the multiplication operation to be selectively performed depending on each bit (or digit) of the secret key k. Therefore, the power consumption of the multiplication is different depending on whether the observed bit is 0 or not, so it is vulnerable to SPA.

SPA의 대응 방법 중 스칼라를 새로운 표현 방법으로 리코딩하여, 일정한 연산 패턴이 나타나도록 하는 방법이 있다. 예를 들어, 타원곡선 암호시스템에서는 고정된 연산패턴을 만들어 내기 위하여 부호가 있는 리코딩 기법을 도입한다. 즉, 이진수로 표현된 비밀키를 1,-1만을 이용해 표현하면, 항상 타원곡선 위의 점에 대한 두배하는 연산과 더하기 연산 또는 빼기 연산이 고정적으로 일어난다. 이때, 타원곡선 위에서의 연산의 특성상, 더하기 연산과 빼기 연산은 거의 구분이 불가능 할 정도의 연산 차이가 있기 때문에 SPA 공격에 안전하게 된다. 하지만, RSA 와 DSA 와 같은 환경에서는 역원 계산이 많은 연산을 요구하는 함수이기 때문에 타원곡선 암호에서 사용되었던 부호있는 리코딩기법을 SPA 대응법으로 활용하기 힘들다. 따라서, RSA와 DSA 와 같은 환경에서는 고정된 연산 패턴을 만들어 내는 부호없는 리코딩 기법이 필요하다. Among the corresponding methods of the SPA, there is a method of recording a scalar with a new expression method so that a certain operation pattern appears. For example, an elliptic curve cryptographic system introduces a signed recording technique to produce a fixed operation pattern. In other words, when a secret key represented by a binary number is expressed using only 1 and -1, a double operation and an addition operation or a subtraction operation on a point on an elliptic curve always occur. At this time, the addition operation and the subtraction operation are almost indistinguishable from each other due to the characteristics of the operation on the elliptic curve. However, in an environment such as RSA and DSA, it is difficult to use signed recording techniques used in elliptic curve cryptography as SPA counterparts because inverse calculations require many operations. Therefore, in an environment such as RSA and DSA, an unsigned recording technique that generates a fixed operation pattern is required.

최근에 SPA의 대응 방법으로 Vuillaume-Okeya이 리코딩 방법을 제안하였다. 이 방법은 역원 연산의 비용이 큰 RSA와 DSA 같은 시스템에서 효율적으로 구성 될 수 있게 부호가 없는 스칼라로 변형하는 리코딩 방법이다. 이 방법은 Moller가 제안한 리코딩 방법을 부호가 없는 방법으로 확장하여 윈도우 크기가 w일 경우 부호가 없는 디짓 셋(digit set)인 1,2,…,2w를 이용해 비밀키를 표현하는 것이다. 이 방법은 리코딩 된 값의 비트 길이가 고정적이지 않아서 부가적인 정보가 유출되는 등 여러 가지 단점이 있지만 가장 중요한 단점은 Right-to-Left 방향으로 리코딩이 된다는 것이다. Recently, Vuillaume-Okeya proposed a recording method as a countermeasure of SPA. This method is a recording method that transforms to an unsigned scalar so that it can be efficiently configured in systems such as RSA and DSA, which are expensive in inverse operations. This method extends Moller's proposed recording method to an unsigned method, so that when the window size is w, an unsigned digit set 1,2,... , 2 w to represent the secret key. This method has a number of disadvantages, such as additional information being leaked because the bit length of the recorded value is not fixed, but the most important disadvantage is that it is recorded in the right-to-left direction.

지수승 알고리즘은 스칼라를 최상위 비트(Left-to-Right)부터 스캔하면서 계산하는 방법도 있지만, 최하위 비트(Right-to-Left)부터 스캔하면서 계산하는 방법도 가능하다. 그러나 메모리 같은 자원이 제한된 환경에서는 Right-to-Left 리코딩 방법보다 Left-to-Right 리코딩 방법을 선호하게 된다. 예를 들어, Left-to-Right 지수승 연산이 Right-to-Left 지수승 연산보다 레지스터 개수가 적다는 장점이 있다. 그러므로 Right-to-Left 리코딩 방법을 사용할 경우 Left-to-Right 방향 지수승 연산되는 방법에 적용하기 위해서는 리코딩이 먼저 선행된 후에 스칼라 곱셈이 실행될 수밖에 없다. 바꾸어 말하면, 리코딩 된 값을 저장할 추가 공간이 (즉, O(n)-size RAM) 필요하다는 것이다. 여기서 n은 키의 비트 길이이다. 하지만, 리코딩이 좌-투-우 방향으로 이루어진다면, 리코딩된 결과 값을 따로 저장하지 않고도 리코딩 알고리즘과 지수승 알고리즘이 하나로 통합될 수 있어서 효율적인 지수승 알고리즘을 얻게 된다. 따라서 Left-to-Right 리코딩을 설계하는 것은 메모리 제약을 받는 다양한 환경에 적합하게 구성될 수 있다.Exponential multiplication algorithms calculate scalars by scanning from the leftmost bit (left-to-right), but can also compute by scanning from the least significant bit (right-to-left). However, in resource-constrained environments such as memory, left-to-right recording is preferred over right-to-left recording. For example, left-to-right exponential operations have the advantage of having fewer registers than right-to-left exponential operations. Therefore, when using the Right-to-Left recording method, scalar multiplication is inevitably performed after the recording is preceded in order to apply to the left-to-right exponential power calculation. In other words, you need extra space to store the recorded value (ie O (n) -size RAM). Where n is the bit length of the key. However, if the recording is done in the left-to-right direction, the recording algorithm and the exponential power algorithm can be integrated into one without storing the recorded result value separately, thereby obtaining an efficient exponential power algorithm. Therefore, designing left-to-right recording can be configured for a variety of memory-constrained environments.

본 발명은 이와 같이 종래의 제품의 문제점을 해결하기 위한 것으로, 그 목적은 고정된 연산 패턴을 지원하는 비밀키에 대한 부호 없는 리코딩 과정과 지수승 과정을 하나로 통합하여 리코딩 된 결과를 따로 저장하지 않고도, 단순전력분석에 안전한 Left-to-Right 리코딩을 이용한 지수승 방법을 제공함에 있다.The present invention is to solve the problems of the conventional product as described above, the object of which is to integrate the unsigned recording process and the exponential multiplication process for the secret key supporting a fixed operation pattern into one without storing the recorded results separately In addition, it provides an exponential power method using Left-to-Right recording that is safe for simple power analysis.

상기 목적을 달성하기 위하여, 본 발명에 따른 Left-to-Right 리코딩을 이용한 지수승 방법(i) 이진법으로 표현된 비밀키 k를 {1,2}를 이용해 Left-to-Right 방향으로 리코딩하는 단계; 및 (ii) 상기 리코딩 단계를 활용하여, 주어진 비밀키 k와 밑 g에 대한 지수승 gk를 계산하는 과정에서, 상기 리코딩 단계와 지수승 과정을 분리해서 처리하지 아니하고 Left-to-Right 방향으로 상기 리코딩 단계를 동시에 수행하여 지수승 결과 값을 산출하는 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, an exponential power method using Left-to-Right recording according to the present invention (i) recording the secret key k expressed in binary in the Left-to-Right direction using {1,2} ; And (ii) calculating the exponential power g k for a given secret key k and the base g by using the recording step, in the left-to-right direction without separately processing the recording step and the exponential power process. And calculating the exponential power result by simultaneously performing the recording step.

바람직하게는, 단계 (i)는 (i-1) kn+1 = 1, kn = 0을 만족하는 (n+2)-비트 비밀키 k를 입력하는 단계; (i-2) 입력된 (n+2)-비트 정보에서 kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입하고, j값에는 n을 대입하는 단계; (i-3) 상기 인덱스 값 j와 kj의 값에 따라서, ej를 1 또는 2에 설정하는 단계; (i-4) 상기 j 값을 j-1로 갱신하고 상기 j값을 하나씩 차감하는 단계; (i-5) 상기 j값이 0보다 작은 지를 판단하는 단계; (i-6) 상기 j값이 -1이 될 때까지 단계 (i-3) 내지 (i-4)를 반복 수행하는 단계; (i-7) 상기 j값이 -1이 되면, (en,…,e1,e0)를 출력하는 단계를 포함한다. 더욱 바람직하게는, 단계 (ii)는 (ii-1) (n+2)-비트 비밀키 k, (1,0,kn-1,…,k0)2, 와 밑 g값을 입력받는 단계; (ii-2) g[1] = g, g[2] = g2, 그리고 c = g대입하고, kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입하는 단계; (ii-3) j값에는 n를 대입하고, c 에 c2값을 대입하는 단계; (ii-4) 인덱스 j와 kj 의 값에 따라서, c*g[1] 또는 c*g[2]을 c에 갱신하는 단계; (ii-5) 상기 j 값을 j-1로 갱신하여 j값을 하나씩 차감하는 단계; (ii-6) 상기 j값이 0보다 작은 지를 판단하는 단계; (ii-7) 상기 j값이 -1이 될 때까지 단계 (ii-4) 내지 (ii-6)를 반복 수행하는 단계; (ii-8) 상기 j값이 -1이 되면, c = gk를 출력하는 단계를 포함한다. Preferably, step (i) comprises (i-1) inputting an (n + 2) -bit secret key k that satisfies k n + 1 = 1, k n = 0; (i-2) substituting for z the index value of the least significant bit that satisfies k z = 0 in the input (n + 2) -bit information and substituting n for the j value; (i-3) setting e j to 1 or 2 according to the values of the index values j and k j ; (i-4) updating the j value to j-1 and subtracting the j value one by one; (i-5) determining whether j is less than 0; (i-6) repeating steps (i-3) to (i-4) until the j value becomes -1; (i-7) if the j value becomes -1, outputting (e n ,..., e 1 , e 0 ). More preferably, step (ii) receives the (ii-1) (n + 2) -bit secret key k, (1,0, k n-1 , ..., k 0 ) 2 , and the following g values. step; (ii-2) assigning g [1] = g, g [2] = g 2 , and c = g and assigning to z the index value of the least significant bit that satisfies k z = 0; (ii-3) substituting n for j and c 2 for c; (ii-4) updating c * g [1] or c * g [2] to c according to the values of the indexes j and k j ; (ii-5) updating the j value to j-1 to subtract j values one by one; (ii-6) determining whether j is less than 0; (ii-7) repeating steps (ii-4) to (ii-6) until the j value becomes -1; (ii-8) outputting c = g k when the j value becomes -1.

본 발명은 단순 전력 분석에 안전하면서, 비밀키의 리코딩과 지수승 연산을 동시에 수행할 수 있도록 설계된 방법으로 메모리의 제약을 받는 환경, 예를 들면 스마트 카드, 센서 노드, RFID 칩 등에 적합한 것으로, 메모리의 제약을 받는 환경에서 RSA 또는 DSA 암호 시스템을 부채널 공격에 안전하면서 메모리의 사용을 최대한 줄일 수 있다.The present invention is safe for simple power analysis and designed to simultaneously perform recording of a secret key and exponential power. It is suitable for memory-constrained environments, such as smart cards, sensor nodes, and RFID chips. In an environment constrained by the RSA or DSA cryptosystem, it is safe for side-channel attacks while minimizing memory usage.

이하, 첨부된 도면에 의하여 본 발명의 바람직한 실시 예를 상세하게 설명한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

먼저, 2진법으로 표현된 (n+2)-비트 비밀키 (1,0,kn-1,…,k0)2를 {1,2}의 원소를 이용해 (n+1)-비트로 Left-to-Right 리코딩하는 과정을 도 1을 참조하여 설명한다.First, the (n + 2) -bit secret key (1,0, k n-1 , ..., k 0 ) 2 expressed in binary form is left as (n + 1) -bit using the element of {1,2}. A process of -to-Right recording will be described with reference to FIG. 1.

임의의 n-비트로 표현된 비밀키 k = (kn-1,…,k1,k0)2 를 (1,0,kn-1,…,k0)2의 형태로 먼저 변환한다. RSA의 경우 비밀키 k 대신에 k+rΦ(N)을 이용한다. 이때 Φ는 오일러 파이(Phi) 함수이고 r은 랜덤 한 값, 그리고 N은 RSA에서 사용하는 모듈러 값인 두 소수의 곱이다. Φ(N)을 k에 더하는 과정을 반복하면 k < Φ(N) < 2N 이 성립하므로 n비트의 k의 경우 kn+1 = 1, kn = 0 을 항상 만족한다. 그리고 gk+rΦ(N) = gk mod N 이 성립하기 때문에 스칼라 길이가 확장된 스칼라를 이용하여 계산하더라도 기존의 값의 결과와 같게 된다. 본 발명에서는 이와 같은 방법으로 얻어진 (n+2)-비트 (1,0,kn-1,…,k0)2를 {1,2}의 원소를 이용해 (n+1)-비트로 Left-to-Right 리코딩하는 과정을 수행한다.The secret key k = (k n-1 ,..., K 1 , k 0 ) 2 , represented by arbitrary n-bits, is first converted into the form (1,0, k n-1 , ..., k 0 ) 2 . R + uses k + rΦ (N) instead of secret key k. Where Φ is Euler's Pi function, r is a random value, and N is a product of two prime numbers, a modular value used by RSA. Repeating the process of adding Φ (N) to k results in k <Φ (N) <2N, so k n + 1 = 1 and k n = 0 are always satisfied for n bits of k. And since g k + r Φ (N) = g k mod N, the scalar length is equal to the result of the existing value even when calculated using the scalar with the extended scalar length. In the present invention, the (n + 2) -bit (1,0, k n-1 ,..., K 0 ) 2 obtained by the above method is left- (n + 1) -bit using the element of {1,2}. Perform the process of to-Right recording.

도 1은 본 발명의 실시 예에 따른 (n+2)-비트 (1,0,kn-1,…,k0)2를 입력할 경우, 1,2의 원소를 이용해 (n+1)-비트로 Left-to-Right 리코딩하는 과정을 나타내는 흐름도이다. 본 발명의 중심되는 아이디어는 다음의 수학식 1로부터 도출되었다. 입력값의 가정에서 처럼, kn+1 = 0, kn = 0이다. 그리고, z 는 k 을 이진수로 표현했을 경우 kz = 0이 되는 최하위 비트의 인덱스 값으로 정의하자. 그럼, 다음과 같은 수학식 1을 얻을 수 있다.FIG. 1 illustrates the input of (n + 2) -bit (1,0, k n-1 , ..., k 0 ) 2 according to an embodiment of the present invention, using (1 + 1) This flowchart illustrates the process of left-to-right recording in -bit. The central idea of the present invention was derived from the following equation. As in the assumption of input values, k n + 1 = 0 and k n = 0. Then, define z as the index value of the least significant bit where k z = 0 when k is represented in binary. Then, the following Equation 1 can be obtained.

Figure 112007075413292-pat00003
Figure 112007075413292-pat00003

수학식 1에서 알 수 있듯이, (n+2)-비트로 표현된 이진수 표현을 1,2의 원소들을 가지고 (n+1)-비트로 표현이 가능함을 알 수 있다. As can be seen from Equation 1, it can be seen that the binary representation represented by (n + 2) -bits can be represented by (n + 1) -bits with elements of 1,2.

도 1을 참조하면, kn+1 = 1, kn = 0을 만족하는 (n+2)-비트 비밀키 k를 입력한다(단계 S110). 입력된 (n+2)-비트 정보에서 kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입한다(단계 S115). j값에는 n을 대입한다(S120). 단계 S125에서 j > z인 지의 여부를 판단한다. Referring to FIG. 1, a (n + 2) -bit secret key k that satisfies k n + 1 = 1 and k n = 0 is input (step S110). In the input (n + 2) -bit information, the index value of the least significant bit that satisfies k z = 0 is substituted into z (step S115). n is substituted into j (S120). In step S125, it is determined whether j> z.

단계 S125의 판단 결과 j > z인 경우, kj = 0인 지의 여부를 판단한다(단계 S130). 단계 S130의 판단 결과 kj = 0인 경우 ej = 1로 대입한다(S140). 즉 j > z이 고 kj = 0이면 ej = 1이다.If j> z as a result of the determination in step S125, it is determined whether k j = 0 (step S130). If k j = 0 as a result of the determination in step S130, it substitutes e j = 1 (S140). That is, if j> z and k j = 0, then e j = 1.

단계 S130의 판단에서 kj ≠ 0이면 ej = 2(단계 S145)가 되게 한다. 단계 S125의 판단 결과 j≤z인 경우, j = z인 지의 여부를 판단한다(단계 S135).In the determination of step S130, if k j ≠ 0, e j = 2 (step S145). If the result of the determination in step S125 is j≤z, it is determined whether j = z (step S135).

단계 S135의 판단 결과, j = z이면, ej = 2(단계 S150), 그렇지 않으면 ej = 1(S155)로 대입한다. 이어서, j를 j-1로 갱신하여 j값을 하나씩 차감하며(단계 S160), j값이 0보다 작은지를 판단한다(S165), j값이 -1이 될 때까지 단계 S125으로 회귀하여 루프를 반복한다. j값이 -1이 되면, (en,…,e1,e0) 를 출력한다(단계 S170). As a result of the determination in step S135, if j = z, e j = 2 (step S150), otherwise e j = 1 (S155). Subsequently, j is updated to j-1 to subtract j values one by one (step S160), and it is determined whether j value is less than zero (S165). The loop is returned to step S125 until j value becomes -1. Repeat. When j becomes -1, (e n , ..., e 1 , e 0 ) is output (step S170).

이하, 2진법으로 표현된 비밀키 k와 밑 g에 대한 지수승 gk의 계산을 리코딩 과정과 통합된 방식으로 Left-to-Right 방향으로 수행하는 알고리즘을 도 2를 참조하여 설명한다.Hereinafter, an algorithm for performing the calculation of the exponential power g k for the secret key k and the base g expressed in the binary method in the left-to-right direction in an integrated manner with the recording process will be described with reference to FIG. 2.

앞으로 살펴 볼 도면 2에서는 기존의 Left-to-Right 스칼라 곱셈 알고리즘과 도면 1에서 제안된 Left-to-Right 리코딩을 통합하여 동시에 수행하는 알고리즘을 설명한다. Figure 2, which will be described later, describes an algorithm that simultaneously performs the existing left-to-right scalar multiplication algorithm and the left-to-right recording proposed in FIG.

도 2 는 본 발명의 실시 예에 따른 이진법으로 표현된 비밀키 k와 밑 g 에 대한 지수승 gk의 계산을 리코딩 과정과 통합된 방식으로 Left-to-Right 방향으로 수행하는 알고리즘의 일 예를 나타내는 흐름도이다. 이 방법을 단순전력분석 공격에 안전한 통합된 이진법 Left-to-Right 지수승 알고리즘(SPA-resistant Unified binary Left-to-Right Exponentiation Algorithm)이라 한다. 2 is an example of an algorithm for performing calculation of an exponential power g k for a secret key k and a base g expressed in binary according to an embodiment of the present invention in a left-to-right direction in an integrated manner with a recording process. It is a flowchart showing. This method is called SPA-resistant Unified binary Left-to-Right Exponentiation Algorithm.

도 2를 참조하면, 스칼라 곱셈 알고리즘은 (n+2)-비트 비밀키 k, (1,0,kn-1,…,k0)2, 와 밑 g값을 입력 받는다(단계 S210). 사전 계산으로 g[1] = g, g[2] = g2, 그리고 c = g으로 대입하고, kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입한다(단계 S215). j값에는 n를 대입한다(단계 S220). c 에 c2값을 대입한다(단계 S225). Referring to FIG. 2, the scalar multiplication algorithm receives (n + 2) -bit secret key k, (1,0, k n-1 ,..., K 0 ) 2 , and the value of g (step S210). Substituting g [1] = g, g [2] = g 2 , and c = g by precomputation, and assigning to z the index value of the least significant bit that satisfies k z = 0 (step S215). n is substituted for j (step S220). The value c 2 is substituted into c (step S225).

단계 S230에서, j > z인 지의 여부를 판단한다. 단계 S230의 판단 결과 j > z인 경우, kj = 0인 지의 여부를 판단한다(단계 S235).In step S230, it is determined whether j> z. If j> z as a result of the determination in step S230, it is determined whether k j = 0 (step S235).

단계 S235의 판단 결과 kj = 0인 경우, 즉 j > z이고 kj = 0이면 c 에 c*g[1]을 대입하고(S245), 만약 kj ≠ 0이면 c*g[2]를 c 에 대입한다(S250). 단계 S230의 판단 결과 j≤z인 경우 j = z인 지를 판단한다(단계 S240).If k j = 0, i.e., j> z and k j = 0, c * g [1] is substituted into c (S245). If k j ≠ 0, c * g [2] is substituted. Substitute in c (S250). If the result of the determination in step S230 is j≤z, it is determined whether j = z (step S240).

단계 S240의 판단 결과, j = z이면, c*g[2]를 c 에 대입하고 (S225), 그렇지 않으면 c*g[1]를 c 에 대입한다(S260). As a result of the determination in step S240, if j = z, c * g [2] is substituted into c (S225), otherwise c * g [1] is substituted into c (S260).

이어서, j를 j-1로 갱신하여(S265) j값을 하나씩 차감하며, j값이 0보다 작은지를 판단한다(단계S270).Subsequently, j is updated to j-1 (S265) to subtract j values one by one, and it is determined whether j value is less than zero (step S270).

j값이 -1이 될 때까지 단계 S225으로 회귀하여 루프를 반복한다. j값이 -1이 되면, c를 출력한다(단계 S275). The loop returns to step S225 until the j value becomes -1. If the j value becomes -1, c is output (step S275).

도 1은 본 발명에 따른 2진법으로 표현된 (n+2)-bit 비밀키를 {1,2}의 원소를 이용해 (n+1)-bit으로 Left-to-Right 리코딩하는 과정을 나타내는 흐름도이다.1 is a flowchart illustrating a process of left-to-right recording a (n + 2) -bit secret key represented by a binary method according to the present invention to (n + 1) -bit using an element of {1,2}. to be.

도 2는 본 발명에 따른 2진법으로 표현된 비밀키 k와 밑 g에 대한 지수승 gk의 계산을 리코딩 과정과 통합된 방식으로 Left-to-Right 방향으로 수행하는 알고리즘의 일 예를 나타내는 흐름도이다.FIG. 2 is a flowchart illustrating an example of an algorithm for performing the calculation of the exponential power g k for the secret key k and the base g represented by the binary method in the left-to-right direction in an integrated manner with the recording process. to be.

Claims (8)

(i) 이진법으로 표현된 비밀키 k를 {1,2}를 이용해 Left-to-Right 방향으로 리코딩하는 리코딩단계; 및(i) a recording step of recording the secret key k expressed in binary form in a Left-to-Right direction using {1,2}; And (ii) 상기 리코딩 단계를 활용하여, 주어진 비밀키 k와 밑 g에 대한 지수승 gk를 계산하는 과정에서, 상기 리코딩 단계와 지수승 과정을 분리해서 처리하지 아니하고 Left-to-Right 방향으로 상기 리코딩 단계를 동시에 수행하여 지수승 결과 값을 산출하는 단계를 포함하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩 을 이용한 지수승 방법.(ii) in the process of calculating the exponential power g k for a given secret key k and the base g by using the recording step, the recording step and the exponential power process are not processed separately and the left-to-right direction is performed. An exponential power method using integrated left-to-right recording, comprising the step of simultaneously performing a recording step to calculate an exponential power value. 제1 항에 있어서, 상기 리코딩 단계는 (n+2)-비트의 (1, 0, kn-1, …, k0)2 형태의 2진수 비밀키 k를 {1, 2}를 이용하여 (n+1)-비트로 리코딩하는 단계인 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법. The method of claim 1, wherein the recording step comprises using a binary secret key k of the form (1, 0, k n-1 , ..., k 0 ) 2 of (n + 2) -bit using {1, 2}. An exponential power method using integrated Left-to-Right recording, characterized in that it is recording with (n + 1) -bit. 제1 항에 있어서, According to claim 1, 상기 (i) 단계는Step (i) is (i-1) kn+1 = 1, kn = 0을 만족하는 (n+2)-비트 비밀키 k를 입력하는 단계; (i-1) inputting an (n + 2) -bit secret key k that satisfies k n + 1 = 1, k n = 0; (i-2) 입력된 (n+2)-비트 정보에서 kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입하고, j값에는 n을 대입하는 단계;(i-2) substituting for z the index value of the least significant bit that satisfies k z = 0 in the input (n + 2) -bit information and substituting n for the j value; (i-3) 상기 z, j와 kj의 값에 따라서, ej를 1 또는 2로 설정하는 단계;(i-3) setting e j to 1 or 2 according to the values of z, j and k j ; (i-4) 상기 j를 j-1로 갱신하여 상기 j의 값을 하나씩 차감하는 단계;(i-4) updating j by j-1 to subtract the value of j one by one; (i-5) 상기 j값이 0보다 작은 지를 판단하는 단계;(i-5) determining whether j is less than 0; (i-6) 상기 j값이 -1이 될 때까지 상기 (i-3) 내지 (i-4) 단계를 반복 수행하는 단계; 및(i-6) repeating steps (i-3) to (i-4) until the j value becomes -1; And (i-7) 상기 j값이 -1이 되면, en부터 e0까지의 값들을 출력하는 단계를 포함하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법. (i-7) exponential multiplication method using integrated left-to-right recording, when j is -1, outputting values from e n to e 0 . 제3 항에 있어서, The method of claim 3, wherein 상기 (i-3) 단계는, Step (i-3), 상기 j 값이 상기 z 값보다 크고, 상기 kj 값이 0이면, 상기 ej 를 1로 설정하는 단계;Setting e j to 1 if the j value is greater than the z value and the k j value is 0; 상기 j 값이 상기 z 값보다 크고, 상기 kj 값이 0이 아니면, 상기 ej 를 2로 설정하는 단계;Setting e j to 2 if the j value is greater than the z value and the k j value is not zero; 상기 j 값이 상기 z 값과 동일하면, 상기 ej 를 2로 설정하는 단계; 및Setting e j to 2 if the j value is equal to the z value; And 상기 j 값이 상기 z 값보다 작으면, 상기 ej 를 1로 설정하는 단계를 포함하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법.If the j value is less than the z value, setting the e j to 1, exponential multiplication method using integrated left-to-right recording, characterized in that. 제1 항에 있어서, According to claim 1, 상기 (ii) 단계는 상기 이진법으로 표현된 비밀키 k와 밑 g 에 대한 지수승 gk의 계산을 리코딩 과정과 통합된 방식으로 Left-to-Right 방향으로 수행하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법.In the step (ii), the left-to-right integration is performed by calculating the exponential power g k for the secret key k and the base g expressed in the binary method in a manner integrated with the recording process. Exponential power method using Right recording. 제1 항에 있어서, According to claim 1, 상기 (ii) 단계는Step (ii) is (ii-1) (n+2)-비트 비밀키 k, (1,0,kn-1,…,k0)2, 와 밑 g값을 입력받는 단계;(ii-1) receiving a (n + 2) -bit secret key k, (1,0, k n-1, ..., k 0 ) 2 , and a value of g below; (ii-2) g[1]에 g를, g[2]에 g2를, 그리고 c에 g를 대입하고, kz = 0을 만족하는 최하위 비트의 인덱스 값을 z에 대입하는 단계;(ii-2) g to 2 g of g of [1], the g [2], and the step of substituting the g c and substitutes the index value of the least significant bits that satisfy the k z = 0 to z; (ii-3) j값에는 n를 대입하고, 상기 c를 c2로 갱신하는 단계;(ii-3) inserting n into the j value and updating c to c 2 ; (ii-4) 상기 z, j와 kj의 값에 따라서, 상기 c를 c*g[1] 또는 c*g[2]로 갱신하는 단계;(ii-4) updating c to c * g [1] or c * g [2] according to the values of z, j and k j ; (ii-5) 상기 j를 j-1로 갱신하여 상기 j의 값을 하나씩 차감하는 단계;(ii-5) updating j to j-1 to subtract the value of j one by one; (ii-6) 상기 j값이 0보다 작은 지를 판단하는 단계;(ii-6) determining whether j is less than 0; (ii-7) 상기 j값이 -1이 될 때까지 상기 (ii-4) 내지 (ii-6) 단계를 반복 수행하는 단계;(ii-7) repeating steps (ii-4) to (ii-6) until the j value becomes -1; (ii-8) 상기 j값이 -1이 되면, c = gk를 출력하는 단계를 포함하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법.(ii-8) when the j value is -1, outputting c = g k , wherein the exponential multiplication method using integrated left-to-right recording comprises: 제6 항에 있어서, The method of claim 6, 상기 (ii-4)단계는Step (ii-4) 상기 j 값이 상기 z 값보다 크고, 상기 kj 값이 0이면, 상기 c를 c*g[1]로 갱신하는 단계;Updating c to c * g [1] if the j value is greater than the z value and the k j value is 0; 상기 j 값이 상기 z 값보다 크고, 상기 kj 값이 0이 아니면, 상기 c를 c*g[2]로 갱신하는 단계;Updating c to c * g [2] if the j value is greater than the z value and the k j value is not zero; 상기 j 값이 상기 z 값과 동일하면 상기 c를 c*g[2]로 갱신하는 단계; 및Updating c to c * g [2] if the j value is equal to the z value; And 상기 j 값이 상기 z 값보다 작으면 상기 c를 c*g[1]로 갱신하는 단계를 포함하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법.And updating the c to c * g [1] if the j value is less than the z value. 제1 항에 있어서, According to claim 1, n-비트로 표현된 비밀키 k = (kn-1,…,k1,k0)2 를 (1,0,kn-1,…,k0)2의 형태로 변환하는 단계를 더 포함하는 것을 특징으로 하는 통합형 Left-to-Right 리코딩을 이용한 지수승 방법.converting the secret key k = (k n-1 , ..., k 1 , k 0 ) 2 represented by n-bit into the form (1,0, k n-1 , ..., k 0 ) 2 Exponential power method using integrated Left-to-Right recording, characterized in that.
KR1020070106211A 2006-12-05 2007-10-22 SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method KR100937869B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020060122606 2006-12-05
KR20060122606 2006-12-05

Publications (2)

Publication Number Publication Date
KR20080052364A KR20080052364A (en) 2008-06-11
KR100937869B1 true KR100937869B1 (en) 2010-01-21

Family

ID=39807185

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070106211A KR100937869B1 (en) 2006-12-05 2007-10-22 SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method

Country Status (1)

Country Link
KR (1) KR100937869B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030004925A (en) * 2001-07-07 2003-01-15 최준림 RSA cipher device using modular exponentiation algorithm
KR20050034238A (en) * 2003-10-09 2005-04-14 삼성전자주식회사 Security system using RSA algorithm and method thereof
KR20060013124A (en) * 2004-08-06 2006-02-09 삼성전자주식회사 A modular exponentiation algorithm, a record device including the algorithm and a system using the algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030004925A (en) * 2001-07-07 2003-01-15 최준림 RSA cipher device using modular exponentiation algorithm
KR20050034238A (en) * 2003-10-09 2005-04-14 삼성전자주식회사 Security system using RSA algorithm and method thereof
KR20060013124A (en) * 2004-08-06 2006-02-09 삼성전자주식회사 A modular exponentiation algorithm, a record device including the algorithm and a system using the algorithm

Also Published As

Publication number Publication date
KR20080052364A (en) 2008-06-11

Similar Documents

Publication Publication Date Title
CA2614120C (en) Elliptic curve point multiplication
EP1653428B1 (en) Elliptic curve encrypting device, elliptic curve encrypting method, elliptic curve encrypting program and computer-readable recording medium recording that program
JP4632950B2 (en) Tamper-resistant cryptographic processing using personal keys
EP3188001B1 (en) Modular multiplication device and method
EP2104031A2 (en) Data processing system and data processing method
KR100867989B1 (en) SPA-resistant Left-to-Right Recoding and Unified Scalar Multiplication Methods
KR20140046568A (en) Method for elliptic curve cryptography with countermeasures against simple power analysis and fault injection analysis and system thereof
EP1808762B1 (en) Encryption processing apparatus, encryption processing method, and computer program
EP2264939B1 (en) Encrypting method having countermeasure function against power analyzing attacks
JP5182364B2 (en) Cryptographic processing method with tamper resistance against side channel attack
WO2008106789A1 (en) Method and apparatus for generating a public key in a manner that counters power analysis attacks
US10374790B2 (en) Countermeasure method for an electronic component implementing an elliptic curve cryptography algorithm
JP5977996B2 (en) Modular power method and apparatus resistant to side channel attacks
WO2007080825A1 (en) Encryption processing device, encryption processing method, and computer program
WO2008106790A1 (en) Integer division in a manner that counters a power analysis attack
Lee et al. Countermeasures against power analysis attacks for the NTRU public key cryptosystem
KR20040067779A (en) Information processing means
Abarzúa et al. Survey on performance and security problems of countermeasures for passive side-channel attacks on ECC
JP2007187908A (en) Modular exponentiation calculation device and method having tolerance to side-channel attack
KR100937869B1 (en) SPA-resistant Unsigned Left-to-Right Recoding and Unified Exponentiation Method
Leadbitter et al. Attacking DSA under a repeated bits assumption
KR101548174B1 (en) Method for calculating negative inverse of modulus
KR101423947B1 (en) Modular multiplication and modular exponentiation using extended NIST prime
Schinianakis et al. RNS-Based Public-Key Cryptography (RSA and ECC)
JP2010008883A (en) Arithmetic device for cipher, arithmetic method for cipher, and program

Legal Events

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

Payment date: 20121206

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20130730

Year of fee payment: 18