KR102404223B1 - Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program - Google Patents

Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program Download PDF

Info

Publication number
KR102404223B1
KR102404223B1 KR1020200112004A KR20200112004A KR102404223B1 KR 102404223 B1 KR102404223 B1 KR 102404223B1 KR 1020200112004 A KR1020200112004 A KR 1020200112004A KR 20200112004 A KR20200112004 A KR 20200112004A KR 102404223 B1 KR102404223 B1 KR 102404223B1
Authority
KR
South Korea
Prior art keywords
key
data
dependent layer
outputting
dependent
Prior art date
Application number
KR1020200112004A
Other languages
Korean (ko)
Other versions
KR20220030527A (en
Inventor
이상진
홍득조
김희석
김성겸
정건상
Original Assignee
국방과학연구소
고려대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 국방과학연구소, 고려대학교 산학협력단 filed Critical 국방과학연구소
Priority to KR1020200112004A priority Critical patent/KR102404223B1/en
Publication of KR20220030527A publication Critical patent/KR20220030527A/en
Application granted granted Critical
Publication of KR102404223B1 publication Critical patent/KR102404223B1/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/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Landscapes

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

Abstract

실시예에 따른 키 의존적 레이어를 이용한 암호 생성 장치는 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 제1 키 의존적 레이어와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 암호화 부와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 제2 키 의존적 레이어와, 상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 키 스케쥴러를 포함할 수 있다.An apparatus for generating encryption using a key-dependent layer according to an embodiment comprises: a first key-dependent layer that receives data as an input and outputs an intermediate value of the data; and an encryption unit that receives an intermediate value of the data as an input and outputs encrypted data; , a second key-dependent layer that receives the encrypted data as input and outputs protected encrypted data, and a key scheduler that provides a round key value to the first key-dependent layer, the encryption unit, and the second key-dependent layer. may include

Description

키 의존적 레이어를 이용한 암호 생성 장치 및 방법, 컴퓨터 판독 가능한 기록 매체 및 컴퓨터 프로그램{APPARATUS AND METHOD FOR ENCRYPTION GENERATING USING KEY DEPENDENT LAYER, COMPUTER-READABLE STORAGE MEDIUM AND COMPUTER PROGRAM}Apparatus and method for generating a password using a key-dependent layer, a computer-readable recording medium, and a computer program

실시예는 암호화 장비에 부채널 공격이 가능한 상황에서 공격자가 중간 값을 추측할 수 없도록 하는 기술에 관한 것이다.The embodiment relates to a technique for preventing an attacker from guessing an intermediate value in a situation where a side-channel attack is possible on an encryption device.

일반적으로, 암호를 생성하는 기술은 아래와 같은 기법들이 사용될 수 있다.In general, the following techniques may be used as a technique for generating a password.

마스킹(Masking)Masking

마스킹 기법은 전력 분석 공격의 여러가지 대응 기법들 중 하나이다. 마스킹 기법은 평문 x에 대하여 암호문 y를 얻기 위해 마스킹 난수 m을 이용하여

Figure 112020093121046-pat00001
의 암호문
Figure 112020093121046-pat00002
을 구한 후, 최종적으로 y를 얻기 위해
Figure 112020093121046-pat00003
의 연산을 수행한다. (경우에 따라 마스킹 기법은 다르게 구성한다.) 따라서 암호화 중 중간 값을 알 수 없기 때문에 일반적인 전력 분석 공격은 성공할 수 없다.The masking technique is one of several countermeasures against power analysis attacks. The masking technique uses a masking random number m to obtain a ciphertext y for a plaintext x.
Figure 112020093121046-pat00001
ciphertext of
Figure 112020093121046-pat00002
After finding , to finally get y
Figure 112020093121046-pat00003
perform the operation of (In some cases, the masking technique is configured differently.) Therefore, a general power analysis attack cannot succeed because the intermediate value during encryption cannot be known.

선형 연산의 Branch NumberBranch Number of Linear Operation

선형 연산의 Branch Number는 선형 연산의 확산 정도를 수치화 한 값을 나타내는 것으로, 해당 값이 클수록 높은 확산 효과가 있음을 보장할 수 있다. 주어진 선형 연산

Figure 112020093121046-pat00004
의 s 비트 크기의 워드에 대한 Branch Number
Figure 112020093121046-pat00005
는 다음과 같이 정의된다.The branch number of a linear operation represents a numerical value of the degree of diffusion of a linear operation, and the larger the value, the higher the diffusion effect can be guaranteed. given linear operation
Figure 112020093121046-pat00004
Branch Number for a word of s bit size
Figure 112020093121046-pat00005
is defined as

Figure 112020093121046-pat00006
Figure 112020093121046-pat00006

여기서,

Figure 112020093121046-pat00007
는 벡터 α의 ns개의 원소
Figure 112020093121046-pat00008
중 값이 0이 아닌 원소의 개수를 뜻한다.here,
Figure 112020093121046-pat00007
is the n s elements of the vector α
Figure 112020093121046-pat00008
Indicates the number of elements whose value is not 0.

MDS(Maximum Distance Separable) 행렬Maximum Distance Separable (MDS) Matrix

MDS 행렬은 MDS 코드의 행렬을 지칭한다. 유한체(Finite field) GF(2s) 에서 정의된 [n,k,d] 코드가 d=n-k+1 을 만족할 때 MDS 코드라고 한다. 여기서, d는 [n,k,d] 코드에 포함된 서로 다른 코드 워드의 거리(distance)의 최소값을 나타낼 수 있다. 따라서 체계적(Systermatic) [2k,k,k+1] 코드의 생성자(Generator) k by 2k 행렬

Figure 112020093121046-pat00009
의 입, 출력의 거리
Figure 112020093121046-pat00010
는 항상 k+1 보다 크거나 같음을 만족한다. 암호에서는 이와 같은 [2k,k,k+1] 코드의 MDS 행렬 P를 사용하여 최대 확산성을 보장할 수 있다. 이와 같이, MDS 행렬 곱을 선형 연산으로 갖는 경우 해당 선형 연산의 Branch Number가 k+1 임을 보장할 수 있다. 다양한 행렬을 이용하여 암호의 선형 연산으로 사용되나, 행렬 곱을 통해 구성한 선형 연산의 이론적인 최대 Branch Number가 k+1 임이 알려져 있어 행렬 곱을 이용한 확산 효과를 k+1을 기준으로 평가하기도 한다.The MDS matrix refers to a matrix of MDS codes. When the [n,k,d] code defined in the finite field GF(2 s ) satisfies d=n-k+1, it is called an MDS code. Here, d may represent a minimum value of distances between different code words included in the [n, k, d] code. So Generator k by 2k matrix of systematic [2k,k,k+1] code
Figure 112020093121046-pat00009
distance of input and output of
Figure 112020093121046-pat00010
is always greater than or equal to k+1. In encryption, the maximum spreadability can be guaranteed by using the MDS matrix P of the [2k,k,k+1] code. As such, when the MDS matrix multiplication is a linear operation, it can be guaranteed that the branch number of the linear operation is k+1. It is used as a linear operation of encryption using various matrices, but it is known that the theoretical maximum branch number of a linear operation constructed through matrix multiplication is k+1, so the diffusion effect using matrix multiplication is evaluated based on k+1.

상술한 문제점을 해결하기 위해, 실시예는 암호 기능을 탑재한 장치에 구현된 암호 알고리즘이 부채널 공격에 노출될 수 있는 점을 방지하기 위한 키 의존적 레이어를 이용한 암호 생성 장치 및 방법을 제공하는 것을 그 목적으로 한다.In order to solve the above problems, the embodiment provides an apparatus and method for generating a password using a key-dependent layer for preventing that an encryption algorithm implemented in a device equipped with an encryption function may be exposed to a side-channel attack. for that purpose

이를 해결하기 위해 실시예는 부채널 대응기법(마스킹 기법) 적용이 용이한 키 의존적 레이어(Key Dependent Layer)의 연산으로 사용함으로써 비교적 효율적인 연산으로 부채널 공격자에게 중간 값을 알 수 없도록 만들어 줄 수 있다.In order to solve this problem, the embodiment is used as an operation of a key-dependent layer that is easy to apply a side-channel response technique (masking technique), so that an intermediate value cannot be known to a side-channel attacker with a relatively efficient operation. .

실시예에 따른 키 의존적 레이어를 이용한 암호 생성 장치는 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 제1 키 의존적 레이어와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 암호화 부와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 제2 키 의존적 레이어와, 상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 키 스케쥴러를 포함할 수 있다.An apparatus for generating encryption using a key-dependent layer according to an embodiment comprises: a first key-dependent layer that receives data as an input and outputs an intermediate value of the data; and an encryption unit that receives an intermediate value of the data as an input and outputs encrypted data; , a second key-dependent layer that receives the encrypted data as input and outputs protected encrypted data, and a key scheduler that provides a round key value to the first key-dependent layer, the encryption unit, and the second key-dependent layer. may include

상기 제1 키 의존적 레이어 및 상기 제2 키 의존적 레이어는 키 의존적 함수와 Key XOR 연산을 포함할 수 있다.The first key-dependent layer and the second key-dependent layer may include a key-dependent function and a Key XOR operation.

상기 키 의존적 함수는 행렬 곱 연산을 포함하고, 상기 행렬 곱 연산은 16비트의 마스터 키 값으로부터 결정될 수 있다. The key-dependent function may include a matrix multiplication operation, and the matrix multiplication operation may be determined from a 16-bit master key value.

상기 행렬 곱 연산은 4개의 상태값 워드와 16비트의 키를 입력받아 4개의 워드를 출력할 수 있다.The matrix multiplication operation may receive four state value words and a 16-bit key and output four words.

상기 키 의존적 함수는 마스킹 기법에 적용된 키 의존적 함수일 수 있다.The key-dependent function may be a key-dependent function applied to a masking technique.

또한, 실시예에 따른 키 의존적 레이어를 이용한 암호 생성 방법은 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계를 포함할 수 있다.In addition, the encryption method using the key-dependent layer according to the embodiment includes the steps of outputting an intermediate value of the data by inputting data, outputting encrypted data by taking the intermediate value of the data as an input, the encryption It may include outputting protected encrypted data by inputting the encrypted data.

실시예에 의하면, 암호 알고리즘에 키 의존적 레이어(Key Dependent Layer)가 포함되어 있을 경우, 부채널 공격을 방지할 수 있는 효과가 있다.According to the embodiment, when a key-dependent layer is included in the encryption algorithm, there is an effect of preventing side-channel attacks.

또한, 실시예는 Key가 암호화 과정의 초기 및 후기의 Key Dependent Layer 연산을 결정하면서 부채널 공격 대응을 용이하게 해주는 효과가 있다. In addition, the embodiment has the effect of facilitating a side-channel attack response while the key determines the operation of the key dependent layer in the early and late stages of the encryption process.

또한, 실시예의 키 의존적 레이어 연산은 비교적 연산 비용이 적은 Companion Matrix의 행렬 곱(Matrix Multiplication) 연산을 활용하기 때문에 연산의 경량성을 최대화 할 수 있는 효과가 있다. In addition, since the key-dependent layer operation of the embodiment utilizes the matrix multiplication operation of the Companion Matrix, which has a relatively low operation cost, there is an effect of maximizing the lightness of the operation.

또한, 실시예는 기존의 부채널 대응기법(마스킹 기법)도 해당 연산에 적용하기 용이하기 때문에 부가적인 부채널 대응 기법도 효율적으로 추가 적용시킬 수 있는 효과가 있다.In addition, in the embodiment, since it is easy to apply an existing sub-channel correspondence technique (masking technique) to a corresponding operation, there is an effect that additional sub-channel correspondence techniques can also be efficiently applied.

도 1은 실시예에 따른 암호 생성 장치를 나타낸 블록도이다.
도 2는 키 의존적 레이어의 구성 요소를 표현한 도면이다.
도 3은 키 의존적 함수의 구성요소를 표현한 도면이다.
도 4는 마스킹이 적용된 마스킹된 키 의존적 레이어를 나타내는 도면이다.
도 5는 키 의존적 함수의 알고리즘을 나타내는 도면이다.
도 6은 Key Dependent Matrix Multiplication 알고리즘을 나타내는 도면이다.
도 7은 Key Dependent Matrix Multiplication 알고리즘에서 02와 03의 Galois Field 곱연산을 나타내는 도면이다.
도 8는 마스킹된 키 의존적 함수의 알고리즘을 나타내는 도면이다.
도 9은 Masked Key Dependent Matrix Multiplication 알고리즘을 나타내는 도면이다.
도 10은 Masked Key Dependent Matrix Multiplication 알고리즘에서 마스킹된 02와 03의 Galois Field 곱연산 결과 및 해당 출력 마스킹 값을 출력하는 알고리즘을 나타내는 도면이다.
도 11은 실시예에 따른 암호 생성 방법을 나타낸 순서도이다.
1 is a block diagram showing an apparatus for generating encryption according to an embodiment.
2 is a diagram illustrating components of a key-dependent layer.
3 is a diagram illustrating components of a key-dependent function.
4 is a diagram illustrating a masked key-dependent layer to which masking is applied.
5 is a diagram illustrating an algorithm of a key-dependent function.
6 is a diagram illustrating a Key Dependent Matrix Multiplication algorithm.
7 is a diagram illustrating the Galois Field multiplication operation of 02 and 03 in the Key Dependent Matrix Multiplication algorithm.
8 is a diagram illustrating an algorithm of a masked key dependent function.
9 is a diagram illustrating a Masked Key Dependent Matrix Multiplication algorithm.
10 is a diagram illustrating an algorithm for outputting a Galois Field multiplication operation result of 02 and 03 masked in the Masked Key Dependent Matrix Multiplication algorithm and a corresponding output masking value.
11 is a flowchart illustrating a method of generating an encryption according to an embodiment.

이하, 도면을 참조하여 실시예를 상세히 설명하기로 한다.Hereinafter, the embodiment will be described in detail with reference to the drawings.

도 1은 실시예에 따른 암호 생성 장치를 나타낸 블록도이고, 도 2는 키 의존적 레이어의 구성 요소를 표현한 도면이고, 도 3은 키 의존적 함수의 구성요소를 표현한 도면이고, 도 4는 마스킹이 적용된 마스킹된 키 의존적 레이어를 나타내는 도면이고, 도 5는 키 의존적 함수의 알고리즘을 나타내는 도면이고, 도 6은 Key Dependent Matrix Multiplication 알고리즘을 나타내는 도면이고, 도 7은 Key Dependent Matrix Multiplication 알고리즘에서 02와 03의 Galois Field 곱연산을 나타내는 도면이고, 도 8는 마스킹된 키 의존적 함수의 알고리즘을 나타내는 도면이고, 도 9은 Masked Key Dependent Matrix Multiplication 알고리즘을 나타내는 도면이고, 도 10은 Masked Key Dependent Matrix Multiplication 알고리즘에서 마스킹된 02와 03의 Galois Field 곱연산 결과 및 해당 출력 마스킹 값을 출력하는 알고리즘을 나타내는 도면이다.Fig. 1 is a block diagram showing an apparatus for generating encryption according to an embodiment, Fig. 2 is a diagram showing the components of a key-dependent layer, Fig. 3 is a diagram showing the components of a key-dependent function, and Fig. 4 is a diagram to which masking is applied. It is a diagram showing a masked key-dependent layer, Fig. 5 is a diagram showing an algorithm of a key-dependent function, Fig. 6 is a diagram showing a Key Dependent Matrix Multiplication algorithm, and Fig. 7 is Galois of 02 and 03 in the Key Dependent Matrix Multiplication algorithm. Field multiplication is a diagram, FIG. 8 is a diagram illustrating an algorithm of a masked key-dependent function, FIG. 9 is a diagram illustrating a Masked Key Dependent Matrix Multiplication algorithm, and FIG. 10 is a masked 02 in the Masked Key Dependent Matrix Multiplication algorithm. It is a diagram showing an algorithm for outputting the Galois Field multiplication operation result of and 03 and the corresponding output masking value.

도 1을 참조하면, 실시예에 따른 암호 생성 장치(1000)는 제1 키 의존적 레이어(100)와 암호화 부(200)와 제2 키 의존적 레이어(300)와 키 스케쥴러(400)를 포함할 수 있다. 여기서, 키 스케줄러(400)는 마스터 키(MK)를 입력받고, 생성된 라운드 키(도 2의 RKi ll Ki)를 제1 키 의존적 레이어(100)와 암호화 부(200)와 제2 키 의존적 레이어(300)에 제공할 수 있다.Referring to FIG. 1 , an encryption generating apparatus 1000 according to an embodiment may include a first key-dependent layer 100 , an encryption unit 200 , a second key-dependent layer 300 , and a key scheduler 400 . have. Here, the key scheduler 400 receives the master key (MK), and uses the generated round key (RK i ll K i in FIG. 2 ) with the first key dependent layer 100 , the encryption unit 200 , and the second key. It may be provided to the dependent layer 300 .

제1 키 의존적 레이어(100, Key Dependent Layer)는 데이터를 암호화하기 전에 적용될 수 있다. 여기서, 데이터(P)는 워드(word)를 포함할 수 있다. 제1 키 의존적 레이어(100)는 데이터(P)와 라운드 키(RKi ll Ki)를 입력으로 하여 연산할 수 있다. 제1 키 의존적 레이어(100)는 입력된 데이터(P)를 중간값(P')으로 출력할 수 있다. 여기서, 라운드 키(RKi ll Ki)는 마스터 키(MK)를 입력받은 키 스케쥴러(400)로부터 제공될 수 있다. A first key-dependent layer (100, Key Dependent Layer) may be applied before data encryption. Here, the data P may include a word. The first key-dependent layer 100 may operate by inputting the data P and the round key RKi ll Ki. The first key-dependent layer 100 may output the input data P as an intermediate value P'. Here, the round key RKi ll Ki may be provided from the key scheduler 400 receiving the master key MK.

암호화 부(200, Encryption Body)는 제1 키 의존적 레이어(100)로부터 출력된 데이터의 중간값(P')을 입력으로 하여 암호화 데이터(C')를 출력할 수 있다. The encryption unit 200 (Encryption Body) may output the encrypted data (C') by receiving the median value (P') of the data output from the first key-dependent layer 100 as an input.

암호화 부(200)은 길이가 정형화된 데이터를 암호화시킬 수 있는 암호화 장치를 사용할 수 있으며, 보다 상세하게 상용 블록암호 및 신규로 설계된 블록암호 사용이 가능하다. 따라서 일반적으로 해당 암호화 장치는 마스터 키(MK)로부터 제공 받은 라운드 키로부터 암호화 및 복호화가 가능한 것을 지칭한다.The encryption unit 200 may use an encryption device capable of encrypting data of a standardized length, and in more detail, it is possible to use a commercial block cipher and a newly designed block cipher. Therefore, in general, the corresponding encryption device refers to one capable of encryption and decryption from the round key provided from the master key (MK).

제2 키 의존적 레이어(300)는 암호화된 데이터(C')를 입력으로 하여 보호된 암호화 데이터(C)를 출력할 수 있다. 제2 키 의존적 레이어(300)는 제1 키 의존적 레이어(100)와 동일하게 구성될 수 있다. The second key-dependent layer 300 may output the protected encrypted data C by receiving the encrypted data C' as an input. The second key-dependent layer 300 may have the same configuration as the first key-dependent layer 100 .

마스터 키(MK)를 알수 없는 공격자는 제1 및 제2 키 의존적 레이어(100, 300)의 연산을 결정할 수 없기 때문에 데이터 혹은 보호화된 암호화 데이터(P, C)로부터 중간값(P', C')를 알아 낼수 없다. 이에 공격자가 획득한 부채널 정보와 연관성이 존재하는 중간값을 구할 수 없는 공격자는 일반적인 부채널 공격 시행을 수행하기 어렵다. 이에 비교적 효율적인 연산으로 구성된 키 의존적 레이어(Key Dependent Layer)를 사용하여 해당 보호 기법을 데이터(P, C)에 적용할 수 있다.Since an attacker who does not know the master key (MK) cannot determine the operation of the first and second key-dependent layers (100, 300), the intermediate values (P', C) from the data or protected encrypted data (P, C) ') cannot be found. Accordingly, it is difficult for an attacker who cannot obtain an intermediate value that is correlated with the side-channel information obtained by the attacker to perform a general side-channel attack. Accordingly, the corresponding protection technique can be applied to the data (P, C) by using a key-dependent layer composed of relatively efficient operations.

이하에서는 키 의존적 레이어에 대한 구성을 살펴본다. 여기서, 키 의존적 레이어는 제1 키 의존적 레이어 또는 제2 키 의존적 레이어일 수 있으며, 제1 키 의존적 레이어와 제2 키 의존적 레이어는 동일한 구성을 가질 수 있다.Hereinafter, we will look at the configuration of the key-dependent layer. Here, the key-dependent layer may be a first key-dependent layer or a second key-dependent layer, and the first key-dependent layer and the second key-dependent layer may have the same configuration.

Key Dependent Layer의 구성Composition of Key Dependent Layer

도 2에 도시된 바와 같이, 키 의존적 레이어(100)는 키 의존적 함수(110, Key Dependent Function, 이하 'KDF 함수'라 칭함)와 key(130) XOR 연산으로 이루어질 수 있다. As shown in FIG. 2 , the key-dependent layer 100 may be formed of a key-dependent function 110 (Key Dependent Function, hereinafter referred to as a 'KDF function') and a key 130 XOR operation.

Key Dependent Function - KDFKey Dependent Function - KDF

도 3에 도시된 바와 같이, KDF 함수의 내부는 행렬 곱 연산을 포함할 수 있으며, 도 5에 도시된 바와 같이, 4개의 상태 값 워드와 16 비트의 키 값을 입력받고, 4개의 워드를 출력할 수 있다. 여기서, 행렬 곱 연산에 사용된 행렬은 16 비트의 키 Kj 로부터 결정된 행렬 M(Kj)의 곱을 통해 구성될 수 있다. 여기서, M(Kj)는 수학식 1과 같이 결정될 수 있다.As shown in FIG. 3 , the inside of the KDF function may include a matrix multiplication operation, and as shown in FIG. 5 , 4 state value words and 16-bit key values are input, and 4 words are output. can do. Here, the matrix used for the matrix multiplication operation may be constructed by multiplying the matrix M(K j ) determined from the 16-bit key K j . Here, M(K j ) may be determined as in Equation (1).

[수학식 1][Equation 1]

Figure 112020093121046-pat00011
Figure 112020093121046-pat00011

도 5는 Companoin 행렬 곱을 4번 시행하는 알고리즘을 나타내며, 행렬 곱 시행 시 상대적으로 적은 연산량을 갖는 02, 03을 사용하여 키에 대한 정보로 입력 워드값을 섞을 수 있다.FIG. 5 shows an algorithm that performs the Companoin matrix multiplication four times. When the matrix multiplication is performed, input word values can be mixed with information about the key by using 02 and 03, which have a relatively small amount of computation.

KDF 의 확산 효과Diffusion effect of KDF

실시예에서 사용하는 선형 연산은 키 정보로부터 생성된 행렬 M(K) 곱 연산으로 구성될 수 있다. M(K)는 16 비트의 키 K로부터 결정될 수 있다. K를 구성하는 4개의 4비트 키 값

Figure 112020093121046-pat00012
가 각각 하나의 Companion 행렬을 결정하여 서로 곱한 결과를 M(K)로 한다. 16비트의 키 K로부터 결정되는 216 개의 행렬 M(K)는 GF(24)(즉, s=4), GF(28)(즉, s=8) 상에서 모두 다르고, GF(24) 상에서의 행렬 M(K)의 Branch Number는 표 1과 같이 분포되어 있다.The linear operation used in the embodiment may consist of a matrix M(K) product operation generated from key information. M(K) may be determined from a 16-bit key K. Four 4-bit key values that make up K
Figure 112020093121046-pat00012
Determines one Companion matrix each, and multiplies the result to be M(K). 2 16 matrices M(K) determined from a 16-bit key K are different on GF(2 4 ) (ie s=4), GF(2 8 ) (ie s=8), and GF(2 4 ) ), the branch numbers of the matrix M(K) are distributed as shown in Table 1.

[표 1][Table 1]

Figure 112020093121046-pat00013
Figure 112020093121046-pat00013

위의 결과로부터 4 X 4의 행렬 곱 연산의 최대 확산성이 Branch Number = 5임을 고려해 보았을 때, 실시예에서 사용하는 행렬 M(K)이 상대적으로 높은 Branch Number를 갖는다고 할 수 있다.From the above results, it can be said that the matrix M(K) used in the embodiment has a relatively high branch number, considering that the maximum spreadability of the matrix multiplication operation of 4 X 4 is Branch Number = 5.

마스킹을 적용한 KDLKDL with masking applied

실시예에서 사용하는 KDL은 XOR 연산에 대해 선형 성질을 갖고 있는 KDF를 라운드 함수로 가지고 있는 페이스텔(Feistel) 구조 기반이기 때문에 마스킹 기법의 적용이 용이하다. 마스킹 기법이 적용된 KDL을 MKDL으로 표기할 수 있다. MKDL가 6번의 MKDF로 구성된 예시로 도 4와 같이 나타낼 수 있다. Since the KDL used in the embodiment is based on a Feistel structure that has a KDF, which has a linear property for XOR operation, as a round function, it is easy to apply a masking technique. KDL to which the masking technique is applied can be expressed as MKDL. As an example in which MKDL is composed of 6 MKDFs, it can be represented as shown in FIG. 4 .

MKDF는 마스킹이 적용된 KDF로서, 입력받은 마스킹 값에 해당하는 출력 마스킹 값을 추가적인 결과값으로 도출할 수 있다.MKDF is a KDF to which masking is applied, and an output masking value corresponding to an input masking value may be derived as an additional result value.

도 8 내지 도 10은 MKDF와 MKDF의 구성요소를 나타내는 알고리즘이다. MKDL는 도 4에서 확인할 수 있듯이 입력 마스킹 값 m과 동일한 값으로 마스킹 된 출력값

Figure 112020093121046-pat00014
,
Figure 112020093121046-pat00015
을 출력함을 알 수 있다.8 to 10 are algorithms showing MKDF and components of MKDF. MKDL is an output value masked with the same value as the input masking value m, as can be seen in FIG.
Figure 112020093121046-pat00014
,
Figure 112020093121046-pat00015
It can be seen that output

도 11은 실시예에 따른 암호 생성 방법을 나타낸 순서도이다.11 is a flowchart illustrating a method for generating an encryption according to an embodiment.

도 11에 도시된 바와 같이, 실시예에 따른 암호 생성 방법은 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계(S100)와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계(S200)와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계(S300)를 포함할 수 있다. 여기서, 암호 생성 방법은 암호 생성 장치에서 수행될 수 있다.11, the encryption method according to the embodiment includes the steps of outputting an intermediate value of the data by inputting data (S100), and outputting encrypted data by inputting the intermediate value of the data as an input (S200) and outputting protected encrypted data by inputting the encrypted data (S300). Here, the password generating method may be performed in the password generating apparatus.

데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계(S100)는 제1 키 의존적 레이어에서 수행될 수 있다.The step of inputting data and outputting an intermediate value of the data ( S100 ) may be performed in the first key-dependent layer.

데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계(S200)는 암호화부에서 수행될 수 있다.The step (S200) of outputting encrypted data by inputting an intermediate value of data may be performed by the encryption unit.

암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계(S300)는 제2 키 의존적 레이어에서 수행될 수 있다.Outputting protected encrypted data by inputting the encrypted data ( S300 ) may be performed in the second key-dependent layer.

본 문서의 다양한 실시예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media)(예: 메모리(내장 메모리 또는 외장 메모리))에 저장된 명령어를 포함하는 소프트웨어(예: 프로그램)로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시예들에 따른 전자 장치를 포함할 수 있다. 상기 명령이 제어부에 의해 실행될 경우, 제어부가 직접, 또는 상기 제어부의 제어하에 다른 구성요소들을 이용하여 상기 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, 비일시적은 저장매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다.Various embodiments of the present document provide software (eg, a machine-readable storage media) (eg, a memory (internal memory or external memory)) including instructions stored in a machine-readable storage medium (eg, a computer). : program) can be implemented. The device is a device capable of calling a stored command from a storage medium and operating according to the called command, and may include the electronic device according to the disclosed embodiments. When the command is executed by the control unit, the control unit may perform a function corresponding to the command directly or by using other components under the control of the control unit. Instructions may include code generated or executed by a compiler or interpreter. The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, non-transitory means that the storage medium does not include a signal and is tangible, and does not distinguish that data is semi-permanently or temporarily stored in the storage medium.

실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다.According to an embodiment, the method according to various embodiments disclosed in the present document may be included and provided in a computer program product.

일 실시예에 따르면, 컴퓨터 프로그램을 저장하고 있는 컴퓨터 판독 가능 기록매체로서, 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계를 수행하기 위한 동작을 포함하는 방법을 프로세서가 수행하도록 하기 위한 명령어를 포함할 수 있다.According to an embodiment, there is provided a computer-readable recording medium storing a computer program, comprising the steps of: receiving data as an input and outputting an intermediate value of the data; and outputting encrypted data by receiving the intermediate value of the data as an input and instructions for causing the processor to perform a method including an operation for outputting protected encrypted data by inputting the encrypted data as an input.

일 실시예에 따르면, 컴퓨터 판독 가능한 기록매체에 저장되어 있는 컴퓨터 프로그램으로서, 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계와, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계와, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계를 수행하기 위한 동작을 포함하는 방법을 프로세서가 수행하도록 하기 위한 명령어를 포함할 수 있다.According to an embodiment, there is provided a computer program stored in a computer-readable recording medium, comprising: outputting an intermediate value of the data by inputting data; and outputting encrypted data by inputting the intermediate value of the data as an input and instructions for causing the processor to perform a method including an operation for outputting protected encrypted data by inputting the encrypted data as an input.

상기에서는 도면 및 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허청구범위에 기재된 실시예의 기술적 사상으로부터 벗어나지 않는 범위 내에서 실시예는 다양하게 수정 및 변경시킬 수 있음은 이해할 수 있을 것이다.Although the above has been described with reference to the drawings and embodiments, it will be understood by those skilled in the art that various modifications and changes can be made to the embodiments without departing from the spirit of the embodiments described in the claims below. will be able

100: 제1 키 의존적 레이어
200: 암호화 부
300: 제2 키 의존적 레이어
400: 키 스케줄러
100: first key dependent layer
200: Encryption Department
300: second key dependent layer
400: key scheduler

Claims (8)

데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 제1 키 의존적 레이어(Key Dependent Layer);
상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 암호화 부;
상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 제2 키 의존적 레이어; 및
상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 키 스케쥴러;
를 포함하고,
제1 키 의존적 레이어와 상기 제2 키 의존적 레이어 각각은,
행렬 곱 연산을 포함하는 키 의존적 함수와, Key XOR 연산을 포함하고,
상기 행렬 곱 연산은,
상기 라운드 키 값에 기초하여 결정되는 암호 생성 장치.
a first key-dependent layer that receives data as an input and outputs an intermediate value of the data;
an encryption unit for outputting encrypted data by inputting an intermediate value of the data;
a second key-dependent layer that receives the encrypted data as an input and outputs protected encrypted data; and
a key scheduler providing a round key value to the first key dependent layer, the encryption unit, and the second key dependent layer;
including,
Each of the first key-dependent layer and the second key-dependent layer,
A key-dependent function including a matrix multiplication operation, and a Key XOR operation,
The matrix multiplication operation is
A cryptographic generator determined based on the round key value.
삭제delete 삭제delete 제1항에 있어서,
상기 행렬 곱 연산은,
16비트의 상기 라운드 키 값을 4 개의 4 비트 키 값으로 분할하여 4 개의 Companion 행렬을 결정하고, 상기 결정된 4 개의 Companion 행렬에 기초하여 결정되는 암호 생성 장치.
According to claim 1,
The matrix multiplication operation is
A cryptographic generating apparatus that divides the 16-bit round key value into four 4-bit key values to determine four Companion matrices, and is determined based on the determined four Companion matrices.
제1항에 있어서,
상기 키 의존적 함수는 마스킹 기법의 적용이 가능한 키 의존적 함수인 암호 생성 장치.
According to claim 1,
The key-dependent function is a key-dependent function to which a masking technique can be applied.
제1 키 의존적 레이어(Key Dependent Layer)를 통해, 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계;
암호화 부를 통해, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계;
제2 키 의존적 레이어를 통해, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계; 및
상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 단계;
를 포함하고,
상기 데이터의 중간값을 출력하는 단계 및 상기 보호된 암호화 데이터를 출력하는 단계 각각은,
키 의존적 함수에 포함되는 행렬 곱 연산을 수행하는 단계; 및
Key XOR 연산을 수행하는 단계;를 포함하고,
상기 행렬 곱 연산은,
상기 라운드 키 값에 기초하여 결정되는 암호 생성 방법.
outputting an intermediate value of the data by inputting data through a first key dependent layer;
outputting encrypted data by inputting an intermediate value of the data through an encryption unit;
outputting protected encrypted data with the encrypted data as an input through a second key-dependent layer; and
providing a round key value to the first key dependent layer, the encryption unit, and the second key dependent layer;
including,
Each of the step of outputting the intermediate value of the data and the step of outputting the protected encrypted data comprises:
performing a matrix multiplication operation included in a key-dependent function; and
Including; performing a key XOR operation;
The matrix multiplication operation is
A method of generating an encryption determined based on the round key value.
컴퓨터 프로그램을 저장하고 있는 컴퓨터 판독 가능 기록매체로서,
상기 컴퓨터 프로그램은,
제1 키 의존적 레이어(Key Dependent Layer)를 통해, 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계;
암호화 부를 통해, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계;
제2 키 의존적 레이어를 통해, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계; 및
상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 단계;
를 프로세서가 수행하도록 하기 위한 명령어를 포함하고,
상기 데이터의 중간값을 출력하는 단계 및 상기 보호된 암호화 데이터를 출력하는 단계 각각은,
키 의존적 함수에 포함되는 행렬 곱 연산을 수행하는 단계; 및
Key XOR 연산을 수행하는 단계;를 포함하고,
상기 행렬 곱 연산은,
상기 라운드 키 값에 기초하여 결정되는 컴퓨터 판독 가능한 기록매체.
As a computer-readable recording medium storing a computer program,
The computer program is
outputting an intermediate value of the data by inputting data through a first key dependent layer;
outputting encrypted data by inputting an intermediate value of the data through an encryption unit;
outputting protected encrypted data with the encrypted data as an input through a second key-dependent layer; and
providing a round key value to the first key dependent layer, the encryption unit, and the second key dependent layer;
including instructions for causing the processor to perform
Each of the step of outputting the intermediate value of the data and the step of outputting the protected encrypted data comprises:
performing a matrix multiplication operation included in a key-dependent function; and
Including; performing a key XOR operation;
The matrix multiplication operation is
A computer-readable recording medium determined based on the round key value.
컴퓨터 판독 가능한 기록매체에 저장되어 있는 컴퓨터 프로그램으로서,
상기 컴퓨터 프로그램은,
제1 키 의존적 레이어(Key Dependent Layer)를 통해, 데이터를 입력으로 하여 상기 데이터의 중간값을 출력하는 단계;
암호화 부를 통해, 상기 데이터의 중간값을 입력으로 하여 암호화 데이터를 출력하는 단계;
제2 키 의존적 레이어를 통해, 상기 암호화된 데이터를 입력으로 하여 보호된 암호화 데이터를 출력하는 단계; 및
상기 제1 키 의존적 레이어, 상기 암호화 부 및 상기 제2 키 의존적 레이어에 라운드 키 값을 제공하는 단계;
를 프로세서가 수행하도록 하기 위한 명령어를 포함하고,
상기 데이터의 중간값을 출력하는 단계 및 상기 보호된 암호화 데이터를 출력하는 단계 각각은,
키 의존적 함수에 포함되는 행렬 곱 연산을 수행하는 단계; 및
Key XOR 연산을 수행하는 단계;를 포함하고,
상기 행렬 곱 연산은,
상기 라운드 키 값에 기초하여 결정되는 컴퓨터 프로그램.
As a computer program stored in a computer-readable recording medium,
The computer program is
outputting an intermediate value of the data by inputting data through a first key dependent layer;
outputting encrypted data by inputting an intermediate value of the data through an encryption unit;
outputting protected encrypted data with the encrypted data as an input through a second key-dependent layer; and
providing a round key value to the first key dependent layer, the encryption unit, and the second key dependent layer;
including instructions for causing the processor to perform
Each of the step of outputting the intermediate value of the data and the step of outputting the protected encrypted data comprises:
performing a matrix multiplication operation included in the key-dependent function; and
Including; performing a key XOR operation;
The matrix multiplication operation is
a computer program determined based on the round key value.
KR1020200112004A 2020-09-03 2020-09-03 Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program KR102404223B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200112004A KR102404223B1 (en) 2020-09-03 2020-09-03 Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200112004A KR102404223B1 (en) 2020-09-03 2020-09-03 Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program

Publications (2)

Publication Number Publication Date
KR20220030527A KR20220030527A (en) 2022-03-11
KR102404223B1 true KR102404223B1 (en) 2022-06-02

Family

ID=80814539

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200112004A KR102404223B1 (en) 2020-09-03 2020-09-03 Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program

Country Status (1)

Country Link
KR (1) KR102404223B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102397579B1 (en) * 2017-03-29 2022-05-13 한국전자통신연구원 Method and apparatus for white-box cryptography for protecting against side channel analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Kranz, Thorsten 외 2명. "Linear cryptanalysis: Key schedules and tweakable block ciphers." IACR Transactions on Symmetric Cryptology (2017.)*
Lisitskaya, I. V. 외 2명. "Importance of S-Blocks in Modern Block Ciphers." International Journal of Computer Network &Information Security 4.10 (2012.)*

Also Published As

Publication number Publication date
KR20220030527A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
EP3552338B1 (en) Method of rsa signature or decryption protected using a homomorphic encryption
US8199909B2 (en) Method and device for carrying out a cryptographic calculation
EP3154217B1 (en) Scrambled tweak mode of block ciphers for differential power analysis resistant encryption
US8050401B2 (en) High speed configurable cryptographic architecture
US9898623B2 (en) Method for performing an encryption with look-up tables, and corresponding encryption apparatus and computer program product
US9515820B2 (en) Protection against side channels
US20060023875A1 (en) Enhanced stream cipher combining function
US8504845B2 (en) Protecting states of a cryptographic process using group automorphisms
KR102397579B1 (en) Method and apparatus for white-box cryptography for protecting against side channel analysis
WO2014136386A1 (en) Tag generation device, tag generation method, and tag generation program
CN113904808B (en) Private key distribution and decryption method, device, equipment and medium
CN111010266B (en) Message encryption and decryption, reading and writing method and device, computer equipment and storage medium
CN111404952B (en) Transformer substation data encryption transmission method and device, computer equipment and storage medium
KR102315632B1 (en) System and method for generating scalable group key based on homomorphic encryption with trust server
EP0996250A2 (en) Efficient block cipher method
EP3832945A1 (en) System and method for protecting memory encryption against template attacks
KR102404223B1 (en) Apparatus and method for encryption generating using key dependent layer, computer-readable storage medium and computer program
US10075290B2 (en) Operator lifting in cryptographic algorithm
CN115766244A (en) Internet of vehicles information encryption method and device, computer equipment and storage medium
US20180359081A1 (en) Cmac computation using white-box implementations with external encodings
US7142673B1 (en) Method for the cryptographic conversion of L-bit input blocks of digital data into L-bit output blocks
US20240113871A1 (en) Encryption processing apparatus, encryption processing method for encryption processing apparatus, and storage medium
KR102407204B1 (en) Apparatus and method for compressing using password for improving security
US12101415B2 (en) Method of RSA signature or decryption protected using a homomorphic encryption
CN115842628A (en) Method and device for realizing key processing, computer storage medium and solid state disk

Legal Events

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