KR102393958B1 - Data processing method in system with encryption algorithm - Google Patents

Data processing method in system with encryption algorithm Download PDF

Info

Publication number
KR102393958B1
KR102393958B1 KR1020190174322A KR20190174322A KR102393958B1 KR 102393958 B1 KR102393958 B1 KR 102393958B1 KR 1020190174322 A KR1020190174322 A KR 1020190174322A KR 20190174322 A KR20190174322 A KR 20190174322A KR 102393958 B1 KR102393958 B1 KR 102393958B1
Authority
KR
South Korea
Prior art keywords
bit
sub
key
byte
round
Prior art date
Application number
KR1020190174322A
Other languages
Korean (ko)
Other versions
KR20210081908A (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 KR1020190174322A priority Critical patent/KR102393958B1/en
Publication of KR20210081908A publication Critical patent/KR20210081908A/en
Application granted granted Critical
Publication of KR102393958B1 publication Critical patent/KR102393958B1/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/24Key scheduling, i.e. generating round keys or sub-keys for block encryption

Abstract

적어도 하나의 프로세서에 의해 동작하는 암호화 알고리즘이 적용된 시스템이 비트들로 구성된 데이터 블록을 처리하기 위하여, 복수의 비트들로 구성된 스크램블러 키와 데이터 블록의 시작 주소를 토대로, 데이터 블록을 암호화할 라운드 횟수만큼의 라운드 키들을 생성한다. 데이터 블록을 구성하는 복수의 비트들을 바이트 단위로 분리하여 서브 입력 데이터들로 생성하고, 암/복호화를 처리하는 복수의 각 바이트 레인으로 바이트 순서에 따라 각 서브 입력 데이터들을 입력한다.
암호화할 횟수만큼 생성된 라운드 키들을 바이트 단위로 분리하여 서브 라운드 키들로 생성하고, 각 암호화 라운드에 따라 서브 라운드 키들을 복수의 바이트 레인들로 각각 입력하여, 서브 라운드 키를 이용하여 서브 데이터를 암호화한다.
In order for the system to which the encryption algorithm operated by at least one processor is applied to process the data block composed of bits, based on the scrambler key composed of a plurality of bits and the start address of the data block, the number of rounds to encrypt the data block Generates round keys of A plurality of bits constituting a data block is divided into byte units to generate sub-input data, and each sub-input data is input according to a byte order into each of a plurality of byte lanes for processing encryption/decryption.
The round keys generated by the number of times to be encrypted are separated into byte units to generate sub-round keys, and according to each encryption round, the sub-round keys are input into a plurality of byte lanes, respectively, and sub-data is encrypted using the sub-round key. do.

Description

암호화 알고리즘이 적용된 시스템에서의 데이터 처리 방법{Data processing method in system with encryption algorithm}Data processing method in system with encryption algorithm applied

본 발명은 대용량 데이터 처리를 위한 암호화 알고리즘이 적용된 시스템에서의 데이터 처리 방법에 관한 것이다.The present invention relates to a data processing method in a system to which an encryption algorithm for processing large amounts of data is applied.

데이터 보호를 위해 사용되는 블록 암호화 알고리즘 중 상용 알고리즘으로 DES(Data Encryption Standard), AES(Advanced Encryption Standard) 등이 있다. 이들 알고리즘은 데이터를 블록 단위로 처리한다.Among block encryption algorithms used for data protection, commercial algorithms include DES (Data Encryption Standard) and AES (Advanced Encryption Standard). These algorithms process data in blocks.

DES의 경우 한 블록의 크기는 8 바이트이며, AES의 경우 한 블록의 크기가 16 바이트이다. 블록 암호화 알고리즘은 암호화 품질을 향상시키기 위해 데이터 블록 안에서의 데이터의 위치를 변경하는 작업을 수행한다. 이는 현재 처리하는 데이터와 이전 데이터, 이후 데이터 사이의 종속관계를 지우는 역할을 하여 암호화 품질을 높이는 역할을 한다. In case of DES, the size of one block is 8 bytes, and in case of AES, the size of one block is 16 bytes. Block encryption algorithms perform the task of repositioning data within blocks of data to improve encryption quality. This increases the encryption quality by erasing the dependency relationship between the currently processed data, the previous data, and the subsequent data.

이와 같이 블록 암호 알고리즘은 데이터 블록 안에서 데이터 위치를 바꾸어 암호화 품질은 높이지만, 데이터를 블록 단위로만 처리해야하는 제약을 가진다. 예를 들어, 블록 암호 알고리즘을 사용하여 데이터를 암호화하여 메모리에 저장하는 시스템이 있다고 가정하면, 블록 안의 특정 부분을 변경하려고 할 때 해당 시스템에서는 ‘읽기-수정-쓰기’ 라는 작업을 수행해야 한다.As described above, the block cipher algorithm improves the encryption quality by changing the data location within the data block, but has a limitation in that data must be processed only in blocks. For example, suppose there is a system that encrypts data using a block cipher algorithm and stores it in memory.

따라서, 변경하고자 했던 데이터는 임의의 주소에 저장된 1 바이트 데이터이나, 해당 데이터가 포함된 블록 단위로 처리해야 하는 제약 때문에 1 블록을 모두 읽어 복호화 한 뒤, 데이터를 변경한다. 그리고 변경된 데이터를 포함하는 블록을 암호화하여 메모리에 저장해야 한다. Therefore, the data to be changed is 1-byte data stored at an arbitrary address, but because of the restriction that the data must be processed in units of blocks including the data, all blocks are read and decoded, and then the data is changed. And the block containing the changed data must be encrypted and stored in memory.

암/복호화 알고리즘으로 블록 암호 알고리즘을 사용하는 경우, 1 블록 길이보다 짧은 길이의 데이터를 처리할 때는 반드시 발생하는 문제로, 암/복호화에 시간이 많이 걸릴 수 있다. 또한, 메모리 접근 시간이 길어지는 경우 전체 시스템 성능이 크게 하락할 수 있다.When a block cipher algorithm is used as the encryption/decryption algorithm, it is a problem that always occurs when processing data with a length shorter than 1 block length, and encryption/decryption may take a lot of time. In addition, if the memory access time is long, the overall system performance may significantly decrease.

따라서, 본 발명은 메모리에 데이터를 암호화하여 저장할 수 있으면서도, '읽기-수정-쓰기'와 달리 '쓰기' 만으로 메모리 내용을 변경할 수 있는 대용량 데이터 처리를 위한 암호화 알고리즘이 적용된 시스템에서의 데이터 처리 방법을 제공한다.Therefore, the present invention provides a data processing method in a system to which an encryption algorithm for processing large amounts of data can be encrypted and stored in the memory, and the contents of the memory can be changed only by 'write' unlike 'read-modify-write' to provide.

상기 본 발명의 기술적 과제를 달성하기 위한 본 발명의 하나의 특징인 적어도 하나의 프로세서에 의해 동작하는 암호화 알고리즘이 적용된 시스템이 비트들로 구성된 데이터 블록을 처리하는 방법으로서,As a method of processing a data block composed of bits by a system to which an encryption algorithm operated by at least one processor, which is a feature of the present invention for achieving the technical problem of the present invention is applied,

복수의 비트들로 구성된 스크램블러 키와 상기 데이터 블록의 시작 주소를 토대로, 상기 데이터 블록을 암호화할 라운드 횟수만큼의 라운드 키들을 생성하는 단계, 상기 데이터 블록을 구성하는 복수의 비트들을 바이트 단위로 분리하여 서브 입력 데이터들로 생성하고, 암/복호화를 처리하는 복수의 각 바이트 레인으로 바이트 순서에 따라 각 서브 입력 데이터들을 입력하는 단계, 그리고 상기 암호화할 횟수만큼 생성된 라운드 키들을 바이트 단위로 분리하여 서브 라운드 키들로 생성하고, 각 암호화 라운드에 따라 상기 서브 라운드 키들을 상기 복수의 바이트 레인들로 각각 입력하여, 상기 서브 라운드 키를 이용하여 상기 서브 데이터를 암호화하는 단계를 포함한다.Based on the scrambler key composed of a plurality of bits and the start address of the data block, generating round keys as many as the number of rounds to encrypt the data block; separating the plurality of bits constituting the data block into byte units Generating sub-input data, inputting each sub-input data according to the byte order to each of a plurality of byte lanes that process encryption/decryption, and separating the round keys generated as many times as the number of times to be encrypted in units of bytes to serve generating round keys, inputting the sub-round keys into the plurality of byte lanes according to each encryption round, respectively, and encrypting the sub-data using the sub-round keys.

상기 라운드 키들을 생성하는 단계는 각각, 제1 길이 비트인 제1 번째 스크램블러 키에서 미리 설정된 위치의 비트들을 선택하여 제2 길이 비트의 선택 비트 키를 생성하는 단계, 상기 제2 길이 비트로 구성된 시작 주소를 토대로 제2 길이 비트의 변환된 주소를 생성하는 단계, 그리고 상기 제2 길이 비트의 선택 비트 키와 상기 제2 길이 비트의 변환된 주소를 토대로 제1 번째 라운드 키를 생성하는 단계를 포함할 수 있다.The generating of the round keys includes generating a selection bit key of a second length bit by selecting bits at a preset position in a first scrambler key that is a first length bit, respectively, a start address composed of the second length bits. generating a converted address of a second length bit based on there is.

상기 제2 길이 비트의 변환된 주소를 생성하는 단계는, 상기 제1 번째 스크램블러 키의 비트 길이가 128 비트이면, 상기 제2 길이 비트로 구성된 시작 주소의 비트들을 미리 설정된 위치로 변경하여 상기 제2 길이 비트의 변환된 주소로 생성하는 단계를 포함할 수 있다.In the generating of the converted address of the second length bit, when the bit length of the first scrambler key is 128 bits, the bits of the start address composed of the second length bit are changed to a preset position to set the second length It may include generating the translated address of bits.

상기 제2 길이 비트의 변환된 주소를 생성하는 단계는, 상기 제1 번째 스크램블러 키의 비트 길이가 64 비트이면, 상기 시작 주소를 형성하는 비트들에서 특정 비트에 해당하는 값을 한 비트로 더 생성하고, 상기 특정 비트에 해당하는 값의 역 서브바이트 연산한 값을 두 비트의 값으로 생성하는 단계, 그리고 상기 특정 비트를 기준으로 우측의 하위 1 비트 씩 세 개의 비트들은 삭제하고, 상기 특정 비트, 상기 특정 비트를 기준으로 좌측의 상위 비트들과 상기 생성한 세 비트들을 포함하여 상기 제2 비트의 변환된 주소로 생성하는 단계를 포함하고, 상기 특정 비트는 상기 시작 주소를 형성하는 비트들에서 가장 우측에서 4번째 비트에 해당한다.In the step of generating the converted address of the second length bit, if the bit length of the first scrambler key is 64 bits, a value corresponding to a specific bit from bits forming the start address is further generated as one bit, , generating a value of two bits as a value obtained by performing an inverse sub-byte operation of a value corresponding to the specific bit, and deleting three bits by the lower 1 bit on the right based on the specific bit, the specific bit, the and generating the converted address of the second bit including upper bits on the left and the three generated bits based on a specific bit, wherein the specific bit is the rightmost bit among bits forming the start address It corresponds to the 4th bit in

상기 제1 번째 라운드 키를 생성하는 단계 이후에, 상기 제1 번째 라운드가 상기 암호화할 라운드 횟수의 마지막 횟수에 해당하지 않으면, 상기 제1 번째 스크램블러 키로부터 제2 번째 스크램블러 키를 생성하는 단계를 포함할 수 있다.After generating the first round key, if the first round does not correspond to the last number of rounds to be encrypted, generating a second scrambler key from the first scrambler key. can do.

상기 제2 번째 스크램블러 키를 생성하는 단계는, 상기 제1 번째 스크램블러 키의 상위 8비트는 역 서브바이트 연산하는 단계, 역 서브바이트 연산된 상위 8비트와 상기 상위 8비트를 제외한 하위 비트들로 구성된 제1 번째 스크램블러 키에서, 하위 3비트를 제1 방향으로 순환 시프트하는 단계, 그리고 상기 하위 3비트가 제1 방향으로 순환 시프트하여 생성된 키를 상기 제2 번째 스크램블러 키로 생성하는 단계를 포함할 수 있다.The generating of the second scrambler key includes: performing an inverse subbyte operation on the upper 8 bits of the first scrambler key; Cycically shifting the lower 3 bits in the first direction in the first scrambler key, and generating a key generated by cyclically shifting the lower 3 bits in the first direction as the second scrambler key there is.

상기 제1 번째 라운드 키를 생성하는 단계는, 상기 제2 길이 비트의 선택 비트 기와 상기 제2 길이 비트의 변환된 주소를 배타적 논리 합 하여 제2 길이 비트의 결합 키로 생성하는 단계, 상기 결합 키의 각 비트들을 역 서브바이트 연산하여 제2 길이 비트의 인버스 키로 생성하는 단계, 상기 제2 길이 비트의 인버스 키의 비트들의 위치를 미리 결정한 위치로 변경하여 제2 길이 비트의 비트 위치 변경 키로 생성하는 단계, 상기 제2 길이 비트의 비트 위치 변경 키의 각 비트들을 역 서브바이트 연산하여 제2 길이 비트의 제2 인버스 키로 생성하는 단계, 상기 제2 인버스 키의 제2 길이 비트를 제1 길이 비트로 변경하여, 제1 길이 비트의 길이 변경 키로 생성하는 단계, 그리고 상기 제1 길이 비트의 제1 번째 스크램블러 키와 상기 제1 길이 비트의 길이 변경 키를 배타적 논리 합 하여, 상기 제1 번째 라운드 키로 생성하는 단계를 포함할 수 있다.The generating of the first round key includes generating a combined key of a second length bit by performing an exclusive-OR between the selection bit group of the second length bit and the converted address of the second length bit; generating an inverse key of a second length bit by performing an inverse subbyte operation on each bit; generating a bit position change key of a second length bit by changing the positions of bits of the inverse key of the second length bit to a predetermined position , generating a second inverse key of a second length bit by performing an inverse subbyte operation on each bit of the bit position change key of the second length bit, changing the second length bit of the second inverse key into a first length bit , generating a length change key of a first length bit, and performing an exclusive-OR on a first scrambler key of the first length bit and a length change key of the first length bit to generate the first round key may include.

상기 인버스 키로 생성하는 단계와 상기 비트 위치 변경 키로 생성하는 단계는 복수의 횟수로 생성될 수 있다.The generating with the inverse key and the generating with the bit position change key may be generated a plurality of times.

상기 서브 데이터를 암호화하는 단계는, 상기 서브 데이터를 역 서브바이트 연산하여 역 서브바이트 연산된 서브 데이터를 생성하는 단계, j-0번째 서브 라운드 키와 상기 역 서브바이트 연산된 서브 데이터를 배타적 논리 합하여 제1 서브 바이트를 출력하는 단계, j-1번째 서브 라운드 키를 기초로 비트 순환 회전 결정 값을 계산하고, 계산한 비트 순환 회전 결정 값을 토대로 상기 제1 서브 바이트의 한 비트가 순환 회전되거나 상기 제1 서브 바이트의 비트 순서 그대로 하여 순환 처리 서브 바이트를 생성하는 단계, j-2 번째 서브 라운드 키를 구성하는 각 비트들로 계산된 제1 값과 제2 값을 이용하여, 상기 순환 처리 서브 바이트의 비트 위치를 변경하여 비트 재배치 서브 바이트를 생성하는 단계, j-3번째 서브 라운드 키와 상기 비트 재배치 서브 바이트를 배타적 논리 합하여 제2 서브 바이트를 해당 라운드의 라운드 바이트로 출력하는 단계를 포함할 수 있다.The encrypting of the sub data includes: generating inverse sub-byte-operated sub data by performing an inverse sub-byte operation on the sub data; outputting the first sub-byte, calculating a bit rotation rotation determination value based on the j-1th sub-round key, and based on the calculated bit rotation rotation determination value, one bit of the first sub-byte is rotationally rotated or the generating a circular processing sub-byte by maintaining the bit order of the first sub-byte, the circular processing sub-byte using the first value and the second value calculated for each bit constituting the j-2th sub-round key generating a bit rearrangement subbyte by changing the bit position of there is.

상기 j는 상기 서브 데이터가 상기 데이터 블록에서 몇 번째 바이트에 해당하는지 나타내는 정수이고, 상기 j-0, j-1, j-2, j-3의 계산 값이 0 이하인 경우, 계산된 각 값을 16으로 나눈 나머지 값을 가지는 서브 라운드 키를 사용할 수 있다.Where j is an integer indicating which byte the sub data corresponds to in the data block, and when the calculated values of j-0, j-1, j-2, and j-3 are 0 or less, each calculated value is You can use a sub-round key with the remainder divided by 16.

상기 순환 처리 서브 바이트를 생성하는 단계는, 상기 j-1번째 서브 라운드 키를 구성하는 비트들 중 미리 설정된 제1 비트와 제2 비트의 배타적 논리 합의 값이 1이면 상기 제1 서브 바이트를 한 비트씩 좌측으로 순환 회전하여 상기 순환 처리 서브 바이트로 생성하고, 상기 제1 비트와 제2 비트의 배타적 논리 합의 값이 0이면 상기 제1 서브 바이트를 상기 순환 처리 서브 바이트로 생성할 수 있다.The generating of the circularly processed sub-byte may include adding the first sub-byte to one bit if the value of the exclusive logical sum of the first bit and the second bit preset among the bits constituting the j-1 th sub-round key is 1 It is possible to generate the cyclically processed sub-byte by cyclically rotating to the left. If the exclusive logical sum of the first bit and the second bit is 0, the first sub-byte may be generated as the circularly processed sub-byte.

상기 비트 재배치 서브 바이트를 생성하는 단계는, 상기 순환 처리 서브 바이트와 상기 j-2번째 서브 라운드 키를 입력받는 단계, 상기 j-2번째 서브 라운드 키의 제1, 제2, 제3 비트 값의 배타적 논리 합하여 상기 제1 값을 계산하는 단계, 상기 j-2번째 서브 라운드 키의 제4, 제5, 제6 비트 값의 배타적 논리 합하여 상기 제2 값을 계산하는 단계, 그리고 상기 제1 값과 제2 값들에 따라, 상기 순환 처리 서브 바이트의 비트들의 위치를 변경하여 상기 비트 재배치 서브 바이트로 생성하는 단계를 포함할 수 있다.The generating of the bit rearrangement sub-byte includes: receiving the circular processing sub-byte and the j-2 th sub-round key; calculating the first value by performing an exclusive-OR; calculating the second value by performing an exclusive-OR of the fourth, fifth, and sixth bit values of the j-2th sub-round key; and the first value and The method may include changing the positions of bits of the circular processing sub-byte according to second values to generate the bit rearrangement sub-byte.

상기 서브 데이터를 암호화하는 단계 이후에, 암호화된 데이터 블록을 복호화하는 단계를 더 포함하고, 상기 복호화하는 단계는, 암호화된 데이터 블록과 상기 암호화된 데이터 블록의 시작 주소, 그리고 상기 데이터 블록을 암호화할 때 생성한 스크램블러 키를 입력받는 단계, 상기 암호화된 데이터 블록과 상기 스크램블러 키를 기초로 상기 암호화할 횟수만큼 생성된 라운드 키들을 생성하는 단계, 그리고 암호화 라운드의 역순으로 라운드 키들을 상기 복수의 바이트 레인들로 입력하여 상기 암호화된 데이터 블록을 복호화하는 단계를 포함할 수 있다.After the step of encrypting the sub data, the method further includes the step of decrypting the encrypted data block, wherein the decrypting includes: an encrypted data block, a start address of the encrypted data block, and to encrypt the data block receiving the generated scrambler key as input; generating round keys generated as many times as the number of times to be encrypted based on the encrypted data block and the scrambler key; It may include the step of decrypting the encrypted data block by inputting it into

상기 복호화하는 단계는, 상기 j-3번째 서브 라운드 키와 암호화된 서브 데이터를 배타적 논리 합하여, 상기 비트 재배치 서브 바이트를 생성하는 단계, 상기 j-2 번째 서브 라운드 키를 구성하는 각 비트들로 계산된 제1 값과 제2 값을 이용하여, 상기 비트 재배치 서브 바이트의 비트 위치를 변경하여, 상기 순환 처리 서브 바이트를 생성하는 단계, 상기 j-1번째 서브 라운드 키를 기초로 비트 순환 회전 결정 값을 계산하고, 계산한 비트 순환 회전 결정 값을 토대로 상기 순환 처리 서브 바이트의 한 비트가 순환 회전되거나 상기 순환 처리 서브 바이트의 비트 순서 그대로 하여 상기 제1 서브 바이트를 생성하는 단계, 상기 j-0번째 서브 라운드 키와 상기 제1 서브 바이트를 배타적 논리 합하여 상기 역 서브바이트 연산된 서브 데이터를 제1 서브 바이트를 출력하는 단계, 상기 비트 재배치 서브 바이트와 상기 비트 재배치 서브 바이트를 배타적 논리 합하여, 상기 역 서브바이트 연산된 서브 데이터를 출력하는 단계, 그리고 상기 인버스된 서브 데이터를 서브바이트 연산하여 상기 서브 데이터를 생성하는 단계를 포함할 수 있다.The decrypting may include generating the bit rearrangement sub-byte by performing an exclusive-OR of the j-3 th sub-round key and the encrypted sub data, and calculating each bit constituting the j-2 th sub-round key. generating the circular processing sub-byte by changing the bit position of the bit rearrangement sub-byte by using the first value and the second value; a bit rotation rotation determination value based on the j-1th sub-round key generating the first sub-byte by cyclically rotating one bit of the circular processing sub-byte or maintaining the bit order of the circular processing sub-byte based on the calculated bit rotation rotation determination value, the j-0th outputting a first sub-byte of the sub-data obtained by performing the inverse sub-byte operation by performing an exclusive-OR on the sub-round key and the first sub-byte; The method may include outputting byte-operated sub data, and generating the sub data by performing sub-byte operation on the inversed sub data.

상기 순환 처리 서브 바이트를 생성하는 단계는, 상기 j-1번째 서브 라운드 키를 구성하는 비트들 중 미리 설정된 제1 비트와 제2 비트의 배타적 논리 합의 값이 1이면 상기 제1 서브 바이트를 한 비트씩 우측으로 순환 회전하여 상기 순환 처리 서브 바이트로 생성하고, 상기 제1 비트와 제2 비트의 배타적 논리 합의 값이 0이면 상기 제1 서브 바이트를 상기 순환 처리 서브 바이트로 생성할 수 있다.The generating of the circularly processed sub-byte may include adding the first sub-byte to one bit if the value of the exclusive logical sum of the first bit and the second bit preset among the bits constituting the j-1 th sub-round key is 1 The cyclic processing sub-byte may be generated by cyclically rotating to the right, and when the value of the exclusive logical sum of the first bit and the second bit is 0, the first sub-byte may be generated as the circular processing sub-byte.

본 발명에 따르면 암호화 장치와 복호화 장치의 동작에서 입력 데이터 위치를 변경하는 일이 없기 때문에, 데이터 블록 안의 특정 데이터를 용이하게 수정할 수 있다.According to the present invention, since the position of input data is not changed during the operation of the encryption device and the decryption device, specific data in a data block can be easily modified.

또한, 상용 블록 암호 알고리즘을 사용하는 경우, '읽기-수정-쓰기'의 과정을 거쳐야 하나, 본 발명에 따르면 변경하려는 데이터만 수정할 수 있으므로 상용 알고리즘을 사용하는 경우 보다 더 빠르게 데이터를 수정할 수 있다.In addition, when a commercial block cipher algorithm is used, a process of 'read-modify-write' is required, but according to the present invention, only data to be changed can be modified, so data can be modified faster than when a commercial algorithm is used.

또한, 데이터 버스의 규격(64/128 비트)에 따라 확장/축소가 용이하며, 수행할 라운드 숫자를 조정할 수 있어 성능 향상에 유리하다.In addition, expansion/reduction is easy according to the data bus standard (64/128 bits), and the number of rounds to be performed can be adjusted, which is advantageous for performance improvement.

도 1은 일반적인 블록 암호화 방법에 대한 예시도이다.
도 2는 일반적인 블록 암호화 방법이 적용된 시스템의 구조도이다.
도 3은 일반적인 블록 암호화 방법이 적용된 시스템에서 데이터 변경 과정을 나타낸 예시도이다.
도 4는 본 발명의 실시예에 따른 암호화 알고리즘이 적용된 시스템의 구조도이다.
도 5는 본 발명의 실시예에 따른 키 스케줄러의 예시도이다.
도 6은 본 발명의 실시예에 따른 키 생성 모듈의 예시도이다.
도 7은 본 발명의 실시예에 따른 비트 선택 모듈의 예시도이다.
도 8은 본 발명의 실시예에 따른 주소 비트 변환 모듈의 예시도이다.
도 9는 본 발명의 실시예에 따른 하위 키 변환 모듈의 예시도이다.
도 10은 본 발명의 실시예에 따른 비트 위치 변경 모듈의 예시도이다.
도 11은 본 발명의 실시예에 따른 키 길이 변경 모듈의 예시도이다.
도 12 및 도 13은 본 발명의 실시예에 따른 비트 이동 모듈의 예시도이다.
도 14는 본 발명의 실시예에 따른 암/복호화기에서 데이터 블록을 암호화하는 예시도이다.
도 15는 본 발명의 실시예에 따른 암/복호화기에서 암호화된 데이터 블록을 복호화하는 예시도이다.
도 16은 본 발명의 실시예에 따른 비트 순환 회전 함수의 연산 방법에 대한 예시도이다.
도 17은 본 발명의 실시예에 따른 DERV 함수의 연산 방법에 대한 예시도이다.
도 18은 본 발명의 실시예에 따른 암호화 알고리즘이 적용된 시스템의 데이터 암호화 동작 예시도이다.
도 19는 본 발명의 실시예에 따른 데이터 변경 예시도이다.
1 is an exemplary diagram of a general block encryption method.
2 is a structural diagram of a system to which a general block encryption method is applied.
3 is an exemplary diagram illustrating a data change process in a system to which a general block encryption method is applied.
4 is a structural diagram of a system to which an encryption algorithm according to an embodiment of the present invention is applied.
5 is an exemplary diagram of a key scheduler according to an embodiment of the present invention.
6 is an exemplary diagram of a key generation module according to an embodiment of the present invention.
7 is an exemplary diagram of a bit selection module according to an embodiment of the present invention.
8 is an exemplary diagram of an address bit conversion module according to an embodiment of the present invention.
9 is an exemplary diagram of a sub-key conversion module according to an embodiment of the present invention.
10 is an exemplary diagram of a bit position change module according to an embodiment of the present invention.
11 is an exemplary diagram of a key length change module according to an embodiment of the present invention.
12 and 13 are exemplary diagrams of a bit shift module according to an embodiment of the present invention.
14 is an exemplary diagram for encrypting a data block in an encryption/decryptor according to an embodiment of the present invention.
15 is an exemplary diagram of decrypting an encrypted data block in the encryption/decryptor according to an embodiment of the present invention.
16 is an exemplary diagram of a method of calculating a bit cyclic rotation function according to an embodiment of the present invention.
17 is an exemplary diagram of a method of calculating a DERV function according to an embodiment of the present invention.
18 is an exemplary diagram of a data encryption operation of a system to which an encryption algorithm according to an embodiment of the present invention is applied.
19 is a diagram illustrating data change according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, the embodiments of the present invention will be described in detail so that those of ordinary skill in the art to which the present invention pertains can easily implement them. However, the present invention may be embodied in several different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. Throughout the specification, when a part "includes" a certain element, it means that other elements may be further included, rather than excluding other elements, unless otherwise stated.

이하, 도면을 참조로 하여 대용량 데이터 처리를 위한 암호화 장치 및 방법에 대해 상세히 설명한다.Hereinafter, an encryption apparatus and method for processing large data will be described in detail with reference to the drawings.

본 발명의 실시예에 대해 설명하기 앞서, 일반적인 블록 암호화 방법에 대해 도 1 내지 도 3을 참조로 설명한다. 본 발명의 실시예에서는 다양한 블록 암호화 방법 중 AES 암호화 방법을 예로 하여 설명한다.Before describing an embodiment of the present invention, a general block encryption method will be described with reference to FIGS. 1 to 3 . In the embodiment of the present invention, the AES encryption method among various block encryption methods will be described as an example.

도 1은 일반적인 블록 암호화 방법에 대한 예시도이다.1 is an exemplary diagram of a general block encryption method.

상용 블록 암호화 알고리즘은 데이터를 블록 단위로 처리한다. AES 암호화 방식의 경우 입력으로 받는 한 블록의 데이터 크기는 16 바이트(128비트)이다. Commercial block encryption algorithms process data in blocks. In the case of AES encryption, the data size of one block received as input is 16 bytes (128 bits).

도 1에 도시된 바와 같이, 주소 0x0 ~ 0xF에 위치한 128 비트의 데이터와 128 비트의 키로 AES 암호화한 결과가 도 1의 우측에 나타낸 바와 같다. 예를 들어, 도 1의 128 비트 데이터인 4973207468697320746865207265616C와 128 비트의 키인 139050849F660D3D84E48ADF51672652로 AES 암호화한 경우 암호화된 결과는 128 비트의 31C45DA459EAE1C26B3CFAD6E5975822가 된다.As shown in FIG. 1 , the results of AES encryption using 128-bit data located at addresses 0x0 to 0xF and a 128-bit key are shown on the right side of FIG. 1 . For example, when AES-encrypted using 128-bit data of 4973207468697320746865207265616C of FIG. 1 and 128-bit key of 139050849F660D3D84E48ADF51672652, the encrypted result is 31C45DA459EAE1C26B3CFAD6E5975822 of 128 bits.

이때, 블록 암호화 알고리즘은 암호화 품질을 향상시키기 위해 데이터 블록 안에서의 데이터 위치를 변경하는 작업을 수행한다. 이는, 현재 처리하는 데이터와 이전 데이터, 이후 데이터 사이의 종속 관계를 지우는 역할을 하며, 암호화 품질을 높여준다.At this time, the block encryption algorithm performs a task of changing the data position in the data block to improve the encryption quality. This serves to erase the dependency relationship between the currently processed data, the previous data, and the subsequent data, and improves the encryption quality.

이와 같은 블록 암호화 알고리즘이 적용된 시스템과, 해당 시스템에서 데이터를 변경하는 과정에 대해 도 2를 참조로 설명한다.A system to which such a block encryption algorithm is applied and a process of changing data in the system will be described with reference to FIG. 2 .

도 2는 일반적인 블록 암호화 방법이 적용된 시스템의 구조도이고, 도 3은 일반적인 블록 암호화 방법이 적용된 시스템에서 데이터 변경 과정을 나타낸 예시도이다.2 is a structural diagram of a system to which a general block encryption method is applied, and FIG. 3 is an exemplary diagram illustrating a data change process in a system to which a general block encryption method is applied.

도 2에 도시된 바와 같이, 시스템(10)은 암호화된 데이터가 저장되는 메모리(11), 데이터를 암호화하는 암호화 기능과 암호화된 데이터를 복호화하는 복호화 기능을 포함하는 메모리 컨트롤러(12)를 포함한다. 그리고 시스템(10) 사용자가 데이터를 입력하거나 수정할 수 있도록 원본 데이터를 디스플레이하거나 수정된 데이터를 입력으로 받을 수 있도록 하는 응용 소프트웨어(13)를 포함한다.As shown in FIG. 2 , the system 10 includes a memory 11 in which encrypted data is stored, and a memory controller 12 including an encryption function for encrypting data and a decryption function for decrypting the encrypted data. . And the system 10 includes application software 13 that allows the user to input or modify data, display original data, or receive modified data as input.

여기서 메모리(11)에 저장된 암호화된 데이터의 블록에서 특정 부분을 변경하려 한다고 가정한다. 본 발명의 실시예에서는 0x5번 주소에 해당하는 16진수 데이터 69를 16진수 데이터 00으로 변경하려고 한다고 가정하여 설명하며, 이는 도 3의 음영으로 표시된 부분에 해당한다.Here, it is assumed that a specific part in the block of encrypted data stored in the memory 11 is to be changed. In the embodiment of the present invention, it is assumed that hexadecimal data 69 corresponding to address 0x5 is to be changed to hexadecimal data 00, which corresponds to the shaded portion in FIG. 3 .

그러면 시스템(10)은 메모리(11)에서 메모리 컨트롤러로 암호화된 데이터를 읽은 메모리 컨트롤러(12)의 복호화 기능을 통해 암호화된 데이터를 복호화하여 응용 소프트웨어(13)로 전달한다(①). 사용자가 응용 소프트웨어(13)를 통해 0x5번 주소의 16진수 데이터 69를 16진수 데이터 00으로 수정한다(②).Then, the system 10 decrypts the encrypted data through the decryption function of the memory controller 12 that reads the encrypted data from the memory 11 to the memory controller and transmits it to the application software 13 (①). The user modifies the hexadecimal data 69 of the address 0x5 to the hexadecimal data 00 through the application software 13 (②).

시스템(10)은 사용자에 의해 수정된 데이터를 메모리 컨트롤러(12)의 암호화 기능을 이용하여 암호화하고, 메모리(11)에 수정 후 암호화된 데이터로 저장한다(③). 이때, 최초 메모리(11)에 저장되어 있던 암호화된 데이터와 데이터가 수정된 후 암호화된 데이터를 비교하면, 0x5번 주소의 16진수 데이터 변경에 따라 블록 내 모든 주소의 암호화된 데이터들이 변경된 것을 알 수 있다.The system 10 encrypts the data modified by the user using the encryption function of the memory controller 12, and stores the modified data in the memory 11 as encrypted data (③). At this time, when the encrypted data stored in the first memory 11 is compared with the encrypted data after the data is modified, it can be seen that the encrypted data of all addresses in the block are changed according to the change of the hexadecimal data of the address 0x5. there is.

즉, 변경하고자 했던 데이터는 주소 0x5의 1 바이트 16진수 데이터 ‘69’ 였다. 그러나, 블록 암호화 방식의 특성 상 데이터를 블록 단위로 처리해야 하는 제약 때문에 1 블록을 모두 읽어 복호화(읽기) 한 뒤, '69'를 변경하려는 16진수 데이터 '00'으로 변경하고, 이 블록을 암호화하여 메모리(11)에 저장(쓰기)해야 하는 번거로움이 있다.That is, the data to be changed was 1-byte hexadecimal data ‘69’ at address 0x5. However, due to the limitation of processing data in block units due to the nature of the block encryption method, after all 1 block is read and decrypted (read), '69' is changed to '00' of the hexadecimal data to be changed, and this block is encrypted Therefore, there is a hassle of storing (writing) in the memory 11 .

이는 암/복호화 알고리즘으로 블록 암호 알고리즘을 사용하는 경우 반드시 발생하는 문제로, 암/복호화에 시간이 많이 걸리거나, 메모리 접근 시간이 길어지는 경우 전체 시스템 성능이 크게 하락할 수 있다. 따라서, 본 발명의 실시예에서는 블록 단위로 메모리에 데이터를 암호화하여 저장할 수 있으면서도, 기존 블록 암호화 방식에서 발생하는 '읽기-수정-쓰기' 절차와 달리 '쓰기' 만으로 메모리 내용을 변경할 수 있는 암호화 장치 및 방법을 제안한다.This is a problem that always occurs when a block cipher algorithm is used as the encryption/decryption algorithm. If encryption/decryption takes a lot of time or memory access time is long, the overall system performance may significantly decrease. Therefore, in the embodiment of the present invention, data can be encrypted and stored in the memory in block units, but unlike the 'read-modify-write' procedure that occurs in the existing block encryption method, the encryption device can change the memory contents only by 'write' and methods are proposed.

본 발명의 실시예에 대한 설명에 앞서, 설명의 편의를 위해 사용되는 비트의 표현 방식에 대해 다음과 같이 정의한다.Prior to the description of the embodiment of the present invention, a bit representation method used for convenience of description is defined as follows.

- A[M]: A의 M번째 비트- A[M]: Mth bit of A

- A[M:N]: A의 M번째 비트부터 N 번째 비트 - A[M:N]: From the Mth bit to the Nth bit of A

예를 들어, A[7:0] = 0x96일 때, A[7]=1, A[6]=0, A[5]=0, A[4]=1, A[3]=0, A[2]=1, A[1]=1, A[0]=0임.For example, when A[7:0] = 0x96, A[7]=1, A[6]=0, A[5]=0, A[4]=1, A[3]=0, A[2]=1, A[1]=1, A[0]=0.

- 바이트 배열 D[j]: 바이트 배열 D의 j 번째 바이트- byte array D[j]: jth byte of byte array D

예를 들어, 8 바이트 배열 D의 값이 D=0x1112131415161718 일 때, D[0]=0x11, D[1]=0x12, D[2]=0x13, D[3]=0x14, D[4]=0x15, D[5]=0x16, D[6]=0x17, D[7]=0x18For example, when the value of an 8-byte array D is D=0x1112131415161718, D[0]=0x11, D[1]=0x12, D[2]=0x13, D[3]=0x14, D[4]= 0x15, D[5]=0x16, D[6]=0x17, D[7]=0x18

- 1 바이트는 1 주소를 차지함- 1 byte occupies 1 address

예를 들어, D = 0x1112131415161718212223242526272831 일 때, D[0]의 값인 0x11이 메모리 주소 0x100에 저장되어 있고, D[1]의 값인 0x12가 메모리 주소 0x101에 저장되어 있다. 그러나 일반적으로 4바이트를 한꺼번에 표시하기 때문에 D[0:3]인 0x11121314가 메모리 주소 0x100에 저장되는 것으로 예를 들어 설명한다.For example, when D = 0x11121314151617182122223242526272831, 0x11, the value of D[0], is stored in memory address 0x100, and 0x12, the value of D[1], is stored in memory address 0x101. However, since 4 bytes are generally displayed at once, it will be described as an example that 0x11121314, which is D[0:3], is stored in memory address 0x100.

도 4는 본 발명의 실시예에 따른 암호화 알고리즘이 적용된 시스템의 구조도이다.4 is a structural diagram of a system to which an encryption algorithm according to an embodiment of the present invention is applied.

도 4에 도시된 바와 같이, 본 발명의 실시예에 따른 암호화 알고리즘이 적용된 시스템은 난수 발생기(100), 키 스케줄러(200), 암/복호화기(300)로 구현된다. 본 발명의 실시예에서는 설명의 편의를 위하여 도 4의 (a)에는 데이터 블록을 암호화하는 과정을 나타내었고, 도 4의 (b)에는 암호화된 데이터 블록을 복호화하는 과정을 나타내었다. 그러나 두 절차 모두 동일한 시스템으로 수행된다.As shown in FIG. 4 , the system to which the encryption algorithm according to the embodiment of the present invention is applied is implemented with a random number generator 100 , a key scheduler 200 , and an encryption/decryptor 300 . In the embodiment of the present invention, for convenience of explanation, FIG. 4(a) shows a process of encrypting a data block, and FIG. 4(b) shows a process of decrypting the encrypted data block. However, both procedures are performed with the same system.

난수 발생기(100)는 64 비트 또는 128 비트의 스크램블러 키(SK0)를 생성한다. 난수 발생기(100)가 스크램블러 키를 생성하는 방법과 생성된 키의 형태는 다양하므로 본 발명의 실시예에서는 어느 하나의 방법으로 한정하지 않는다. The random number generator 100 generates a 64-bit or 128-bit scrambler key SK0. Since the method of generating the scrambler key by the random number generator 100 and the form of the generated key are various, the embodiment of the present invention is not limited to any one method.

키 스케줄러(200)는 난수 발생기(100)에서 생성한 스크램블러 키와, 암호화하고자 하는 데이터들로 구성된 하나의 블록(이하, 설명의 편의를 위하여 데이터 블록이라 지칭함)의 시작 주소(A)를 입력으로 받는다. 이때, 데이터 블록에 포함된 데이터들의 길이는 난수 발생기(100)에서 생성한 스크램블러 키의 길이와 동일하다. The key scheduler 200 inputs the scrambler key generated by the random number generator 100 and the start address (A) of one block (hereinafter, referred to as a data block for convenience of description) composed of data to be encrypted as input. receive In this case, the length of the data included in the data block is the same as the length of the scrambler key generated by the random number generator 100 .

여기서, 난수 발생기(100)에서 생성한 스크램블러 키는 메모리(도면 미도시)에 저장된다. 이는 생성한 스크램블러 키를 이용하여 데이터를 암호화하거나 복호화 할 때 동일하게 사용하기 위함이다.Here, the scrambler key generated by the random number generator 100 is stored in a memory (not shown). This is to use the same scrambler key to encrypt or decrypt data using the generated scrambler key.

본 발명의 실시예에서는 데이터 블록을 암호화하거나 암호화된 데이터 블록을 복호화하는 데 전체 8 라운드에 걸쳐 데이터를 처리하는 것을 예로 하여 설명한다. 따라서, 키 스케줄러(200)는 각 라운드에서 암호화 또는 복호화하기 위해 사용할 라운드 키들(RK0 ~ RK7)을 생성한다. 이때, 키 스케줄러(200)는 임의의 라운드에서 사용할 라운드 키는 이전 라운드에서 생성한 라운드 키를 기초로 생성하며, 스크램블러 키와 함께 메모리에 저장된다. 이에 대해서 이후 상세히 설명한다.In the embodiment of the present invention, processing data over a total of 8 rounds for encrypting a data block or decrypting an encrypted data block will be described as an example. Accordingly, the key scheduler 200 generates round keys RK 0 to RK 7 to be used for encryption or decryption in each round. At this time, the key scheduler 200 generates a round key to be used in an arbitrary round based on the round key generated in the previous round, and is stored in the memory together with the scrambler key. This will be described in detail later.

암/복호화기(300)는 복수의 스크램블러들로 구성된다. 스크램블러의 수는 암호화 또는 복호화하기 위하여 데이터를 처리하는 라운드 수만큼 구비되어 있다. 본 발명의 실시예에서는 8 라운드에 걸쳐 데이터를 처리하기 때문에, 스크램블러의 수도 8개 구비되는 것을 예로 하여 설명한다.The encryption/decryptor 300 includes a plurality of scramblers. The number of scramblers is provided as many as the number of rounds of processing data to encrypt or decrypt. In the embodiment of the present invention, since data is processed over eight rounds, it will be described with an example that eight scramblers are provided.

암/복호화기(300)의 첫 번째 스크램블러는 데이터 블록 또는 암호화된 데이터 블록을 입력으로 받는다. 그리고 키 스케줄러(200)에서 생성한 제1 라운드 키 또는 제8 라운드 키를 입력으로 받는다. The first scrambler of the encryption/decryptor 300 receives a data block or an encrypted data block as an input. Then, the first round key or the eighth round key generated by the key scheduler 200 is received as an input.

암호화는 경우라면 암/복호화기(300)의 첫 번째 스크램블러는 제1 라운드 키와 데이터 블록으로 암호화 하여, 제1 라운드 데이터 블록(RD1)을 생성한다. 생성한 제1 라운드 데이터 블록은 두 번째 스크램블러로 입력된다. In the case of encryption, the first scrambler of the encryption/decryptor 300 encrypts the first round key and the data block to generate the first round data block RD 1 . The generated first round data block is input to the second scrambler.

두 번째 스크램블러는 제2 라운드 키를 이용하여 제1 라운드 데이터 블록을 암호화하여 제2 라운드 데이터 블록(RD2)을 생성한다. 이와 같은 방식으로 전체 8 라운드의 암호화 절차를 거쳐 생성된 제8 라운드 데이터 블록이 암호화 데이터 블록으로 메모리(10)에 저장된다.The second scrambler generates a second round data block RD 2 by encrypting the first round data block using the second round key. In this way, the eighth round data block generated through the entire eight rounds of encryption is stored in the memory 10 as an encrypted data block.

이상에서 설명한 암호화 알고리즘이 적용된 시스템의 데이터 처리 과정을 간단하게 요약하면, 데이터 암호화를 위해 사용할 라운드 수 즉, 데이터를 암호화할 횟수만큼의 라운드 키들을 생성한다. 이때, 라운드 키들은 난수 발생기에서 최초 생성한 스크램블러 키와 데이터 블록의 시작 주소를 이용하여 생성된다.Briefly summarizing the data processing process of the system to which the encryption algorithm described above is applied, the number of rounds to be used for data encryption, that is, round keys corresponding to the number of times to encrypt data are generated. In this case, the round keys are generated using the scrambler key initially generated by the random number generator and the start address of the data block.

라운드 키들이 생성되면, 암/복호화기는 평문의 데이터 블록을 입력으로 받아, 데이터 블록에 포함된 비트들을 바이트 단위로 분리하여 바이트 레인(byte lane)으로 입력한다. 이때, 바이트들의 위치를 바꿔 바이트 레인으로 입력하는 것이 아니라, 순서대로 입력한다. 바이트 레인은 스크램블러 키의 길이에 따라 16개 바이트 레인 또는 8개의 바이트 레인으로 변경될 수 있으나, 어느 하나의 형태로 한정하지 않는다.When round keys are generated, the encryption/decryptor receives a data block of plaintext as an input, separates bits included in the data block in byte units, and inputs them into a byte lane. At this time, the bytes are not input to the byte lane by changing positions, but are input in order. The byte lane may be changed to 16 byte lanes or 8 byte lanes according to the length of the scrambler key, but is not limited to either type.

암/복호화기는 바이트 레인 각각에 키 스케줄러(200)에서 생성한 라운드 키를 바이트 단위로 입력하여 바이트 단위의 데이터를 암호화 한다. 전체 라운드를 거쳐 암호화된 데이터 블록은 메모리에 저장된다. 암/복호화기가 암호화된 데이터 블록을 복호화하는 방법은 암호화 방식의 역순으로 진행되며, 이미 라운드 키들이 생성되어 있기 때문에 라운드 키가 생성된 역순으로 암/복호화기에 입력하여 복호화된다.The encryption/decryptor inputs the round key generated by the key scheduler 200 to each byte lane in byte units to encrypt byte unit data. After the entire round, the encrypted data block is stored in memory. The encryption/decryptor decrypts the encrypted data block in the reverse order of the encryption method, and since round keys have already been generated, the round keys are input into the encryption/decryptor in the reverse order to be decrypted.

여기서, 난수 발생기(100)에서 생성된 스크램블러 키와 데이터 블록의 시작 주소를 이용하여 라운드 키를 생성하는 키 스케줄러(200)에 대해 도 5를 참조로 설명한다.Here, the key scheduler 200 that generates a round key using the scrambler key generated by the random number generator 100 and the start address of the data block will be described with reference to FIG. 5 .

도 5는 본 발명의 실시예에 따른 키 스케줄러의 예시도이다.5 is an exemplary diagram of a key scheduler according to an embodiment of the present invention.

도 5에 도시된 바와 같이, 키 스케줄러(200)는 암호화 또는 복호화하는 라운드 수와 동일한 수의 키 생성 모듈(210)들로 구성된다. 본 발명의 실시예에서는 시스템에서 데이터 블록이나 암호화된 데이터 블록을 8 라운드로 암호화/복호화를 수행하는 것을 예로 하여 설명하므로, 키 생성 모듈(210) 또한 8개 구비되는 것을 예로 하여 설명한다.As shown in FIG. 5 , the key scheduler 200 includes the same number of key generation modules 210 as the number of rounds for encryption or decryption. In the embodiment of the present invention, since encryption/decryption of a data block or an encrypted data block is performed in eight rounds in the system as an example, it will be described with an example that eight key generation modules 210 are also provided.

첫 번째 키 생성 모듈은 난수 발생기(100)에서 생성한 스크램블러 키를 그대로 수신한다. 그리고 첫 번째 키 생성 모듈은 데이터 블록의 시작 주소를 입력으로 받는다. The first key generation module receives the scrambler key generated by the random number generator 100 as it is. And the first key generation module receives the start address of the data block as input.

첫 번째 키 생성 모듈은 첫 번째 스크램블러 키(SK0)와 시작 주소를 이용하여 제1 라운드 키(RK0)를 생성한다. 그리고 첫 번째 키 생성 모듈은 첫 번째 스크램블러 키(SK0)를 이용하여 두 번째 스크램블러 키(SK1)를 생성한다.The first key generation module generates a first round key (RK 0 ) using the first scrambler key (SK 0 ) and the start address. And the first key generation module generates a second scrambler key (SK 1 ) by using the first scrambler key (SK 0 ).

두 번째 키 생성 모듈은 첫 번째 키 생성 모듈에서 생성한 두 번째 스크램블러 키(SK1)와 시작 주소를 이용하여 제2 라운드 키(RK1)를 생성한다. 이와 같은 방법으로 스크램블러 키와 시작 주소를 이용하여 각 라운드의 라운드 키를 생성하는 키 생성 모듈에 대해 도 6을 참조로 설명한다.The second key generation module generates a second round key (RK 1 ) using the second scrambler key (SK 1 ) and the start address generated by the first key generation module. A key generation module that generates a round key for each round using the scrambler key and the start address in this way will be described with reference to FIG. 6 .

도 6은 본 발명의 실시예에 따른 키 생성 모듈의 예시도이다.6 is an exemplary diagram of a key generation module according to an embodiment of the present invention.

도 6에 도시된 바와 같이, 키 생성 모듈(210)은 비트 선택 모듈(211), 주소 비트 변환 모듈(212), 제1 비트 결합 모듈(213), 제1 하위 키 변환 모듈(214), 제1 비트 위치 변경 모듈(215), 제2 하위 키 변환 모듈(216), 제2 비트 위치 변경 모듈(217), 키 길이 변경 모듈(218), 제2 비트 결합 모듈(219), 그리고 비트 이동 모듈(220)을 포함한다. As shown in FIG. 6 , the key generation module 210 includes a bit selection module 211 , an address bit conversion module 212 , a first bit combining module 213 , a first lower key conversion module 214 , and a first 1 bit position change module 215 , a second lower key conversion module 216 , a second bit position change module 217 , a key length change module 218 , a second bit combination module 219 , and a bit shift module (220).

본 발명의 실시예에서는 설명의 편의를 위하여 각 구성들을 "모듈"로 설명하나, 소프트웨어로 구현된 함수들이 각 기능들을 수행할 수 있다. 그리고, 각 모듈에서 출력된 키들의 명칭을 구분의 편의를 위하여 각각 상이한 키 이름을 부여하였으나, 반드시 이와 같이 한정되는 것은 아니다.In the embodiment of the present invention, each configuration is described as a “module” for convenience of description, but functions implemented in software may perform respective functions. In addition, although different key names are given for the convenience of distinguishing the names of the keys output from each module, it is not necessarily limited in this way.

키 생성 모듈(210)이 P번째 라운드의 키 생성 모듈로부터 P번째 스크램블러 키(SKP)를 수신하면 비트 선택 모듈(211)은 수신한 P번째 스크램블러 키를 구성하는 비트들 중 사전에 결정된 위치의 비트들을 선택하여 선택된 선택 비트 키(SK)로 생성한다. 여기서 선택 비트 키(SK)는 주소 비트 결합 모듈(212)의 출력인 비트 변환 주소(TA)와 같이 제1 비트 결합 모듈의 입력으로 전달되어, 배타적 논리 합(XOR)으로 결합된다.When the key generation module 210 receives the P-th scrambler key SK P from the key generation module of the P-th round, the bit selection module 211 selects a predetermined position among bits constituting the received P-th scrambler key. Bits are selected and generated with the selected selected bit key (SK). Here, the selection bit key SK is transmitted to the input of the first bit combining module, like the bit conversion address TA, which is the output of the address bit combining module 212, and combined by an exclusive OR (XOR).

본 발명의 실시예에서는 P번째 스크램블러 키(SKP)가 64 비트 또는 128 비트로 구성되어 있는 것을 예로 하여 설명한다. 그리고 비트 선택 모듈(211)에서 출력된 선택 비트 키(SK)는 32 비트의 데이터들로 구성되어 있는 것을 예로 하여 설명한다.In the embodiment of the present invention, the P-th scrambler key (SKP) will be described by taking as an example 64 bits or 128 bits. In addition, the selection bit key SK output from the bit selection module 211 will be described with the example that it is composed of 32-bit data.

여기서, 비트 선택 모듈(211)은 64 비트 또는 128 비트로 구성된 P번째 스크램블러 키에서, 사전에 미리 결정된 비트 위치의 데이터들이 선택되는 것을 예로 하여 설명한다. Here, the bit selection module 211 will be described as an example in which data of a predetermined bit position are selected from the P-th scrambler key composed of 64 bits or 128 bits.

또한, 비트 선택 모듈(211)은 데이터를 암호화할 때나 복호화할 때 동일하게 사용된다. 데이터를 암호화할 때 임의의 라운드에서 선택한 비트 위치를 알고 있어야 복호화할 때도 역으로 사용할 수 있으므로, 본 발명의 실시예에서는 키 생성 모듈(210)이 생성하는 키로 데이터를 암호화하거나 복호화할 때 선택되는 라운드별 각 비트 위치를 미리 알고 있다고 가정한다.In addition, the bit selection module 211 is equally used when encrypting or decrypting data. When encrypting data, it is necessary to know the selected bit position in an arbitrary round so that it can be used in reverse for decryption. It is assumed that each bit position of each star is known in advance.

주소 비트 변환 모듈(212)은 32 비트의 시작 주소를 입력으로 받아, 32 비트의 변환된 주소(TA)를 출력한다. 이때, 주소 비트 변환 모듈(212)은 난수 발생기(100)가 생성한 스크램블러 키의 비트 수에 따라 32 비트의 시작 주소를 미리 정해진 규칙에 따라 변환하거나 무작위로 변환하여 변환된 주소로 출력한다. 이에 대해서는 이후 상세히 설명한다.The address bit conversion module 212 receives a 32-bit start address as an input and outputs a 32-bit converted address (TA). At this time, the address bit conversion module 212 converts or randomly converts the 32-bit start address according to a predetermined rule according to the number of bits of the scrambler key generated by the random number generator 100, and outputs the converted address. This will be described in detail later.

제1 비트 결합 모듈(213)은 비트 선택 모듈(211)에서 출력된 32 비트의 선택 비트(SK)와 주소 비트 변환 모듈(212)에서 출력된 변환된 32 비트의 변환된 주소를 입력으로 각각 받아 배타적 논리 합을 계산하여 32 비트의 결합 키로 생성한다. 본 발명의 실시예에서는 제1 비트 결합 모듈(213)이 선택 비트 키(SK)와 변환된 주소를 배타적 논리 합 하여 결합 키로 생성하는 것을 예로 하여 설명하나, 반드시 이와 같이 한정되는 것은 아니다.The first bit combining module 213 receives the 32-bit selection bit SK output from the bit selection module 211 and the converted 32-bit converted address output from the address bit conversion module 212 as inputs, respectively. The exclusive logical sum is calculated and generated as a 32-bit combined key. In the exemplary embodiment of the present invention, the first bit combining module 213 generates the combined key by performing an exclusive logical OR on the selected bit key SK and the converted address, but is not necessarily limited thereto.

제1 하위 키 변환 모듈(214)은 제1 비트 결합 모듈(213)로부터 출력된 32 비트의 결합 키를 입력으로 받아, 1 바이트씩 묶어 4개의 하위 키들로 생성한다. 그리고 1 바이트씩 묶인 4개의 하위 키들을 역 서브바이트(InverseSubByte) 연산하여 32 비트의 제1 인버스 키로 생성한다. The first sub-key conversion module 214 receives the 32-bit combination key output from the first bit combination module 213 as an input, binds 1 byte at a time, and generates four sub-keys. Then, the 4 sub-keys grouped by 1 byte are operated by InverseSubByte to generate a 32-bit first inverse key.

제1 비트 위치 변경 모듈(215)은 제1 하위 키 변환 모듈(214)에서 출력된 32 비트의 제1 인버스 키를 입력으로 받아, 32 비트들의 위치를 변경하여 제1 비트 위치 변경 키로 생성한다. The first bit position change module 215 receives the 32-bit first inverse key output from the first sub-key conversion module 214 as an input, changes the positions of the 32 bits to generate the first bit position change key.

제2 하위 키 변환 모듈(216)은 제1 비트 위치 변경 모듈(215)에서 비트 위치가 변경된 제1 비트 위치 변경 키를 입력으로 받아, 4 바이트씩 묶어 4개의 하위 키들로 생성한다. 그리고 4개의 하위 키들을 역 서브바이트 연산하여 32 비트의 제2 인버스 키로 생성한다. The second lower key conversion module 216 receives the first bit position change key whose bit position is changed from the first bit position change module 215 as an input, binds 4 bytes each, and generates four lower keys. Then, the 4 sub-keys are subjected to inverse sub-byte operation to generate a 32-bit second inverse key.

제2 비트 위치 변경 모듈(217)은 제2 하위 키 변환 모듈(216)에서 출력된 32 비트의 제2 인버스 키를 입력으로 받아, 32 비트들의 위치를 변경하여 제2 비트 위치 변경 키로 생성한다.The second bit position change module 217 receives the 32-bit second inverse key output from the second lower key conversion module 216 as an input, changes the positions of the 32 bits to generate a second bit position change key.

키 길이 변경 모듈(218)은 제2 비트 위치 변경 모듈(217)에서 생성한 32 비트의 제2 비트 위치 변경 키를 입력으로 받아, 제2 비트 위치 변경 키의 길이를 변경하여 길이 변경 키로 생성한다. 이때, 키 길이 변경 모듈(218)은 난수 발생기(100)에서 최초 생성한 스크램블러 키의 키 길이에 따라 제2 비트 위치 변경 키의 길이를 64 비트 또는 128 비트 중 어느 하나의 길이로 변경하여 길이 변경 키로 생성한다. 이에 대해서는 이후 상세히 설명한다. The key length change module 218 receives the 32-bit second bit position change key generated by the second bit position change module 217 as an input, changes the length of the second bit position change key to generate a length change key . At this time, the key length change module 218 changes the length of the second bit position change key to any one of 64 bits or 128 bits according to the key length of the scrambler key initially generated by the random number generator 100 to change the length. create a key This will be described in detail later.

제2 비트 결합 모듈(219)은 키 길이 변경 모듈(218)에서 출력한 길이 변경 키와 키 생성 모듈(210)이 수신한 P번째 스크램블러 키를 이용하여 배타적 논리 합을 계산하여, 스크램블러 키 길이를 가지는 라운드 키(RKP)로 생성한다. 제2 비트 결합 모듈(219)이 생성한 라운드 키(RKP)는 P번째 라운드의 스크램블러로 입력된다.The second bit combining module 219 calculates an exclusive-OR using the length change key output from the key length change module 218 and the P-th scrambler key received by the key generation module 210 to determine the scrambler key length. A branch is created with a round key (RK P ). The round key RK P generated by the second bit combining module 219 is input to the P-th round scrambler.

비트 이동 모듈(220)은 키 생성 모듈(210)이 수신한 P번째 스크램블러 키를 구성하는 비트들의 위치를 변경하여, P+1번째 스크램블러 키(SKP+1)로 생성한다. 이에 대해서는 이후 상세히 설명한다.The bit shift module 220 changes positions of bits constituting the P-th scrambler key received by the key generation module 210 to generate the P+1-th scrambler key SK P+1 . This will be described in detail later.

이상에서 설명한 키 생성 모듈(210)을 구성하는 각 모듈(또는 각 함수)이 키를 생성하는 예에 대해 도 7 내지 도 11을 참조로 설명한다.An example in which each module (or each function) constituting the key generation module 210 described above generates a key will be described with reference to FIGS. 7 to 11 .

도 7은 본 발명의 실시예에 따른 비트 선택 모듈의 예시도이다.7 is an exemplary diagram of a bit selection module according to an embodiment of the present invention.

도 7에 도시된 바와 같이, 비트 선택 모듈(211)은 스크램블러 키의 길이에 따라 도 7의 (a)와 같이 128 비트의 스크램블러 키를 32 비트의 선택 비트 키로 생성하거나, 도 7의 (b)와 같이 64 비트의 스크램블러 키를 32 비트의 선택 비트 키로 생성할 수 있다.As shown in FIG. 7, the bit selection module 211 generates a 128-bit scrambler key as a 32-bit selection bit key as shown in FIG. As shown, a 64-bit scrambler key can be generated as a 32-bit selection bit key.

비트 선택 모듈(211)은 128 비트들 각각에 삽입된 데이터들 중 미리 설정된 위치의 32 개의 비트들을 선택하여 선택 비트 키로 생성한다. 여기서 비트 선택 모듈(211)이 선택한 비트들을 어느 하나로 한정하지 않는다.The bit selection module 211 selects 32 bits at a preset position among the data inserted into each of the 128 bits and generates them as a selection bit key. Here, the bits selected by the bit selection module 211 are not limited to any one.

그리고, 0번 비트부터 127번 비트, 또는 0번 비트부터 63번 비트를 내림차순 또는 오름차순으로 순서대로 선택할 수도 있고, 무작위 순서로 선택할 수도 있다. 이때, 비트 선택 모듈(211)은 이후 암호화된 데이터를 복호화할 때 선택 비트 키를 생성하기 위하여 어떤 비트들이 선택되었는지 사전에 정의되었다고 가정한다.In addition, bits 0 to 127, or bits 0 to 63 may be selected in descending or ascending order, or may be selected in random order. At this time, it is assumed that the bit selection module 211 has previously defined which bits are selected to generate a selection bit key when decrypting the encrypted data thereafter.

예를 들어 설명하면, 64 비트 스크램블러 키를 사용한다고 가정하면, 비트 선택 모듈(211)은 다음 수학식 1에 나타낸 바와 같은 비트들로 선택 비트 키를 생성할 수 있다.For example, assuming that a 64-bit scrambler key is used, the bit selection module 211 may generate a selection bit key with bits as shown in Equation 1 below.

Figure 112019133708949-pat00001
Figure 112019133708949-pat00001

수학식 1을 설명하면, 64 비트 스크램블러 키의 20번째 비트를 선택 비트 키의 31번째 비트에 위치시킨다는 것을 의미한다. 수학식 1에 나타낸 선택 비트 키 생성 방식은 하나의 예로, 반드시 이와 같이 한정되는 것은 아니다.When Equation 1 is described, it means that the 20th bit of the 64-bit scrambler key is positioned at the 31st bit of the selection bit key. The selection bit key generation method shown in Equation 1 is an example, and is not necessarily limited thereto.

도 8은 본 발명의 실시예에 따른 주소 비트 변환 모듈의 예시도이다.8 is an exemplary diagram of an address bit conversion module according to an embodiment of the present invention.

도 8에 도시된 바와 같이 주소 비트 변환 모듈(212)은, 32 비트의 시작 주소를 입력으로 받아, 32 비트의 변환된 주소(TA)를 출력한다. 이때, 주소 비트 변환 모듈(212)은 난수 발생기(100)가 생성한 스크램블러 키가 128 비트이지 또는 64 비트인지에 따라 미리 정해진 규칙에 따라 32 비트의 변환된 주소를 출력한다. As shown in FIG. 8 , the address bit conversion module 212 receives a 32-bit start address as an input and outputs a 32-bit converted address (TA). At this time, the address bit conversion module 212 outputs the converted address of 32 bits according to a predetermined rule according to whether the scrambler key generated by the random number generator 100 is 128 bits or 64 bits.

예를 들어, 스크램블러 키가 128 비트라고 가정한다. 그러면 주소 비트 변환 모듈(212)은 시작 주소의 32 비트들의 비트 위치를 미리 설정된 규칙 또는 무작위로 바꿔 변환된 주소(TA)로 생성한다.For example, assume that the scrambler key is 128 bits. Then, the address bit conversion module 212 generates the converted address (TA) by changing the bit positions of 32 bits of the start address in a preset rule or at random.

만약 스크램블러 키가 64 비트라고 가정하면, 주소 비트 변환 모듈(212)은 시작 주소의 하위 3개의 비트인 A[2], A[1], 및 A[0]의 비트는 삭제하고, 하위 4번째 비트인 A[3] 비트를 동일하게 두 개 생성하고, A[3] 비트의 인버스된 비트인 A-1[3] 비트를 두 개 생성한다. If it is assumed that the scrambler key is 64 bits, the address bit conversion module 212 deletes the lower 3 bits of the start address, A[2], A[1], and A[0], and deletes the lower 4th bit. Two identically generated bits A[3] are generated, and two bits A -1 [3], which are inverse bits of bit A[3], are generated.

그리고 하위 4개 비트를 제외한 나머지 비트 A[31:4]에, 생성된 두 개의 A[3] 비트와 인버스된 두 개의 비트인 A-1[3] 비트들을 이용하여, 32 비트의 주소 변환 비트를 생성한다. 이때, 주소 비트 변환 모듈(212)은 32 비트(A[31:4], A[3], A[3], A-1[3], A-1[3])들의 비트 위치를 미리 설정된 규칙 또는 랜덤하게 바꿔 변환된 주소(TA)로 생성한다. And in the remaining bits A[31:4] except for the lower 4 bits, using the generated two A[3] bits and the two inversed bits, A -1 [3] bits, the 32-bit address conversion bit to create At this time, the address bit conversion module 212 sets the bit positions of 32 bits (A[31:4], A[3], A[3], A-1[3], A-1[3]) in advance. It is generated as a converted address (TA) by changing it at a rule or randomly.

여기서, 스크램블러 키가 64 비트일 경우 하위 4번째 비트인 A[3] 비트를 사용하는 이유는, 스크램블러 키가 64 비트인 경우 시작 주소는 0x0, 0x8, 0x10, 0x18이 된다. 이를 2진수로 표현하면 00000000, 00001000, 00010000, 00011000 등으로 표현되며 하위 4번째 비트인 A[3]이 0과 1로 변경되며 중요한 정보로써 사용되기 때문이다. Here, when the scrambler key is 64 bits, the reason for using the lower 4th bit, A[3] bit, is that when the scrambler key is 64 bits, start addresses are 0x0, 0x8, 0x10, 0x18. If this is expressed in binary, it is expressed as 00000000, 00001000, 00010000, 00011000, etc. This is because the lower 4th bit, A[3], is changed to 0 and 1 and is used as important information.

도 9는 본 발명의 실시예에 따른 하위 키 변환 모듈의 예시도이다.9 is an exemplary diagram of a sub-key conversion module according to an embodiment of the present invention.

하위 키 변환 모듈은 제1 하위 키 변환 모듈(214)과 제2 하위 키 변환 모듈(216)이 동일한 형태로 구현된다.In the sub-key conversion module, the first sub-key conversion module 214 and the second sub-key conversion module 216 are implemented in the same form.

도 9에 도시된 바와 같이, 하위 키 변환 모듈은 입력으로 32 비트의 결합 키 또는 32 비트의 제1 비트 위치 변경 키를 수신하면, 32 비트의 키를 1 바이트의 하위 키가 포함되도록 4개의 하위 키들로 그룹핑한다. 그리고, 그룹핑한 1 바이트의 4개 하위 키들을 역 서브바이트 연산하여 제1 인버스 키, 또는 제2 인버스 키로 출력한다. 역 서브바이트 연산 방법은 이미 알려진 것으로, 본 발명의 실시예에서는 상세한 설명을 생략한다.As shown in Fig. 9, when the low-key conversion module receives a 32-bit combination key or a 32-bit first bit position change key as an input, it converts the 32-bit key into 4 low-order keys so that the 1-byte low-key is included. group by keys. Then, the grouped 4 sub-keys of 1 byte are calculated as inverse sub-bytes and output as the first inverse key or the second inverse key. The inverse subbyte operation method is already known, and a detailed description thereof will be omitted in the embodiment of the present invention.

도 10은 본 발명의 실시예에 따른 비트 위치 변경 모듈의 예시도이다.10 is an exemplary diagram of a bit position change module according to an embodiment of the present invention.

비트 위치 변경 모듈은 제1 비트 위치 변경 모듈(215)과 제2 비트 위치 변경 모듈(217)이 동일한 형태로 구현된다. In the bit position change module, the first bit position change module 215 and the second bit position change module 217 are implemented in the same form.

도 10에 도시된 바와 같이, 비트 위치 변경 모듈이 32 비트의 제1 인버스 키 또는 32 비트의 제2 인버스 키를 입력으로 받으면, 32 비트에 각각 삽입된 데이터들의 위치를 변경한다. 이를 본 발명의 실시예에서는 비트 위치를 변경한다고 지칭한다.As shown in FIG. 10 , when the bit position change module receives a 32-bit first inverse key or a 32-bit second inverse key as an input, it changes positions of data inserted into 32 bits, respectively. This is referred to as changing the bit position in the embodiment of the present invention.

즉, 도 10에 나타낸 바와 같이, IN[31:0]의 제1 인버스 키 또는 제2 인버스 키가 입력되면, 비트 위치 변경 모듈은 해당 인버스 키의 비트들의 순서를 {IN[31], IN[27], IN[23], IN[19], IN[15], …, IN[4], IN[0]}으로 바꾸어 출력한다. 예를 들어, 입력으로 0x81726354를 수신하면, 출력으로 0x802B3C66이 생성된다.That is, as shown in FIG. 10, when the first inverse key or the second inverse key of IN[31:0] is input, the bit position change module changes the order of the bits of the corresponding inverse key to {IN[31], IN[ 27], IN[23], IN[19], IN[15], … , IN[4], IN[0]} and output. For example, if 0x81726354 is received as an input, 0x802B3C66 is generated as an output.

도 11은 본 발명의 실시예에 따른 키 길이 변경 모듈의 예시도이다.11 is an exemplary diagram of a key length change module according to an embodiment of the present invention.

도 11에 도시된 바와 같이 키 길이 변경 모듈(218)은 사용하는 스크램블러 키의 길이(64 비트 또는 128 비트)에 따라 도 11의 (a) 및 (b)와 같이 키 길이 변경 모듈을 분류하여 사용한다. 11, the key length change module 218 classifies and uses the key length change module as shown in FIGS. 11 (a) and (b) according to the length (64 bits or 128 bits) of the used scrambler key. do.

도 11의 (a)에 도시된 바와 같이, 스크램블러 키의 길이가 128 비트인 경우, 키 길이 변경 모듈은 32 비트의 제2 비트 위치 변경 키를 4번 이어 붙여 128 비트의 길이 변경 키로 생성한다. 그리고 도 11의 (b)와 같이 스크램블러 키의 길이가 64 비트인 경우, 키 길이 변경 모듈은 32 비트의 제2 비트 위치 변경 키를 2번 이어 붙여 128 비트의 길이 변경 키로 생성한다. As shown in (a) of FIG. 11 , when the length of the scrambler key is 128 bits, the key length change module creates a 128-bit length change key by concatenating the second bit position change key of 32 bits four times. And when the length of the scrambler key is 64 bits as shown in (b) of FIG. 11, the key length change module creates a 128-bit length change key by concatenating the second bit position change key of 32 bits twice.

예를 들어 스크램블러 키의 길이가 128 비트인 경우, 키 길이 변경 모듈이 0x81726354를 입력으로 수신하면, 출력인 길이 변경 키는 0x81726354817263548172635481726354가 된다. 마찬가지로 스크램블러 키의 길이가 64 비트인 경우, 키 길이 변경 모듈이 0x81726354를 입력으로 수신하면, 출력인 길이 변경 키는 0x8172635481726354가 된다.For example, if the length of the scrambler key is 128 bits, when the key length change module receives 0x81726354 as an input, the length change key as an output becomes 0x81726354817263548172635481726354. Similarly, when the length of the scrambler key is 64 bits, when the key length change module receives 0x81726354 as an input, the length change key as an output becomes 0x8172635481726354.

다음은 비트 이동 모듈(220)에 대해 도 12 및 도 13을 참조로 설명한다.The following describes the bit shift module 220 with reference to FIGS. 12 and 13 .

도 12 및 도 13은 본 발명의 실시예에 따른 비트 이동 모듈의 예시도이다.12 and 13 are exemplary diagrams of a bit shift module according to an embodiment of the present invention.

본 발명의 실시예에서는 P번째 스크램블러 키를 입력으로 수신하여 P+1번째 스크램블러 키로 생성하는 비트 이동 모듈(220)을 도 12 또는 도 13에 도시된 비트 이동 모듈 중 어느 하나의 비트 이동 모듈을 사용하는 것을 예로 하여 설명한다.In an embodiment of the present invention, any one of the bit shifting modules shown in FIG. 12 or 13 is used for the bit shifting module 220 that receives the Pth scrambler key as an input and generates the P+1th scrambler key as an input. It will be described with an example.

P번째 스크램블러 키(SKP)와 데이터 블록의 시작 주소(A)를 입력으로 받아 키 길이 변경 모듈까지 수행하여 얻은 결과, 그리고 P번째 스크램블러 키(SKP)를 가지고 배타적 논리 합을 계산하여 P번째 라운드 키(RKP)를 얻은 후에. 다음 라운드(P+1번째 라운드)를 위해 P번째 스크램블러 키(SKP)를 다음 라운드로 넘겨줘야 한다. 이때, 인접 라운드 간의 연관성을 지우기 위해 비트 이동 모듈을 사용한다. The result obtained by taking the Pth scrambler key (SK P ) and the start address of the data block (A) as inputs and performing up to the key length change module, and calculating the exclusive-OR with the Pth scrambler key (SK P ) to calculate the Pth After obtaining the round key (RK P ). For the next round (P+1th round), the Pth scrambler key (SK P ) must be transferred to the next round. In this case, a bit shift module is used to erase the association between adjacent rounds.

본 발명의 실시예에서는 도 12에 도시된 바와 같이 P번째 스크램블러 키(SKP)의 상위 8 비트만 역 서브바이트 연산을 수행한다. 그 후, 왼쪽으로 3 비트 순환 회전(ROTL3: ROTate Left 3 bit)하여, P+1번째 스크램블러 키(SKP+1)를 생성한다.In the embodiment of the present invention, only the upper 8 bits of the P-th scrambler key (SK P ) perform the inverse subbyte operation as shown in FIG. Thereafter, by rotating 3 bits to the left (ROTL3: ROTate Left 3 bits), a P+1 th scrambler key (SK P+1 ) is generated.

이때, 빠른 연산을 위하여, 도 13에 도시된 바와 같이 역 서브바이트 연산 없이 왼쪽으로 3 비트 순환 회전(ROTL3)만 한 후 P+1번째 스크램블러 키(SKP+1)를 생성할 수도 있다.At this time, for fast operation, as shown in FIG. 13 , the P+1th scrambler key SK P+1 may be generated after only a 3-bit cyclic rotation (ROTL3) to the left without inverse subbyte operation.

다음은, 상기 도 4에서 키 스케줄러(200)에서 출력된 8개의 라운드 키들과 데이터 블록을 이용하여 암/복호화기(300)에서 암호화하고 복호화하는 예에 대해 도 14 및 도 15를 참조로 설명한다. Next, an example of encryption and decryption in the encryption/decryptor 300 using the eight round keys and data blocks output from the key scheduler 200 in FIG. 4 will be described with reference to FIGS. 14 and 15. .

도 14는 본 발명의 실시예에 따른 암/복호화기에서 데이터 블록을 암호화하는 예시도이고, 도 15는 본 발명의 실시예에 따른 암/복호화기에서 암호화된 데이터 블록을 복호화하는 예시도이다.14 is an exemplary diagram of encrypting a data block in the encryption/decryptor according to an embodiment of the present invention, and FIG. 15 is an exemplary diagram of decrypting an encrypted data block in the encryption/decryptor according to an embodiment of the present invention.

도 14 및 도 15에서는 128 비트의 입력 데이터와 라운드 키를 사용하는 경우의 데이터 블록의 암호화와 암호화된 데이터 블록의 복호화를 나타낸 것이다. 그리고, 본 발명의 실시예에서는 전체 8 라운드의 데이터 처리 과정 중 임의의 라운드인 P 라운드의 데이터 처리 과정을 실시예로 나타내었다.14 and 15 show encryption of a data block and decryption of an encrypted data block when 128-bit input data and a round key are used. In addition, in the embodiment of the present invention, the data processing process of round P, which is an arbitrary round among the data processing processes of all eight rounds, is shown as an embodiment.

도 14에 도시된 바와 같이, 128 비트의 데이터 블록(RDP)과 라운드 키(RKP)가 입력되면, 입력된 데이터 블록을 바이트 단위로 묶어 각각 바이트 레인(byte lane)에 입력한다. As shown in FIG. 14 , when a 128-bit data block (RD P ) and a round key (RK P ) are input, the input data blocks are bundled into byte units and inputted to a byte lane, respectively.

여기서, 바이트 레인이라 함은, 블록 단위로 입력된 데이터들을 바이트 단위로 각각 암호화하거나 복호화하는 기능들의 집합을 의미한다. 만약 데이터 블록이 128 비트라면 16개의 바이트 레인이 형성된다. 그리고 64 비트의 데이터 블록이 입력되면, 8개의 바이트 레인이 형성된다.Here, the byte lane means a set of functions for encrypting or decrypting data input in block units in units of bytes, respectively. If the data block is 128 bits, 16 byte lanes are formed. And when a 64-bit data block is input, 8 byte lanes are formed.

기존 블록 단위의 암/복호화 알고리즘을 사용하는 시스템들은 입력 데이터들이 8 바이트 또는 16 바이트가 모두 채워지지 않을 경우 암/복호화 시 오류가 발생할 수 있기 때문에, 데이터가 입력되지 않은 비트에 특정 비트(예를 들어, 0)를 채워 넣는다거나 패딩 비트(padding bit)를 채워 넣은 데이터 블록을 입력으로 사용하였다. 이는 블록 암호화 방식의 특성 상 원문 데이터의 길이는 블록 길이의 배수가 되어야 하기 때문이다.In systems using the existing block-based encryption/decryption algorithm, an error may occur during encryption/decryption if 8 bytes or 16 bytes of input data are not filled. For example, a data block filled with 0) or a padding bit was used as an input. This is because the length of the original data must be a multiple of the block length due to the characteristics of the block encryption method.

그러나, 본 발명의 실시예에서는 블록 단위로 입력 데이터를 수신하더라도, 이를 바이트 단위로 바이트 레인에서 암호화 처리하기 때문에, 입력된 데이터의 위치와 동일한 위치로 암호화된 데이터가 출력된다. 따라서, 데이터가 입력되지 않은 바이트 레인의 경우, 해당 바이트 레인은 데이터의 암호화나 복호화를 수행하지 않기 때문에, 특정 비트나 패딩 비트로 채워 넣지 않아도 무방하다. However, in the embodiment of the present invention, even when input data is received in block units, the encrypted data is output to the same position as the position of the input data because it is encrypted in the byte lane in units of bytes. Accordingly, in the case of a byte lane to which data is not input, since the corresponding byte lane does not perform data encryption or decryption, it is not necessary to fill the byte lane with a specific bit or padding bit.

본 발명의 실시예에서는 하나의 바이트 레인에 하나의 역 서브바이트 연산 함수 처리 모듈, 제1 배타적 논리 합 계산 함수 처리 모듈, 비트 순환 함수(ROTL/ROTR) 처리 모듈, 서브 바이트 비트 재배치 모듈, 제2 배타적 논리 합 계산 함수 처리 모듈을 포함하는 것을 예로 하여 설명한다. 본 발명의 실시예에서는 암/복호화기를 구성하는 바이트 레인 역시 설명의 편의를 위하여 모듈로 표현하였으나, 소프트웨어로 구현된 프로그램이 바이트 레인의 기능을 수행할 수 있다.In an embodiment of the present invention, one inverse sub-byte operation function processing module, a first exclusive-OR operation function processing module, a bit cycle function (ROTL/ROTR) processing module, a sub-byte bit relocation module, a second An example including an exclusive logical sum calculation function processing module will be described. In the embodiment of the present invention, the byte lane constituting the encryption/decryptor is also expressed as a module for convenience of explanation, but a program implemented in software may perform the function of the byte lane.

제1 배타적 논리 합 계산 함수 처리 모듈로 입력되는 바이트 단위로 구분된 라운드 키(이하, 설명의 편의를 위하여 '서브 라운드 키'라 지칭함)는 j-0번째 서브 라운드 키가 입력된다. 여기서 j는 바이트 단위로 구분한 라운드 입력 데이터(이하, '서브 입력 데이터'라 지칭함)의 서브 입력 데이터 순서를 의미한다.The j-0th sub-round key is input to the round key divided into byte units (hereinafter, referred to as 'sub-round key' for convenience of description) input to the first exclusive-OR calculation function processing module. Here, j denotes a sub-input data sequence of round input data (hereinafter, referred to as 'sub-input data') divided in units of bytes.

예를 들어, 바이트 레인에 RDP[0]의 서브 입력 데이터가 입력되었다고 가정하면 j는 0이 된다. 하나의 서브 입력 데이터는 8 바이트인 것을 예로 하여 설명하므로, j는 0에서 7까지의 수 중 어느 하나의 수가 된다.For example, assuming that sub-input data of RD P [0] is input to the byte lane, j becomes 0. Since one sub-input data is described as an example of 8 bytes, j is any number from 0 to 7.

그리고, 비트 순환 함수 처리 모듈로는 j-1번째 서브 라운드 키가 입력되고, DREV 함수 처리 모듈로는 j-2번째 서브 라운드 키가 입력된다. 그리고 제2 배타적 논리 합 계산 함수 처리 모듈로는 j-3번째 서브 라운드 키가 입력된다.Then, the j-1 th sub-round key is input to the bit cycle function processing module, and the j-2 th sub-round key is input to the DREV function processing module. And the j-3 th sub-round key is input to the second exclusive-OR calculation function processing module.

여기서, j-0, j-1, j-2, j-3의 값이 0보다 작을 경우, 16으로 나눈 나머지 값을 사용한다. 예를 들어, j=0인 경우 j-0은 0으로 0과 같고, j-1은 -1, j-2는 -2, j-3은 -3으로 0보다 작기 때문에, 각 값인 0, -1, -2, -3을 16으로 나눈 나머지 값인 0(0 mod 16), 15(-1 mod 16), 14(-2 mod 16), 13(-3 mod 16)을 이용한다. 이때의 값 0은 0 번째 서브 라운드 키를, 15는 15번째 서브 라운드 키를 의미하며, 도 14의 바이트 레인으로 표시된 부분의 나타낸 것과 같다.Here, when the values of j-0, j-1, j-2, and j-3 are less than 0, the remainder of dividing by 16 is used. For example, when j=0, j-0 is 0, which is equal to 0, j-1 is -1, j-2 is -2, and j-3 is -3, which is less than 0, so the values 0, - 0(0 mod 16), 15(-1 mod 16), 14(-2 mod 16), 13(-3 mod 16), which are the remainder values obtained by dividing 1, -2, -3 by 16, are used. At this time, the value 0 means the 0th sub-round key, and 15 means the 15th sub-round key, as shown in the portion indicated by the byte lane in FIG. 14 .

도 14에 나타낸 복수의 바이트 레인들 중 하나의 바이트 레인을 예로 하여 이어 설명하면, 0번째 서브 입력 데이터 RDP[0]를 입력으로 받은 바이트 레인은, 서브 입력 데이터에 역 서브바이트 연산을 수행하여 역 서브바이트 연산된 서브 입력 데이터를 생성한다. If one byte lane among the plurality of byte lanes shown in FIG. 14 is used as an example, the byte lane receiving the 0th sub-input data RD P [0] as an input performs an inverse sub-byte operation on the sub-input data. Generates sub-input data with inverse sub-byte operations.

0번째 서브 입력 데이터의 역 서브바이트 연산된 서브 입력 데이터와, 0번째 서브 라운드 키를 배타적 논리 합을 계산하여, 제1 서브 바이트를 출력한다. The first sub-byte is output by performing an exclusive-OR of the sub-input data, which is the inverse sub-byte operation of the 0-th sub-input data, and the 0-th sub-round key.

15번째 서브 라운드 키와 제1 서브 바이트를 입력으로 받은 비트 순환 함수 처리 모듈은 입력으로 받은 15번째 서브 라운드 키에서 N 값을 계산하고, 계산된 N 값을 토대로 제1 서브 출력을 순환 회전하거나 순환 회전하지 않은 채, 순환 처리 서브 바이트를 생성한다. 여기서, N은 비트 순환 회전 결정 값이라 지칭하며, 이에 대해서는 이후 설명한다.The bit rotation function processing module receiving the 15th sub-round key and the first sub-byte as inputs calculates N values from the 15th sub-round key received as inputs, and rotates or cycles the first sub-output based on the calculated N values Creates a circular processing sub-byte without rotation. Here, N is referred to as a bit cycle rotation determination value, which will be described later.

비트 순환 함수 처리 모듈에서 출력된 순환 처리 서브 바이트와 14번째 서브 라운드 키를 입력으로 받은 서브 바이트 비트 재배치 모듈은, 14번째 서브 라운드 키의 각 비트로 계산된 제1 값과 제2 값을 이용하여 순환 처리 서브 바이트의 비트 위치를 변경하여, 비트 재배치 서브 바이트로 생성한다.The circular processing sub-byte output from the bit rotation function processing module and the sub-byte bit relocation module receiving the 14th sub-round key as inputs are cycled using the first and second values calculated for each bit of the 14th sub-round key By changing the bit position of the processing sub-byte, it is created as a bit rearrangement sub-byte.

비트 재배치 서브 바이트와 13번째 서브 라운드 키(KP[13])를 입력으로 받은 제2 배타적 논리 합 함수 처리 모듈은 비트 재배치 서브 바이트와 13번째 서브 라운드 키의 배타적 논리 합을 계산하여, 제2 서브 바이트를 생성한다. 이렇게 생성된 제2 서브 바이트가 해당 라운드의 라운드 바이트 출력이 된다.The second exclusive-OR function processing module receiving the bit relocation sub-byte and the 13th sub-round key (KP[13]) as inputs calculates the exclusive-OR of the bit relocation sub-byte and the 13th sub-round key, generate bytes. The generated second sub-byte becomes the round byte output of the corresponding round.

도 15에 나타낸 복호화는 상기 도 14의 암호화에서 수행하는 연산의 순서를 반대로 하여 데이터를 처리한다. 즉,13번째 서브 라운드 키(KP[13])와 암호화된 서브 데이터를 배타적 논리 합하여, 비트 재배치 서브 바이트를 생성한다. 그리고, 14번째 서브 라운드 키를 구성하는 각 비트들로 계산된 제1 값과 제2 값을 이용하여, 비트 재배치 서브 바이트의 비트 위치를 변경하여, 순환 처리 서브 바이트를 생성한다.The decryption shown in FIG. 15 processes data by reversing the order of operations performed in the encryption of FIG. 14 . That is, the 13th sub-round key (KP[13]) and the encrypted sub-data are exclusive-ORed to generate a bit rearrangement sub-byte. Then, the bit position of the bit rearrangement sub-byte is changed by using the first value and the second value calculated with each bit constituting the 14th sub-round key to generate a cyclic processing sub-byte.

15번째 서브 라운드 키를 기초로 비트 순환 회전 결정 값을 계산하고, 계산한 비트 순환 회전 결정 값을 토대로 순환 처리 서브 바이트의 한 비트가 순환 회전되거나, 순환 처리 서브 바이트의 비트 순서 그대로 하여 제1 서브 바이트를 생성한다. 0번째 서브 라운드 키와 제1 서브 바이트를 배타적 논리 합하여 역 서브바이트 연산된 서브 데이터를 생성한다. 그리고 가장 마지막으로 수행하는 SB(SubByte) 연산은, 기존 역 서브바이트 연산된 서브 입력 데이터를 다시 서브바이트 연산하여, 최초 입력된 서브 입력 데이터로 생성한다는 것을 의미한다. 서브바이트 연산은 이미 알려진 것으로, 본 발명의 실시예에서는 상세한 설명을 생략한다.A bit cycle rotation determination value is calculated based on the 15th sub-round key, and one bit of the circular processing sub-byte is rotationally rotated based on the calculated bit rotation rotation determination value, or the bit order of the circular processing sub-byte is maintained as the first sub-byte generate bytes. The 0th sub-round key and the first sub-byte are exclusive-ORed to generate inverse sub-byte-operated sub data. And the last SB (SubByte) operation means that the sub-input data, which has been subjected to the inverse sub-byte operation, is sub-byte-operated again, and is generated as the first input sub-input data. The sub-byte operation is already known, and detailed description will be omitted in the embodiment of the present invention.

여기서, 비트 순환 회전 함수가 수행되는 예에 대해 도 16을 참조로 설명한다.Here, an example in which the bit cyclic rotation function is performed will be described with reference to FIG. 16 .

도 16은 본 발명의 실시예에 따른 비트 순환 회전 함수의 연산 방법에 대한 예시도이다.16 is an exemplary diagram of a method of calculating a bit cyclic rotation function according to an embodiment of the present invention.

도 16의 (a)는 좌측으로 비트를 순환 회전시키는 함수(이하, 설명의 편의를 위하여 '레프트 쉬프트 함수'라 지칭함)를 이용한 연산 방법이고, 도 16의 (b)는 우측으로 비트를 순환 회전시키는 함수(이하, 설명의 편의를 위하여 '라이트 쉬프트 함수'라 지칭함)를 이용한 연산 방법의 예시도이다. Fig. 16 (a) is a calculation method using a function that rotates bits to the left (hereinafter, referred to as a 'left shift function' for convenience of description), and Fig. 16 (b) is a diagram for cyclic rotation of bits to the right It is an exemplary diagram of a calculation method using a function (hereinafter, referred to as a 'right shift function' for convenience of explanation).

도 16에 도시된 바와 같이, 좌측으로 비트를 순환 회전시키는 함수는 1바이트의 서브 라운드 키 KP[j-1]를 입력으로 받아, 비트 순환 회전 결정 값 N을 계산하는데, 다음 수학식 2와 같이 계산한다.As shown in Fig. 16, the function that rotates bits to the left receives a 1-byte sub-round key K P [j-1] as an input, and calculates a bit rotation rotation determination value N, as shown in Equation 2 and count together

Figure 112019133708949-pat00002
Figure 112019133708949-pat00002

여기서, K5와 K4는 각각 1바이트의 서브 라운드 키 KP[j-1]에 포함된 비트들{K7, K6, K5, K4, K3, K2, K1, K0} 중에서, 4번째 비트(K4)와 5번째 비트(K5)의 값을 의미한다.Here, K 5 and K 4 are bits {K 7 , K 6 , K 5 , K 4 , K 3 , K 2 , K 1 , K included in the 1-byte sub-round key K P [j-1], respectively. 0 }, meaning values of the fourth bit (K 4 ) and the fifth bit (K 5 ).

수학식 2를 기초로 계산한 비트 순환 회전 결정 값 N을 토대로, 레프트 쉬프트 함수는 왼쪽으로 1 비트 순환 회전하거나, 회전하지 않는다. 즉, N 값이 1인 경우 왼쪽으로 1 비트씩 순환회전 하여, 서브 입력 데이터인 IN[7:0]을 {IN[6:0], IN[7]}로 순환 회전하여 순환 처리 서브 바이트로 출력한다.Based on the bit rotation rotation determination value N calculated based on Equation 2, the left shift function rotates one bit to the left or does not rotate. That is, if the value of N is 1, it rotates to the left by 1 bit, and cyclically rotates the sub input data IN[7:0] to {IN[6:0], IN[7]} as a circular processing sub-byte. print out

그러나, N 값이 0으로 계산되면 서브 입력 데이터인 IN[7:0]을 그대로 출력하여, 순환 처리 서브 바이트로 출력한다. However, when the value of N is calculated as 0, IN[7:0], which is the sub-input data, is output as it is, and is output as a circular processing sub-byte.

도 16의 (b)에 도시한 라이트 쉬프트 함수에 의한 연산 방법은 레프트 쉬프트 함수의 연산 방법과 동작 방식이 동일하나, 1 비트 순환 회전이 오른쪽으로 이루어진다.The calculation method by the right shift function shown in FIG. 16B has the same operation method as the calculation method of the left shift function, but the 1-bit cyclic rotation is performed to the right.

도 17은 본 발명의 실시예에 따른 서브 바이트 비트 재배치 함수의 연산 방법에 대한 예시도이다.17 is an exemplary diagram of a method of calculating a sub-byte bit relocation   function according to an embodiment of the present invention.

도 17에 도시된 바와 같이, 서브 바이트 비트 재배치 함수는 라운드 키인 KP[j-2]를 입력으로 받아, 7, 3, 0번째 비트 값의 배타적 논리 합(A), 6, 2, 1번째 비트 값의 배타적 논리 합(B)을 계산한다. 그리고, A와 B의 값에 따라 입력 IN의 각 비트를 도 17에 도시한 바와 같이 배열하여 입력 라운드 키의 각 비트의 위치를 변경한다. 본 발명의 실시예에서는 서브 바이트 비트 재배치 함수가 유리 함수(DERV 함수)인 것을 예로 하여 설명하나, 반드시 이와 같이 한정되는 것은 아니다.As shown in Fig. 17, the sub-byte bit relocation function receives K P [j-2], which is a round key, as an input, and the exclusive-OR (A) of the 7th, 3rd, and 0th bit values, 6th, 2nd, 1st Calculates the exclusive logical sum (B) of bit values. Then, according to the values of A and B, each bit of the input IN is arranged as shown in FIG. 17 to change the position of each bit of the input round key. In the embodiment of the present invention, although the sub-byte bit relocation function is a rational function (DERV function) as an example, the description is not necessarily limited thereto.

이상에서 설명한 암호화 알고리즘이 적용된 시스템에서 데이터를 암호화하는 예에 대해 도 18을 참조로 설명한다. An example of encrypting data in a system to which the above-described encryption algorithm is applied will be described with reference to FIG. 18 .

도 18은 본 발명의 실시예에 따른 암호화 알고리즘이 적용된 시스템의 데이터 암호화 동작 예시도이다.18 is an exemplary diagram of a data encryption operation of a system to which an encryption algorithm according to an embodiment of the present invention is applied.

도 18에 도시된 데이터 암호화 동작 실시예는 16 바이트의 스크램블러 키(0x139050849F660D3D84E48ADF51672652), 16 바이트의 데이터(0x4973207468697320746865207265616C), 그리고 데이터의 시작 주소는 00000000, 라운드 횟수는 8회인 것을 예로 하여 설명한다.The data encryption operation embodiment shown in FIG. 18 will be described with an example that the 16-byte scrambler key (0x139050849F660D3D84E48ADF51672652), 16-byte data (0x4973207468697320746865207265616C), and the start address of the data is 00000000 and the number of rounds is 8 as an example.

도 18에 도시된 바와 같이, 한 라운드 안에서 입력된 데이터 블록에 포함된 데이터들을 바이트 단위로 나누어 각각의 바이트 레인에서 처리한다. 이때, 바이트 단위로 나뉜 데이터들의 위치는 바뀌지 않고 바이트 레인으로 입력된다.As shown in FIG. 18 , data included in a data block input within one round is divided into byte units and processed in each byte lane. At this time, the positions of the data divided into byte units are not changed and are input to the byte lane.

예를 들어, 입력 데이터 RD0의 두 번째 바이트인 RD0[1]은 라운드 0 수행 후 RD1[1]에 위치하고, 라운드 1 수행 후 RD2[1]에 위치한다. 마지막 라운드까지 이 위치는 유지된다.For example, RD 0 [1], which is the second byte of input data RD 0 , is located at RD 1 [1] after round 0 is performed, and is located at RD 2 [1] after round 1 is performed. This position is maintained until the last round.

한 블록 안에서 연산 시작과 종료 시점의 데이터 바이트의 위치를 그대로 유지하는 구조 덕분에, 상기 도 3에서 설명한 바와 같이 '읽기-수정-쓰기' 없이 블록 안에서 다른 데이터를 변경하지 않으면서 특정 데이터를 변경하는 것이 가능하다.Thanks to the structure that maintains the position of the data bytes at the start and end of the operation in one block as it is, it is possible to change specific data without changing other data in the block without 'read-modify-write' as described in FIG. 3 above. it is possible

도 19는 본 발명의 실시예에 따른 데이터 변경 예시도이다.19 is a diagram illustrating data change according to an embodiment of the present invention.

상기 도 18에서 설명한 구조를 사용할 때, 도 19에 도시된 바와 같이 메모리에 저장되어 있는 값을 바꾸는 데이터 변경을 예로 하여 나타내었다. 응용 소프트웨어가 주소 0x0 ~ 0xF에 데이터(0x49732074…)를 썼을 때, 메모리 컨트롤러가 데이터를 암호화하여 메모리에 저장(0x704E4241…)한다. When the structure described with reference to FIG. 18 is used, as shown in FIG. 19, data change for changing the value stored in the memory is shown as an example. When the application software writes data (0x49732074…) to addresses 0x0 to 0xF, the memory controller encrypts the data and stores it in the memory (0x704E4241…).

이때, 사용자가 특정 주소의 데이터만을 변경하려고 시도한다고 가정하고, 변경하고자 하는 데이터가 주소 0x1의 값을 0x73에서 0xF1으로, 주소 0x9의 값을 0x68에서 0xF2로 변경하려 한다고 가정한다. 이 경우, 본 발명의 실시예에 따른 암호화 알고리즘을 사용하면, 주소 0x1과 0x9에 각각 0x16과 0x73을 쓰는 것으로 메모리에 저장된 데이터를 변경할 수 있다. In this case, it is assumed that the user attempts to change only data of a specific address, and it is assumed that the data to be changed attempts to change the value of address 0x1 from 0x73 to 0xF1 and the value of address 0x9 from 0x68 to 0xF2. In this case, if the encryption algorithm according to the embodiment of the present invention is used, data stored in the memory can be changed by writing 0x16 and 0x73 to addresses 0x1 and 0x9, respectively.

일반 블록 암호 알고리즘을 사용하는 경우 상기 도 3에서 설명한 바와 같이, 수정하려는 데이터가 포함된 블록을 전부 읽고 수정해야 하지만, 본 발명의 실시예에 따른 데이터 수정은 변경하고자 하는 위치의 데이터만 수정할 수 있기 때문에 메모리 내용을 빠르고 용이하게 변경할 수 있다.In the case of using the general block cipher algorithm, as described in FIG. 3, all blocks including the data to be modified must be read and modified, but data modification according to the embodiment of the present invention can modify only the data at the desired position. Therefore, the contents of the memory can be changed quickly and easily.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements by those skilled in the art using the basic concept of the present invention as defined in the following claims are also provided. is within the scope of the right.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements by those skilled in the art using the basic concept of the present invention as defined in the following claims are also provided. is within the scope of the right.

Claims (15)

적어도 하나의 프로세서에 의해 동작하는 암호화 알고리즘이 적용된 시스템이 비트들로 구성된 데이터 블록을 처리하는 방법으로서,
복수의 비트들로 구성된 스크램블러 키와 상기 데이터 블록의 시작 주소를 토대로, 상기 데이터 블록을 암호화할 라운드 횟수만큼의 라운드 키들을 생성하는 단계,
상기 데이터 블록을 구성하는 복수의 비트들을 바이트 단위로 분리하여 서브 입력 데이터들로 생성하고, 암/복호화를 처리하는 복수의 각 바이트 레인으로 바이트 순서에 따라 각 서브 입력 데이터들을 입력하는 단계, 그리고
상기 암호화할 라운드 횟수만큼 생성된 라운드 키들을 바이트 단위로 분리하여 서브 라운드 키들로 생성하고, 각 암호화 라운드에 따라 상기 서브 라운드 키들을 상기 복수의 바이트 레인들로 각각 입력하여, 상기 서브 라운드 키를 이용하여 상기 서브 입력 데이터를 암호화하는 단계
를 포함하며,
상기 라운드 키들 중 n번째 라운드 키는, 상기 데이터 블록의 시작 주소와, n번째 라운드에 앞선 라운드인 n-1번째 라운드의 라운드 키를 생성하기 위해 사용된 스크램블러 키를 기초로 생성된 스크램블러 키를 기초로 생성되는, 데이터 블록 처리 방법.
A method for processing a data block composed of bits by a system to which an encryption algorithm operated by at least one processor is applied, comprising:
generating round keys corresponding to the number of rounds to encrypt the data block based on a scrambler key composed of a plurality of bits and a start address of the data block;
Separating a plurality of bits constituting the data block in units of bytes to generate sub-input data, and inputting each sub-input data according to a byte order into a plurality of byte lanes for processing encryption/decryption; and
The round keys generated by the number of rounds to be encrypted are divided into byte units to generate sub-round keys, and the sub-round keys are inputted into the plurality of byte lanes according to each encryption round, respectively, to use the sub-round key. encrypting the sub-input data by
includes,
The nth round key among the round keys is a scrambler key generated based on the start address of the data block and a scrambler key used to generate a round key of the n-1th round that is a round preceding the nth round. A method of processing data blocks that are created with
제1항에 있어서,
상기 라운드 키들을 생성하는 단계는 각각,
제1 길이 비트인 제1 번째 스크램블러 키에서 미리 설정된 위치의 비트들을 선택하여 제2 길이 비트의 선택 비트 키를 생성하는 단계,
상기 제2 길이 비트로 구성된 시작 주소를 토대로 제2 길이 비트의 변환된 주소를 생성하는 단계, 그리고
상기 제2 길이 비트의 선택 비트 키와 상기 제2 길이 비트의 변환된 주소를 토대로 제1 번째 라운드 키를 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
According to claim 1,
Each of the steps of generating the round keys comprises:
generating a selection bit key of a second length bit by selecting bits at a preset position in a first scrambler key that is a first length bit;
generating a translated address of a second length bit based on a start address composed of the second length bit; and
generating a first round key based on the selected bit key of the second length bit and the converted address of the second length bit
Including, a data block processing method.
제2항에 있어서,
상기 제2 길이 비트의 변환된 주소를 생성하는 단계는,
상기 제1 번째 스크램블러 키의 비트 길이가 128 비트이면, 상기 제2 길이 비트로 구성된 시작 주소의 비트들을 미리 설정된 위치로 변경하여 상기 제2 길이 비트의 변환된 주소로 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
3. The method of claim 2,
The step of generating the converted address of the second length bit comprises:
If the bit length of the first scrambler key is 128 bits, changing the bits of the start address composed of the second length bits to preset positions to generate the converted address of the second length bits
Including, a data block processing method.
제3항에 있어서,
상기 제2 길이 비트의 변환된 주소를 생성하는 단계는,
상기 제1 번째 스크램블러 키의 비트 길이가 64 비트이면, 상기 시작 주소를 형성하는 비트들에서 특정 비트에 해당하는 값을 한 비트로 더 생성하고, 상기 특정 비트에 해당하는 값의 역 서브바이트 연산한 값을 두 비트의 값으로 생성하는 단계, 그리고
상기 특정 비트를 기준으로 우측의 하위 1 비트 씩 세 개의 비트들은 삭제하고, 상기 특정 비트, 상기 특정 비트를 기준으로 좌측의 상위 비트들과 상기 생성한 세 비트들을 포함하여 상기 제2 길이 비트의 변환된 주소로 생성하는 단계
를 포함하고,
상기 특정 비트는 상기 시작 주소를 형성하는 비트들에서 가장 우측에서 4번째 비트에 해당하는, 데이터 블록 처리 방법.
4. The method of claim 3,
The step of generating the converted address of the second length bit comprises:
If the bit length of the first scrambler key is 64 bits, a value corresponding to a specific bit is further generated as one bit from bits forming the start address, and the value corresponding to the specific bit is inversely sub-byte operated. generating as a value of two bits, and
3 bits are deleted by each lower 1 bit on the right based on the specific bit, and the second length bit is converted by including the specific bit, upper bits on the left based on the specific bit, and the three generated bits Steps to create an address with
including,
The specific bit corresponds to a fourth bit from the right of the bits forming the start address.
제2항에 있어서,
상기 제1 번째 라운드 키를 생성하는 단계 이후에,
상기 제1 번째 라운드가 상기 암호화할 라운드 횟수의 마지막 횟수에 해당하지 않으면, 상기 제1 번째 스크램블러 키로부터 제2 번째 스크램블러 키를 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
3. The method of claim 2,
After generating the first round key,
generating a second scrambler key from the first scrambler key if the first round does not correspond to the last number of rounds to be encrypted
Including, a data block processing method.
제5항에 있어서,
상기 제2 번째 스크램블러 키를 생성하는 단계는,
상기 제1 번째 스크램블러 키의 상위 8비트는 역 서브바이트 연산하는 단계,
역 서브바이트 연산된 상위 8비트와 상기 상위 8비트를 제외한 하위 비트들로 구성된 제1 번째 스크램블러 키에서, 하위 3비트를 제1 방향으로 순환 시프트하는 단계, 그리고
상기 하위 3비트가 제1 방향으로 순환 시프트하여 생성된 키를 상기 제2 번째 스크램블러 키로 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
6. The method of claim 5,
The step of generating the second scrambler key comprises:
performing an inverse subbyte operation on the upper 8 bits of the first scrambler key;
Cycically shifting the lower 3 bits in the first direction in the first scrambler key composed of the upper 8 bits calculated by inverse subbyte operation and lower bits excluding the upper 8 bits; and
generating a key generated by cyclically shifting the lower 3 bits in a first direction as the second scrambler key
Including, a data block processing method.
제2항에 있어서,
상기 제1 번째 라운드 키를 생성하는 단계는,
상기 제2 길이 비트의 선택 비트 기와 상기 제2 길이 비트의 변환된 주소를 배타적 논리 합 하여 제2 길이 비트의 결합 키로 생성하는 단계,
상기 결합 키의 각 비트들을 역 서브바이트 연산하여 제2 길이 비트의 인버스 키로 생성하는 단계,
상기 제2 길이 비트의 인버스 키의 비트들의 위치를 미리 결정한 위치로 변경하여 제2 길이 비트의 비트 위치 변경 키로 생성하는 단계,
상기 제2 길이 비트의 비트 위치 변경 키의 각 비트들을 역 서브바이트 연산하여 제2 길이 비트의 제2 인버스 키로 생성하는 단계,
상기 제2 인버스 키의 제2 길이 비트를 제1 길이 비트로 변경하여, 제1 길이 비트의 길이 변경 키로 생성하는 단계, 그리고
상기 제1 길이 비트의 제1 번째 스크램블러 키와 상기 제1 길이 비트의 길이 변경 키를 배타적 논리 합 하여, 상기 제1 번째 라운드 키로 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
3. The method of claim 2,
The step of generating the first round key comprises:
generating a combination key of a second length bit by performing an exclusive-OR of the selected bit group of the second length bit with the converted address of the second length bit;
generating an inverse key of a second length bit by performing an inverse subbyte operation on each bit of the combination key;
Changing the positions of the bits of the inverse key of the second length bit to a predetermined position to generate a bit position change key of the second length bit;
generating a second inverse key of a second length bit by performing an inverse subbyte operation on each bit of the bit position change key of the second length bit;
changing a second length bit of the second inverse key into a first length bit to generate a length change key of the first length bit; and
generating the first round key by performing an exclusive-OR on the first scrambler key of the first length bit and the length change key of the first length bit
Including, a data block processing method.
제7항에 있어서,
상기 인버스 키로 생성하는 단계와 상기 비트 위치 변경 키로 생성하는 단계는 복수의 횟수로 생성되는, 데이터 블록 처리 방법.
8. The method of claim 7,
The generating with the inverse key and the generating with the bit position change key are generated a plurality of times.
제1항에 있어서,
상기 서브 입력 데이터를 암호화하는 단계는,
상기 서브 입력 데이터를 역 서브바이트 연산하여 역 서브바이트 연산된 서브 입력 데이터를 생성하는 단계,
j-0번째 서브 라운드 키와 상기 역 서브바이트 연산된 서브 입력 데이터를 배타적 논리 합하여 제1 서브 바이트를 출력하는 단계,
j-1번째 서브 라운드 키를 기초로 비트 순환 회전 결정 값을 계산하고, 계산한 비트 순환 회전 결정 값을 토대로 상기 제1 서브 바이트의 한 비트가 순환 회전되거나 상기 제1 서브 바이트의 비트 순서 그대로 하여 순환 처리 서브 바이트를 생성하는 단계,
j-2 번째 서브 라운드 키를 구성하는 각 비트들로 계산된 제1 값과 제2 값을 이용하여, 상기 순환 처리 서브 바이트의 비트 위치를 변경하여 비트 재배치 서브 바이트를 생성하는 단계,
j-3번째 서브 라운드 키와 상기 비트 재배치 서브 바이트를 배타적 논리 합하여 제2 서브 바이트를 해당 라운드의 라운드 바이트로 출력하는 단계
를 포함하는, 데이터 블록 처리 방법.
According to claim 1,
Encrypting the sub-input data comprises:
generating inverse sub-byte-operated sub-input data by performing an inverse sub-byte operation on the sub-input data;
outputting a first sub-byte by performing an exclusive-OR of the j-0th sub-round key and the sub-input data calculated by the inverse sub-byte operation;
A bit rotation rotation determination value is calculated based on the j-1th sub-round key, and one bit of the first sub-byte is rotationally rotated or the bit order of the first sub-byte is unchanged based on the calculated bit rotation rotation determination value. generating cyclic processing subbytes;
generating a bit rearrangement sub-byte by changing the bit position of the circular processing sub-byte by using the first value and the second value calculated with each bit constituting the j-2th sub-round key;
outputting the second sub-byte as a round byte of the corresponding round by performing an exclusive-OR of the j-3th sub-round key and the bit rearrangement sub-byte
Including, a data block processing method.
제9항에 있어서,
상기 j는 상기 서브 입력 데이터가 상기 데이터 블록에서 몇 번째 바이트에 해당하는지 나타내는 정수이고,
상기 j-0, j-1, j-2, j-3의 계산 값이 0 이하인 경우, 계산된 각 값을 16으로 나눈 나머지 값을 가지는 서브 라운드 키를 사용하는, 데이터 블록 처리 방법.
10. The method of claim 9,
wherein j is an integer indicating which byte the sub-input data corresponds to in the data block,
When the calculated values of j-0, j-1, j-2, and j-3 are equal to or less than 0, a sub-round key having a remainder obtained by dividing each calculated value by 16 is used.
제9항에 있어서,
상기 순환 처리 서브 바이트를 생성하는 단계는,
상기 j-1번째 서브 라운드 키를 구성하는 비트들 중 미리 설정된 제1 비트와 제2 비트의 배타적 논리 합의 값이 1이면 상기 제1 서브 바이트를 한 비트씩 좌측으로 순환 회전하여 상기 순환 처리 서브 바이트로 생성하고,
상기 제1 비트와 제2 비트의 배타적 논리 합의 값이 0이면 상기 제1 서브 바이트를 상기 순환 처리 서브 바이트로 생성하는, 데이터 블록 처리 방법.
10. The method of claim 9,
The step of generating the circular processing sub-byte comprises:
If the value of the preset exclusive logical sum of the first bit and the second bit among the bits constituting the j-1th sub-round key is 1, the first sub-byte is rotated to the left by one bit and the circular processing sub-byte is created with
and generating the first sub-byte as the circularly processed sub-byte when the value of the exclusive logical sum of the first bit and the second bit is 0.
제11항에 있어서,
상기 비트 재배치 서브 바이트를 생성하는 단계는,
상기 순환 처리 서브 바이트와 상기 j-2번째 서브 라운드 키를 입력받는 단계,
상기 j-2번째 서브 라운드 키의 제1, 제2, 제3 비트 값의 배타적 논리 합하여 상기 제1 값을 계산하는 단계,
상기 j-2번째 서브 라운드 키의 제4, 제5, 제6 비트 값의 배타적 논리 합하여 상기 제2 값을 계산하는 단계, 그리고
상기 제1 값과 제2 값들에 따라, 상기 순환 처리 서브 바이트의 비트들의 위치를 변경하여 상기 비트 재배치 서브 바이트로 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
12. The method of claim 11,
The step of generating the bit rearrangement sub-byte comprises:
receiving the circular processing sub-byte and the j-2th sub-round key;
calculating the first value by performing an exclusive-OR of the first, second, and third bit values of the j-2th sub-round key;
calculating the second value by performing an exclusive-OR of the fourth, fifth, and sixth bit values of the j-2th sub-round key; and
generating the bit rearrangement sub-byte by changing the positions of the bits of the circular processing sub-byte according to the first value and the second values
Including, a data block processing method.
제11항에 있어서,
상기 서브 입력 데이터를 암호화하는 단계 이후에,
암호화된 데이터 블록을 복호화하는 단계
를 더 포함하고,
상기 복호화하는 단계는,
암호화된 데이터 블록과 상기 암호화된 데이터 블록의 시작 주소, 그리고 상기 데이터 블록을 암호화할 때 생성한 스크램블러 키를 입력받는 단계,
상기 암호화된 데이터 블록과 상기 스크램블러 키를 기초로 상기 암호화할 라운드 횟수만큼 생성된 라운드 키들을 생성하는 단계, 그리고
암호화 라운드의 역순으로 라운드 키들을 상기 복수의 바이트 레인들로 입력하여 상기 암호화된 데이터 블록을 복호화하는 단계
를 포함하는, 데이터 블록 처리 방법.
12. The method of claim 11,
After encrypting the sub-input data,
Decrypting the encrypted data block
further comprising,
The decoding step is
receiving an encrypted data block, a start address of the encrypted data block, and a scrambler key generated when encrypting the data block;
generating round keys generated as many times as the number of rounds to be encrypted based on the encrypted data block and the scrambler key; and
Decrypting the encrypted data block by inputting round keys into the plurality of byte lanes in a reverse order of an encryption round.
Including, a data block processing method.
제13항에 있어서,
상기 복호화하는 단계는,
상기 j-3번째 서브 라운드 키와 암호화된 서브 입력 데이터를 배타적 논리 합하여, 상기 비트 재배치 서브 바이트를 생성하는 단계,
상기 j-2 번째 서브 라운드 키를 구성하는 각 비트들로 계산된 제1 값과 제2 값을 이용하여, 상기 비트 재배치 서브 바이트의 비트 위치를 변경하여, 상기 순환 처리 서브 바이트를 생성하는 단계,
상기 j-1번째 서브 라운드 키를 기초로 비트 순환 회전 결정 값을 계산하고, 계산한 비트 순환 회전 결정 값을 토대로 상기 순환 처리 서브 바이트의 한 비트가 순환 회전되거나 상기 순환 처리 서브 바이트의 비트 순서 그대로 하여 상기 제1 서브 바이트를 생성하는 단계,
상기 j-0번째 서브 라운드 키와 상기 제1 서브 바이트를 배타적 논리 합하여 상기 역 서브바이트 연산된 서브 입력 데이터를 제1 서브 바이트를 출력하는 단계,
상기 비트 재배치 서브 바이트와 상기 비트 재배치 서브 바이트를 배타적 논리 합하여, 상기 역 서브바이트 연산된 서브 입력 데이터를 출력하는 단계, 그리고
상기 역 서브바이트 연산된 서브 입력 데이터를 서브바이트 연산하여 상기 서브 입력 데이터를 생성하는 단계
를 포함하는, 데이터 블록 처리 방법.
14. The method of claim 13,
The decoding step is
generating the bit rearrangement sub-byte by performing an exclusive-OR of the j-3th sub-round key and the encrypted sub-input data;
generating the circular processing sub-byte by changing the bit position of the bit rearrangement sub-byte by using a first value and a second value calculated with each bit constituting the j-2th sub-round key;
A bit rotation rotation determination value is calculated based on the j-1th sub-round key, and one bit of the circular processing sub-byte is rotationally rotated based on the calculated bit rotation rotation determination value or the bit order of the circular processing sub-byte is the same generating the first sub-byte by
outputting a first sub-byte of the sub-input data obtained by performing the inverse sub-byte operation by performing an exclusive-OR of the j-0th sub-round key and the first sub-byte;
outputting the sub-input data obtained by performing the inverse sub-byte operation by performing an exclusive-OR on the bit rearrangement sub-byte and the bit rearrangement sub-byte; and
generating the sub-input data by performing a sub-byte operation on the inversely-sub-byte-operated sub-input data;
Including, a data block processing method.
제14항에 있어서,
상기 순환 처리 서브 바이트를 생성하는 단계는,
상기 j-1번째 서브 라운드 키를 구성하는 비트들 중 미리 설정된 제1 비트와 제2 비트의 배타적 논리 합의 값이 1이면 상기 제1 서브 바이트를 한 비트씩 우측으로 순환 회전하여 상기 순환 처리 서브 바이트로 생성하고,
상기 제1 비트와 제2 비트의 배타적 논리 합의 값이 0이면 상기 제1 서브 바이트를 상기 순환 처리 서브 바이트로 생성하는, 데이터 블록 처리 방법.
15. The method of claim 14,
The step of generating the circular processing sub-byte comprises:
If the value of the preset exclusive logical sum of the first bit and the second bit among the bits constituting the j-1th sub-round key is 1, the first sub-byte is rotated to the right by one bit and the circular processing sub-byte is created with
and generating the first sub-byte as the circularly processed sub-byte when the value of the exclusive logical sum of the first bit and the second bit is 0.
KR1020190174322A 2019-12-24 2019-12-24 Data processing method in system with encryption algorithm KR102393958B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190174322A KR102393958B1 (en) 2019-12-24 2019-12-24 Data processing method in system with encryption algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190174322A KR102393958B1 (en) 2019-12-24 2019-12-24 Data processing method in system with encryption algorithm

Publications (2)

Publication Number Publication Date
KR20210081908A KR20210081908A (en) 2021-07-02
KR102393958B1 true KR102393958B1 (en) 2022-05-03

Family

ID=76897196

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190174322A KR102393958B1 (en) 2019-12-24 2019-12-24 Data processing method in system with encryption algorithm

Country Status (1)

Country Link
KR (1) KR102393958B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101619484B1 (en) * 2015-03-11 2016-05-10 주식회사 텔레칩스 Dram scrambler and encryption method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030000720A (en) * 2001-06-26 2003-01-06 박승배 Symmetric key block cipher algorithm design method with no operation between key and plaintext
KR100922728B1 (en) * 2006-12-05 2009-10-22 한국전자통신연구원 AES encryption and decryption apparatus and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101619484B1 (en) * 2015-03-11 2016-05-10 주식회사 텔레칩스 Dram scrambler and encryption method

Also Published As

Publication number Publication date
KR20210081908A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
ES2805125T3 (en) Flexible architecture and instructions for Advanced Encryption Standard (AES)
JP5822970B2 (en) Encryption device for pseudo-random generation, data encryption, and message encryption hashing
TWI402675B (en) Low latency block cipher
US8094816B2 (en) System and method for stream/block cipher with internal random states
JP4905000B2 (en) Cryptographic processing apparatus, cryptographic processing method, and computer program
EP3205044B1 (en) Rotation-based cipher
US9418246B2 (en) Decryption systems and related methods for on-the-fly decryption within integrated circuits
US8913740B2 (en) Method and apparatus for generating an Advanced Encryption Standard (AES) key schedule
KR20180081559A (en) Generate key sequence for encryption operation
JPH10240500A (en) Random number generator and method, enciphering device and method, decoder and method and stream cipher system
CN110276208B (en) Encryption circuit, decryption circuit and method thereof
KR102393958B1 (en) Data processing method in system with encryption algorithm
JP2014240921A (en) Encryption device, encryption processing method and encryption processing program
CN112287333B (en) Lightweight adjustable block cipher realization method, system, electronic equipment and readable storage medium
Mahmoud et al. A Metamorphic-Key-Hopping GOST Cipher and Its FPGA Implementation
EP1629626B1 (en) Method and apparatus for a low memory hardware implementation of the key expansion function
KR101076747B1 (en) Method and apparatus for random accessible encryption and decryption by using a hierarchical tree structure of stream cipher module
Islam et al. Data encryption standard
KR102287962B1 (en) Encryption method of 128-bit lightweight block cipher suitable for side-channel countermeasures
KR100546777B1 (en) Apparatus and method for SEED Encryption/Decryption, and F function processor therefor
US20020031218A1 (en) Encryption method relevant to all encryption procedures
JPS6281145A (en) Data ciphering system
TW202403576A (en) Cipher device and cipher method thereof
Mahdi New Paradigm Design by Merging the Techniques of Stream Cipher with Block Cipher
JP2004138722A (en) Encryption device, decryption device, encryption method, decryption method, encryption program, and decryption program

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant