KR20230103271A - Masking method on block cipher PIPO to resist side channel attacks - Google Patents
Masking method on block cipher PIPO to resist side channel attacks Download PDFInfo
- Publication number
- KR20230103271A KR20230103271A KR1020210194041A KR20210194041A KR20230103271A KR 20230103271 A KR20230103271 A KR 20230103271A KR 1020210194041 A KR1020210194041 A KR 1020210194041A KR 20210194041 A KR20210194041 A KR 20210194041A KR 20230103271 A KR20230103271 A KR 20230103271A
- Authority
- KR
- South Korea
- Prior art keywords
- pipo
- masking
- value
- mask
- mask value
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 74
- 230000000873 masking effect Effects 0.000 title claims abstract description 52
- 101800000089 Movement protein P3N-PIPO Proteins 0.000 title claims abstract 16
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 11
- 230000002087 whitening effect Effects 0.000 description 4
- 229910052709 silver Inorganic materials 0.000 description 3
- 239000004332 silver Substances 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
- H04L9/003—Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/04—Masking or blinding
- H04L2209/046—Masking or blinding of operations, operands or results of the operations
Abstract
본 발명은 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법에 관한 것으로서, 더욱 상세하게는 테이블을 이용하지 않고, 선형 및 비선형 연산 값에 대해 직접 마스킹 연산을 적용하는 PIPO 암호 알고리즘 마스킹 방법에 관한 것이다.
본 발명에 의하면, 입력되는 평문에 마스킹을 적용한 후 중간 계산 과정에서도 마스크 값을 제거하지 않은 상태에서 암호화 과정을 마치고 최종적으로 마스크를 제거함으로써 부채널 공격을 효과적으로 막을 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공한다. 나아가, 암호화시 입력되는 평문에 랜덤한 마스크 값을 적용하여 계산 중간 값을 예측할 수 없도록 함으로써 CPA와 같은 부채널 공격을 방어할 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공한다.The present invention relates to a PIPO cryptographic algorithm masking method corresponding to a side-channel attack, and more particularly, to a PIPO cryptographic algorithm masking method in which a masking operation is directly applied to linear and nonlinear calculation values without using a table.
According to the present invention, after applying masking to the input plaintext, the encryption process is completed without removing the mask value even in the intermediate calculation process, and the mask is finally removed. Provides a PIPO encryption algorithm masking method that can effectively prevent side-channel attacks do. Furthermore, a PIPO encryption algorithm masking method capable of defending against side-channel attacks such as CPA is provided by applying a random mask value to input plaintext during encryption so that the calculation intermediate value cannot be predicted.
Description
본 발명은 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법에 관한 것으로서, 더욱 상세하게는 테이블을 이용하지 않고, 선형 및 비선형 연산 값에 대해 직접 마스킹 연산을 적용하는 PIPO 암호 알고리즘 마스킹 방법에 관한 것이다.The present invention relates to a PIPO cryptographic algorithm masking method corresponding to a side-channel attack, and more particularly, to a PIPO cryptographic algorithm masking method in which a masking operation is directly applied to linear and nonlinear calculation values without using a table.
도 1은 PIPO의 구조 및 처리 단위를 도시한 도면이고, 도 2는 키 예측 단위와 전력 누설 단위를 도시한 도면이다.1 is a diagram showing the structure and processing unit of PIPO, and FIG. 2 is a diagram showing a key prediction unit and a power leakage unit.
PIPO(Plug-In Plug-Out)는 IoT 환경 등을 고려하여 효율적인 마스킹을 적용할 수 있는 경량 블록 암호 알고리즘이다. PIPO는 8바이트(64비트) 블록 사이즈와 128비트(혹은 256비트) 키 사이즈를 사용한다.PIPO (Plug-In Plug-Out) is a lightweight block cipher algorithm that can apply efficient masking in consideration of the IoT environment. PIPO uses an 8-byte (64-bit) block size and a 128-bit (or 256-bit) key size.
PIPO는 128비트 키를 가질 경우는 13라운드로 구성되며 256비트 키를 가질 경우는 17라운드로 구성된다. 각 라운드는 비선형 연산층인 S-layer와 선형 연산층인 P-layer 그리고 라운드 키를 이용한 Key-XOR 연산으로 구성된다.PIPO consists of 13 rounds for a 128-bit key and 17 rounds for a 256-bit key. Each round consists of S-layer, a nonlinear operation layer, P-layer, a linear operation layer, and Key-XOR operation using a round key.
S-layer에는 비선형 연산인 논리적 AND(∧)와 OR(∨) 그리고 선형 연산인 XOR() 연산들로 구성되어 있다. PIPO 블록 암호 알고리즘은 S-layer를 구현하는 형태에 따라 TLU(Table Look Up) 방식과 BS(Bit Slice) 방식으로 설계된다.The S-layer includes logical AND (∧) and OR (∨), which are non-linear operations, and XOR (, which is a linear operation). ) consists of operations. The PIPO block cipher algorithm is designed in the TLU (Table Look Up) method and BS (Bit Slice) method according to the form of implementing the S-layer.
TLU 버전은 SBox 연산 결과를 사전 연산 테이블(배열)로 만들어 놓은 후, 이를 참조하는 형태로 S-layer 연산을 수행하나, BS 방식은 비트 연산들(AND, OR, XOR)로 S-layer 연산을 직접 수행한다. 암·복호화 과정에서 중간 연산 값들은 8x8 크기의 비트로 구성된 상태 배열로 두고 연산을 수행한다.The TLU version makes the SBox operation result into a pre-operation table (array) and then performs S-layer operation by referencing it, but the BS method performs S-layer operation with bit operations (AND, OR, XOR). do it yourself In the encryption/decryption process, intermediate operation values are placed in a state array composed of 8x8 bits and operations are performed.
BS 방식을 구현할 경우에는 내부 상태의 각 변수 값을 행(row)단위로 저장하고 처리한다. 입력되는 평문과 처음 XOR()연산을 하는 화이트닝 키(Whitening Key, WK)와 각 라운드에서 사용되는 라운드 키(Round Key, RK)는 마스터 비밀 키의 일부로 구성되며 라운드 키의 일부 바이트는 라운드 상수(RCON)와 XOR 되어 있다. 이때, 인접한 2개 라운드 키를 찾으면 마스터 키를 복구할 수 있다.In the case of implementing the BS method, each variable value of the internal state is stored and processed in units of rows. The input plaintext and the first XOR ( ) operation, the Whitening Key (WK) and the Round Key (RK) used in each round are composed of a part of the master secret key, and some bytes of the round key are XORed with the round constant (RCON). At this time, if two adjacent round keys are found, the master key can be recovered.
부채널 분석 공격은 비밀 키(실제는 화이트닝 키나 라운드 키)를 가정한 상태에서 암호 알고리즘 중간에 발생하는 연산 값을 예측하고, 측정한 부채널 정보와의 상관 관계를 이용하여 추측한 비밀 키가 맞는지를 확인하여 비밀 키를 복구하는 공격이다. 부채널 공격 중 암호화 연산 과정에서 측정된 전력 소비량을 사용하는 공격을 전력 분석 공격이라고 한다. 암호의 중간 연산 값을 계산하기 위해서는, 앞선 라운드의 모든 라운드 키를 알고 있어야 하므로 암호화 과정에서 0라운드 키(화이트닝 키)를 찾고, 이를 바탕으로 1라운드 키 순서대로 찾아 공격한다.The side-channel analysis attack predicts the operation value that occurs in the middle of the encryption algorithm under the assumption of a secret key (actually a whitening key or round key), and uses the correlation with the measured side-channel information to determine whether the guessed secret key is correct. It is an attack to recover the secret key by verifying. Among side-channel attacks, an attack that uses power consumption measured in the process of encryption operation is called a power analysis attack. In order to calculate the intermediate operation value of the cipher, all round keys of the previous round must be known, so the 0 round key (whitening key) is found in the encryption process, and based on this, the 1 round key sequence is found and attacked.
BS 버전에 대한 전력 분석 공격을 수행할 경우 상태 행렬에서 연산이 열 (Column)단위의 비트 연산으로 각 행의 값을 이루는 비트는 서로 독립적이다. 열 단위 각 비트별 연산은 독립적이므로 8개의 비트를 묶어 한번에 행 단위의 바이트 단위로 처리하므로 전력은 행 단위로 사용되어 누설된다.When performing a power analysis attack on the BS version, the operation in the state matrix is a bit operation in column units, and the bits constituting the value of each row are independent of each other. Since each bit-by-column operation is independent, 8 bits are bundled and processed in units of bytes per row at a time, so power is used and leaked in units of rows.
PIPO의 BS 형태의 구현에서는 행 단위의 한 비트씩 비밀 키를 가정하고 누설 전력과의 상관도를 조사하여 상관도가 제일 높은 한 비트을 찾는 CPA(Correlation Power Analysis) 공격 방식으로 8바이트(64비트) 비밀 키를 모두 복구할 수 있다. 전력 분석 공격을 이용하여 화이트닝 키와 1라운드 키를 복구한 후 최종적으로 128비트 마스터 키를 CPA를 통해 복구함을 실험적으로 확인할 수 있다.In the BS-type implementation of PIPO, 8 bytes (64 bits) is used as a CPA (Correlation Power Analysis) attack method to find a bit with the highest correlation by assuming a secret key by one bit per row and examining the correlation with leakage power. All secret keys can be recovered. After recovering the whitening key and the first round key using a power analysis attack, it can be experimentally confirmed that the 128-bit master key is finally recovered through CPA.
본 발명은 이와 같은 문제점을 해결하기 위해 창안된 것으로서, 입력되는 평문에 마스킹을 적용한 후 중간 계산 과정에서도 마스크 값을 제거하지 않은 상태에서 암호화 과정을 마치고 최종적으로 마스크를 제거함으로써 부채널 공격을 효과적으로 막을 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공하는데 그 목적이 있다.The present invention was devised to solve this problem, and after applying masking to the input plaintext, the mask value is not removed even in the intermediate calculation process, and the encryption process is completed and the mask is finally removed, thereby effectively preventing side-channel attacks. The purpose is to provide a PIPO encryption algorithm masking method that can be used.
즉, 암호화시 입력되는 평문에 랜덤한 마스크 값을 적용하여 계산 중간 값을 예측할 수 없도록 함으로써 CPA와 같은 부채널 공격을 방어할 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공하는데 목적이 있다.That is, an object of the present invention is to provide a PIPO encryption algorithm masking method capable of defending against side-channel attacks such as CPA by applying a random mask value to an input plaintext during encryption so that a calculated median value cannot be predicted.
이와 같은 목적을 달성하기 위하여 본 발명에 따른 PIPO 암호 알고리즘 마스킹 시스템이, 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹을 수행하는 방법은, (a) 평문을 입력받는 단계; (b) 평문에 마스크(mask) 값을 적용하는 단계; (c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및, (d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계를 포함한다.In order to achieve the above object, the PIPO encryption algorithm masking system according to the present invention performs the PIPO encryption algorithm masking corresponding to the side-channel attack, including: (a) receiving plain text; (b) applying a mask value to the plain text; (c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and (d) separately storing a resultant value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying them to the next operation of the encryption process.
상기 마스크 값의 적용은, XOR(exclusive OR) 연산을 사용할 수 있다.To apply the mask value, exclusive OR (XOR) operation may be used.
상기 단계(c)의 이항 논리 연산은, AND 연산, OR 연산 및 XOR 연산 중 어느 하나일 수 있다.The binary logic operation of step (c) may be any one of an AND operation, an OR operation, and an XOR operation.
상기 새로운 마스크 값을 계산하는 수식은, 카르노 맵(Karnaugh map)을 이용하여 생성할 수 있다.An equation for calculating the new mask value may be generated using a Karnaugh map.
상기 새로운 마스크 값과 새로운 랜덤 수를 XOR 연산하고, 마스크가 적용된 중간값끼리 이항 논리 연산한 값에도 상기 동일한 랜덤 수를 XOR 연산시킴으로써, 마스크 값이 가지는 0과 1의 개수가 동일하게 할 수 있다.The number of 0's and 1's of the mask value can be the same by XOR'ing the new mask value and the new random number and XOR'ing the same random number to the value obtained by performing the binary logic operation of the intermediate values to which the mask is applied.
상기 단계(d) 이후, (e) 암호화 과정의 모든 연산을 마친 후 최종 생성된 마스크를 제거하는 단계를 더 포함할 수 있다.After the step (d), (e) may further include removing a mask finally generated after all operations of the encryption process are completed.
본 발명의 다른 측면에 따르면, 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹을 수행하기 위한 컴퓨터 프로그램은, 비일시적 저장 매체에 저장되며, 프로세서에 의하여, (a) 평문을 입력받는 단계; (b) 평문에 마스크(mask) 값을 적용하는 단계; (c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및, (d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계가 실행되도록 하는 명령을 포함한다.According to another aspect of the present invention, a computer program for performing masking of a PIPO cryptographic algorithm corresponding to a side-channel attack is stored in a non-transitory storage medium and includes, by a processor, (a) receiving plain text; (b) applying a mask value to the plain text; (c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and (d) a command for performing a step of separately storing a resultant value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying the resultant value to the next operation in the encryption process.
본 발명의 또 다른 측면에 따르면, 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹을 수행하기 위한 시스템은, 적어도 하나의 프로세서; 및 컴퓨터로 실행가능한 명령을 저장하는 적어도 하나의 메모리를 포함하되, 상기 적어도 하나의 메모리에 저장된 상기 컴퓨터로 실행가능한 명령은, 상기 적어도 하나의 프로세서에 의하여, (a) 평문을 입력받는 단계; (b) 평문에 마스크(mask) 값을 적용하는 단계; (c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및, (d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계가 실행되도록 한다.According to another aspect of the present invention, a system for performing masking of a PIPO cryptographic algorithm corresponding to a side-channel attack includes at least one processor; and at least one memory for storing computer-executable instructions, wherein the computer-executable instructions stored in the at least one memory include, by the at least one processor, steps of (a) receiving plain text; (b) applying a mask value to the plain text; (c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and (d) separately storing a resultant value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying the resultant value to the next operation in the encryption process.
본 발명에 의하면, 입력되는 평문에 마스킹을 적용한 후 중간 계산 과정에서도 마스크 값을 제거하지 않은 상태에서 암호화 과정을 마치고 최종적으로 마스크를 제거함으로써 부채널 공격을 효과적으로 막을 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공하는 효과가 있다.According to the present invention, after applying masking to the input plaintext, the encryption process is completed without removing the mask value even in the intermediate calculation process, and the mask is finally removed. Provides a PIPO encryption algorithm masking method that can effectively prevent side-channel attacks has the effect of
나아가, 암호화시 입력되는 평문에 랜덤한 마스크 값을 적용하여 계산 중간 값을 예측할 수 없도록 함으로써 CPA와 같은 부채널 공격을 방어할 수 있는 PIPO 암호 알고리즘 마스킹 방법을 제공하는 효과가 있다.Furthermore, there is an effect of providing a PIPO encryption algorithm masking method capable of defending against side-channel attacks such as CPA by applying a random mask value to input plaintext during encryption so that a calculated intermediate value cannot be predicted.
도 1은 PIPO의 구조 및 처리 단위를 도시한 도면.
도 2는 키 예측 단위와 전력 누설 단위를 도시한 도면.
도 3은 종래 PIPO 암호 구현 시스템이 PIPO 암호를 구현하는 방법을 블럭 다이어그램으로 도시한 도면.
도 4는 본 발명에 따른 PIPO 암호 구현 시스템이 마스킹 기법을 적용하여 PIPO 암호를 구현하는 방법을 블럭 다이어그램으로 도시한 도면.
도 5는 MAND에 대한 진리표 및 카르노 맵을 나타낸 도면.
도 6은 MOR에 대한 진리표 및 카르노 맵을 나타낸 도면.
도 7은 선형 연산에 대한 마스크 적용 기법을 나타낸 도면.
도 8은 비선형 연산에 대한 마스크 적용 기법을 나타낸 도면.1 shows the structure and processing units of PIPO;
Fig. 2 shows a key prediction unit and a power leakage unit;
3 is a block diagram showing how a conventional PIPO cryptographic implementation system implements PIPO cryptography;
4 is a block diagram showing a method of implementing a PIPO encryption by applying a masking technique in a PIPO encryption implementation system according to the present invention;
5 shows a truth table and Karnaugh map for M AND ;
Figure 6 shows the truth table and Karnaugh map for M OR .
Fig. 7 shows a mask application technique for linear operations;
8 is a diagram illustrating a mask application technique for nonlinear operations;
이하 첨부된 도면을 참조로 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, the terms or words used in this specification and claims should not be construed as being limited to the usual or dictionary meaning, and the inventor appropriately uses the concept of the term in order to explain his/her invention in the best way. It should be interpreted as a meaning and concept consistent with the technical idea of the present invention based on the principle that it can be defined. Therefore, since the embodiments described in this specification and the configurations shown in the drawings are only one of the most preferred embodiments of the present invention and do not represent all of the technical ideas of the present invention, various alternatives may be used at the time of this application. It should be understood that there may be equivalents and variations.
도 3은 종래 PIPO(Plug-In Plug-Out) 암호 구현 시스템(100)이 PIPO 암호를 구현하는 방법을 블럭 다이어그램으로 도시한 도면이다.FIG. 3 is a block diagram illustrating a method in which a conventional PIPO (Plug-In Plug-Out)
도시된 바와 같이 마스킹(masking)이 사용되지 않으며, 이러한 시스템은 부채널 공격에 매우 취약하다. 본 발명은 이러한 문제점을 해결하기 위한 것으로서 이하 도 4 내지 도 8을 참조하여 본 발명의 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법을 설명하기로 한다.As shown, no masking is used, and such a system is very vulnerable to side-channel attacks. The present invention is to solve this problem, and a PIPO encryption algorithm masking method corresponding to a side channel attack of the present invention will be described with reference to FIGS. 4 to 8 below.
도 4는 본 발명에 따른 PIPO 암호 구현 시스템(200)이 마스킹 기법을 적용하여 PIPO 암호를 구현하는 방법을 블럭 다이어그램으로 도시한 도면이다.4 is a block diagram showing a method of implementing PIPO encryption by applying a masking technique in the PIPO
블록 암호 알고리즘에 대한 부채널 공격 대응 방법 중 하나가 평문과 중간에 계산되는 값에 대해 마스킹(masking)을 적용하는 것이다. 입력되는 평문(S401)에 마스킹을 적용(S402)한 후, 중간 계산 과정에서도 마스크 값을 제거하지 않은 상태에서 암호화 과정(S404)을 마치고, 최종적으로 마스크를 제거한다(S406). 이 경우 새로운 마스크 값을 계산하여(S405), 계산된 마스크 값을 암호화 과정의 다음 단계에서 마스크 값으로 사용한다. 이와 같은 새로운 마스크 값을 계산하는 방법에 대하여는 도 5 및 도 6을 참조하여 상세히 후술한다.One of the counter-channel attack countermeasures against the block cipher algorithm is to apply masking to the plaintext and the value calculated in the middle. After applying masking to the input plain text (S401) (S402), the encryption process (S404) is completed without removing the mask value even in the intermediate calculation process, and finally the mask is removed (S406). In this case, a new mask value is calculated (S405), and the calculated mask value is used as a mask value in the next step of the encryption process. A method of calculating such a new mask value will be described later in detail with reference to FIGS. 5 and 6 .
마스킹 기법에서 마스크를 적용하거나 제거할 경우 XOR(exclusive OR, )와 같은 연산을 이용하는데 이를 부울(Boolean) 마스킹이라 한다.In masking techniques, when applying or removing a mask, XOR (exclusive OR, ), which is called Boolean masking.
마스킹 기법은 중간 값에 대한 XOR나 Rotation과 같은 선형 연산을 수행하는 경우에는 다음 암호 연산 결과 값에 대한 마스크 값을 쉽게 계산할 수 있기 때문에 크게 문제가 되지 않는다. 그러나 중간 값에 대한 논리적 AND(∧)나 OR(∨)와 같은 비선형 연산시에는 마스킹 기법을 적용하는 것이 어렵다.The masking technique is not a big problem because the mask value for the result of the next cryptographic operation can be easily calculated when a linear operation such as XOR or Rotation is performed on an intermediate value. However, it is difficult to apply the masking technique to nonlinear operations such as logical AND(∧) or OR(∨) for intermediate values.
PIPO에서의 연산은 산술 연산이 아닌 단지 논리 연산인 비트별 AND, OR, XOR 그리고 Rotation으로만 구성된다. 암호 알고리즘의 중간 연산 값을 , 라 하며, 각각 마스크를 , , 마스크가 XOR된 값을 , 이라 정의한다. 이 경우 사용하는 이항 논리 연산자“·”(AND, OR 혹은 XOR)에 대하여 수학식 1을 만족하는 마스크 을 찾는 것이다(S405).Operations in PIPO consist of bitwise AND, OR, XOR, and Rotation, which are just logic operations, not arithmetic operations. The intermediate operation value of a cryptographic algorithm , , and each mask , , the value of which the mask is XORed , is defined as In this case, a mask that satisfies
[수학식 1][Equation 1]
이항 연산자·이 XOR이라면, 출력 마스크 은 로 쉽게 계산될 수 있으며(MXOR, S405) 이 과정에서 나 의 누출은 없다.If the binary operator · is XOR, the output mask silver It can be easily calculated as (M XOR , S405), and in this process me There is no leakage of
이항 연산자 ·이 비선형 연산인 AND 혹은 OR 연산의 경우 을 효과적으로 찾을 수 있어야 한다.In the case of AND or OR operation, which is a non-linear operation, binary operators should be able to find it effectively.
즉, 마스크가 적용된 중간 값 과 그리고 과 를 알고 있을 때 (a∧b)의 결과의 마스크 값 를 계산하는 것이 중요하다. 그 이유는 수학식 1로부터 (a∧b)를 알 수 있기 때문이다. 는 오직 의 수식으로만 표현되어야 하고 계산 과정에서 마스킹이 제거된 와 는 누출되어서는 안된다.That is, the median value with the mask applied class and class Mask value of the result of (a∧b) when . It is important to calculate The reason is that (a∧b) can be known from
마찬가지로, 마스크가 적용된 중간 값 과 그리고 과 를 알고 있을 때 (a∨b)의 결과 마스크 값 를 계산하는 것이 중요한데, 그 이유는 역시 수학식 1로부터 (a∨b)를 알 수 있기 때문이다. 역시 의 수식으로만 표현되어야 하고 계산 과정에서 마스킹 이 제거된 와 는 누출되어서는 안된다.Similarly, the masked median class and class Resultant mask value of (a∨b) when . It is important to calculate , because (a∨b) can also be found from
이하에서는 도 5를 참조하여 를 계산(S405)하는 방법을 설명하고, 도 6을 참조하여 를 계산(S405)하는 방법을 설명한다.Below, with reference to Figure 5 Describe the method of calculating (S405), referring to FIG. A method of calculating (S405) will be described.
도 5는 MAND에 대한 진리표 및 카르노 맵(Karnaugh map)을 나타낸 도면이다.5 is a diagram showing a truth table and a Karnaugh map for M AND .
도 5(a)는 의 모든 비트의 조합을 고려한 MAND의 진리표이고, 도 5(b)는 MAND에 대한 카르노 맵이다.Figure 5 (a) is It is a truth table of M AND considering the combination of all bits of , and FIG. 5(b) is a Karnaugh map for M AND .
진리표에서 표시한 는 실제 암호 연산시 계산하는 값이며 은 의 마스크 값으로 계산되어 별도로 저장된다. 즉, 마스크 값 를 만으로 계산해야 비밀 키 누출이 생기지 않는다. 이에 따라 를 새로운 논리식으로 표현하기 위해 카르노 맵 사용하여 다음과 같이 구한다.indicated in the truth table is the value calculated during the actual cryptographic operation. silver It is calculated as a mask value of and stored separately. That is, the mask value cast It should be calculated only to avoid secret key leakage. Accordingly In order to express in a new logical expression, it is obtained as follows using a Karnaugh map.
[수학식 2][Equation 2]
이와 같이 마스크 값을 계산할 때 중간 결과 값 와 의 노출이 없게 되는 장점이 있다.Intermediate result values when calculating mask values like this and has the advantage of not being exposed to
나아가, 마스크 결과 값에 대해 0과 1의 개수가 균형을 이루도록 설계할 필요가 있을 경우에는 에 새로운 랜덤 수 를 XOR한 를 만들 수도 있는데 이 경우 실제 연산도 가 아닌 로 하면 동일한 마스킹 효과를 가진다.Furthermore, if it is necessary to design the number of 0s and 1s to balance the mask result value, a new random number in XORed , in which case the actual operation is also not , it has the same masking effect.
랜덤 수 을 XOR할 때 은 기존 마스크된 값(,)이나 마스크 값(,)를 조합하여 대체할 수도 있는데 의 0과 1의 개수가 동일하도록 을 선택해야 한다. 예를 들어, , 와 같은 방식이다.random number when XORing is the existing masked value ( , ) or mask value ( , ) can be replaced by a combination of so that the number of 0's and 1's in should choose for example, , the same way as
도 6은 MOR에 대한 진리표 및 카르노 맵을 나타낸 도면이다.6 is a diagram showing a truth table and a Karnaugh map for M OR .
도 6(a)는 의 모든 비트의 조합을 고려한 MOR의 진리표이고, 도 6(b)는 MOR에 대한 카르노 맵이다.Figure 6 (a) is It is a truth table of M OR considering the combination of all bits of , and FIG. 6(b) is a Karnaugh map for M OR .
진리표에서 표시한 는 실제 암호 연산시 계산하는 값이며 은 의 마스크 값으로 계산되어 별도로 저장된다. 즉, 마스크 값 를 만으로 계산해야 비밀 키 누출이 생기지 않는다. 이에 따라 를 새로운 논리식으로 표현하기 위해 카르노 맵(Karnaugh map)을 사용하여 다음과 같이 구한다.indicated in the truth table is the value calculated during the actual cryptographic operation. silver It is calculated as a mask value of and stored separately. That is, the mask value cast It should be calculated only to avoid secret key leakage. Accordingly In order to express in a new logical expression, a Karnaugh map is used to obtain as follows.
[수학식 3][Equation 3]
이와 같이 마스크 값을 계산할 때 중간 결과 값 와 의 노출이 없게 되는 장점이 있다.Intermediate result values when calculating mask values like this and has the advantage of not being exposed to
나아가, 마스크 결과 값에 대해 0과 1의 개수가 균형을 이루도록 설계할 필요가 있을 경우에는 에 새로운 랜덤 수 를 XOR한 를 만들 수도 있는데 이 경우 실제 연산도 가 아닌 로 하면 동일한 마스킹 효과를 가진다.Furthermore, if it is necessary to design the number of 0s and 1s to balance the mask result value, a new random number in XORed , in which case the actual operation is also not , it has the same masking effect.
랜덤 수 을 XOR할 때 은 기존 마스크된 값(,)이나 마스크 값(,)를 조합하여 대체할 수도 있는데 의 0과 1의 개수가 동일하도록 을 선택해야 한다. 예를 들어, , 와 같은 방식이다.random number when XORing is the existing masked value ( , ) or mask value ( , ) can be replaced by a combination of so that the number of 0's and 1's in should choose for example, , the same way as
도 7은 선형 연산에 대한 마스크 적용 기법을 나타낸 도면이다.7 is a diagram illustrating a mask application technique for linear operations.
선형 연산 XOR에 대하여는 과 이 계산되고, 계산된 cm 및 MXOR은 별도로 저장되어 PIPO 암호화 과정의 다음 연산까지 유지하여 적용된다.For the linear operation XOR class is calculated, and the calculated c m and M XOR are separately stored and applied until the next operation of the PIPO encryption process.
도 8은 비선형 연산에 대한 마스크 적용 기법을 나타낸 도면이다.8 is a diagram illustrating a mask application technique for nonlinear operation.
비선형 연산 AND에 대하여는 과 수학식 2가 계산되고, 계산된 cm 및 MAND은 별도로 저장되어 PIPO 암호화 과정의 다음 연산까지 유지하여 적용된다.For the nonlinear operation AND, and
역시 비선형 연산 OR에 대하여는 과 수학식 2이 계산되고, 계산된 cm 및 MOR은 별도로 저장되어 PIPO 암호화 과정의 다음 연산까지 유지하여 적용된다.Also for the nonlinear operation OR and
지금까지 설명한 바와 같이, 본 발명의 PIPO 암호 알고리즘 마스킹 방법은, PIPO 암호에서 입력 평문에 XOR 마스킹을 적용한 이후 암호화 연산을 수행할 경우에도 마스크 값이 저장되며, 암호화가 끝난 후 마스킹을 제거해야 부채널 공격을 막을 수 있다. 또한 중간 암호문에 적용된 마스크 값은 고정되지 않고 연산 과정에서 변하게 되므로 마스크 값을 다시 계산하여 암호화 과정의 다음 연산까지 유지하는 것이 필요하다.As described above, in the PIPO encryption algorithm masking method of the present invention, even when performing an encryption operation after applying XOR masking to the input plaintext in the PIPO encryption, the mask value is stored, and the masking must be removed after encryption to can block an attack. In addition, since the mask value applied to the intermediate ciphertext is not fixed and changes during the operation process, it is necessary to recalculate the mask value and maintain it until the next operation in the encryption process.
PIPO 암호를 비롯하여 비선형 부울 연산이 사용되는 곳에는 본 발명의 마스크 값 계산 방식을 이용할 수 있다.The mask value calculation method of the present invention can be used where non-linear Boolean operations are used, including PIPO cryptography.
100: 종래 PIPO 암호 구현 시스템
200: 본 발명의 마스킹 기법을 적용한 PIPO 암호 구현 시스템100: conventional PIPO cryptographic implementation system
200: PIPO encryption implementation system applying the masking technique of the present invention
Claims (8)
(a) 평문을 입력받는 단계;
(b) 평문에 마스크(mask) 값을 적용하는 단계;
(c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및,
(d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계
를 포함하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.A method in which a PIPO cryptographic algorithm masking system performs masking of a PIPO cryptographic algorithm corresponding to a side-channel attack, comprising:
(a) receiving plain text input;
(b) applying a mask value to the plain text;
(c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and,
(d) separately storing a result value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying them to the next operation in the encryption process.
A PIPO cryptographic algorithm masking method corresponding to a side-channel attack comprising a.
상기 마스크 값의 적용은,
XOR(exclusive OR) 연산을 사용하는 것
을 특징으로 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.The method of claim 1,
Application of the mask value,
Using the XOR (exclusive OR) operation
PIPO cryptographic algorithm masking method for responding to side-channel attacks characterized by.
상기 단계(c)의 이항 논리 연산은,
AND 연산, OR 연산 및 XOR 연산 중 어느 하나인 것
을 특징으로 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.The method of claim 1,
The binary logic operation of step (c) is,
Any one of AND operation, OR operation and XOR operation
PIPO cryptographic algorithm masking method for responding to side-channel attacks characterized by.
상기 새로운 마스크 값을 계산하는 수식은,
카르노 맵(Karnaugh map)을 이용하여 생성하는 것
을 특징으로 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.The method of claim 1,
The formula for calculating the new mask value is,
Generating using Karnaugh maps
PIPO cryptographic algorithm masking method for responding to side-channel attacks characterized by.
상기 새로운 마스크 값과 새로운 랜덤 수를 XOR 연산하고,
마스크가 적용된 중간값끼리 이항 논리 연산한 값에도 상기 동일한 랜덤 수를 XOR 연산시킴으로써,
마스크 값이 가지는 0과 1의 개수가 동일하게 하는 것
을 특징으로 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.The method of claim 1,
XOR operation of the new mask value and a new random number;
By performing an XOR operation on the same random number for a value obtained by performing a binary logic operation between intermediate values to which a mask is applied,
Making the number of 0's and 1's in the mask value the same
PIPO cryptographic algorithm masking method for responding to side-channel attacks characterized by.
상기 단계(d) 이후,
(e) 암호화 과정의 모든 연산을 마친 후 최종 생성된 마스크를 제거하는 단계
를 더 포함하는 것을 특징으로 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹 방법.The method of claim 1,
After step (d),
(e) removing the final mask after completing all operations of the encryption process
A PIPO encryption algorithm masking method corresponding to a side-channel attack, characterized in that it further comprises.
비일시적 저장 매체에 저장되며, 프로세서에 의하여,
(a) 평문을 입력받는 단계;
(b) 평문에 마스크(mask) 값을 적용하는 단계;
(c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및,
(d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계
가 실행되도록 하는 명령을 포함하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹을 수행하기 위한 컴퓨터 프로그램.A computer program for performing masking of a PIPO cryptographic algorithm corresponding to a side-channel attack,
It is stored in a non-transitory storage medium, and by the processor,
(a) receiving plain text input;
(b) applying a mask value to the plain text;
(c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and,
(d) separately storing a result value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying them to the next operation in the encryption process.
A computer program for performing a masking PIPO cryptographic algorithm corresponding to a side-channel attack comprising instructions for causing the to be executed.
적어도 하나의 프로세서; 및
컴퓨터로 실행가능한 명령을 저장하는 적어도 하나의 메모리를 포함하되,
상기 적어도 하나의 메모리에 저장된 상기 컴퓨터로 실행가능한 명령은, 상기 적어도 하나의 프로세서에 의하여,
(a) 평문을 입력받는 단계;
(b) 평문에 마스크(mask) 값을 적용하는 단계;
(c) 마스크 값이 적용된 중간값과 마스크 값을 입력으로 하여 마스크가 적용된 중간값끼리 이항 논리 연산을 수행하고, 새로운 마스크 값을 계산하여 출력하는 단계; 및,
(d) 상기 마스크가 적용된 중간값끼리 이항 논리 연산을 수행한 결과값과 상기 새로운 마스크 값을 별도로 저장하여 암호화 과정의 다음 연산에 적용하는 단계
가 실행되도록 하는 부채널 공격에 대응하는 PIPO 암호 알고리즘 마스킹을 수행하기 위한 시스템.
A system for performing PIPO cryptographic algorithm masking against side-channel attacks,
at least one processor; and
including at least one memory for storing computer-executable instructions;
The computer-executable instructions stored in the at least one memory are, by the at least one processor,
(a) receiving plain text input;
(b) applying a mask value to the plain text;
(c) taking the masked median value and the mask value as inputs, performing a binary logic operation between the masked median values, and calculating and outputting a new mask value; and,
(d) separately storing a result value obtained by performing a binary logic operation between intermediate values to which the mask is applied and the new mask value, and applying them to the next operation in the encryption process.
A system for performing PIPO cryptographic algorithm masking against side-channel attacks that cause
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210194041A KR20230103271A (en) | 2021-12-31 | 2021-12-31 | Masking method on block cipher PIPO to resist side channel attacks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210194041A KR20230103271A (en) | 2021-12-31 | 2021-12-31 | Masking method on block cipher PIPO to resist side channel attacks |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20230103271A true KR20230103271A (en) | 2023-07-07 |
Family
ID=87154562
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210194041A KR20230103271A (en) | 2021-12-31 | 2021-12-31 | Masking method on block cipher PIPO to resist side channel attacks |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20230103271A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101506499B1 (en) | 2008-12-30 | 2015-03-31 | 고려대학교 산학협력단 | Method for encrypting with SEED applying mask |
-
2021
- 2021-12-31 KR KR1020210194041A patent/KR20230103271A/en not_active Application Discontinuation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101506499B1 (en) | 2008-12-30 | 2015-03-31 | 고려대학교 산학협력단 | Method for encrypting with SEED applying mask |
Non-Patent Citations (1)
Title |
---|
H. Kim, Y. Jeon, G. Kim, J. Kim, B. Sim, D. Han, H. Seo, S. Kim, S. Hong, J. Sung, and D. Hong, "PIPO :A Lightweight Block Cipher with Efficient Higher-Order Masking Software Implementations,"ICISC'20, LNCS 12593, pp. 99-122, 2020. |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11733966B2 (en) | Protection system and method | |
US11546135B2 (en) | Key sequence generation for cryptographic operations | |
EP3424175B1 (en) | Converting a boolean masked value to an arithmetically masked value for cryptographic operations | |
Li et al. | Cryptanalysis of a chaotic image encryption scheme based on permutation-diffusion structure | |
EP3154217B1 (en) | Scrambled tweak mode of block ciphers for differential power analysis resistant encryption | |
US20050232430A1 (en) | Security countermeasures for power analysis attacks | |
EP2316189B1 (en) | Method for generating a cipher-based message authentication code | |
EP3566385A1 (en) | Homomorphic white box system and method for using same | |
US9565018B2 (en) | Protecting cryptographic operations using conjugacy class functions | |
Aldaya et al. | AES T-Box tampering attack | |
KR20050072537A (en) | Cryptographic apparatus and cryptographic method , and storage medium thereof | |
US20060153372A1 (en) | Smart card and method protecting secret key | |
Kumar et al. | A cryptographic model based on logistic map and a 3-D matrix | |
KR101506499B1 (en) | Method for encrypting with SEED applying mask | |
Zhang et al. | Further improving efficiency of higher order masking schemes by decreasing randomness complexity | |
Andreeva et al. | AES-COPA v. | |
Sharma et al. | Cryptanalysis of image encryption algorithm based on pixel shuffling and chaotic S-box transformation | |
EP1587237B1 (en) | Security countermeasures for power analysis attacks | |
EP3891925B1 (en) | A computation device using shared shares | |
KR20230103271A (en) | Masking method on block cipher PIPO to resist side channel attacks | |
RU2708439C1 (en) | Computing device and method | |
Singh et al. | Study & analysis of cryptography algorithms: RSA, AES, DES, T-DES, blowfish | |
US20230379136A1 (en) | Secure provision of keys for fully homomorphic encryption | |
Sekar | The stream cipher core of the 3GPP encryption standard 128-EEA3: timing attacks and countermeasures | |
Karthika et al. | Theoretical analysis of biases in TLS encryption scheme Chacha 128 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal |