KR20200086859A - Lightweight block cryptography device - Google Patents

Lightweight block cryptography device Download PDF

Info

Publication number
KR20200086859A
KR20200086859A KR1020190003166A KR20190003166A KR20200086859A KR 20200086859 A KR20200086859 A KR 20200086859A KR 1020190003166 A KR1020190003166 A KR 1020190003166A KR 20190003166 A KR20190003166 A KR 20190003166A KR 20200086859 A KR20200086859 A KR 20200086859A
Authority
KR
South Korea
Prior art keywords
round
key
bit
decryption
encryption
Prior art date
Application number
KR1020190003166A
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 KR1020190003166A priority Critical patent/KR20200086859A/en
Publication of KR20200086859A publication Critical patent/KR20200086859A/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
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • 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

Landscapes

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

Abstract

The present invention relates to a lightweight block encryption device. The block encryption device performs encryption and decryption in accordance with a mode selection signal and comprises: a control unit to generate and output a round signal of a form increasing at each clock to display a current round and a count signal controlled in accordance with an input signal for separating key data and plaintext data; a key generation unit to determine an encryption or decryption mode in accordance with the mode selection signal and receive key data to generate and output an n-bit round key at each round; and a round unit to use the round signal and the round key to perform encryption or decryption on plaintext data to output a result value. The key generation unit uses a white key of an m^th round to reversely generate a round key from the m^th round to a first round to transfer the round key to the round unit without storing and transferring a round key used during previous encryption in some rounds of a decryption mode.

Description

블록 암호화 장치{LIGHTWEIGHT BLOCK CRYPTOGRAPHY DEVICE}Block encryption device {LIGHTWEIGHT BLOCK CRYPTOGRAPHY DEVICE}

본 발명은 정보 암호화 장치에 관한 것으로, 특히 경량화된 블록 암호화 장치에 관한 것이다.The present invention relates to an information encryption device, and more particularly to a lightweight block encryption device.

통신망을 통한 다양한 정보의 전달이 보편화 됨에 따라 교환되고 있는 정보량 역시 급격하게 증가하고 있다. 또한 교환 혹은 전송 정보에 개인정보와 같은 사적인 정보가 포함되어 있다는 것을 고려한다면 정보가 타인에게 유출되지 않도록 정보의 보안성을 높일 필요가 있다. 특히, IoT(Internet of Things) 시대의 도래에 따라 정보보안의 중요성이 더욱더 강조되고 있으며, 경량/저전력을 필요로 하는 IoT 분야의 특성상 그에 알맞은 암호화 프로세서가 IoT 분야의 중요기술로 여겨지고 있다.As the transmission of various information through a communication network is becoming common, the amount of information being exchanged is also rapidly increasing. In addition, considering that personal information such as personal information is included in the exchange or transmission information, it is necessary to increase the security of the information so that the information does not leak to others. In particular, with the advent of the Internet of Things (IoT) era, the importance of information security is increasingly emphasized, and due to the nature of the IoT field requiring light weight/low power, an appropriate encryption processor is considered an important technology in the IoT field.

참고적으로 2012년 일본 NEC사에서 개발된 대칭키 암호화 알고리즘(TWINE)은 80-비트와 128-비트의 키 길이를 지원하며 블록 크기가 64-비트인 경량 블록암호 알고리즘이다. S-box와 XOR만을 사용하므로 IoT, WSN 등의 경량화가 필요한 환경의 보안에 사용될 수 있도록 경량화에 초점을 맞추어 개발되어 경량 하드웨어 구현에 적합하다는 특징을 가진다. 이러한 암호화 알고리듬(TWINE)은 상술한 특징을 가지면서도 기존의 블록암호 알고리즘과 유사한 보안강도를 가지며, 로우엔드 하드웨어부터 하이엔드 하드웨어까지 다양한 하드웨어를 구현할 수 있도록 만들어졌다.For reference, symmetric key encryption algorithm (TWINE) developed by NEC in Japan in 2012 supports 80-bit and 128-bit key lengths, and is a lightweight block encryption algorithm with a block size of 64-bit. Since it uses only S-box and XOR, it is developed with a focus on weight reduction so that it can be used for security of environments that require weight reduction such as IoT, WSN, etc. This encryption algorithm (TWINE) has the characteristics described above, yet has a security strength similar to that of the existing block encryption algorithm, and is made to implement various hardware from low-end hardware to high-end hardware.

그러나 상기 예시한 대칭키 암호화 알고리즘(TWINE) 역시 암호화와 복호화에 사용되는 라운드 키를 저장하는 방식이기 때문에 키 저장을 위한 레지스터가 요구되는 관계로 저면적 구현과 제품 경량화에 제약이 따른다.However, since the symmetric key encryption algorithm (TWINE) exemplified above is also a method of storing a round key used for encryption and decryption, there is a limitation in implementing a low area and reducing the weight of the product because a register for key storage is required.

대한민국 공개특허공보 특2003-0087893호Republic of Korea Patent Publication No. 2003-0087893

이에 본 발명은 상술한 문제점을 해결하기 위해 창안된 발명으로서, 본 발명의 주요 목적은 저면적 구현과 경량화된 블록 암호화 장치를 제공함에 있으며,Accordingly, the present invention is an invention created to solve the above-mentioned problems, and the main object of the present invention is to provide a low-area implementation and a lightweight block encryption device.

더 나아가 본 발명의 또 다른 목적은 경량화된 하드웨어 구현을 위해 암호화와 복호화 연산과정 중 하드웨어 자원을 공유할 수 있는 경량화된 블록 암호화 장치를 제공함에 있다.Furthermore, another object of the present invention is to provide a lightweight block encryption device capable of sharing hardware resources during encryption and decryption computation to implement lightweight hardware.

전술한 목적을 달성하기 위한 본 발명의 실시예에 따른 블록 암호화 장치는 모드선택신호에 따라 암호화 및복호화를 수행하는 블록 암호화 장치로서,A block encryption device according to an embodiment of the present invention for achieving the above object is a block encryption device that performs encryption and decryption according to a mode selection signal,

현재 라운드를 표시하기 위해 매 클럭 마다 증가하는 형태의 라운드 신호와, 키 데이터와 평문 데이터를 구분 짓기 위한 입력신호에 따라 제어되는 카운트 신호를 생성하여 출력하는 제어부와;A control unit for generating and outputting a round signal in a form of increasing every clock to display a current round, and a count signal controlled according to an input signal for distinguishing key data and plain text data;

상기 모드선택신호에 따라 암, 복호화 모드가 결정되고, 키 데이터를 입력받아 매 라운드마다 n비트의 라운드키를 생성하여 출력하는 키생성부와;A key generation unit for determining a dark and a decryption mode according to the mode selection signal and receiving key data to generate and output an n-bit round key every round;

상기 라운드 신호와 라운드키를 이용해 평문 데이터에 대한 암호화 혹은 복호화를 수행하여 그 결과값을 출력하는 라운드부;를 포함하되,Includes; a round unit for performing encryption or decryption of the plain text data using the round signal and the round key to output the result value;

상기 키생성부는 복호화 모드의 일부 라운드에서 이전 암호화시 사용된 라운드 키를 저장하여 전달함이 없이 m번째 라운드의 화이크 키를 이용해 상기 m번째 부터 첫 번째 라운드까지의 라운드키를 역으로 생성하여 상기 라운드부로 전달함을 특징으로 하며,The key generation unit inversely generates round keys from the mth to the first round using the fake key of the mth round without storing and transmitting the round key used in the previous encryption in some rounds of the decryption mode. It is characterized by delivering to the round part,

더 나아가 상기 라운드부는 상기 평문 데이터에 대한 암호화 혹은 복호화 연산과정에서 상기 평문 데이터의 홀수자리 연산과정을 통합 처리하도록 로직 구현되어 있음을 또 다른 특징으로 한다.Furthermore, it is another feature that the round unit is implemented with logic to integrally process the odd digit calculation process of the plain text data in the process of encrypting or decrypting the plain text data.

상술한 기술적 과제 해결 수단에 따르면, 본 발명은 복호화 모드의 일부 라운드에서 이전 암호화시 사용된 라운드키를 별도의 레지스터에 저장하여 이용하지 않는 대신에, m번째 라운드의 화이크키를 이용해 상기 m번째 부터 첫 번째 라운드까지의 라운드키를 역으로 생성하는 방식을 취하기 때문에, 결과적으로 라운드키 저장용 레지스터의 수를 줄여 블록 암호화 장치를 경량화시킬 수 있는 이점이 있다.According to the above technical problem solving means, the present invention does not store and use the round key used for the previous encryption in a separate register in some rounds of the decryption mode. Since the method of generating the round key up to the first round in reverse is adopted, as a result, the number of registers for storing the round key is reduced, thereby making the block encryption device lighter.

또한 본 발명의 실시예에 따른 블록 암호화 장치는 평문을 암호화하거나 이를 복호화하는 각각의 연산 과정에 있어서 동일한 연산이 필요한 부분을 통합 구현함으로써 저면적, 경량화된 블록 암호화 장치를 제공할 수 있는 장점이 있다.In addition, the block encryption device according to an embodiment of the present invention has an advantage of providing a low-area, lightweight block encryption device by integrating and implementing parts that require the same operation in each operation process of encrypting or decrypting plaintext. .

도 1은 80-비트와 128-비트 키 스케쥴러 알고리즘 예시도.
도 2는 80-비트 키 스케쥴러 예시도.
도 3은 S-박스 테이블 예시도.
도 4는 상수 테이블 예시도.
도 5는 TWINE 암호화 알고리즘 예시도.
도 6은 TWINE의 라운드 함수 예시도.
도 7은 PI 치환 테이블 예시도.
도 8은 TWINE 복호화 알고리즘 예시도.
도 9는 본 발명의 실시예에 따른 블럭 암호화 장치의 블럭 구성 예시도.
도 10은 도 9 중 키생성부(200) 내부의 80-비트 키 길이에 관한 블럭 예시도.
도 11은 도 9 중 키생성부(200) 내부의 128-비트 키 길이에 관한 블럭 예시도.
도 12 및 도 13은 각각 80-비트 및 128-비트 암호화 연산 과정을 도시화한 도면.
도 14 및 도 15는 각각 80-비트 및 128-비트 역 키생성 알고리즘 예시도.
1 is an exemplary 80-bit and 128-bit key scheduler algorithm.
2 is an exemplary 80-bit key scheduler.
3 is an exemplary S-box table.
4 is an example of a constant table.
5 is an exemplary diagram of the TWINE encryption algorithm.
6 is an example of a round function of TWINE.
7 is an exemplary PI substitution table.
8 is an exemplary diagram of a TWINE decoding algorithm.
9 is an exemplary block diagram of a block encryption device according to an embodiment of the present invention.
FIG. 10 is an exemplary block diagram of an 80-bit key length inside the key generator 200 in FIG. 9.
FIG. 11 is a block diagram showing the length of a 128-bit key in the key generator 200 in FIG. 9.
12 and 13 are diagrams illustrating 80-bit and 128-bit encryption operation processes, respectively.
14 and 15 are examples of 80-bit and 128-bit inverse key generation algorithms, respectively.

이하 본 발명의 바람직한 실시예를 첨부 도면을 참조하여 상세히 설명하기로 한다. 본 발명을 설명함에 있어 관련된 공지 기능 혹은 구성이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the description of the present invention, if it is determined that related functions or configurations may unnecessarily obscure the subject matter of the present invention, detailed descriptions thereof will be omitted.

우선 일본 NEC사에서 개발된 대칭키 암호화 알고리즘(TWINE)은 80-비트 또는 128-비트의 마스터키를 가지고 64-비트의 데이터를 암호화 또는 복호화하는 경량 블록암호 알고리즘이다. 이러한 TWINE 알고리즘에서 암, 복호화 과정은 36번의 라운드를 거치게 되는데, 매 라운드마다 키값이 바뀌게 되고, 각 라운드마다 바뀐 키를 가지고 데이터의 암호화와 복호화가 진행되며 마지막 라운드에서 나온 데이터를 결과값으로 반환시킨다. 따라서 TWINE 알고리즘은 크게 키 생성과 암, 복호화 두 부분으로 나눌 수 있다.First, the symmetric key encryption algorithm (TWINE) developed by NEC of Japan is a lightweight block encryption algorithm that encrypts or decrypts 64-bit data with an 80-bit or 128-bit master key. In this TWINE algorithm, the encryption and decryption process goes through 36 rounds. The key value is changed every round, and the encryption and decryption of the data is performed with the changed key in each round, and the data from the last round is returned as the result. . Therefore, TWINE algorithm can be divided into two parts: key generation, encryption, and decryption.

키 생성과 암,복호화 두 부분 모두 동일하게 사용되는 연산은 XOR, 4-비트 순환 쉬프트, S-box가 있으며, 키 생성에서만 사용되는 상수(Constant) 테이블과 암,복호화에서만 사용되는 PI 치환 테이블을 가지고 있다.The operations used in both the key generation, encryption, and decryption are XOR, 4-bit cyclic shift, and S-box, and the constant table used only for key generation and the PI replacement table used only for encryption and decryption are used. Have.

또한 모든 데이터는 4-비트 단위로 처리된다. S-box는 입력받은 데이터에 따라 다른 값을 반환하는 역할을 하며, 상수 테이블은 매 라운드에 따라 다른 값을 반환해준다. 마지막으로 PI 치환 테이블은 암, 복호화 중 각 서브블록(4-비트 단위로 나뉜 데이터)의 위치를 바꾸어 주는 역할을 한다.Also, all data is processed in 4-bit units. The S-box serves to return different values depending on the received data, and the constant table returns different values every round. Finally, the PI substitution table plays a role of changing the position of each sub-block (data divided into 4-bit units) during cancer and decoding.

이하 키 생성 절차에 대해 부연 설명하면,Hereinafter, the key generation procedure will be explained.

우선 도 1은 80-비트와 128-비트 키 스케쥴러 알고리즘을 예시한 것이며, 도 2는 80-비트 키 스케쥴러를, 도 3 및 도 4 각각은 S-박스 테이블과 상수 테이블을 예시한 것이다. 80-비트 키 생성과 128-비트 키 생성 알고리즘은 거의 유사하므로 하기에서는 80-비트 키에 대한 설명만 할 것이며, 80-비트 알고리즘의 각 줄 첫 번째 숫자를 사용하여 설명할 것이다.First, FIG. 1 illustrates an 80-bit and 128-bit key scheduler algorithm, FIG. 2 illustrates an 80-bit key scheduler, and FIGS. 3 and 4 illustrate S-box tables and constant tables, respectively. Since the 80-bit key generation and 128-bit key generation algorithms are almost similar, in the following, only the 80-bit key will be described, and the first number of each line of the 80-bit algorithm will be described.

(1) 데이터는 4-비트 단위로 처리되므로 입력으로 들어온 80-비트의 마스터키가 4-비트의 WK(White Key)로 총 20개의 서브블록으로 나뉘게 된다.(1) Since data is processed in 4-bit units, the 80-bit master key entered as an input is divided into a total of 20 sub-blocks with 4-bit WK (White Key).

(2) 이후 도 1에서 3.~9.까지 35번의 반복을 거쳐 매 라운드마다 RK(Round Key)를 생성하게 되며, RK가 암,복호화 중 사용되는 키값이다.(2) Subsequently, RK (Round Key) is generated in each round after 35 repetitions from Fig. 1 to 3. to 9. The RK is a key value used during encryption and decryption.

(3) 4-비트 WK의 20개의 서브블록 중 고정된 서브블록을 RK값으로 가져온다. RK의 위첨자 r은 현재 라운드를 의미하며, 아래 첨자 (32)는 4-비트 WK의 8개의 서브블록을 가져오므로 32-비트를 의미한다.(3) Among 20 sub-blocks of 4-bit WK, a fixed sub-block is taken as the RK value. The superscript r of RK means the current round, and the subscript 32 means 8 bits of 4-bit WK, so it means 32-bit.

(4)~(5) 현재 WK 값에 따라 도 3과 같이 다른 값을 반환해주는 S-box를 이용해 연산된 결과를 첫 번째 WK와 네 번째 WK에 넣는다.(4)~(5) According to the current WK value, the calculated result is put into the first WK and the fourth WK using an S-box that returns a different value as shown in FIG. 3.

(6)~(7) 도 4에서 보는 것처럼 CON은 매 라운드마다 6-비트의 값을 반환해준다. 따라서 WK의 한 블록은 4-비트이므로 4-비트를 맞추어 주기 위해 CON값을 반으로 잘라 High, Low로 나누고 맨 앞에 0을 붙여서 4비트를 맞춘다. 이를 이용해 연산된 결과를 일곱 번째 WK와 열아홉 번째 WK에 넣는다.(6) to (7) As shown in Fig. 4, CON returns a 6-bit value every round. Therefore, one block of WK is 4-bit, so to match 4-bit, cut the CON value in half, divide it into High, Low, and add 0 at the beginning to match 4 bits. The calculated result is put into the 7th WK and the 19th WK.

(8)~(9) Rota(b)의 의미는 b를 a-비트만큼 왼쪽으로 순환 쉬프트를 하라는 의미이다. 따라서 WK의 한 블록은 4-비트이므로 그에 맞추어 쉬프트를 진행한다.(8)~(9) Rota(b) means to shift b to the left by a-bit. Therefore, since one block of WK is 4-bit, shift is performed accordingly.

(10) 2.의 반복문을 35번 거치게 되면 최종적으로 35개의 RK가 생성되고, 마지막 RK를 가지기 위해 36번째 RK를 만들게 된다.(10) If the loop of 2. goes through 35 times, 35 RKs are finally created, and the 36th RK is created to have the last RK.

(11) 최종적으로 36개의 RK가 만들어진다.(11) Finally, 36 RKs are made.

이와 같은 과정을 통해 만들어진 36개의 RK가 매 라운드마다 암, 복호화에 사용된다.36 RKs created through this process are used for cancer and decryption every round.

이하 암, 복호화에 대해 부연 설명하기로 한다.Hereinafter, cancer and decryption will be described in detail.

도 5는 TWINE 암호화 알고리즘을, 도 6은 TWINE의 라운드 함수를, 도 7은 PI 치환 테이블을 각각 예시한 것이다.FIG. 5 illustrates the TWINE encryption algorithm, FIG. 6 illustrates the TWINE round function, and FIG. 7 illustrates the PI substitution table.

우선 암호화의 진행 과정은 도 5에 도시한 바와 같이 64-비트의 평문 데이터와 32-비트의 RK 36개의 입력으로 시작된다. 그리고 TWINE의 라운드 함수는 도 6에 예시한 바와 같다고 하면,First, as shown in FIG. 5, the process of encryption starts with 64-bit plaintext data and 32-bit RK 36 inputs. And if the round function of TWINE is as illustrated in Fig. 6,

(1) 64-비트 평문데이터를 4-비트의 16개 서브블록으로 나눈다. X의 위첨자 1은 현재 라운드를 의미하며, 아래첨자 0(4)~15(4)는 4-비트인 16개의 서브블록을 의미한다.(1) 64-bit plain text data is divided into 16 4-bit sub-blocks. The superscript 1 of X means the current round, and the subscripts 0(4) to 15(4) mean 16 subblocks of 4-bit.

(2) 키 생성에서 만들어진 32-비트의 RK 36개를 라운드 단위로 분리한다. 위첨자 1~36은 라운드를 의미하며, 아래첨자 (32)는 32-비트를 의미한다.(2) 36 32-bit RKs created in key generation are separated into round units. Superscripts 1 to 36 mean rounds, and subscript 32 means 32-bits.

(3) 4.~6.까지 35번의 반복을 진행하게 되고, i가 증가할 때마다 라운드가 증가한다.(3) 35 repetitions are performed from 4. to 6. The round increases each time i increases.

(4) 현재 라운드의 32-비트 RK를 4-비트 단위로 분리한다. 위첨자 i가 현재 라운드를 의미하며, 아래첨자 0(4)~7(4)가 4-비트 8개의 서브블록을 의미한다.(4) The 32-bit RK of the current round is divided into 4-bit units. The superscript i means the current round, and the subscripts 0(4) to 7(4) refer to 8 4-bit subblocks.

(5) RK와 S-box를 이용해 연산된 결과를 현재 라운드의 평문 데이터의 홀수 번째 자리에 대입한다.(5) The result calculated using RK and S-box is substituted into the odd digit of the plain text data of the current round.

(6) 현재 라운드에서 다음 라운드로 증가하면서 도 7과 같은 PI 치환 테이블을 참조하여 자리를 바꾸어 주게 된다.(6) As it increases from the current round to the next round, the seat is changed by referring to the PI substitution table shown in FIG. 7.

(7) 3.에서의 35번의 반복이 끝난 후 마지막 36번째 라운드 연산을 진행한다.(7) After the 35 iterations in 3. are over, the last 36th round operation is performed.

(8) 최종 암호문을 반환한다.(8) The final ciphertext is returned.

이하 상술한 TWINE 알고리즘에 기초하여 설계한 본 발명의 실시예에 따른 블록 암호화 장치에 대해 부연 설명하기로 한다.Hereinafter, a block encryption device according to an embodiment of the present invention designed based on the above-described TWINE algorithm will be described in detail.

우선 TWINE 알고리즘에 기초한 본 발명의 블럭 암호화 장치는 도 9에 도시한 바와 같이 제어(control)부(100), 키생성부(Key_gen)(200), 라운드(Round)부(300)로 구성된다. 도 9에 도시된 각 포트 이름의 기능은 하기 표 1과 같다.First, the block encryption apparatus of the present invention based on the TWINE algorithm is composed of a control unit 100, a key generation unit (Key_gen) 200, and a round unit 300 as shown in FIG. The function of each port name shown in FIG. 9 is shown in Table 1 below.

Figure pat00001
Figure pat00001

도 9에서 입력신호인 'iMode'가 '로우'이면 암호화를, '하이'이면 복호화를 진행한다. 그리고 입력신호 'ikey_sel'이 '로우'이면 80-비트 키를, '하이'이면 128-비트 키를 사용한다는 것을 의미한다. 입력신호 'iplain_in'이 '로우'이면 idata[31:0] 포트로 들어오는 데이터가 키 데이터이며, '하이'이면 idata[31:0] 포트로 들어오는 데이터가 평문 데이터임을 의미한다. 만약 128-비트 키를 사용할 경우에는 idata[31:0] 포트로 32-비트씩 4번 들어올 것이며, 64-비트 평문 데이터는 idata[31:0]포트로 32-비트씩 두 번 들어오게 된다.In FIG. 9, if the input signal'iMode' is'low', encryption is performed, and if it is'high', decryption is performed. Also, if the input signal'ikey_sel' is'low', it means that an 80-bit key is used, and if it is'high', a 128-bit key is used. If the input signal'iplain_in' is'low', the data coming into the idata[31:0] port is the key data, and if it is'high', the data coming into the idata[31:0] port is the plain text data. If a 128-bit key is used, 32-bit data will be input 4 times into the idata[31:0] port, and 64-bit plain text data will be input twice through the 32-bit data into the idata[31:0] port.

참고적으로 키생성부(Key_gen)(200)에서는 매 라운드마다 생성된 rk[31:0]를 라운드(Round)부(300)로 보내주며, 라운드(Round)부(300)에선 rnd[5:0]과 rk[31:0]을 이용해 암,복호화를 진행한다. 라운드(Round)부(300)에서 암, 복호화된 결과값이 나오면 32-비트씩 잘라서 두 번에 걸쳐 총 64-비트 데이터를 출력한다.For reference, the key generating unit (Key_gen) 200 sends rk[31:0] generated in each round to the round unit 300, and in the round unit 300, rnd[5: 0] and rk[31:0] to perform encryption and decryption. When the result of the dark and decoded data is output from the round unit 300, 32-bits are cut out to output a total of 64-bit data twice.

제어부(100)에서는 count[2:0] 신호를 이용해 idata[31:0] 포트로 들어온 32-비트 데이터를 80-비트 키, 128-비트 키 그리고 64-비트 평문 데이터의 길이에 맞게 제어한다. 그리고 rnd[5:0] 신호를 이용해 현재 라운드가 몇 라운드인지를 라운드부(300)로 알려준다.The control unit 100 controls the 32-bit data coming into the idata[31:0] port using the count[2:0] signal to match the length of the 80-bit key, 128-bit key, and 64-bit plain text data. And the rnd[5:0] signal is used to inform the round unit 300 how many rounds the current round is.

이하 상술한 각 블럭에 대해 보다 구체적으로 설명하면,Hereinafter, each block will be described in more detail.

우선 키생성부(200)는 라운드부(300)에서 사용될 라운드 키(rk)를 생성하는 블록이다. 키에 대한 데이터를 입력받아 1-clk/1-round 단위로 각각의 라운드 키를 생성하며 80-비트와 128-비트를 지원한다. 이러한 키생성부(200)는 도 10과 도 11에 도시한 바와 같으며, 키생성부(200) 내부의 80-비트 키 길이와 128-비트 키 길이에 관한 내용을 두 개의 블록도로 나누어 설명하였다.First, the key generating unit 200 is a block for generating a round key rk to be used in the round unit 300. It receives data on the key and generates each round key in 1-clk/1-round units, and supports 80-bit and 128-bit. The key generating unit 200 is as shown in FIGS. 10 and 11, and the contents of the 80-bit key length and the 128-bit key length inside the key generating unit 200 are divided into two block diagrams. .

키생성부(200)는 도 10과 도 11에 도시한 바와 같이 32-비트의 키 데이터 입력을 4번 쉬프트 하여 128-비트인 레지스터에 저장한다. iKey_sel 신호를 통해 키 길이가 정해지며 iMode 신호에 따라 암, 복호화 모드가 결정된다. 80-비트와 128-비트 키 길이에 대한 암, 복호화 모두 연산과정, 쉬프트 과정, 라운드 키 생성과정으로 진행이 되며 제어부(100)를 통해 입력으로 받는 rnd 값으로 제어가 된다.As shown in FIGS. 10 and 11, the key generator 200 shifts the 32-bit key data input 4 times and stores it in a 128-bit register. The key length is determined through the iKey_sel signal, and the dark and decryption modes are determined according to the iMode signal. Both the arm and decryption for the 80-bit and 128-bit key lengths are performed in the operation process, the shift process, and the round key generation process, and are controlled by the rnd value received as input through the control unit 100.

80-비트 키 길이에 대한 암호화 연산과정은 도 12에 도시한 바와 같다.The encryption operation process for the 80-bit key length is as shown in FIG. 12.

80-비트 WK를 4-비트 단위로 나누어 특정한 위치의 값을 s_box와 RCON값을 이용하여 연산을 한다. RCON은 6-비트이므로 3비트씩 RCONH와 RCONL로 나눈 다음 최상위 비트에 0을 붙여주어 4-비트로 만든 후 사용한다. 128-비트 키 길이에 대한 암호화 연산과정은 도 13에 도시한 바와 같으며 WK를 연산하는 특정한 위치와 s_box를 이용한 연산이 하나 더 추가될 뿐 다른 내용은 80-비트 키 길이에 대한 암호화 연산과정과 동일하다.The 80-bit WK is divided into 4-bit units, and the value of a specific location is calculated using s_box and RCON values. Since RCON is 6-bit, it is divided into RCONH and RCONL by 3 bits, then 0 is added to the most significant bit to make it 4-bit. The encryption operation process for the 128-bit key length is as shown in FIG. 13, and a specific location for calculating the WK and one operation using s_box are added, and the other contents are the encryption operation process for the 80-bit key length. same.

한편, 복호화 과정에서는 암호화와는 반대로, 36번째 라운드 키부터 1번째 라운드 키까지 역순으로 필요로 한다. 이를 해결하기 위해 기존의 키 생성 알고리즘은 복호화 과정의 라운드 키에 관하여 암호화 과정에서 생성된 라운드 키를 레지스터에 저장하여 사용하는 방식을 이용한다. 이러한 방법은 많은 레지스터를 필요로 하기 때문에 경량화 목적에 부적합하다.On the other hand, in the decryption process, in contrast to encryption, from the 36th round key to the first round key, it is necessary in reverse order. To solve this, the existing key generation algorithm uses a method of storing and using the round key generated in the encryption process in a register with respect to the round key in the decryption process. This method is unsuitable for the purpose of weight reduction because it requires a large number of resistors.

이러한 문제를 해결하기 위해 본 발명의 실시예에서는 역 키생성 알고리즘을 만들어 하드웨어 구현에 적용시켰다. 80-비트 역 키생성 알고리즘은 도 14에 도시한 바와 같으며 128-비트 역 키생성 알고리즘은 도 15에 도시한 바와 같다.In order to solve this problem, in the embodiment of the present invention, an inverse key generation algorithm was created and applied to hardware implementation. The 80-bit inverse key generation algorithm is as shown in FIG. 14, and the 128-bit inverse key generation algorithm is as shown in FIG.

역 키생성 알고리즘은 36번째 라운드의 화이트 키를 가지고 있으면, 기존 키 생성 알고리즘을 역순으로 진행하여 1번째 라운드 키까지 만들어 낼 수 있다. 80-비트 역 키생성 알고리즘을 예로 들어 설명하면 도 14의 4에서 7번까지 S-box와 XOR를 이용하여 연산하는 것과 8에서 9번까지 행 치환과정을 거치는 것은 기존 키 생성 알고리즘과 동일하지만 연산이 되는 화이트 키의 특정부분과 총 몇 비트를 쉬프트 하는 지에 대한 내용이 다르다는 것을 확인할 수 있다. 이러한 알고리즘을 이용함으로써 라운드 키를 저장하는 레지스터를 사용하지 않고 최종 목표인 저면적을 구현할 수가 있다.If the inverse key generation algorithm has the white key of the 36th round, the existing key generation algorithm may be performed in the reverse order to generate the first round key. If the 80-bit inverse key generation algorithm is described as an example, the operation using S-box and XOR from 4 to 7 in FIG. 14 and the row replacement process from 8 to 9 are the same as those of the existing key generation algorithm. You can see that the contents of the specific white key shift and how many bits are shifted are different. By using such an algorithm, the final target low area can be implemented without using a register that stores a round key.

다시 도 9를 참조하면, 라운드부(300)는 키생성부(200)에서 생성된 라운드 키를 이용하여 평문을 암호문으로 만들어낸다. 64-비트의 평문을 입력으로 받아 총 36개의 라운드를 거쳐 암호문이 생성되며 그 과정은 도 16에 도시한 바와 같다.Referring to FIG. 9 again, the round unit 300 uses the round key generated by the key generating unit 200 to generate a plain text as an encrypted text. A 64-bit plaintext is received as input, and a ciphertext is generated through a total of 36 rounds, and the process is as illustrated in FIG. 16.

우선 32-비트의 텍스트 데이터 입력을 2번 쉬프트 하여 64-비트인 레지스터에 저장한다. 전체적인 과정은 연산과정, 쉬프트 과정으로 이루어져 있다. 연산과정에서 짝수 자리의 값은 아무런 연산을 거치지 않고 홀수 자리만 연산을 거치며 암,복호화 모두 이 과정은 동일하다는 것을 도 5와 도 8의 5번 과정을 통해 확인할 수 있다. 본 발명의 실시예에서는 이러한 공통점을 이용하여 암, 복호화의 홀수 자리 연산과정을 통합함으로써 저면적을 추구한다.First, the 32-bit text data input is shifted twice and stored in a 64-bit register. The whole process consists of arithmetic and shifting. It can be confirmed through the process 5 of FIG. 5 and FIG. 8 that the process of the encryption and decryption is the same for both the odd and the digits. In the exemplary embodiment of the present invention, a low area is pursued by integrating odd and digit arithmetic processes of encryption and decryption using such a common point.

그 후 쉬프터 내부에서 암호화와 복호화가 iMode 신호를 통하여 각각의 쉬프트 과정을 수행하게 된다. 암호화일 경우 64-비트의 데이터가 재배열되며 마지막 라운드인 36번째 라운드에서 이 과정을 거치지 않고 암호문을 출력하게 된다. 복호화 과정은 64-비트 입력을 암호화 과정을 거쳐 나온 암호문으로 하며 암호화와 다르게 행 연산 과정을 역으로 진행할 뿐 이 외에는 암호화 과정과 차이점이 없다. Thereafter, encryption and decryption are performed inside the shifter to perform each shift process through an iMode signal. In the case of encryption, 64-bit data is rearranged, and the ciphertext is output without going through this process in the 36th round, the last round. The decryption process uses a 64-bit input as the ciphertext that has been passed through the encryption process, and unlike the encryption, the row operation process is reversed, and there is no difference from the encryption process.

제어부(100)는 키생성부(200)와 라운드부(300)에서 사용될 rnd 신호와 카운트(count) 신호를 만들어내는 블록이다. rnd 신호는 매 클록마다 1씩 증가하는 현재 라운드를 표시하는 신호이며, 이 rnd 신호를 통해 라운드의 진행상황을 파악할 수 있다. 이 카운트 신호는 첫 번째로 값이 변할 때만 32-비트의 데이터를 받아오고, 그 이후의 변화에는 32-비트의 데이터를 받아옴과 동시에 오른쪽으로 32-비트씩 쉬프트를 시키는 역할을 한다. 카운트 신호의 값은 총 4번 변화하며 iplain_in에 의해 제어가 된다.The control unit 100 is a block for generating an rnd signal and a count signal to be used in the key generation unit 200 and the round unit 300. The rnd signal is a signal indicating the current round that increases by 1 for each clock, and the progress of the round can be grasped through the rnd signal. This count signal first receives 32-bit data only when the value changes, and serves to shift 32-bit to the right while receiving 32-bit data for subsequent changes. The value of the count signal changes 4 times in total and is controlled by iplain_in.

이상에서 설명한 바와 같이, 본 발명의 실시예에 따른 블록 암호화 장치의 키생성부(200)는 1-클럭(clk) 동안 한 라운드에 해당하는 라운드키(RK)를 만들어내고 라운드부(300)에서는 이 RK를 이용하여 한 라운드에 해당하는 연산을 처리한다. 따라서 평문이 입력되고 36-클럭 후에 암호문 또는 복호문이 출력된다. 도 5와 도 8에 각각 도시한 암, 복호화 알고리즘의 5번 과정의 연산이 동일하기 때문에, 본 발명의 실시예에서는 경량화를 위하여 하드웨어 설계 시 이 부분에 대한 연산기를 공유함으로써 더 적은 하드웨어 자원이 사용되도록 설계하였다.As described above, the key generation unit 200 of the block encryption apparatus according to the embodiment of the present invention generates a round key RK corresponding to one round during 1-clock (clk) and the round unit 300 The operation corresponding to one round is processed using this RK. Therefore, the plaintext is input and the encrypted text or the decrypted text is output after 36-clock. Since the operation of the fifth process of the encryption and decryption algorithms shown in FIGS. 5 and 8 are the same, in the embodiment of the present invention, less hardware resources are used by sharing the operators for this part when designing the hardware for weight reduction. It was designed as possible.

레지스터 절감에 대해서는 기존의 TWINE 알고리즘이 필요한 32-비트 RK 36개를 모두 저장하도록 제안되어 있었다. 이러한 경우 RK 36개를 모두 저장하기 위해선 32-비트 * 36개 = 1152 비트의 레지스터가 필요하다. 하지만 매 라운드마다 하나의 RK를 생성하여 사용한다면 32-비트의 레지스터만 사용하게 되므로 레지스터 사용을 획기적으로 줄일 수 있으나, 복호화를 진행함에 있어서 문제가 발생한다.Regarding register savings, it has been proposed to store all 36 32-bit RKs that require the existing TWINE algorithm. In this case, 32-bit * 36 = 1152-bit registers are needed to store all 36 RKs. However, if one RK is generated and used every round, only 32-bit registers are used, which significantly reduces the use of registers, but there is a problem in decoding.

첫 번째 문제점은 암호화에 사용되는 RK는 1라운드에서 36라운드 순으로 사용되므로 마스터키를 이용하여 매 라운드에 필요한 RK를 생성함에 있어서 무리가 없다. 하지만 복호화에 사용되는 RK는 36라운드에서 1라운드 순으로 사용되므로 36라운드의 RK를 생성하기 위하여 36라운드의 화이트키(WK)를 저장하는 128-비트의 레지스터가 추가로 필요하다.The first problem is that the RK used for encryption is used in the order of 1 round to 36 rounds, so there is no difficulty in generating the RK required for each round using the master key. However, since the RK used for decoding is used in the order of 1 round to 36 rounds, an additional 128-bit register that stores the white key (WK) of the 36 rounds is required to generate the RK of the 36 rounds.

두 번째 문제는 도 1에 도시한 키 생성 알고리즘은 마스터키를 가지고 1라운드에서 36라운드 순으로 RK를 생성하는 알고리즘이다. 하지만 복호화에 사용되는 RK는 36라운드에서 1라운드 순으로 사용되어야 하므로 36라운드의 WK를 가지고 36라운드에서 1라운드 순으로 RK를 생성하기 위한 새로운 알고리즘이 필요하게 된다.The second problem is that the key generation algorithm shown in FIG. 1 is an algorithm for generating RKs from the first round to the 36th round with the master key. However, since the RK used for decoding must be used in order from round 36 to round 1, a new algorithm for generating RK from round 36 to round 1 with a WK of 36 rounds is needed.

두 번째 문제를 해결하기 위해 본 발명의 실시예에 따른 블록 암호화 장치는 도 14에 도시한 바와 같이 RK를 36라운드에서 1라운드 순으로 생성하는 역 키생성 알고리즘을 이용하였다. 역 키생성 알고리즘을 이용해 RK를 36라운드에서 1라운드 순으로 생성함으로써, 매 라운드에 해당하는 RK를 생성한다. 이로써 경량화를 위해 레지스터 사용을 줄이는 설계를 진행하면서 생기는 두 가지 문제점을 정상적으로 해결할 수 있다.In order to solve the second problem, the block encryption apparatus according to the embodiment of the present invention uses an inverse key generation algorithm that generates RK from 36 rounds to 1 round as shown in FIG. 14. By using the inverse key generation algorithm, RK is generated from 36 rounds to 1 round in order, thereby generating RK corresponding to each round. As a result, two problems caused by designing to reduce the use of resistors for weight reduction can be solved normally.

이상 본 발명은 도면에 도시된 실시예들을 참고로 설명하였으나 이는 예시적인 것에 불과하며, 당해 기술분야에서 통상의 지식을 가진자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위에 의해서만 정해져야 할 것이다.The present invention has been described above with reference to the embodiments shown in the drawings, but these are merely exemplary, and those skilled in the art will understand that various modifications and other equivalent embodiments are possible therefrom. Therefore, the true technical protection scope of the present invention should be defined only by the appended claims.

Claims (3)

모드선택신호에 따라 암,복호화를 수행하는 블록 암호화 장치에 있어서,
현재 라운드를 표시하기 위해 매 클럭 마다 증가하는 형태의 라운드 신호와, 키 데이터와 평문 데이터를 구분 짓기 위한 입력신호에 따라 제어되는 카운트 신호를 생성하여 출력하는 제어부와;
상기 모드선택신호에 따라 암, 복호화 모드가 결정되고, 키 데이터를 입력받아 매 라운드마다 n비트의 라운드키를 생성하여 출력하는 키생성부와;
상기 라운드 신호와 라운드키를 이용해 평문 데이터에 대한 암호화 혹은 복호화를 수행하여 그 결과값을 출력하는 라운드부;를 포함하되,
상기 키생성부는 복호화 모드의 일부 라운드에서 이전 암호화시 사용된 라운드 키를 저장하여 전달함이 없이 m번째 라운드의 화이크 키를 이용해 상기 m번째 부터 첫 번째 라운드까지의 라운드키를 역으로 생성하여 상기 라운드부로 전달함을 특징으로 하는 블록 암호화 장치.
In the block encryption device for performing encryption and decryption according to the mode selection signal,
A control unit for generating and outputting a count signal controlled according to an input signal for distinguishing key data and plain text data, and a round signal which increases in every clock to display the current round;
A key generation unit for determining a dark and a decryption mode according to the mode selection signal, receiving key data, and generating and outputting an n-bit round key every round;
Includes a round unit for performing encryption or decryption of plain text data using the round signal and the round key and outputting the result value.
The key generation unit inversely generates the round keys from the m th to the first round using the fake key of the m th round without storing and transmitting the round key used for the previous encryption in some rounds of the decryption mode. Block encryption device characterized in that the transmission to the round part.
청구항 1에 있어서, 상기 라운드부는,
상기 평문 데이터에 대한 암호화 혹은 복호화 연산과정에서 상기 평문 데이터의 홀수자리 연산과정을 통합 처리하도록 로직 구현됨을 특징으로 하는 블록 암호화 장치.
The method according to claim 1, The round portion,
A block encryption device, characterized in that logic is implemented to integrally process the odd-digit operation of the plaintext data in the process of encrypting or decrypting the plaintext data.
청구항 1에 있어서, 상기 키생성부는 복호화 모드에서 36번째 라운드의 화이크 키를 이용해 36번째부터 첫 번째 라운드까지의 라운드키를 역으로 생성하여 상기 라운드부로 전달함을 특징으로 하는 블록 암호화 장치.The method according to claim 1, wherein the key generation unit in the decryption mode, using the 36th round of the fake key, the block encryption device characterized in that the inverse generation of the round key from the 36th to the first round is transmitted to the round unit.
KR1020190003166A 2019-01-10 2019-01-10 Lightweight block cryptography device KR20200086859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190003166A KR20200086859A (en) 2019-01-10 2019-01-10 Lightweight block cryptography device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190003166A KR20200086859A (en) 2019-01-10 2019-01-10 Lightweight block cryptography device

Publications (1)

Publication Number Publication Date
KR20200086859A true KR20200086859A (en) 2020-07-20

Family

ID=71832135

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190003166A KR20200086859A (en) 2019-01-10 2019-01-10 Lightweight block cryptography device

Country Status (1)

Country Link
KR (1) KR20200086859A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030087893A (en) 2002-05-09 2003-11-15 최병윤 Modular AES Rijndael Round Key Scheduler with On-the-Fly Computation Scheme of Round Key

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030087893A (en) 2002-05-09 2003-11-15 최병윤 Modular AES Rijndael Round Key Scheduler with On-the-Fly Computation Scheme of Round Key

Similar Documents

Publication Publication Date Title
US6324286B1 (en) DES cipher processor for full duplex interleaving encryption/decryption service
US7295671B2 (en) Advanced encryption standard (AES) hardware cryptographic engine
US20110255689A1 (en) Multiple-mode cryptographic module usable with memory controllers
US6304657B1 (en) Data encryption apparatus using odd number of shift-rotations and method
US7639797B2 (en) Apparatus and method of performing AES Rijndael algorithm
US20090220083A1 (en) Stream cipher using multiplication over a finite field of even characteristic
JP2006527865A (en) Line doll block encryption apparatus and encryption and decryption method thereof
US20060002548A1 (en) Method and system for implementing substitution boxes (S-boxes) for advanced encryption standard (AES)
JP4025722B2 (en) Method and apparatus for data encryption
JP2002032018A (en) Ciphering device using standard algorithm for ciphering data
Elgeldawi et al. A comparative analysis of symmetric algorithms in cloud computing: a survey
Gouvêa et al. High speed implementation of authenticated encryption for the MSP430X microcontroller
US10237066B1 (en) Multi-channel encryption and authentication
JP5044848B2 (en) Pi ++ stream cipher encryption method and decryption method, and encryption and decryption algorithm based on pi data
JPWO2006019152A1 (en) Message authenticator generation device, message authenticator verification device, and message authenticator generation method
JP6167721B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM
Mohan et al. Revised aes and its modes of operation
KR100710455B1 (en) Apparatus for rijndael block cipher and encryption/decryption method thereof
KR20200086859A (en) Lightweight block cryptography device
JP4395527B2 (en) Information processing device
EP1629626B1 (en) Method and apparatus for a low memory hardware implementation of the key expansion function
CN108989018B (en) AES encryption unit, AES encryption circuit and encryption method
KR100494560B1 (en) Real time block data encryption/decryption processor using Rijndael block cipher and method therefor
Mirsaid et al. The encryption algorithm AES-RFWKPES32-4
Labbi et al. Symmetric encryption algorithm for RFID systems using a dynamic generation of key