KR102169369B1 - Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same - Google Patents

Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same Download PDF

Info

Publication number
KR102169369B1
KR102169369B1 KR1020190137449A KR20190137449A KR102169369B1 KR 102169369 B1 KR102169369 B1 KR 102169369B1 KR 1020190137449 A KR1020190137449 A KR 1020190137449A KR 20190137449 A KR20190137449 A KR 20190137449A KR 102169369 B1 KR102169369 B1 KR 102169369B1
Authority
KR
South Korea
Prior art keywords
mask
bit
masking
input
value
Prior art date
Application number
KR1020190137449A
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 KR1020190137449A priority Critical patent/KR102169369B1/en
Application granted granted Critical
Publication of KR102169369B1 publication Critical patent/KR102169369B1/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/06Cryptographic 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/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding
    • H04L2209/046Masking or blinding of operations, operands or results of the operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/122Hardware reduction or efficient architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/24Key scheduling, i.e. generating round keys or sub-keys for block encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

According to the present disclosure, disclosed are a method for cryptographically processing data and an apparatus using the same. More particularly, provided are a PIPO lightweight block encryption technique for calculating a 64-bit ciphertext from a 64-bit plaintext and a masking technique therefor. A method of processing and encrypting data comprises the following step of: (a) obtaining a first input value, a plain text, and calculating a first masking input value by masking the first input value through an exclusive-OR (XOR) operation with an S-layer output mask; (b) repeating the process of calculating an (i+2)^th masking input value by increasing i by 1; and (c) calculating a result value obtained by performing XOR operation on a (r+1)^th masking round key and a (r+1)^th masking input value as a ciphertext.

Description

경량 블록 암호화에 대한 1차 부채널 공격에 대응하는 방법 및 이를 이용한 장치{COUNTERMEASURE METHOD OF FIRST-ORDER SIDE-CHANNEL ATTACK ON LIGHTWEIGHT BLOCK CIPHER AND APPARATUS USING THE SAME}A method for responding to a primary side-channel attack for lightweight block encryption, and a device using the same {COUNTERMEASURE METHOD OF FIRST-ORDER SIDE-CHANNEL ATTACK ON LIGHTWEIGHT BLOCK CIPHER AND APPARATUS USING THE SAME}

본 개시서에는 암호학적으로 데이터를 처리하는 방법 및 이를 이용한 장치가 개시된다. 구체적으로, 본 개시서에 따른 방법은 64비트 평문으로부터 64비트 암호문을 산출하는 PIPO 경량 블록 암호화 기법 및 이에 대한 마스킹 기법을 제공함에 관한 것이다.The present disclosure discloses a method for cryptographically processing data and an apparatus using the same. Specifically, a method according to the present disclosure relates to providing a PIPO lightweight block encryption technique for calculating a 64-bit ciphertext from a 64-bit plaintext and a masking technique therefor.

스마트 카드 및 IC(integrated circuit) 카드는 사용자에 관한 보안 정보를 포함하고, 사용자의 보안 정보가 유출되는 것을 방지하기 위하여 그 보안 정보를 암호문으로 만들어서 송수신할 필요가 있다. 송신측에서는 평문을 암호화하여 암호문을 만들어 송신하고, 수신측에서는 수신된 암호문을 복호화하여 평문을 획득한다.A smart card and an integrated circuit (IC) card contain security information about a user, and in order to prevent leakage of the user's security information, it is necessary to transmit and receive the security information in a cryptogram. The transmitting side encrypts the plain text to create an encrypted text and transmits it, and the receiving side decrypts the received encrypted text to obtain the plain text.

블록 암호 기법에는 DES(Data Encryption Standard), AES(Advanced Encryption Standard), SEED, ARIA, SM4 등이 있다.Block encryption techniques include DES (Data Encryption Standard), AES (Advanced Encryption Standard), SEED, ARIA, and SM4.

특히, 근래 사물 인터넷(IoT; Internet of Things) 환경의 대부분의 기기들은 제한된 리소스(메모리, 속도, 하드웨어 GE 등)를 가지기 때문에 암호학적 안전성을 요구하는 시스템에서 사용될 경우 리소스 부하가 적은 경량 블록 암호를 사용하기를 선호한다.In particular, since most devices in the Internet of Things (IoT) environment have limited resources (memory, speed, hardware GE, etc.), when used in a system requiring cryptographic safety, a lightweight block cipher with a low resource load is used. I prefer to use it.

하지만 수학적으로 안전하게 설계된 경량 블록 암호라고 하더라도 부채널 분석에 대한 안전성이 담보되지 않는 문제가 있다. 이를 해결하기 위하여 부채널 분석 방지를 위한 마스킹 기법을 적용하여야 한다. 부채널 분석 방지 기술은 부채널을 통하여 수집되는 정보인 전력, 전자기파를 무작위적으로 나타나게 하거나 균일하게 나타나게 함으로써 부채널 분석을 어렵게 하는 것이다.However, even with a lightweight block cipher designed to be mathematically safe, there is a problem that safety for side channel analysis is not guaranteed. To solve this problem, a masking technique to prevent subchannel analysis should be applied. The technology for preventing sub-channel analysis makes it difficult to analyze sub-channels by making power and electromagnetic waves, which are information collected through sub-channels appear random or uniform.

그런데, 부채널 분석 대응 마스킹에 추가적으로 필요한 리소스는 경량 블록 암호를 사용하는 의미를 퇴색시키며, 더 높은 부채널 안전성을 요구하는 환경일수록 블록 암호 구현에 더욱 많은 리소스를 필요로 하게 된다. 따라서 부채널 안전성을 요구하는 시스템에서 사용되는 IoT 환경에서도 리소스 부담을 가지지 않고 사용할 수 있는 경량 블록 암호 및 이에 관한 마스킹 기법의 필요성이 대두된다.However, resources additionally required for masking corresponding to subchannel analysis fade the meaning of using a lightweight block cipher, and in an environment requiring higher side-channel safety, more resources are required for block cipher implementation. Therefore, there is a need for a lightweight block cipher that can be used without a resource burden even in an IoT environment used in a system requiring side-channel safety and a masking technique related thereto.

한국공개특허 제10-2008-0080175(2008.09.02)호Korean Patent Publication No. 10-2008-0080175 (2008.09.02)

[1] Zhang, Wentao, et al. "RECTANGLE: a bit-slice lightweight block cipher suitable for multiple platforms." Science China Information Sciences 58.12 (2015): 1-15.[1] Zhang, Wentao, et al. "RECTANGLE: a bit-slice lightweight block cipher suitable for multiple platforms." Science China Information Sciences 58.12 (2015): 1-15. [2] Bogdanov, A., Knudsen, L.R., Leander, G., Paar, C., Poschmann, A., Robshaw, M.J.B., Seurin, Y., Vikkelsoe, C. PRESENT: An Ultra-Lightweight Block Cipher, CHES 2007, LNCS 4727, pp. 450-466,[2] Bogdanov, A., Knudsen, LR, Leander, G., Paar, C., Poschmann, A., Robshaw, MJB, Seurin, Y., Vikkelsoe, C. PRESENT: An Ultra-Lightweight Block Cipher, CHES 2007, LNCS 4727, pp. 450-466,

본 개시서의 일 실시 예는 경량성을 만족하면서도 확산력을 확보할 수 있는 64비트 블록 암호 기법을 채용한 암호화 방법 및 장치를 제공하는 것을 목적으로 한다.An embodiment of the present disclosure aims to provide an encryption method and apparatus employing a 64-bit block encryption technique capable of securing spreading power while satisfying light weight.

구체적으로, 본 개시서의 일 실시 예는 XOR, OR, AND, 왼쪽 로테이션 연산만을 포함함으로써 비선형성을 가지면서도 연산 리소스가 절감되는 개선된 경량 블록 암호 기법에 대한 부채널 공격에 대비한 안전성을 확보하는 마스킹 기법을 제공하는 것을 목적으로 한다.Specifically, an embodiment of the present disclosure secures safety against side-channel attacks for an improved lightweight block cipher technique that has nonlinearity and reduces computational resources by including only XOR, OR, AND, and left rotation operations. The purpose of this is to provide a masking technique.

또한, 본 개시서의 일 실시 예는 병렬 연산에도 적합한 경량 블록 암호 기법에 대한 마스킹 기법을 제공하는 것도 그 일 목적으로 한다.Another object of the present disclosure is to provide a masking technique for a lightweight block encryption technique suitable for parallel operation.

상기한 바와 같은 본 발명의 목적을 달성하고, 후술하는 본 발명의 특징적인 효과를 실현하기 위한 본 발명의 특징적인 구성은 하기와 같다.The characteristic configuration of the present invention for achieving the object of the present invention as described above and realizing the characteristic effects of the present invention described later is as follows.

본 발명의 일 태양(aspect)에 따르면, 데이터를 처리하여 암호화하는 방법이 제공되는바, 그 방법은, (a) 제1 입력값인 평문을 획득하고, 제1 입력값으로부터 S-레이어 출력 마스크 (M')8와의 XOR(eXclusive-OR; 배타적 논리합) 연산을 통하여 마스킹함으로써 제1 마스킹 입력값을 산출하는 단계; (b) 소정의 라운드 횟수 r에 대하여 i = 0에서부터 i = r - 1에 이르기까지, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과, 상기 S-레이어 출력 마스크 (M')8와 S-레이어 입력 마스크 (M)8을 XOR 연산한 결괏값인 라운드 키 마스크를 XOR 연산한 결괏값으로서 생성된 제i+1 마스킹 라운드 키와 (ii) 제i+1 마스킹 입력값을 XOR 연산한 결괏값에 대하여, 마스킹된 치환 연산 및 마스킹된 확산 연산을 수행하여 제i+2 마스킹 입력값을 산출하는 프로세스를 i를 1씩 증가시키며 반복 수행하는 단계; 및 (c) 제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값을 상기 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 마스킹함으로써 산출된 제r+1 마스킹 라운드 키와 제r+1 마스킹 입력값을 XOR 연산한 결괏값을 암호문으로 산출하는 단계를 포함한다.According to an aspect of the present invention, a method of processing and encrypting data is provided, the method comprising: (a) obtaining a plain text as a first input value, and an S-layer output mask from the first input value. (M') calculating a first masking input value by masking through an XOR (exclusive-OR) operation with 8 ; (b) From i = 0 to i = r-1 for a predetermined number of rounds r, (i) the result of XOR operation of the i+1th round key RK i and the i+1th round constant c i and , The i+1th masking round key generated as a result obtained by XORing the round key mask, which is the result of XOR operation of the S-layer output mask (M') 8 and the S-layer input mask (M) 8 , and ( ii) The process of calculating the i+2th masking input value by performing a masked substitution operation and a masked diffusion operation on the result value obtained by XOR operation of the i+1th masking input value is repeated by increasing i by 1 Step to do; And (c) an r-th calculated by masking the result obtained by XORing the r+1-th round key RK r and the r+1-th round constant c r through an XOR operation with the S-layer output mask (M') 8. And calculating a result value obtained by performing an XOR operation of the +1 masking round key and the r+1th masking input value as a ciphertext.

본 발명의 다른 태양에 따르면, 데이터를 처리하여 복호화하는 방법이 제공되는바, 그 방법은, 데이터를 처리하여 암호화하는 전술한 방법의 역연산을 수행함으로써 상기 암호문으로부터 상기 평문을 산출한다.According to another aspect of the present invention, a method of processing and decrypting data is provided, wherein the plaintext is calculated from the ciphertext by performing an inverse operation of the above-described method of processing and encrypting data.

본 발명의 또 다른 태양에 따르면, 본 개시서에 따른 데이터 암호화 방법 및 데이터 복호화 방법 중 적어도 하나를 수행하도록 구현된 명령어(instructions)를 포함하는, 기계 판독 가능한 비일시적 기록 매체에 저장된, 컴퓨터 프로그램도 제공된다.According to another aspect of the present disclosure, a computer program stored in a machine-readable non-transitory recording medium including instructions implemented to perform at least one of a data encryption method and a data decryption method according to the present disclosure is also Is provided.

본 발명의 다른 일 태양에 따르면, 데이터를 처리하여 암호화하는 장치가 제공되는바, 그 장치는, 제1 입력값인 평문을 획득하는 평문 입력부; S-레이어 입력 마스크 M8 및 S-레이어 출력 마스크 (M')8를 랜덤 생성하는 마스크 값 생성부; 제1 입력값으로부터 S-레이어 출력 마스크 (M')8와의 XOR(eXclusive-OR; 배타적 논리합) 연산을 통하여 마스킹함으로써 제1 마스킹 입력값을 산출하는 마스크 값 적용부; 소정의 라운드 횟수 r에 대하여, 0 ≤ i ≤ r - 1을 만족하는 정수 i에 대하여, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과, 상기 S-레이어 출력 마스크 (M')8와 S-레이어 입력 마스크 M8을 XOR 연산한 결괏값인 라운드 키 마스크를 XOR 연산한 결괏값으로서 생성된 제i+1 마스킹 라운드 키와 (ii) 제i+1 마스킹 입력값을 XOR 연산하는 라운드 키 적용부; 상기 라운드 키 적용부에 의한 결괏값에 대하여, 마스킹된 치환 연산을 수행하는 치환 연산 수행부; 상기 치환 연산 수행부에 의한 결괏값에 대하여, 마스킹된 확산 연산을 수행하여 제i+2 마스킹 입력값을 산출하는 확산 연산 수행부; 제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값을 상기 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 마스킹함으로써 산출된 제r+1 마스킹 라운드 키와 제r+1 마스킹 입력값을 XOR 연산하는 마스크 값 해제부; 및 상기 마스크 값 해제부의 결괏값을 암호문으로 출력하는 암호문 출력부를 포함하고, 상기 라운드 키 적용부, 상기 치환 연산 수행부, 상기 확산 연산 수행부의 연산은, i = 0에서부터 i = r - 1에 이르기까지 i가 1씩 증가되며 반복 수행된다.According to another aspect of the present invention, an apparatus for processing and encrypting data is provided, the apparatus comprising: a plaintext input unit for obtaining a plaintext as a first input value; S- type layer 8 and the mask M S- output layer mask (M ') the mask value generation unit for generating a random 8; A mask value applying unit for calculating a first masking input value by masking through an XOR (exclusive-OR) operation with an S-layer output mask (M') 8 from the first input value; For an integer i that satisfies 0 ≤ i ≤ r-1 for a predetermined number of rounds r, (i) the result obtained by XORing the i+1th round key RK i and the i+1th round constant c i and , The i+1th masking round key generated as a result of XOR operation of the round key mask, which is the result of XOR operation of the S-layer output mask (M') 8 and the S-layer input mask M 8 , and (ii) A round key application unit that performs an XOR operation on the i+1th masking input value; A substitution operation performing unit for performing a masked substitution operation on the result value by the round key application unit; A diffusion operation performing unit for calculating an i+2th masking input value by performing a masked diffusion operation on the result value by the substitution operation unit; The r+1th masking round calculated by masking the result of XOR operation of the r+1th round key RK r and the r+1th round constant c r through XOR operation with the S-layer output mask (M') 8 A mask value canceling unit that performs an XOR operation on the key and the r+1 th masking input value; And a ciphertext output unit for outputting the result value of the mask value canceling unit as a ciphertext, wherein the round key application unit, the substitution operation execution unit, and the diffusion operation execution unit operations range from i = 0 to i = r-1 Until i is incremented by 1 and repeated.

본 발명의 또 다른 일 태양에 따르면, 데이터를 처리하여 복호화하는 장치가 제공되는바, 그 장치는, 상기 데이터를 처리하여 암호화하는 장치에 대응하여 상기 암호문으로부터 평문을 산출한다.According to another aspect of the present invention, there is provided an apparatus for processing and decrypting data, the apparatus calculating a plaintext from the cipher text corresponding to the apparatus for processing and encrypting the data.

본 개시서의 예시적인 실시 예에 따른 암호화 방법 및 복호화 방법은 8비트 치환 테이블과 왼쪽 로테이션 연산만을 이용하여 설계되었으므로 IoT 환경에서의 경량 구현에 적합할 뿐만 아니라 마스크 값을 최소로 이용함으로써 비교적 적은 추가 리소스로도 부채널 분석 대응 마스킹 기법의 적용이 가능한 효과가 있다.Since the encryption method and the decryption method according to the exemplary embodiment of the present disclosure are designed using only an 8-bit permutation table and a left rotation operation, they are not only suitable for lightweight implementation in an IoT environment, but also relatively little addition by using a minimum mask value. As a resource, there is an effect that a masking technique corresponding to subchannel analysis can be applied.

본 발명의 실시 예의 설명에 이용되기 위하여 첨부된 아래 도면들은 본 발명의 실시 예들 중 단지 일부일 뿐이며, 본 발명의 기술분야에서 통상의 지식을 가진 사람(이하 "통상의 기술자"라 함)에게 있어서는 발명에 이르는 추가 노력 없이 이 도면들에 기초하여 다른 도면들이 얻어질 수 있다.
도 1은 본 개시서에 따라 데이터를 처리하여 암호화하는 방법(이하 "데이터 암호화 방법"이라 함) 및/또는 데이터를 처리하여 복호화하는 방법(이하 "데이터 복호화 방법"이라 함)을 수행하는 연산 장치의 예시적 구성을 개략적으로 도시한 개념도이다.
도 2는 본 개시서의 데이터 암호화 방법과 데이터 복호화 방법에 이용되는 연산 장치의 하드웨어 또는 소프트웨어 구성요소를 도시한 예시적 블록도이다.
도 3은 본 개시서의 일 실시 예에 따른 마스킹 기법이 적용되기 전의 데이터 암호화 방법을 개념적으로 나타낸 블록도이다.
도 4는 본 개시서의 데이터 암호화 방법 및 데이터 복호화 방법에서 이용되는 치환 연산(substitution) 및 확산 연산(permutation)을 64비트 평문에 대하여 적용하는 방식을 개념적으로 나타낸 도면이다.
도 5는 본 개시서에 따른 치환 연산의 일 실시 예로서 64비트 평문에 대하여 적용되는 예시적인 64비트 치환 연산(S64)을 도출하는 8비트 치환 테이블을 그 치환 테이블의 입력값의 왼쪽 4비트를 행의 상단으로부터 하단까지 열거하고 오른쪽 4비트를 열의 왼쪽으로부터 오른쪽까지 열거하여 상기 입력값에 대응하는 출력값을 나타낸 도면이다.
도 6은 본 개시서의 일 실시 예에 따른 마스킹 기법이 적용된 데이터 암호화 방법을 예시적으로 나타낸 흐름도이다.
도 7은 본 개시서의 일 실시 예에 따른 마스킹 기법이 적용된 데이터 암호화 방법을 개념적으로 나타낸 블록도이다.
The accompanying drawings, which are attached to be used in the description of the embodiments of the present invention, are only some of the embodiments of the present invention, and those of ordinary skill in the technical field of the present invention (hereinafter referred to as "common technicians") Other drawings can be obtained based on these drawings without further effort leading up to.
1 is a computing device that performs a method of processing and encrypting data (hereinafter referred to as “data encryption method”) and/or a method of processing and decrypting data (hereinafter referred to as “data decryption method”) according to the present disclosure It is a conceptual diagram schematically showing an exemplary configuration of.
FIG. 2 is an exemplary block diagram showing hardware or software components of a computing device used in a data encryption method and a data decryption method of the present disclosure.
3 is a block diagram conceptually showing a data encryption method before a masking technique is applied according to an embodiment of the present disclosure.
4 is a diagram conceptually illustrating a method of applying substitution and permutation used in the data encryption method and data decryption method of the present disclosure to a 64-bit plaintext.
5 is an 8-bit replacement table for deriving an exemplary 64-bit replacement operation (S 64 ) applied to a 64-bit plaintext as an embodiment of a replacement operation according to the present disclosure, 4 bits to the left of the input value of the replacement table. Is a diagram showing an output value corresponding to the input value by enumerating from the top to the bottom of the row and the right 4 bits from the left to the right of the column.
6 is a flowchart illustrating a data encryption method to which a masking technique is applied according to an embodiment of the present disclosure.
7 is a block diagram conceptually showing a data encryption method to which a masking technique is applied according to an embodiment of the present disclosure.

후술하는 본 발명에 대한 상세한 설명은, 본 발명의 목적들, 기술적 해법들 및 장점들을 분명하게 하기 위하여 본 발명이 실시될 수 있는 특정 실시 예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시 예는 통상의 기술자가 본 발명을 실시할 수 있도록 상세히 설명된다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The detailed description of the present invention to be described later refers to the accompanying drawings, which illustrate specific embodiments in which the present invention may be practiced in order to clarify the objects, technical solutions, and advantages of the present invention. These embodiments will be described in detail so that a person skilled in the art can practice the present invention.

본 발명의 상세한 설명 및 청구항들에 걸쳐, '포함하다'라는 단어 및 그 변형은 다른 기술적 특징들, 부가물들, 구성요소들 또는 단계들을 제외하는 것으로 의도된 것이 아니다. 또한, '하나' 또는 '한'은 하나 이상의 의미로 쓰인 것이며, '또 다른'은 적어도 두 번째 이상으로 한정된다.Throughout the detailed description and claims of the present invention, the word'comprise' and its variations are not intended to exclude other technical features, additions, components or steps. In addition,'one' or'one' is used in more than one meaning, and'another' is limited to at least a second or more.

또한, 본 발명의 '제1', '제2' 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로서, 순서를 나타내는 것으로 이해되지 않는 한 이들 용어들에 의하여 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 이와 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.In addition, terms such as'first' and'second' of the present invention are used to distinguish one element from other elements, and the scope of rights is limited by these terms unless understood to indicate an order. No. For example, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는 그 다른 구성요소에 직접 연결될 수도 있지만 중간에 다른 구성요소가 개재할 수도 있다고 이해되어야 할 것이다. 반면에 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉, "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being "connected" to another component, it should be understood that it may be directly connected to the other component, but another component may be interposed therebetween. On the other hand, when it is mentioned that a component is "directly connected" to another component, it should be understood that there is no other component in the middle. On the other hand, other expressions describing the relationship between elements, that is, "between" and "just between" or "neighboring to" and "directly neighboring to" should be interpreted as well.

각 단계들에 있어서 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용된 것으로 식별부호는 논리상 필연적으로 귀결되지 않는 한 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며, 반대의 순서로 수행될 수도 있다.In each step, the identification code (for example, a, b, c, etc.) is used for convenience of explanation, and the identification code does not describe the order of each step unless it inevitably results in a logical reason. The steps may occur out of the order specified. That is, each of the steps may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.

통상의 기술자에게 본 발명의 다른 목적들, 장점들 및 특성들이 일부는 본 설명서로부터, 그리고 일부는 본 발명의 실시로부터 드러날 것이다. 아래의 예시 및 도면은 실례로서 제공되며, 본 발명을 한정하는 것으로 의도된 것이 아니다. 따라서, 특정 구조나 기능에 관하여 본 명세서에 개시된 상세 사항들은 한정하는 의미로 해석되어서는 아니되고, 단지 통상의 기술자가 실질적으로 적합한 임의의 상세 구조들로써 본 발명을 다양하게 실시하도록 지침을 제공하는 대표적인 기초 자료로 해석되어야 할 것이다.Other objects, advantages, and features of the present invention to those skilled in the art will appear, partly from the present disclosure, and partly from the practice of the present invention. The examples and drawings below are provided by way of example and are not intended to limit the invention. Therefore, the details disclosed in this specification with respect to a specific structure or function are not to be construed in a limiting sense, but only representatives that provide guidelines for a person skilled in the art to variously implement the present invention with any detailed structures that are substantially suitable It should be interpreted as basic data.

더욱이 본 발명은 본 명세서에 표시된 실시 예들의 모든 가능한 조합들을 망라한다. 본 발명의 다양한 실시 예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시 예에 관련하여 본 발명의 사상 및 범위를 벗어나지 않으면서 다른 실시 예로 구현될 수 있다. 또한, 각각의 개시된 실시 예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 사상 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. Moreover, the present invention covers all possible combinations of the embodiments indicated herein. It should be understood that the various embodiments of the present invention are different from each other, but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be embodied in other embodiments without departing from the spirit and scope of the present invention in relation to one embodiment. In addition, it is to be understood that the location or arrangement of individual components in each disclosed embodiment may be changed without departing from the spirit and scope of the present invention. Accordingly, the detailed description to be described below is not intended to be taken in a limiting sense, and the scope of the present invention, if properly described, is limited only by the appended claims, along with all scopes equivalent to those claimed by the claims. Like reference numerals in the drawings refer to the same or similar functions over several aspects.

본 명세서에서 달리 표시되거나 분명히 문맥에 모순되지 않는 한, 단수로 지칭된 항목은, 그 문맥에서 달리 요구되지 않는 한, 복수의 것을 아우른다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Unless otherwise indicated in this specification or clearly contradicting the context, items referred to in the singular encompass the plural unless otherwise required by that context. In addition, in describing the present invention, if it is determined that a detailed description of a related known configuration or function may obscure the subject matter of the present invention, a detailed description thereof will be omitted.

이하, 통상의 기술자가 본 발명을 용이하게 실시할 수 있도록 하기 위하여, 본 발명의 바람직한 실시 예들에 관하여 첨부된 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings in order to allow those skilled in the art to easily implement the present invention.

도 1은 본 개시서에 따른 데이터 암호화 방법 및/또는 데이터 복호화 방법을 수행하는 연산 장치의 예시적 구성을 개략적으로 도시한 개념도이다.1 is a conceptual diagram schematically showing an exemplary configuration of a computing device that performs a data encryption method and/or a data decryption method according to the present disclosure.

도 1을 참조하면, 본 발명의 일 실시 예에 따른 연산 장치(100)는, 입출력부(110) 및 프로세서(120)를 포함하며, 상기 입출력부(110)를 통하여 외부와 직간접적으로 데이터 신호를 송수신할 수 있다.Referring to FIG. 1, an operation device 100 according to an embodiment of the present invention includes an input/output unit 110 and a processor 120, and a data signal directly or indirectly to the outside through the input/output unit 110 Can send and receive.

구체적으로, 상기 연산 장치(100)는, 전형적인 컴퓨터 하드웨어(예컨대, 컴퓨터 프로세서, 메모리, 스토리지, 입력 장치 및 출력 장치, 기타 기존의 연산 장치의 구성요소들을 포함할 수 있는 장치; 라우터, 스위치 등과 같은 전자 통신 장치; 네트워크 부착 스토리지(NAS; network-attached storage) 및 스토리지 영역 네트워크(SAN; storage area network)와 같은 전자 정보 스토리지 시스템)와 컴퓨터 소프트웨어(즉, 연산 장치로 하여금 특정의 방식으로 기능하게 하는 명령어들)의 조합을 이용하여 원하는 시스템 성능을 달성하는 것일 수 있다.Specifically, the computing device 100 is a device that may include components of typical computer hardware (eg, computer processor, memory, storage, input device and output device, and other existing computing devices; routers, switches, etc.) Electronic communication devices; electronic information storage systems such as network-attached storage (NAS) and storage area networks (SANs) and computer software (i.e., allowing computing devices to function in a specific way) Instructions) to achieve the desired system performance.

이와 같은 연산 장치의 입출력부(110)는 요청과 응답을 송수신할 수 있는바, 상기 요청은 암호화의 대상인 평문 데이터 신호의 입력만으로, 상기 응답은 그 평문 데이터 신호로부터 얻은 암호문의 출력만으로 구성될 수 있고(암호화의 경우), 반대로 상기 요청이 복호화의 대상인 암호문 데이터 신호의 입력만으로, 상기 응답은 그 암호문 데이터 신호로부터 얻은 평문의 출력만으로 구성될 수도 있다(복호화의 경우).The input/output unit 110 of such a computing device can transmit/receive a request and a response, and the request may consist of only input of a plaintext data signal that is an object of encryption, and the response may consist of only output of a ciphertext obtained from the plaintext data signal. Alternatively (in the case of encryption), on the contrary, the request may consist of only the input of the ciphertext data signal to be decrypted, and the response may consist of only the output of the plaintext obtained from the ciphertext data signal (in the case of decryption).

물론 상기 요청과 상기 응답이 오류 정정(error correction)과 모드 변환(암호화 모드, 복호화 모드 등) 등의 적절한 제어를 위한 다른 신호를 포함할 수 있음은 물론이다. 또한, 일 예시로서 그러한 요청과 응답이 동일한 TCP(transmission control protocol) 세션(session)에 의하여 이루어질 수도 있고, UDP(user datagram protocol) 데이터그램(datagram)으로서 송수신될 수도 있을 것이지만 이에 한정되지 않는다.Of course, the request and the response may include other signals for appropriate control such as error correction and mode conversion (encryption mode, decryption mode, etc.). In addition, as an example, such a request and a response may be made by the same transmission control protocol (TCP) session, or may be transmitted and received as a user datagram protocol (UDP) datagram, but is not limited thereto.

또한, 연산 장치의 프로세서(120)는 MPU(micro processing unit), CPU(central processing unit), GPU(graphics processing unit), NPU(neural processing unit) 또는 TPU(tensor processing unit), 캐시 메모리(cache memory), 데이터 버스(data bus) 등의 하드웨어 구성을 포함할 수 있다. 또한, 범용 컴퓨팅 장치인 경우 운영체제, 특정 목적을 수행하는 애플리케이션의 소프트웨어 구성을 더 포함할 수도 있다.In addition, the processor 120 of the computing device includes a micro processing unit (MPU), a central processing unit (CPU), a graphics processing unit (GPU), a neural processing unit (NPU), or a tensor processing unit (TPU), and a cache memory. ), data bus, and the like. In addition, the general-purpose computing device may further include an operating system and a software configuration of an application that performs a specific purpose.

도 2는 본 개시서의 데이터 암호화 방법과 데이터 복호화 방법에 이용되는 연산 장치의 하드웨어 또는 소프트웨어 구성요소를 도시한 예시적 블록도이다.FIG. 2 is an exemplary block diagram showing hardware or software components of a computing device used in a data encryption method and a data decryption method of the present disclosure.

도 2를 참조하면, 연산 장치(100)는 평문 또는 암호문을 획득하는 입력부(210), 암호화·복호화부(220) 및 암호문 또는 평문을 출력하는 출력부(230)를 포함할 수 있다. Referring to FIG. 2, the computing device 100 may include an input unit 210 for acquiring a plain text or an encrypted text, an encryption/decryption unit 220 and an output unit 230 for outputting an encrypted text or a plain text.

입력부(210)는 본 개시서에 따른 암호화 방법이 적용되는 평문 또는 본 개시서에 따른 복호화 방법이 적용되는 암호문을 획득하도록 구성되고, 출력부(230)는 본 개시서에 따른 방법을 수행한 결과로 산출되는 암호문 또는 평문을 출력하도록 구성되는바, 도 2에 도시된 개별 모듈들은, 예컨대, 연산 장치(100)에 포함된 입출력부 혹은 통신부(110)나 프로세서(120), 또는 상기 입출력부(110) 및 프로세서(120)의 연동에 의하여 구현되거나 입력부(210), 출력부(230) 각각이 연산 장치(100)의 입력 단자 또는 출력 단자 자체인 것으로 구현될 수도 있다.The input unit 210 is configured to obtain a plain text to which the encryption method according to the present disclosure is applied or a cipher text to which the decryption method according to the present disclosure is applied, and the output unit 230 is a result of performing the method according to the present disclosure. The individual modules shown in FIG. 2 are configured to output an encrypted text or plain text calculated as, for example, an input/output unit included in the computing device 100 or a communication unit 110 or a processor 120, or the input/output unit ( 110) and the processor 120 may be interlocked, or each of the input unit 210 and the output unit 230 may be implemented as an input terminal or an output terminal of the computing device 100 itself.

암호화·복호화부(220)는 연산부, 제어부, 및 이들과 빠르게 소통되는 레지스터 및/또는 외부 메모리를 포함하는 다목적의 범용 마이크로프로세서, 마이크로컨트롤러, 임베디드 마이크로컨트롤러, 프로그래머블 디지털 신호 프로세서 또는 기타 프로그래머블 장치로 된 프로세서에 의하여 실현될 수 있으나, 본 개시서에 따른 방법들을 수행하도록 설계된 주문형 집적회로(application specific integrated circuit; ASIC), 프로그래머블 게이트 어레이(programmable gate array), 프로그래머블 어레이 로직(Programmable Array Logic; PAL) 또는 전자 신호들을 처리하기 위해 구성될 수 있는 임의의 다른 장치 또는 장치들의 조합으로 된 프로세서에 의해서도 실시될 수도 있다. 요컨대, 본 개시서의 방법을 수행하는 하드웨어는 범용 컴퓨터 및/또는 전용 연산 장치 또는 특정 연산 장치 또는 특정 연산 장치의 특별한 모습 또는 구성요소를 포함할 수 있다.The encryption/decryption unit 220 is composed of a multi-purpose general-purpose microprocessor, microcontroller, embedded microcontroller, programmable digital signal processor, or other programmable device including an operation unit, a control unit, and registers and/or external memory that communicate with them quickly. Although it may be realized by a processor, an application specific integrated circuit (ASIC), programmable gate array, programmable array logic (PAL) or designed to perform the methods according to the present disclosure It may also be implemented by a processor in any other device or combination of devices that may be configured to process electronic signals. In short, the hardware performing the method of the present disclosure may include a general-purpose computer and/or a dedicated computing device or a specific computing device or special features or components of a specific computing device.

암호화·복호화부(220)는 구체적인 하드웨어 모듈들 또는 이에 의하여 구현되는 소프트웨어 모듈들로서 마스크 값 생성부(221), 마스크 값 적용부(222), 라운드 키 적용부(223), 치환 연산 수행부(224), 확산 연산 수행부(225) 및 마스크 값 해제부(226)를 포함할 수 있다.The encryption/decryption unit 220 is a mask value generator 221, a mask value application unit 222, a round key application unit 223, and a substitution operation execution unit 224 as specific hardware modules or software modules implemented therein. ), a diffusion operation performing unit 225 and a mask value canceling unit 226.

후술하는 LUT(look-up table) 방식에 따른 룩업 테이블을 비일시적 또는 일시적으로 저장함으로써 프로세서(222)가 이를 연산에 이용할 수 있게 하는 룩업 테이블 보유부(227; 미도시)를 더 포함할 수 있다.A look-up table holding unit 227 (not shown) that allows the processor 222 to use the look-up table according to a look-up table (LUT) method to be described later in a non-temporary or temporary manner may be further included. .

도 3은 본 개시서의 일 실시 예에 따른 마스킹 기법이 적용되기 전의 데이터 암호화 방법("PIPO 데이터 암호화 방법"이라 함)을 개념적으로 나타낸 블록도이고, 아래 표 1은 PIPO 데이터 암호화 방법의 구체적인 일 예시를 설명하기 위하여 본 개시서에서 이용되는 기호를 정의한 것이다.3 is a block diagram conceptually showing a data encryption method (referred to as a “PIPO data encryption method”) before a masking method according to an embodiment of the present disclosure is applied, and Table 1 below is a specific example of a PIPO data encryption method. In order to explain an example, the symbols used in the present disclosure are defined.

PP 64비트 평문64-bit plaintext KK 비밀 키 K=(Kn-1 || ... || K0)이고, Ki는 각각 64비트, K0는 하위 64비트 (0≤i<n)Secret key K=(K n-1 || ... || K 0 ), K i is 64 bits each, K 0 is the lower 64 bits (0≤i<n) rr 라운드 횟수Number of rounds RKi RK i 64비트 라운드 키, RKi=Ki mod n(0≤i≤r)64-bit round key, RK i =K i mod n (0≤i≤r) ci c i 라운드 상수, ci=i(0≤i<r)Round constant, c i =i(0≤i<r)

Figure 112019111641806-pat00001
Figure 112019111641806-pat00001
XOR(eXclusive-OR; 배타적 논리합) 연산XOR (eXclusive-OR; exclusive OR) operation <<< i<<< i 왼쪽으로 i비트 순환 시프트(로테이션) 연산Left i-bit cyclic shift (rotation) operation S8 S 8 8비트 (입출력) S-박스 테이블8-bit (in/out) S-box table

먼저, 도 3을 참조하면, PIPO 데이터 암호화 방법은, 제1 입력값인 64비트 평문을 획득하는 단계(S100')를 포함한다. 단계(S100')의 수행 후, 상기 PIPO 데이터 암호화 방법은, 소정의 라운드 횟수 r에 대하여, i = 0에서부터 i = r - 1에 이르기까지, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과 (ii) 제i+1 입력값을 XOR 연산한 결괏값에 대하여, 치환 연산{'S-Layer'(S-레이어)로 도시됨} 및 확산 연산{'P-Layer'(P-레이어)로 도시됨}을 수행하여 제i+2 입력값을 산출하는 프로세스를 i를 1씩 증가시키며 반복 수행하는 단계(S200')를 더 포함한다.First, referring to FIG. 3, the PIPO data encryption method includes a step (S100') of obtaining a 64-bit plaintext as a first input value. After performing step (S100'), the PIPO data encryption method, for a predetermined number of rounds r, from i = 0 to i = r-1, (i) i+1th round key RK i and For the result value obtained by XOR operation of i+1 round constant c i and (ii) the result value obtained by XOR operation of the i+1th input value, substitution operation {shown as'S-Layer'(S-layer)} and The process of calculating the i+2th input value by performing the spreading operation (shown as'P-Layer' (shown as P-layer)) is repeated by increasing i by one (S200').

여기에서 개별 라운드 키는, 예를 들어, 소정의 키 길이 수 n에 대하여, 64비트 길이의 키 분절 Ki(0≤i<n)이 K = (Kn-1|| ... ||K0)를 만족시키도록 64×n 비트의 비밀키 K가 생성될 수 있고, 제i+1 라운드 키 RKi는 Ki mod n(0≤i<n)로 정해질 수 있다. 여기에서 비밀키는 무작위적(randomly)으로 생성될 수 있고, 라운드 상수는 라운드마다 상이하게 정해질 수 있다. 예를 들어, 표 1과 같이 라운드 상수는 ci=i일 수 있다.Here, the individual round key is, for example, for a given number of key lengths n, a 64-bit long key segment K i (0 ≤ i <n) is K = (K n-1 || ... || The secret key K of 64×n bits may be generated to satisfy K 0 ), and the i+1th round key RK i may be determined as K i mod n (0≦i<n) . Here, the secret key can be randomly generated, and the round constant can be set differently for each round. For example, as shown in Table 1, the round constant may be c i =i.

도 4는 본 개시서에서 이용되는 치환 연산(substitution) 및 확산 연산(permutation)을 64비트 평문에 대하여 적용하는 방식을 개념적으로 나타낸 도면이다.4 is a diagram conceptually showing a method of applying substitution and permutation used in the present disclosure to 64-bit plaintext.

도 3 및 도 4를 참조하면, 상기 치환 연산(S-레이어)의 일 예시는 아래 표 2에서 정의되는 바와 같다.3 and 4, an example of the substitution operation (S-layer) is as defined in Table 2 below.

S-레이어S-layer 입력input 64-비트

Figure 112019111641806-pat00002
64-bit
Figure 112019111641806-pat00002
출력Print 64-비트
Figure 112019111641806-pat00003
64-bit
Figure 112019111641806-pat00003
Figure 112019111641806-pat00004
Figure 112019111641806-pat00004

달리 말하자면, 마스킹되지 않은 치환 연산은 64비트 입력값에 대하여 적용되는 64비트 치환 연산 S64이고, 상기 64비트 입력값을 가로쓰기로 오른쪽 상단에서 왼쪽 하단까지 8×8의 비트열로 표현한 경우, 8개 열들 각각의 상단 열로부터 하단 열까지 취한 비트들(x0, x1, ..., x7)로 구성된 8개의 8비트 값들 각각에 제2 치환 연산 S8을 적용하는 연산이다.PIPO 데이터 암호화 방법의 일 실시 예에서 상기 제2 치환 연산 S8의 입력값의 왼쪽 4비트를 행의 상단으로부터 하단까지 열거하고 오른쪽 4비트를 열의 왼쪽으로부터 오른쪽까지 열거하여 상기 입력값에 대응하는 상기 치환 연산의 출력값을 나타낸 S-박스 테이블(S-box table)은 도 5에 도시된 바와 같다.In other words, the unmasked substitution operation is a 64-bit substitution operation S 64 applied to a 64-bit input value, and the 64-bit input value is expressed as an 8×8 bit string from the upper right to the lower left by horizontal writing, This operation applies the second substitution operation S 8 to each of eight 8-bit values composed of bits (x 0 , x 1 , ..., x 7 ) taken from the upper row to the lower row of each of the eight columns. In one embodiment of the data encryption method, the left 4 bits of the input value of the second substitution operation S 8 are enumerated from the top to the bottom of the row, and the right 4 bits are enumerated from the left to the right of the column to correspond to the input value. An S-box table representing the output value of the operation is as shown in FIG. 5.

이 제2 치환 연산 S8은 3개 라운드를 가진 파이스텔(3-round Feistel) 구조에 동일한 4비트 S-박스(S-box), 즉, 제3 치환 연산 S4를 세 번 사용하여 설계한 8비트 S-박스로서, 대합적인(involutive) 성질을 가진다. 즉, S8은 S8의 역함수와 동일하기 때문에 암호화와 복호화 알고리즘에서 사용하는 치환 연산 S64을 별도로 구현할 필요가 없으므로 경량성의 장점을 가진다.This second substitution operation S 8 is designed using the same 4-bit S-box, that is, the third substitution operation S 4 three times in a 3-round Feistel structure. As an 8-bit S-box, it has an involutive property. That is, since S 8 is the same as the inverse function of S 8 , it is not necessary to separately implement the substitution operation S 64 used in the encryption and decryption algorithms, so it has the advantage of lightweight.

한편, 상기 확산 연산(P-레이어)은, 64비트 입력값을 가로쓰기로 오른쪽 상단에서 왼쪽 하단까지 8×8의 비트열로 표현한 경우, 상기 비트열에 대한 총 7회의 열별 일방향 비트 로테이션(rotation)으로써 구현될 수 있다.On the other hand, the spreading operation (P-layer) is, when a 64-bit input value is expressed as an 8×8 bit string from the upper right to the lower left by horizontal writing, a total of 7 unidirectional bit rotations per column for the bit string Can be implemented as

구체적인 상기 확산 연산의 일 예시는 아래 표 3에서 정의되는 바와 같다.A specific example of the spreading operation is as defined in Table 3 below.

P-레이어P-layer 입력input 64-비트

Figure 112019111641806-pat00005
64-bit
Figure 112019111641806-pat00005
출력Print 64-비트
Figure 112019111641806-pat00006
64-bit
Figure 112019111641806-pat00006
Figure 112019111641806-pat00007
Figure 112019111641806-pat00007

달리 말하자면, 상기 확산 연산의 상기 열별 일방향 비트 로테이션은, 상기 비트열의 제2 행에 대한 3만큼의 좌 로테이션, 상기 비트열의 제3 행에 대한 6만큼의 좌 로테이션, 상기 비트열의 제4 행에 대한 1만큼의 좌 로테이션, 상기 비트열의 제5 행에 대한 4만큼의 좌 로테이션, 상기 비트열의 제6 행에 대한 2만큼의 좌 로테이션, 상기 비트열의 제7 행에 대한 5만큼의 좌 로테이션, 및 상기 비트열의 제8 행에 대한 7만큼의 좌 로테이션으로 구성된 제1 비트 로테이션 연산으로 구성될 수 있다. 통상의 기술자는 상기 제1 비트 로테이션 연산과 동치인 우 로테이션들로만 구성된 제2 비트 로테이션 연산을 당연히 생각해낼 수 있을 것이다.단계(S200')의 수행 후, 상기 PIPO 데이터 암호화 방법은, 제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값과 제r+1 입력값을 XOR 연산한 결괏값을 암호문으로 산출하는 단계(S300')를 더 포함한다.In other words, the one-way bit rotation for each column of the spreading operation is a left rotation of 3 for the second row of the bit column, a left rotation of 6 for the third row of the bit column, and a fourth row of the bit column. 1 left rotation, 4 left rotation for the fifth row of the bit string, 2 left rotation for the 6th row of the bit string, 5 left rotation for the 7th row of the bit string, and the It may be configured by a first bit rotation operation consisting of 7 left rotations for the eighth row of the bit column. A person of ordinary skill in the art may naturally think of a second bit rotation operation composed of only right rotations equal to the first bit rotation operation. After performing step S200', the PIPO data encryption method includes: A step (S300') of calculating a result value obtained by XORing the round key RK r and the r+1th round constant c r and a result value obtained by XORing the r+1th input value as a ciphertext (S300').

유리하게는, PIPO 데이터 암호화 방법은, 상기 키 길이 수 n는 2로, 상기 라운드 횟수 r는 14로 하여 수행될 수도 있고(이 경우를 "PIPO-64/128"로 지칭함), 상기 키 길이 수 n는 4로, 상기 라운드 횟수 r는 18로 하여 수행될 수도 있다(이 경우를 "PIPO-64/256"이라 함). 통상의 기술자는 PIPO 데이터 암호화 방법이 이러한 키 길이 수와 라운드 횟수에 한정되지 않을 수 있음을 이해할 수 있다.Advantageously, the PIPO data encryption method may be performed with the key length number n being 2, and the round number r being 14 (this case is referred to as "PIPO-64/128"), and the key length number n may be 4 and the number of rounds r may be 18 (this case is referred to as "PIPO-64/256"). One of ordinary skill in the art can understand that the PIPO data encryption method may not be limited to this number of key lengths and number of rounds.

지금까지 설명된 PIPO 데이터 암호화 방법은, 8비트 치환 테이블과 왼쪽 로테이션 연산만을 이용하여 설계되었으므로 IoT 환경에서의 경량 구현에 적합하다는 장점이 있다.The PIPO data encryption method described so far has an advantage that it is suitable for lightweight implementation in an IoT environment because it is designed using only an 8-bit permutation table and a left rotation operation.

도 6은 앞서 설명된 PIPO 데이터 암호화 방법에 본 개시서의 일 실시 예에 따른 마스킹 기법을 적용한 데이터 암호화 방법을 예시적으로 나타낸 흐름도이며, 도 7은 본 개시서의 일 실시 예에 따른 마스킹 기법이 적용된 데이터 암호화 방법을 개념적으로 나타낸 블록도이다.6 is a flowchart illustrating a data encryption method in which a masking technique according to an embodiment of the present disclosure is applied to the PIPO data encryption method described above, and FIG. 7 is a masking technique according to an embodiment of the present disclosure. It is a block diagram conceptually showing the applied data encryption method.

도 6 및 도 7을 참조하면, 상기 마스킹 기법이 적용된 본 개시서에 따른 데이터 암호화 방법은, 먼저, 평문 입력부(210)에서 제1 입력값인 평문을 획득하고, 마스크 값 적용부(222)에서 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 상기 제1 입력값을 마스킹함으로써 제1 마스킹 입력값을 산출하는 단계(S100)를 포함한다.6 and 7, in the data encryption method according to the present disclosure to which the masking technique is applied, first, a plaintext input unit 210 obtains a first input value, and a mask value application unit 222 And calculating a first masking input value by masking the first input value through an XOR operation with an S-layer output mask (M') 8 (S100).

한편, 상기 S-레이어 출력 마스크 (M')8 및 S-레이어 입력 마스크 M8는 마스크 값 적용부(222)에서 이용되기 위하여 마스크 값 생성부(221)에서 랜덤 생성된다(S050). 마스크 값 적용부(222)에서 이용되어야 한다는 제약 내에서만 단계(S050)는 논리적 순서에 구속된다.Meanwhile, the S-layer output mask (M') 8 and the S-layer input mask M 8 are randomly generated by the mask value generator 221 in order to be used by the mask value applying unit 222 (S050). Step S050 is restricted to a logical order only within the constraint that it must be used in the mask value applying unit 222.

본 개시서에서 이용되는 마스크 관련 값들의 예시는 아래 표 4에 나타난 바와 같다.Examples of mask-related values used in the present disclosure are shown in Table 4 below.

MM 8비트 S-박스 입력 마스크

Figure 112019111641806-pat00008
8-bit S-box input mask
Figure 112019111641806-pat00008
M'M' 8비트 S-박스 출력 마스크
Figure 112019111641806-pat00009
8-bit S-box output mask
Figure 112019111641806-pat00009
(M)8 (M) 8 64비트 S-레이어 입력 마스크64-bit S-layer input mask (M')8 (M') 8 64비트 S-레이어 출력 마스크64-bit S-layer output mask (M)8(M')8 (M) 8 (M') 8 64비트 라운드 키 마스크
Figure 112019111641806-pat00010
64-bit round key mask
Figure 112019111641806-pat00010

달리 말하자면, 상기 S-레이어 입력 마스크 M8는 S-박스 입력 마스크 M을 8회 연접한 수이되, 상기 S-박스 입력 마스크 M은 8비트 랜덤 수일 수 있으며, 상기 S-레이어 출력 마스크 (M')8는 S-박스 출력 마스크 M'를 8회 연접한 수이되, 상기 S-박스 출력 마스크 M'은 8비트 랜덤 수일 수 있다. 여기에서 라운드 키 마스크는 상기 S-레이어 입력 마스크 M8와 상기 S-레이어 출력 마스크 (M')8를 XOR 연산한 결괏값일 수 있다. 계속해서 도 6을 참조하면, 상기 데이터 암호화 방법은, 라운드 키 적용부(223)에서 소정의 라운드 횟수 r에 대하여 i = 0에서부터 i = r - 1에 이르기까지, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과, 상기 S-레이어 출력 마스크 (M')8와 S-레이어 입력 마스크 M8을 XOR 연산한 결괏값인 라운드 키 마스크를 XOR 연산한 결괏값으로서 생성된 제i+1 마스킹 라운드 키와 (ii) 제i+1 마스킹 입력값을 XOR 연산하고(S220), 그 XOR 연산의 결괏값에 대하여, 치환 연산 수행부(224)에 의한 마스킹된 치환 연산의 수행(S240) 및 확산 연산 수행부(225)에 의한 마스킹된 확산 연산의 수행(S260)을 거쳐 제i+2 마스킹 입력값을 산출하는 프로세스를 i를 1씩 증가시키며 반복 수행하는 단계(S200)를 더 포함한다.In other words, the S-layer input mask M 8 is a number obtained by concatenating the S-box input mask M 8 times, and the S-box input mask M may be an 8-bit random number, and the S-layer output mask (M' ) 8 is a number obtained by concatenating the S-box output mask M'8 times, and the S-box output mask M'may be an 8-bit random number. Here, the round key mask may be a result obtained by performing an XOR operation of the S-layer input mask M 8 and the S-layer output mask (M') 8 . 6, in the data encryption method, from i = 0 to i = r-1 for a predetermined number of rounds r in the round key application unit 223, (i) the i+1 round The round key mask, which is the result obtained by XORing the key RK i and the i+1th round constant c i , and the result value obtained by XORing the S-layer output mask (M') 8 and the S-layer input mask M 8 . The i+1th masking round key generated as the result of the XOR operation and (ii) the i+1th masking input value are XORed (S220), and the result value of the XOR operation is replaced by a replacement operation execution unit 224 The process of calculating the i+2th masking input value by performing a masked substitution operation (S240) and performing a masked diffusion operation by the diffusion operation unit 225 (S260) by increasing i by 1 It further includes a repeating step (S200).

구체적으로, 상기 마스킹된 치환 연산은, 상기 마스킹된 치환 연산에 입력된 입력값과 상기 S-박스 입력 마스크 M을 XOR 연산한 결괏값이, 마스킹되지 않은 치환 연산에 입력됨으로써 상기 마스킹되지 않은 치환 연산으로부터 획득된 출력값과 상기 S-박스 출력 마스크 M'를 XOR 연산한 결괏값을 상기 마스킹된 치환 연산의 출력값으로서 되돌려주는 연산일 수 있다.Specifically, in the masked substitution operation, the unmasked substitution operation is performed by inputting the input value input to the masked substitution operation and the result value obtained by performing an XOR operation of the S-box input mask M to an unmasked substitution operation. It may be an operation for returning an output value obtained from XOR and a result value obtained by performing an XOR operation of the S-box output mask M'as an output value of the masked substitution operation.

상기 마스킹된 치환 연산의 입력값으로부터 바로 결괏값이 획득될 수 있도록, 마스킹된 S-박스 테이블이 아래 표 5에 도시된 바와 같은 방식으로 생성될 수 있다. A masked S-box table may be generated in a manner as shown in Table 5 below so that a result value can be obtained directly from the input value of the masked substitution operation.

마스킹된 S-박스의 생성Creation of a masked S-box 입력input S-박스 테이블 S8, 마스크

Figure 112019111641806-pat00011
S-box table S 8 , mask
Figure 112019111641806-pat00011
출력Print 마스킹된 S-박스 테이블 MS8 Masked S-box table MS 8
Figure 112019111641806-pat00012
Figure 112019111641806-pat00012

그러면, 상기 마스킹된 치환 연산, 즉, 마스킹된 S-레이어 연산은 아래 표 6과 같게 된다.Then, the masked substitution operation, that is, the masked S-layer operation is as shown in Table 6 below.

마스킹된 치환 연산(마스킹된 S-레이어)Masked substitution operation (masked S-layer) 입력input 64비트

Figure 112019111641806-pat00013
64-bit
Figure 112019111641806-pat00013
출력Print 64비트
Figure 112019111641806-pat00014
64-bit
Figure 112019111641806-pat00014
Figure 112019111641806-pat00015
Figure 112019111641806-pat00015

한편, 마스킹된 확산 연산은, 도 4와 같이 각 8비트(바이트)의 해당 위치의 비트를 취하여 연접(concatenate)한다. 이때, 서로 다른 위치의 비트를 취하므로 마스크 비트 값 mi(0≤i<8)의 충돌이 발생하지 않는다. 따라서 마스킹된 확산 연산은 도 4와 동일하다. 그렇다면 그 출력값의 마스크 값은 (M')8로 입력값의 마스크 값과 동일하다. 그 후, 상기 데이터 암호화 방법은, 제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값을 상기 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 마스킹함으로써 산출된 제r+1 마스킹 라운드 키와 제r+1 마스킹 입력값을 마스크 값 해제부(226)에서 XOR 연산한 결괏값을 암호문 출력부(230)에서 암호문으로 산출하는 단계(S300)를 더 포함한다.Meanwhile, the masked spreading operation is concatenated by taking a bit at a corresponding position of each 8 bits (byte) as shown in FIG. 4. At this time, since bits at different positions are taken, collision of mask bit values m i (0≦i<8) does not occur. Therefore, the masked spread operation is the same as in FIG. 4. If so, the mask value of the output value is (M') 8, which is the same as the mask value of the input value. Thereafter, the data encryption method masks the result value obtained by performing an XOR operation of the r+1th round key RK r and the r+1th round constant c r through an XOR operation with the S-layer output mask (M') 8. A step (S300) of calculating a result value obtained by XORing the calculated r+1th masking round key and the r+1th masking input value by the mask value canceling unit 226 as a ciphertext in the ciphertext output unit 230 (S300). Include.

여기까지 설명된 마스킹이 적용된 데이터 암호화 방법에 대응하는 마스킹이 적용된 데이터 복호화 방법은 정확하게 그 데이터 암호화 방법의 역연산을 순서대로 수행하는 것에 해당하므로, 통상의 기술자는 데이터 암호화 방법으로부터 쉽게 도출할 수 있을 것인바, 불필요한 세부 사항에서 발명의 요지를 흐리지 않도록 생략한다.The masked data decryption method corresponding to the masked data encryption method described so far corresponds to accurately performing the inverse operation of the data encryption method in order, so a person skilled in the art can easily derive from the data encryption method. As it is, it is omitted so as not to obscure the gist of the invention in unnecessary details.

요컨대, 마스킹이 적용된 PIPO 데이터 암호화 방법의 역연산을 수행함으로써 64비트 암호문으로부터 평문이 산출될 수 있다.In short, by performing the inverse operation of the masking applied PIPO data encryption method, the plaintext can be calculated from the 64-bit ciphertext.

지금까지 설명된 본 개시서의 PIPO 블록 암호화 및 복호화 방법 및 이에 마스킹을 적용한 암호화 및 복호화 방법에서는 치환 연산(S64)과 확산 연산(P64)이 면밀히 선택되었다. In the PIPO block encryption and decryption method of the present disclosure described so far, and the encryption and decryption method applying masking thereto, a substitution operation (S 64 ) and a spread operation (P 64 ) were carefully selected.

치환 연산(P64)은 8비트 로테이션(rotation) 연산만으로 구현이 가능하므로 연산의 종류가 단순화되어 하드웨어 및 소프트웨어 구현에 효율적이라는 장점도 있는데, 그 역연산도 마찬가지이다.Since the substitution operation (P 64 ) can be implemented only with an 8-bit rotation operation, the type of operation is simplified and thus it is effective in hardware and software implementation, and the inverse operation is the same.

본 개시서의 방법들은 설명의 편의상 하나의 프로세서에서 실현되는 것으로 예시되었으나, 암호화·복호화부는 하나의 프로세서 내에서 하나의 코어 또는 복수의 코어를 가진 것으로 구성될 수 있을 뿐만 아니라 복수개의 프로세서들이 서로 연동되도록 구성될 수도 있다는 점이 이해될 것이다. 또한 전술한 본 발명 방법의 각 단계는, 하나의 연산 장치가 직접 수행하거나 상기 하나의 연산 장치가 상기 하나의 연산 장치에 연동되는 타 연산 장치로 하여금 수행하도록 지원함으로써 수행될 수 있다.The methods of this disclosure have been illustrated as being implemented in one processor for convenience of explanation, but the encryption/decryption unit may be configured as having one core or a plurality of cores within one processor, as well as a plurality of processors interworking with each other. It will be appreciated that it may be configured to be possible. In addition, each step of the above-described method of the present invention may be performed by one computing device directly or by supporting the one computing device to perform other computing devices interlocked with the one computing device.

이와 같이 본 발명은 그 모든 실시 예 및 변형례에 걸쳐, 8비트 치환 테이블과 왼쪽 로테이션 연산만을 이용하여 설계되었으므로 IoT 환경에서의 경량 구현에 적합할 뿐만 아니라 비교적 적은 추가 리소스로도 부채널 분석 대응 마스킹 기법의 적용이 가능하고, 본 개시서에 따른 마스킹 기법에 의하여 1차 부채널 공격에 대한 안전성에 제공되는 효과가 있다. 이러한 1차 부채널 공격에 대한 안정성, 경량성은 본 개시서에 예시적으로 개시된 치환 연산, 확산 연산에 한정되지 않을 수 있음을 통상의 기술자는 이해할 수 있을 것이다.As described above, the present invention is designed using only an 8-bit permutation table and left rotation operation across all of its embodiments and modifications, so it is suitable for lightweight implementation in an IoT environment as well as masking for side-channel analysis with relatively few additional resources. The technique can be applied, and the masking technique according to the present disclosure has an effect of providing safety against a primary subchannel attack. It will be understood by those of ordinary skill in the art that stability and light weight against such a primary subchannel attack may not be limited to the substitution operation and spread operation exemplarily disclosed in the present disclosure.

위 실시 예의 설명에 기초하여 해당 기술분야의 통상의 기술자는, 본 발명의 방법 및/또는 프로세스들, 그리고 그 단계들이 하드웨어, 소프트웨어 또는 특정 용례에 적합한 하드웨어 및 소프트웨어의 임의의 조합으로 실현될 수 있다는 점을 명확하게 이해할 수 있다. 더욱이 본 발명의 기술적 해법의 대상물 또는 선행 기술들에 기여하는 부분들은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 기계 판독 가능한 기록 매체에 기록될 수 있다. 상기 기계 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 기계 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 통상의 기술자에게 공지되어 사용 가능한 것일 수도 있다. 기계 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD, Blu-ray와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 전술한 장치들 중 어느 하나뿐만 아니라 프로세서, 프로세서 아키텍처 또는 상이한 하드웨어 및 소프트웨어의 조합들의 이종 조합, 또는 다른 어떤 프로그램 명령어들을 실행할 수 있는 기계 상에서 실행되기 위하여 저장 및 컴파일 또는 인터프리트될 수 있는, C와 같은 구조적 프로그래밍 언어, C++ 같은 객체지향적 프로그래밍 언어 또는 고급 또는 저급 프로그래밍 언어(어셈블리어, 하드웨어 기술 언어들 및 데이터베이스 프로그래밍 언어 및 기술들)를 사용하여 만들어질 수 있는바, 기계어 코드, 바이트코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 이에 포함된다. Based on the description of the above embodiment, one of ordinary skill in the art can realize that the method and/or processes of the present invention, and the steps thereof, can be implemented in hardware, software, or any combination of hardware and software suitable for a specific application. Can understand the point clearly. Furthermore, the objects of the technical solution of the present invention or parts contributing to the prior art may be implemented in the form of program instructions that can be executed through various computer components and recorded in a machine-readable recording medium. The machine-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the machine-readable recording medium may be specially designed and configured for the present invention, or may be known and usable to those skilled in the computer software field. Examples of machine-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROM, DVD, Blu-ray, and magnetic-optical media such as floptical disks. (magneto-optical media), and hardware devices specially configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include a processor, a processor architecture, or a heterogeneous combination of different hardware and software combinations, as well as any one of the aforementioned devices, or storage and compilation or interpreting to be executed on a machine capable of executing any other program instructions. Can be made using a structured programming language such as C, an object-oriented programming language such as C++, or a high-level or low-level programming language (assembly, hardware description languages and database programming languages and technologies), machine code, This includes not only bytecode but also high-level language code that can be executed by a computer using an interpreter.

따라서 본 발명에 따른 일 태양에서는, 앞서 설명된 방법 및 그 조합들이 하나 이상의 연산 장치들에 의하여 수행될 때, 그 방법 및 방법의 조합들이 각 단계들을 수행하는 실행 가능한 코드로서 실시될 수 있다. 다른 일 태양에서는, 상기 방법은 상기 단계들을 수행하는 시스템들로서 실시될 수 있고, 방법들은 장치들에 걸쳐 여러 가지 방법으로 분산되거나 모든 기능들이 하나의 전용, 독립형 장치 또는 다른 하드웨어에 통합될 수 있다. 또 다른 일 태양에서는, 위에서 설명한 프로세스들과 연관된 단계들을 수행하는 수단들은 앞서 설명한 임의의 하드웨어 및/또는 소프트웨어를 포함할 수 있다. 그러한 모든 순차 결합 및 조합들은 본 개시서의 범위 내에 속하도록 의도된 것이다.Accordingly, in an aspect according to the present invention, when the above-described method and combinations thereof are performed by one or more computing devices, the method and combinations of methods may be implemented as executable code that performs each step. In another aspect, the method may be implemented as systems that perform the steps, and the methods may be distributed in several ways across devices or all functions may be integrated into one dedicated, standalone device or other hardware. In yet another aspect, the means for performing the steps associated with the processes described above may include any hardware and/or software described above. All such sequential combinations and combinations are intended to be within the scope of this disclosure.

예를 들어, 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다. 상기 하드웨어 장치는, 프로그램 명령어를 저장하기 위한 ROM/RAM 등과 같은 메모리와 결합되고 상기 메모리에 저장된 명령어들을 실행하도록 구성되는 MPU, CPU, GPU, TPU와 같은 프로세서를 포함할 수 있으며, 외부 장치와 신호를 주고받을 수 있는 입출력부를 포함할 수 있다. 덧붙여, 상기 하드웨어 장치는 개발자들에 의하여 작성된 명령어들을 전달받기 위한 키보드, 마우스, 기타 외부 입력장치를 포함할 수 있다.For example, the hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa. The hardware device may include a processor such as MPU, CPU, GPU, TPU, which is coupled with a memory such as ROM/RAM for storing program instructions and configured to execute instructions stored in the memory, and may include an external device and a signal It may include an input/output unit that can exchange and receive. In addition, the hardware device may include a keyboard, a mouse, and other external input devices for receiving commands written by developers.

이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시 예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시 예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 사람이라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.In the above, the present invention has been described by specific matters such as specific components and limited embodiments and drawings, but this is provided only to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments, Anyone with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.

따라서, 본 발명의 사상은 상기 설명된 실시 예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention is limited to the above-described embodiments and should not be defined, and all modifications equivalently or equivalently to the claims as well as the claims to be described later fall within the scope of the spirit of the present invention. I would say.

그와 같이 균등하게 또는 등가적으로 변형된 것에는, 예컨대 본 발명에 따른 방법을 실시한 것과 동일한 결과를 낼 수 있는, 논리적으로 동치(logically equivalent)인 방법이 포함될 것인바, 본 발명의 진의 및 범위는 전술한 예시들에 의하여 제한되어서는 아니되며, 법률에 의하여 허용 가능한 가장 넓은 의미로 이해되어야 한다.Such equivalently or equivalently modified ones will include, for example, a logically equivalent method capable of producing the same result as that of carrying out the method according to the present invention, the true meaning and scope of the present invention. Is not to be limited by the above-described examples, and should be understood in the broadest possible meaning by law.

Claims (12)

데이터를 처리하여 암호화하는 방법에 있어서,
(a) 제1 입력값인 평문을 획득하고, S-레이어 출력 마스크 (M')8와의 XOR(eXclusive-OR; 배타적 논리합) 연산을 통하여 상기 제1 입력값을 마스킹함으로써 제1 마스킹 입력값을 산출하는 단계;
(b) 소정의 라운드 횟수 r에 대하여 i = 0에서부터 i = r - 1에 이르기까지, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과, 상기 S-레이어 출력 마스크 (M')8와 S-레이어 입력 마스크 M8을 XOR 연산한 결괏값인 라운드 키 마스크를 XOR 연산한 결괏값으로서 생성된 제i+1 마스킹 라운드 키와 (ii) 제i+1 마스킹 입력값을 XOR 연산한 결괏값에 대하여, 마스킹된 치환 연산 및 마스킹된 확산 연산을 수행하여 제i+2 마스킹 입력값을 산출하는 프로세스를 i를 1씩 증가시키며 반복 수행하는 단계; 및
(c) 제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값을 상기 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 마스킹함으로써 산출된 제r+1 마스킹 라운드 키와 제r+1 마스킹 입력값을 XOR 연산한 결괏값을 암호문으로 산출하는 단계
를 포함하는 데이터 암호화 방법.
In the method of processing and encrypting data,
(a) A first masking input value is obtained by obtaining a plaintext as a first input value and masking the first input value through an XOR (eXclusive-OR) operation with an S-layer output mask (M') 8 Calculating;
(b) From i = 0 to i = r-1 for a predetermined number of rounds r, (i) the result of XOR operation of the i+1th round key RK i and the i+1th round constant c i and , The i+1th masking round key generated as a result of XOR operation of the round key mask, which is the result of XOR operation of the S-layer output mask (M') 8 and the S-layer input mask M 8 , and (ii) Repeating the process of calculating the i+2th masking input value by performing a masked substitution operation and a masked diffusion operation on the result value obtained by XOR operation of the i+1th masking input value, increasing i by 1 ; And
(c) The r+1 th round key RK r and the r+1 th round constant c r are XORed and the result is masked through XOR operation with the S-layer output mask (M') 8 1 Step of calculating the result of XOR operation of the masking round key and the r+1th masking input value as a ciphertext
Data encryption method comprising a.
제1항에 있어서,
상기 평문, 상기 암호문, 상기 S-레이어 입력 마스크 M8, 상기 S-레이어 출력 마스크 (M')8 및 상기 라운드 키 마스크는 64개의 비트로 구성되고,
소정의 키 길이 수 n에 대하여,
64비트 길이의 키 분절 Ki(0≤i<n)이 K = (Kn-1|| ... ||K0)를 만족시키도록 64×n 비트의 비밀키 K가 생성되고,
제i+1 라운드 키 RKi는 Ki mod n(0≤i<n)로 정해지는, 데이터 암호화 방법.
The method of claim 1,
The plain text, the cipher text, the S-layer input mask M 8 , the S-layer output mask (M') 8, and the round key mask consist of 64 bits,
For a given number of key lengths n,
A 64×n-bit secret key K is generated so that a 64 - bit long key segment K i(0≤i<n) satisfies K = (K n-1 || ... ||K 0 ),
The i+1th round key RK i is determined by K i mod n (0≤i<n) .
제2항에 있어서,
상기 키 길이 수 n는 2이고 상기 라운드 횟수 r는 14이거나
상기 키 길이 수 n는 4이고 상기 라운드 횟수 r는 18인, 데이터 암호화 방법.
The method of claim 2,
The key length number n is 2 and the number of rounds r is 14 or
The key length number n is 4 and the number of rounds r is 18.
제2항에 있어서,
상기 S-레이어 입력 마스크 M8는 S-박스 입력 마스크 M을 8회 연접한 수이되, 상기 S-박스 입력 마스크 M은 8비트 랜덤 수이고,
상기 S-레이어 출력 마스크 (M')8는 S-박스 출력 마스크 M'를 8회 연접한 수이되, 상기 S-박스 출력 마스크 M'은 8비트 랜덤 수이며,
상기 라운드 키 마스크는 상기 S-레이어 입력 마스크 M8와 상기 S-레이어 출력 마스크 (M')8를 XOR 연산한 결괏값인, 데이터 암호화 방법.
The method of claim 2,
The S-layer input mask M 8 is a number obtained by concatenating the S-box input mask M 8 times, and the S-box input mask M is an 8-bit random number,
The S-layer output mask (M') 8 is a number obtained by concatenating the S-box output mask M'8 times, and the S-box output mask M'is an 8-bit random number,
The round key mask is a result of an XOR operation of the S-layer input mask M 8 and the S-layer output mask (M') 8 .
제4항에 있어서,
상기 마스킹된 치환 연산은,
상기 마스킹된 치환 연산에 입력된 입력값과 상기 S-박스 입력 마스크 M을 XOR 연산한 결괏값이, 마스킹되지 않은 치환 연산에 입력됨으로써 상기 마스킹되지 않은 치환 연산으로부터 획득된 출력값과 상기 S-박스 출력 마스크 M'를 XOR 연산한 결괏값을 상기 마스킹된 치환 연산의 출력값으로서 되돌려주는 연산이고,
상기 마스킹되지 않은 치환 연산은,
64비트 입력값에 대하여 적용되는 64비트 치환 연산 S64이고,
상기 64비트 입력값을 가로쓰기로 오른쪽 상단에서 왼쪽 하단까지 8×8의 비트열로 표현한 경우, 8개 열들 각각의 상단 열로부터 하단 열까지 취한 비트들(x0, x1, ..., x7)로 구성된 8개의 8비트 값들 각각에 제2 치환 연산 S8을 적용하는 연산인, 데이터 암호화 방법.
The method of claim 4,
The masked substitution operation,
The output value obtained from the unmasked substitution operation and the S-box output by inputting the input value input to the masked substitution operation and the result value obtained by XOR operation of the S-box input mask M are input to an unmasked substitution operation. This is an operation that returns the result of the XOR operation of the mask M'as the output value of the masked substitution operation,
The unmasked substitution operation,
It is a 64-bit substitution operation S 64 applied to a 64-bit input value,
When the 64-bit input value is expressed as an 8×8 bit string from the top right to the bottom left by horizontal writing, bits taken from the top column to the bottom column of each of the 8 columns (x 0 , x 1 , ..., x 7 ), which is an operation of applying a second substitution operation S 8 to each of eight 8-bit values composed of).
제5항에 있어서,
상기 제2 치환 연산의 입력값의 왼쪽 4비트를 행의 상단으로부터 하단까지 열거하고 오른쪽 4비트를 열의 왼쪽으로부터 오른쪽까지 열거하여 상기 입력값에 대응하는 상기 제2 치환 연산의 출력값을 나타낸 S-박스 테이블(S-box table)은,
Figure 112020086998994-pat00016

와 같이 정해지고,
상기 마스킹된 치환 연산은 상기 S-박스 테이블로부터 도출된 마스킹된 S-박스 테이블을 이용하여 수행되는, 데이터 암호화 방법.
The method of claim 5,
S-box showing the output value of the second substitution operation corresponding to the input value by enumerating the left 4 bits of the input value of the second substitution operation from the top to the bottom of the row and the right 4 bits from the left to the right of the column Table (S-box table),
Figure 112020086998994-pat00016

Is determined as,
The masked substitution operation is performed using a masked S-box table derived from the S-box table.
제3항에 있어서,
상기 확산 연산은,
상기 확산 연산의 64비트 입력값을 가로쓰기로 오른쪽 상단에서 왼쪽 하단까지 8×8의 비트열로 표현한 경우, 상기 비트열에 대한 총 7회의 열별 일방향 비트 로테이션(rotation)으로써 구현되고,
상기 마스킹된 확산 연산은, 마스킹되지 않은 확산 연산과 동일한, 데이터 암호화 방법.
The method of claim 3,
The diffusion operation,
When the 64-bit input value of the spreading operation is expressed as an 8×8 bit string from the top right to the bottom left by horizontal writing, it is implemented as a total of 7 unidirectional bit rotations per column for the bit string,
The masked spreading operation is the same as the unmasked spreading operation.
제7항에 있어서,
상기 열별 일방향 비트 로테이션은,
상기 비트열의 제2 행에 대한 3만큼의 좌 로테이션, 상기 비트열의 제3 행에 대한 6만큼의 좌 로테이션, 상기 비트열의 제4 행에 대한 1만큼의 좌 로테이션, 상기 비트열의 제5 행에 대한 4만큼의 좌 로테이션, 상기 비트열의 제6 행에 대한 2만큼의 좌 로테이션, 상기 비트열의 제7 행에 대한 5만큼의 좌 로테이션, 및 상기 비트열의 제8 행에 대한 7만큼의 좌 로테이션으로 구성된 제1 비트 로테이션 연산, 또는
상기 제1 비트 로테이션 연산과 동치인 우 로테이션들로 구성된 제2 비트 로테이션 연산인, 데이터 암호화 방법.
The method of claim 7,
The one-way bit rotation for each column,
3 left rotation for the second row of the bit column, 6 left rotation for the third row of the bit column, 1 left rotation for the fourth row of the bit column, and the fifth row of the bit column A left rotation of 4, a left rotation of 2 for the sixth row of the bit string, a left rotation of 5 for the seventh row of the bit string, and a left rotation of 7 for the eighth row of the bit string. First bit rotation operation, or
The data encryption method, which is a second bit rotation operation composed of right rotations equal to the first bit rotation operation.
데이터를 처리하여 복호화하는 방법에 있어서,
제1항에 따른 데이터 암호화 방법의 역연산을 수행함으로써 상기 암호문으로부터 상기 평문을 산출하는 데이터 복호화 방법.
In the method of processing and decoding data,
A data decryption method for calculating the plaintext from the encrypted text by performing an inverse operation of the data encryption method according to claim 1.
입출력 가능한 연산 장치로 하여금, 제1항 내지 제9항 중 어느 한 항의 방법을 수행하도록 구현된 명령어(instructions)를 포함하는, 기계 판독 가능한 비일시적 기록 매체에 저장된, 프로그램 코드.
The program code, stored in a machine-readable non-transitory recording medium, comprising instructions embodied to cause an input/output capable operation device to perform the method of any one of claims 1 to 9.
데이터를 처리하여 암호화하는 장치에 있어서,
제1 입력값인 평문을 획득하는 평문 입력부;
S-레이어 입력 마스크 M8 및 S-레이어 출력 마스크 (M')8를 랜덤 생성하는 마스크 값 생성부;
S-레이어 출력 마스크 (M')8와의 XOR(eXclusive-OR; 배타적 논리합) 연산을 통하여 상기 제1 입력값을 마스킹함으로써 제1 마스킹 입력값을 산출하는 마스크 값 적용부;
소정의 라운드 횟수 r에 대하여, 0 ≤ i ≤ r - 1을 만족하는 정수 i에 대하여, (i) 제i+1 라운드 키 RKi와 제i+1 라운드 상수 ci를 XOR 연산한 결괏값과, 상기 S-레이어 출력 마스크 (M')8와 S-레이어 입력 마스크 M8을 XOR 연산한 결괏값인 라운드 키 마스크를 XOR 연산한 결괏값으로서 생성된 제i+1 마스킹 라운드 키와 (ii) 제i+1 마스킹 입력값을 XOR 연산하는 라운드 키 적용부;
상기 라운드 키 적용부에 의한 결괏값에 대하여, 마스킹된 치환 연산을 수행하는 치환 연산 수행부;
상기 치환 연산 수행부에 의한 결괏값에 대하여, 마스킹된 확산 연산을 수행하여 제i+2 마스킹 입력값을 산출하는 확산 연산 수행부;
제r+1 라운드 키 RKr와 제r+1 라운드 상수 cr를 XOR 연산한 결괏값을 상기 S-레이어 출력 마스크 (M')8와의 XOR 연산을 통하여 마스킹함으로써 산출된 제r+1 마스킹 라운드 키와 제r+1 마스킹 입력값을 XOR 연산하는 마스크 값 해제부; 및
상기 마스크 값 해제부의 결괏값을 암호문으로 출력하는 암호문 출력부
를 포함하고,
상기 라운드 키 적용부, 상기 치환 연산 수행부, 상기 확산 연산 수행부의 연산은, i = 0에서부터 i = r - 1에 이르기까지 i가 1씩 증가되며 반복 수행되는, 데이터 암호화 장치.
In the device that processes and encrypts data,
A plain text input unit for obtaining a plain text as a first input value;
S- type layer 8 and the mask M S- output layer mask (M ') the mask value generation unit for generating a random 8;
A mask value applying unit for calculating a first masking input value by masking the first input value through an XOR (exclusive-OR) operation with an S-layer output mask (M') 8 ;
For an integer i that satisfies 0 ≤ i ≤ r-1 for a predetermined number of rounds r, (i) the result obtained by XORing the i+1th round key RK i and the i+1th round constant c i and , The i+1th masking round key generated as a result of XOR operation of the round key mask, which is the result of XOR operation of the S-layer output mask (M') 8 and the S-layer input mask M 8 , and (ii) A round key application unit that performs an XOR operation on the i+1th masking input value;
A substitution operation performing unit for performing a masked substitution operation on the result value by the round key application unit;
A diffusion operation performing unit for calculating an i+2th masking input value by performing a masked diffusion operation on the result value by the substitution operation unit;
The r+1th masking round calculated by masking the result of XOR operation of the r+1th round key RK r and the r+1th round constant c r through XOR operation with the S-layer output mask (M') 8 A mask value canceling unit that performs an XOR operation on the key and the r+1 th masking input value; And
Ciphertext output section that outputs the result value of the mask value release section as ciphertext
Including,
The operation of the round key application unit, the substitution operation unit, and the spread operation unit is repeatedly performed with i incremented by 1 from i = 0 to i = r-1.
데이터를 처리하여 복호화하는 장치에 있어서,
제11항에 따른 데이터 암호화 장치에 대응하여 상기 암호문으로부터 상기 평문을 산출하는, 데이터 복호화 장치.
In the apparatus for processing and decoding data,
A data decryption device for calculating the plain text from the encrypted text corresponding to the data encryption device according to claim 11.
KR1020190137449A 2019-10-31 2019-10-31 Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same KR102169369B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190137449A KR102169369B1 (en) 2019-10-31 2019-10-31 Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190137449A KR102169369B1 (en) 2019-10-31 2019-10-31 Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same

Publications (1)

Publication Number Publication Date
KR102169369B1 true KR102169369B1 (en) 2020-10-23

Family

ID=73039447

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190137449A KR102169369B1 (en) 2019-10-31 2019-10-31 Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same

Country Status (1)

Country Link
KR (1) KR102169369B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220075094A (en) * 2020-11-27 2022-06-07 동서대학교 산학협력단 Method for decoding Adavanced Encryption Standard employing Multi Layer Perceptron according to analysis of Advanced Virtual RISC equipment with AES
KR20230018688A (en) * 2021-07-30 2023-02-07 주식회사 엔에스에이치씨 White-box encryption apparatus of lightweight block cipher pipo
KR20230028627A (en) 2021-08-19 2023-03-02 한성대학교 산학협력단 Pipo encryption device and pipo encryption method
KR20230077962A (en) 2021-11-26 2023-06-02 한성대학교 산학협력단 Parallel processing pipo encrytion method encrytion method using the same
CN117411618A (en) * 2023-12-07 2024-01-16 杭州城市大脑有限公司 Key generation method, device and encryption method applied to international event

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080080175A (en) 2005-12-14 2008-09-02 엔디에스 리미티드 Method and system for usage of block cipher encryption
KR20100079060A (en) * 2008-12-30 2010-07-08 고려대학교 산학협력단 Method for encrypting with seed applying mask
US20170294148A1 (en) * 2016-04-08 2017-10-12 Sony Corporation Encryption device, encryption method, decryption device, and decryption method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080080175A (en) 2005-12-14 2008-09-02 엔디에스 리미티드 Method and system for usage of block cipher encryption
KR20100079060A (en) * 2008-12-30 2010-07-08 고려대학교 산학협력단 Method for encrypting with seed applying mask
US20170294148A1 (en) * 2016-04-08 2017-10-12 Sony Corporation Encryption device, encryption method, decryption device, and decryption method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
[1] Zhang, Wentao, et al. "RECTANGLE: a bit-slice lightweight block cipher suitable for multiple platforms." Science China Information Sciences 58.12 (2015): 1-15.
[2] Bogdanov, A., Knudsen, L.R., Leander, G., Paar, C., Poschmann, A., Robshaw, M.J.B., Seurin, Y., Vikkelsoe, C. PRESENT: An Ultra-Lightweight Block Cipher, CHES 2007, LNCS 4727, pp. 450-466,
Trichina, Elena, Domenico De Seta, and Lucia Germani. "Simplified Adaptive Multiplicative Masking for AES." International Workshop on Cryptographic Hardware and Embedded Systems (2002) *
Zhang, Wentao, et al. "RECTANGLE: a bit-slice lightweight block cipher suitable for multiple platforms." Science China Information Sciences 58.12 (2015) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220075094A (en) * 2020-11-27 2022-06-07 동서대학교 산학협력단 Method for decoding Adavanced Encryption Standard employing Multi Layer Perceptron according to analysis of Advanced Virtual RISC equipment with AES
KR102505081B1 (en) 2020-11-27 2023-03-02 동서대학교 산학협력단 Method for decoding Adavanced Encryption Standard employing Multi Layer Perceptron according to analysis of Advanced Virtual RISC equipment with AES
KR20230018688A (en) * 2021-07-30 2023-02-07 주식회사 엔에스에이치씨 White-box encryption apparatus of lightweight block cipher pipo
KR102546567B1 (en) 2021-07-30 2023-06-23 주식회사 엔에스에이치씨 White-box encryption apparatus of lightweight block cipher pipo
KR20230028627A (en) 2021-08-19 2023-03-02 한성대학교 산학협력단 Pipo encryption device and pipo encryption method
KR20230077962A (en) 2021-11-26 2023-06-02 한성대학교 산학협력단 Parallel processing pipo encrytion method encrytion method using the same
CN117411618A (en) * 2023-12-07 2024-01-16 杭州城市大脑有限公司 Key generation method, device and encryption method applied to international event
CN117411618B (en) * 2023-12-07 2024-02-20 杭州城市大脑有限公司 Key generation method, device and encryption method applied to international event

Similar Documents

Publication Publication Date Title
KR102169369B1 (en) Countermeasure method of first-order side-channel attack on lightweight block cipher and apparatus using the same
US8577023B2 (en) Encryption processing method, apparatus, and computer program utilizing different types of S-boxes
US8966279B2 (en) Securing the implementation of a cryptographic process using key expansion
US8504845B2 (en) Protecting states of a cryptographic process using group automorphisms
CN108964872B (en) Encryption method and device based on AES
KR101324351B1 (en) Method for generating a cipher-based message authentication code
WO2009087972A1 (en) Data transmission device, data reception device, methods therefor, recording medium, and data communication system therefor
JP5682525B2 (en) Cryptographic processing apparatus, cryptographic processing method, and program
US10790962B2 (en) Device and method to compute a block cipher
US7720225B2 (en) Table splitting for cryptographic processes
CN111066077B (en) Encryption device, encryption method, decryption device, and decryption method
US8619985B2 (en) Table splitting for cryptographic processes
Zhang et al. LAC: A lightweight authenticated encryption cipher
US8699702B2 (en) Securing cryptographic process keys using internal structures
Reyad et al. Key-based enhancement of data encryption standard for text security
KR101095386B1 (en) A Cryptosystem with a Discretized Chaotic Map
Wu et al. JAMBU lightweight authenticated encryption mode and AES-JAMBU
US9391770B2 (en) Method of cryption
CN106656500A (en) Encryption device and method
WO2015166701A1 (en) Encryption method, program, and system
EP3413509B1 (en) Cmac computation using white-box implementations with external encodings
KR102157219B1 (en) Countermeasure method of higher-order side-channel attack on lightweight block cipher and apparatus using the same
JP7383985B2 (en) Information processing device, information processing method and program
KR102287962B1 (en) Encryption method of 128-bit lightweight block cipher suitable for side-channel countermeasures
AU2020392047A1 (en) Method and devices for creating redundancy and encryption using Mojette Transform

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant