KR102479689B1 - Method and apparatus for processing low latency block encription - Google Patents

Method and apparatus for processing low latency block encription Download PDF

Info

Publication number
KR102479689B1
KR102479689B1 KR1020200182743A KR20200182743A KR102479689B1 KR 102479689 B1 KR102479689 B1 KR 102479689B1 KR 1020200182743 A KR1020200182743 A KR 1020200182743A KR 20200182743 A KR20200182743 A KR 20200182743A KR 102479689 B1 KR102479689 B1 KR 102479689B1
Authority
KR
South Korea
Prior art keywords
encryption key
input
encryption
time
clock
Prior art date
Application number
KR1020200182743A
Other languages
Korean (ko)
Other versions
KR20220091737A (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 KR1020200182743A priority Critical patent/KR102479689B1/en
Publication of KR20220091737A publication Critical patent/KR20220091737A/en
Application granted granted Critical
Publication of KR102479689B1 publication Critical patent/KR102479689B1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/06Clock generators producing several clock signals
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Abstract

본 발명은 저지연 블록암호 처리를 위한 암호키 생성 방법 및 그 장치에 관한 것으로, 100Gbps 급 통신 환경에서 종래 128비트 단위의 암호화 함수를 이용하여 지연 없이 암호화를 수행하기 위해 필요한 암호화 함수의 개수와 입력 클록 대비 암호키 생성 연산 클록의 배수를 계산하여 암호키를 생성함으로써 입력 데이터가 전부 입력되기 전에 암호키 생성을 완성하여 지연을 최소화하는 암호화 및 복호화를 제공할 수 있는 장점이 있다. The present invention relates to a method and apparatus for generating an encryption key for low-latency block cipher processing, and the number and input of encryption functions required to perform encryption without delay using conventional encryption functions in units of 128 bits in a 100 Gbps communication environment. By generating an encryption key by calculating a multiple of an encryption key generation operation clock against a clock, the encryption key generation is completed before all input data is input, thereby providing encryption and decryption with minimized delay.

Description

저지연 블록 암호 처리 방법 및 그 장치{METHOD AND APPARATUS FOR PROCESSING LOW LATENCY BLOCK ENCRIPTION}Method for processing low-latency block encryption and its device

본 발명은 경량 암호화에 관한 것으로, 특히 저지연 블록 암호화 기술에 관한 것이다.The present invention relates to lightweight encryption, and more particularly to low-latency block encryption techniques.

경량 블록암호 알고리즘인 LEA(Lightweight Encryption Algorithm)은 2013년 국가보안기술연구소에서 개발되었으며, 2015년 암호모듈 검증제도 검증대상 알고리즘에 포함되어 다양한 정보보안 분야에 사용되고 있다.LEA (Lightweight Encryption Algorithm), a lightweight block encryption algorithm, was developed by the National Security Research Institute in 2013, and was included in the verification target algorithm of the cryptographic module verification system in 2015 and is used in various information security fields.

LEA는 128비트 데이터 블록을 암호화하기 위해 128, 192, 256 비트의 암호키를 사용하며, 암호키의 비트수에 따라 연산 회수는 128비트는 24라운드, 192비트는 28라운드, 256비트는 32라운드가 된다.LEA uses encryption keys of 128, 192, and 256 bits to encrypt a 128-bit data block, and the number of operations depending on the number of bits of the encryption key is 24 rounds for 128 bits, 28 rounds for 192 bits, and 32 rounds for 256 bits. becomes

LEA는 다양한 환경에서 적용하여 사용할 수 있도록 ECB(Electronic Codebook), CBC(Cipher Block Chaining), CTR(Counter), CFB(Cipher Feedback), OFB(Output Feedback), 등의 기밀성 운용모드와 CCM(Counter with CBC-MAC), GCM(Galois/Counter mode) 등의 인증 암호화 운영모드, CMAC(Cipher-based Message Authentication Code) 등의 인증 운용모드로 정의된다.LEA provides confidentiality operation modes such as ECB (Electronic Codebook), CBC (Cipher Block Chaining), CTR (Counter), CFB (Cipher Feedback), OFB (Output Feedback), and CCM (Counter with CBC-MAC), authentication encryption operation mode such as GCM (Galois/Counter mode), and authentication operation mode such as CMAC (Cipher-based Message Authentication Code).

이중 CTR 방식은 오류전파의 블록 수, 패딩의 불필요성, 병렬처리 가능성, 사전 계산 가능성 등을 고려하면 구현 및 가속성이 좋기 때문에 널리 사용된다.The double CTR method is widely used because it has good implementation and acceleration considering the number of error propagation blocks, the need for padding, the possibility of parallel processing, and the possibility of precomputation.

전송속도가 100Gbps보다 작은 시스템에서 LEA CTR 구현 방식은 한 클록(Clock)에 처리되는 비트수가 LEA CTR에서 처리되는 128비트보다 작기 때문에, 입력 데이터들을 128비트로 분할하는 시간 동안 CTR 값을 암호화 함수에 입력하여 암호키를 생성하고, 분할된 128비트 데이터를 생성된 암호키와 XOR 연산하는 방식이 사용된다.Since the number of bits processed in one clock is smaller than the 128 bits processed in LEA CTR in the LEA CTR implementation method in a system with a transmission rate of less than 100 Gbps, the CTR value is input to the encryption function during the time when the input data is divided into 128 bits. A method of generating an encryption key and XOR-operating the divided 128-bit data with the generated encryption key is used.

그런데 100Gbps의 전송속도를 사용하는 시스템에서는 한 클록에 처리되는 비트수가 640비트를 넘게 된다. 따라서 기존 방식으로 암/복호화를 수행하면 암호화 함수에서 암호키를 생성하는 속도보다 처리되어야 할 데이터 비트수가 많아지므로 암호화 연산 동안 데이터들을 저장할 별도의 메모리가 필요하며, 640비트 처리에 필요한 암호화 함수가 연산에 필요한 클록의 배수만큼 필요하다. However, in a system using a transmission speed of 100 Gbps, the number of bits processed in one clock exceeds 640 bits. Therefore, when encryption/decryption is performed in the conventional method, the number of data bits to be processed is greater than the speed at which an encryption key is generated by the encryption function, so a separate memory is required to store data during encryption operation, and the encryption function required for 640-bit processing is required as many times as the number of clocks required for

결국 100Gbps 전송속도에서는 리소스 부족과 클록 타이밍 문제가 발생하고 메모리에 데이터를 저장하고 다시 읽는데 소요되는 시간과 암호키 연산시간과 암/복호화를 위해 XOR 연산하는 시간 등이 합쳐지면 많은 전송지연이 발생하게 된다.Eventually, at the 100Gbps transmission rate, resource shortages and clock timing problems occur, and the time required to store and read data in memory, the time to calculate the encryption key, and the time to perform XOR calculations for encryption/decryption add up to a lot of transmission delays. do.

본 발명의 발명자들은 이러한 종래 기술의 암호화 처리 시간 지연의 문제를 해결하기 위해 연구 노력해 왔다. 100Gbps 이상의 전송속도에서도 지연 없이 암호화 및 복호화를 진행할 수 있는 저지연 블록암호 처리 장치 및 방법을 완성하기 위해 많은 노력 끝에 본 발명을 완성하기에 이르렀다.The inventors of the present invention have made research efforts to solve the problem of the encryption processing time delay of the prior art. After much effort to complete a low-latency block cipher processing apparatus and method capable of performing encryption and decryption without delay even at a transmission speed of 100 Gbps or more, the present invention has been completed.

본 발명의 목적은 고속의 전송속도에서도 지연시간 없이 블록암호를 처리할 수 있는 장치 및 방법을 제공하는 것이다.An object of the present invention is to provide an apparatus and method capable of processing a block cipher without delay even at a high transmission speed.

한편, 본 발명의 명시되지 않은 또 다른 목적들은 하기의 상세한 설명 및 그 효과로부터 용이하게 추론 할 수 있는 범위 내에서 추가적으로 고려될 것이다.Meanwhile, other unspecified objects of the present invention will be additionally considered within the scope that can be easily inferred from the following detailed description and effects thereof.

본 발명에 따른 암호키 생성 방법은,The encryption key generation method according to the present invention,

(a) 입력 클록(clock) 속도와 입력 데이터 길이에 의해 하나의 단위 데이터가 입력되는 시간을 계산하는 단계; (b) 상기 입력 클록 속도의 배수, 상기 입력 데이터 길이, 암호화 함수 연산에 필요한 클록 수 및 입력 데이터 비트수를 한번에 처리하기 위한 암호화 함수의 개수의 배수에 의해 암호키 생성에 필요한 시간을 계산하는 단계; 및 (c) 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 입력 클록 속도의 배수를 조절하는 단계를 포함한다.(a) calculating a time when one unit data is input by an input clock speed and an input data length; (b) calculating a time required for generating an encryption key by a multiple of the input clock speed, the input data length, the number of clocks required for calculating the encryption function, and the number of encryption functions for processing the number of input data bits at once ; and (c) adjusting a multiple of the input clock speed so that the time required to generate the encryption key is shorter than the time required to input the one unit data.

상기 (a) 단계는 상기 입력 데이터 길이를 상기 입력 클록 속도로 나눈 값에 의해 상기 하나의 단위 데이터가 입력되는 시간을 계산하는 것을 특징으로 한다.The step (a) is characterized in that the input time of the one unit data is calculated by dividing the input data length by the input clock speed.

상기 (b) 단계는 상기 입력 데이터 길이와 상기 암호화 함수 연산에 필요한 클록 수를 곱한 값을 상기 입력 클록 속도와 상기 입력 클록 속도의 배수와 상기 암호화 함수의 개수의 배수를 곱한 값으로 나눈 값으로 상기 암호키 생성에 필요한 시간을 계산하는 것을 특징으로 한다.In the step (b), the value obtained by multiplying the input data length by the number of clocks required for calculating the encryption function is divided by the value obtained by multiplying the input clock speed by a multiple of the input clock speed and a multiple of the number of encryption functions. It is characterized in that the time required for generating the encryption key is calculated.

상기 (c) 단계는 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 암호화 함수의 개수의 배수를 조절하는 것을 특징으로 한다.The step (c) is characterized by adjusting the multiple of the number of encryption functions so that the time required to generate the encryption key is shorter than the time required to input the one unit data.

상기 (c) 단계 이후에 상기 입력 클록 속도의 배수에 의해 조절된 암호키 생성 클록에 의해 암호키를 생성하는 단계를 더 포함하는 것을 특징으로 한다.The method may further include generating an encryption key by using an encryption key generation clock adjusted by a multiple of the input clock speed after the step (c).

본 발명의 다른 실시예에 따른 암호키 생성 장치는,An encryption key generating device according to another embodiment of the present invention,

암호키 생성 연산을 위한 클록을 생성하는 암호키 클록 생성부; 상기 암호키 클록에 의해 블록암호 처리를 위한 암호키를 생성하는 암호키 생성부; 및 하나 이상의 프로세서 및 메모리를 포함하며 상기 암호키 클록 생성부를 제어하는 제어부;를 포함하되, 상기 제어부는, 입력 클록 속도와 입력 데이터 길이에 의해 하나의 단위 데이터가 입력되는 시간을 계산하고, 상기 입력 클록 속도의 배수, 상기 입력 데이터 길이, 암호화 함수 연산에 필요한 클록 수 및 입력 데이터 비트수를 한번에 처리하기 위한 암호화 함수의 개수의 배수에 의해 암호키 생성에 필요한 시간을 계산하여, 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 입력 클록 속도의 배수를 결정하여 상기 암호키 클록 생성부의 클록을 조절하는 것을 특징으로 한다.an encryption key clock generator for generating a clock for an encryption key generation operation; an encryption key generator for generating an encryption key for block encryption processing by means of the encryption key clock; and a control unit including one or more processors and memories and controlling the encryption key clock generation unit, wherein the control unit calculates a time when one unit data is input based on an input clock speed and an input data length, and the input The time required to generate the encryption key is calculated by a multiple of the clock speed, the length of the input data, the number of clocks required for calculating the encryption function, and the number of encryption functions for processing the number of bits of input data at once, It is characterized in that the clock of the encryption key clock generation unit is adjusted by determining a multiple of the input clock speed so that the time required to generate the encryption key is shorter than the input time.

상기 제어부는 상기 입력 데이터 길이를 상기 입력 클록 속도로 나눈 값에 의해 상기 하나의 단위 데이터가 입력되는 시간을 계산하는 것을 특징으로Characterized in that the control unit calculates the input time of the one unit data by a value obtained by dividing the input data length by the input clock speed.

상기 제어부는 상기 입력 데이터 길이와 상기 암호화 함수 연산에 필요한 클록 수를 곱한 값을 상기 입력 클록 속도와 상기 입력 클록 속도의 배수와 상기 암호화 함수의 개수의 배수를 곱한 값으로 나눈 값으로 상기 암호키 생성에 필요한 시간을 계산하는 것을 특징으로 한다.The controller generates the encryption key by dividing a value obtained by multiplying the length of the input data by the number of clocks required for the operation of the encryption function by a value obtained by multiplying the input clock speed by a multiple of the input clock speed and a multiple of the number of encryption functions. It is characterized by calculating the time required for

상기 제어부는 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 암호화 함수의 개수의 배수를 조절하는 것을 특징으로 한다.It is characterized in that the control unit adjusts the multiple of the number of the encryption functions so that the time required to generate the encryption key is shorter than the time required to input the one unit data.

본 발명에 따르면 암호키 생성 시간을 단축함으로써 암호키가 생성될 때까지 입력 데이터를 저장해 둘 필요가 없으므로 메모리를 절약할 수 있는 효과가 있다.According to the present invention, by shortening the encryption key generation time, there is no need to store the input data until the encryption key is generated, so there is an effect of saving memory.

또한, 입력 데이터 대비 암호화 함수를 배로 사용하지 않아 리소스와 타이밍 문제를 해결할 수 있고, 암/복호화를 위한 전송지연을 줄일 수 있는 효과도 있다.In addition, since the encryption function is not used twice as much as the input data, resource and timing problems can be solved, and transmission delay for encryption/decryption can be reduced.

한편, 여기에서 명시적으로 언급되지 않은 효과라 하더라도, 본 발명의 기술적 특징에 의해 기대되는 이하의 명세서에서 기재된 효과 및 그 잠정적인 효과는 본 발명의 명세서에 기재된 것과 같이 취급됨을 첨언한다.On the other hand, even if the effects are not explicitly mentioned here, it is added that the effects described in the following specification expected by the technical features of the present invention and their provisional effects are treated as described in the specification of the present invention.

도 1은 본 발명의 바람직한 어느 실시예에 따른 암호키 생성 장치의 개략적인 구조도이다.
도 2는 본 발명의 바람직한 어느 실시예에 따른 암호화 방법의 흐름도이다.
도 3은 본 발명의 바람직한 어느 실시예에 따른 복호화 방법의 흐름도이다.
도 4는 본 발명의 바람직한 어느 실시예에 따른 블록암호 처리 방법의 전체 흐름을 나타낸다.
도 5는 본 발명의 바람직한 어느 실시예에 따른 암호키 생성 방법의 흐름도이다.
※ 첨부된 도면은 본 발명의 기술사상에 대한 이해를 위하여 참조로서 예시된 것임을 밝히며, 그것에 의해 본 발명의 권리범위가 제한되지는 아니한다
1 is a schematic structural diagram of an encryption key generating device according to a preferred embodiment of the present invention.
2 is a flow chart of an encryption method according to a preferred embodiment of the present invention.
3 is a flowchart of a decoding method according to a preferred embodiment of the present invention.
4 shows the overall flow of a block cipher processing method according to a preferred embodiment of the present invention.
5 is a flowchart of a method for generating an encryption key according to a preferred embodiment of the present invention.
※ It is revealed that the accompanying drawings are exemplified as references for understanding the technical idea of the present invention, and thereby the scope of the present invention is not limited.

이하, 도면을 참조하여 본 발명의 다양한 실시예가 안내하는 본 발명의 구성과 그 구성으로부터 비롯되는 효과에 대해 살펴본다. 본 발명을 설명함에 있어서 관련된 공지기능에 대하여 이 분야의 기술자에게 자명한 사항으로서 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. Hereinafter, with reference to the drawings, look at the configuration of the present invention guided by various embodiments of the present invention and the effects resulting from the configuration. In the description of the present invention, if it is determined that a related known function may unnecessarily obscure the subject matter of the present invention as an obvious matter to those skilled in the art, the detailed description thereof will be omitted.

'제1', '제2' 등의 용어는 다양한 구성요소를 설명하는데 사용될 수 있지만, 상기 구성요소는 위 용어에 의해 한정되어서는 안 된다. 위 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용될 수 있다. 예를 들어, 본 발명의 권리범위를 벗어나지 않으면서 '제1구성요소'는 '제2구성요소'로 명명될 수 있고, 유사하게 '제2구성요소'도 '제1구성요소'로 명명될 수 있다. 또한, 단수의 표현은 문맥상 명백하게 다르게 표현하지 않는 한, 복수의 표현을 포함한다. 본 발명의 실시예에서 사용되는 용어는 다르게 정의되지 않는 한, 해당 기술분야에서 통상의 지식을 가진 자에게 통상적으로 알려진 의미로 해석될 수 있다.Terms such as 'first' and 'second' may be used to describe various elements, but the elements should not be limited by the above terms. The above terms may only be used for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a 'first element' may be named a 'second element', and similarly, a 'second element' may also be named a 'first element'. can Also, singular expressions include plural expressions unless the context clearly indicates otherwise. Terms used in the embodiments of the present invention may be interpreted as meanings commonly known to those skilled in the art unless otherwise defined.

이하, 도면을 참조하여 본 발명의 다양한 실시예가 안내하는 본 발명의 구성과 그 구성으로부터 비롯되는 효과에 대해 살펴본다.Hereinafter, with reference to the drawings, look at the configuration of the present invention guided by various embodiments of the present invention and the effects resulting from the configuration.

도 1은 본 발명의 바람직한 어느 실시예에 따른 암호키 생성 장치의 개략적인 구조도이다.1 is a schematic structural diagram of an encryption key generating device according to a preferred embodiment of the present invention.

저지연 블록암호 처리를 위한 암호키 생성 장치(1)는 암호키 클록 생성부(10), 암호키 생성부(20), 데이터 입력부(30), 입력 클록 생성부(40) 및 제어부(50)를 포함한다.Encryption key generation device 1 for low-latency block cipher processing includes an encryption key clock generator 10, an encryption key generator 20, a data input unit 30, an input clock generator 40, and a control unit 50 includes

암호키 생성부(20)는 암호키 클록 생성부(10)에서 생성된 클록(Clock)에 의해 암호키를 생성하여 메모리를 저장한다. 메모리에 저장된 암호키는 입력 데이터와 논리합(XOR: Exclusive OR) 연산되어 출력 데이터가 생성된다.The encryption key generation unit 20 generates an encryption key by the clock generated by the encryption key clock generation unit 10 and stores the memory. The encryption key stored in the memory is subjected to an exclusive OR (XOR) operation with the input data to generate output data.

도 2는 암호키 생성부를 이용하여 LEA CTR 모드로 암호화하는 방법의 구조를 나타낸다.2 shows the structure of a method of encrypting in LEA CTR mode using an encryption key generator.

CTR 값은 1씩 증가하며 암호화 함수(Ek)에 입력되고 암호화 함수의 출력이 암호화하려는 평문(P)과 배타적 논리합(XOR) 연산되어 비문(C)이 생성되게 된다.The CTR value increases by 1 and is input to the encryption function (Ek), and the output of the encryption function is subjected to an exclusive OR (XOR) operation with the plaintext (P) to be encrypted to generate the epitaph (C).

도 3은 암호키 생성부를 이용하여 LEA CTR 모드로 복호화하는 방법의 구조를 나타낸다.3 shows the structure of a method of decryption in LEA CTR mode using an encryption key generator.

암호화 과정과 마찬가지로 CTR 값이 1씩 증가하여 암호화 함수를 거치고 암호화 함수의 출력이 비문(C)과 XOR 연산되면 평문(P)을 얻게 된다.As in the encryption process, the CTR value is increased by 1 and passed through the encryption function. When the output of the encryption function is XORed with the plaintext (C), the plaintext (P) is obtained.

다시 도 1로 돌아와서, 데이터 입력부(30)는 입력 클록 생성부(40)의 클럭에 따라 데이터가 입력된다.Returning to FIG. 1 again, data is input into the data input unit 30 according to the clock of the input clock generator 40 .

제어부(50)는 하나 이상의 프로세서(52) 및 메모리(54)를 포함하여 암호키 클록 생성부(10)와 암호키 생성부(20), 데이터 입력부(30) 등을 제어한다. 이를 위해 프로세서(52)는 연산과 제어를 위한 명령어들을 수행할 수 있고, 메모리(54)에는 프로세서(52)를 구동하기 위한 명령어, 즉, 프로그램 코드와 필요한 데이터들이 저장될 수 있다.The control unit 50 includes one or more processors 52 and memory 54 to control the encryption key clock generation unit 10, the encryption key generation unit 20, and the data input unit 30. To this end, the processor 52 may execute instructions for operation and control, and the memory 54 may store instructions for driving the processor 52, that is, program codes and necessary data.

도 4는 본 발명의 바람직한 어느 실시예에 따른 블록암호 처리 방법의 전체 흐름을 나타낸다.4 shows the overall flow of a block cipher processing method according to a preferred embodiment of the present invention.

입력 데이터는 입력비트(b) 단위로 입력길이(c)만큼 한 단위로 입력된다. 이때 입력 데이터는 입력클록(a)에 의해 입력된다. 예를 들어 입력비트(b)가 640비트(bit) 단위로 102 클록(clock) 동안 입력 데이터가 입력될 수 있다.Input data is input as a unit as much as the input length (c) in units of input bits (b). At this time, the input data is input by the input clock (a). For example, input data may be input for 102 clocks in units of 640 bits (b).

따라서 입력 데이터가 입력되는 시간은 입력길이인 c 클록을 입력 클록의 속도 a로 나눈 값이 된다. 즉, 입력시간=c/a 로 나타낼 수 있다.Therefore, the input data input time is the value obtained by dividing the input length c clock by the input clock speed a. That is, it can be expressed as input time = c/a.

암호화 함수는 앞의 예에서 설명했듯이 카운터(CTR) 값을 암호화 연산하여 암호키를 생성하게 된다.As described in the previous example, the encryption function performs an encryption operation on the counter (CTR) value to generate an encryption key.

암호화 함수의 길이(l)는 정해져 있기 때문에 입력비트(b)가 암호화 함수 처리 길이(l)보다 긴 경우에는 암호화 함수를 여러 개 사용해야 한다. 암호화 함수의 개수(d)는 따라서 입력 비트 수 b를 암호화 함수의 처리 길이 l로 나눈 b/l이 될 것이다. LEA CTR 방법에서 암호화 함수의 길이(l)는 128비트이다. 따라서 입력 데이터비트(b)가 640비트인 경우에 암호화 함수의 개수 d는 d=640/128=5, 즉 5가 된다. Since the length (l) of the encryption function is fixed, when the input bit (b) is longer than the processing length (l) of the encryption function, several encryption functions must be used. The number d of encryption functions will therefore be b/l divided by the number of input bits b by the processing length l of the encryption function. In the LEA CTR method, the length l of the encryption function is 128 bits. Therefore, when the input data bit (b) is 640 bits, the number of encryption functions d is d = 640/128 = 5, that is, 5.

암호화 함수는 CTR 값을 암호화해야 하는데 이에 소요되는 시간은 e 클록이다. 그런데 입력 데이터는 입력길이(c)만큼이므로 전체 암호화에 소요되는 시간은 c와 e를 곱한 시간만큼이 소요된다. 예를 들어 암호화에 3클락이 소요된다면 5개의 암호화 함수를 이용하더라도 전체 입력 데이터에 대해 암호화를 수행하려면 102*3=306 클록이 소요되는 것이다. 따라서 입력 데이터가 입력되는데 소요되는 c 클록보다 암호화에 소요되는 시간이 e배 길어지게 되므로 실시간 연산이 불가능 하게 된다. 102 클록 만에 데이터 입력이 완료되더라도 306 클록에 암호키 생성이 완료될때까지 대기해야 하는 것이다.The encryption function needs to encrypt the CTR value, and the time required for this is e clock. However, since the input data is as long as the input length (c), the time required for the entire encryption is the time multiplied by c and e. For example, if encryption takes 3 clocks, even if 5 encryption functions are used, 102*3=306 clocks are required to encrypt the entire input data. Therefore, since the time required for encryption is e times longer than the c clock required for input data, real-time operation becomes impossible. Even if data input is completed in 102 clocks, it has to wait until encryption key generation is completed in 306 clocks.

따라서 본 발명에서는 총 암호키 연산시간(h)이 데이터 입력시간(c)보다 작아지도록 암호화 클록의 배수(f)와 암호화 함수 개수(d)의 배수(g)를 조절함으로써 입력 데이터가 모두 입력되기 전에 암호키 생성 연산을 마쳐서 이를 메모리에 저장해두고 필요한 타이밍에 입력 데이터와 XOR 연산함으로써 암호화/복호화를 필요한 시간 안에 마치는 것을 목표로 한다.Therefore, in the present invention, by adjusting the multiple (f) of the encryption clock and the multiple (g) of the number of encryption functions (d) so that the total encryption key operation time (h) is smaller than the data input time (c), all input data is input. It aims to complete encryption/decryption within the required time by performing an XOR operation with the input data at the required timing after completing the encryption key generation operation before storing it in memory.

총 암호키 연산시간(h)는 다음과 같이 구할 수 있다.The total encryption key operation time (h) can be obtained as follows.

전체 입력 데이터에 대해 d*g개의 암호화 함수로 e클록 동안 암호화가 수행된다. 따라서 h는 다음 식과 같이 나타낼 수 있다.Encryption is performed during e clock with d*g encryption functions for all input data. Therefore, h can be expressed as:

Figure 112020140720921-pat00001
Figure 112020140720921-pat00001

여기서 d는 b/l이므로 h를 다시 정리하면 다음 식과 같다Here, since d is b/l, rearranging h gives

Figure 112020140720921-pat00002
Figure 112020140720921-pat00002

앞에서 입력클록 a로 입력길이 c만큼의 데이터가 입력되는 시간은 c/a 였다.The time for inputting data as much as the input length c with the input clock a was c/a.

따라서 입력 시간 c/a와 총 암호키 연산 시간 h는 다음 식을 만족해야 한다.Therefore, the input time c/a and the total encryption key operation time h must satisfy the following equation.

Figure 112020140720921-pat00003
Figure 112020140720921-pat00003

제어부(50)는 이 식을 만족시키기 위해 암호화 함수 개수의 배수인 g와 입력 클록 대비 암호화 함수 동작 클록 배수인 f를 조절하여 암호키 클록 생성부(10)가 a*f 속도의 암호키를 생성하도록 제어한다.In order to satisfy this equation, the control unit 50 adjusts g, which is a multiple of the number of encryption functions, and f, which is a multiple of the encryption function operation clock relative to the input clock, so that the encryption key clock generation unit 10 generates an encryption key at a*f rate. control to do

양변에서 클록 스피드인 a를 제거하면 양변은 모두 클록 수를 나타내며 다음 식과 같이 표현할 수 있다.If a, which is the clock speed, is removed from both sides, both sides indicate the number of clocks and can be expressed as the following equation.

Figure 112020140720921-pat00004
Figure 112020140720921-pat00004

h는 (c*e)/(g*f) 이므로 g=2, f=2인 경우에 h는 76.5 클록이 되므로 데이터 입력 시간인 102 클록보다 짧은 시간에 암호키 생성이 완성되는 것이다.Since h is (c*e)/(g*f), in the case of g=2 and f=2, h becomes 76.5 clocks, so the encryption key generation is completed in a time shorter than the data input time of 102 clocks.

따라서 제어부(50)는 암호화 함수는 5*2=10개를 사용하고 암호화 클록 생성부(10)는 입력 클록 속도의 두배인 2*a의 속도로 제어함으로써 저지연 블록암호 처리를 위한 암호키를 필요한 시간 안에 생성해낼 수 있다.Therefore, the control unit 50 uses 5*2=10 encryption functions and the encryption clock generator 10 controls the encryption key for low-latency block encryption processing by controlling it at a speed of 2*a, which is twice the input clock speed. It can be created in the time required.

도 5는 본 발명의 바람직한 어느 실시예에 따른 암호키 생성 방법의 흐름도이다.5 is a flowchart of a method for generating an encryption key according to a preferred embodiment of the present invention.

우선 입력 클록 속도(a)와 입력 데이터 길이(c)에 의해 단위 데이터 입력시간을 계산한다(S10). 입력시간은 a/c로 계산된다.First, the unit data input time is calculated by the input clock speed (a) and the input data length (c) (S10). Input time is calculated as a/c.

다음 총 암호키가 생성되는 시간(h)을 계산한다(S20).The time (h) for generating the next total encryption key is calculated (S20).

입력 데이터비트(b)가 입력 데이터 길이(c)만큼 들어오고, 암호화 함수의 개수(d)와 이의 배수(g)만큼의 암호화 함수를 사용하여 입력 클럭(a)의 배수(f)만큼의 속도로 암호화 연산을 진행하면 암호키가 생성되는 총 시간 h는 다음과 같다.Input data bits (b) come in as much as the input data length (c), and the number of encryption functions (d) and multiples (g) of encryption functions are used to speed up to multiples (f) of the input clock (a). When the encryption operation is performed with , the total time h for generating the encryption key is as follows.

Figure 112020140720921-pat00005
Figure 112020140720921-pat00005

여기서 d는 b/l이므로 h를 다시 정리하면 다음 식과 같다Here, since d is b/l, rearranging h gives

Figure 112020140720921-pat00006
Figure 112020140720921-pat00006

이때 암호키 생성 시간이 입력 시간보다 짧아져야 대기하는 시간 없이 암호화 또는 복호화 연산을 완료할 수 있으므로 암호화 함수 개수 및 클록 속도 결정한다(S30).At this time, since the encryption or decryption operation can be completed without waiting time when the encryption key generation time is shorter than the input time, the number of encryption functions and the clock speed are determined (S30).

이를 식으로 나타내면 h<c/a 이므로 앞에서 구한 식을 정리하면 다음과 같이 나타날 것이다.Expressing this as an expression, since h<c/a, rearranging the previously obtained expression will result in the following.

Figure 112020140720921-pat00007
Figure 112020140720921-pat00007

암호화 함수의 배수 g와 클록 스피드의 배수 f를 적절히 조절하면 전체 암호화 시간 h가 전체 데이터 입력 시간보다 작게 설정 가능하다.By properly adjusting the multiple g of the encryption function and the multiple f of the clock speed, the total encryption time h can be set to be smaller than the total data input time.

마지막으로 결정된 클록 속도와 암호화 함수 개수에 의해 암호키를 생성하게 된다(S40).Finally, an encryption key is generated based on the determined clock speed and the number of encryption functions (S40).

클록 속도는 입력클록의 f배로 설정하고, 암호화 함수의 개수는 입력 데이터비트(b)를 암호화 함수의 처리 길이(l)로 나눈 값의 g배로 설정함으로써 전체 암호키 생성을 데이터 입력 전에 마칠 수 있다.By setting the clock speed to f times the input clock and setting the number of encryption functions to g times the value obtained by dividing the input data bits (b) by the processing length (l) of the encryption function, the entire encryption key generation can be completed before data input. .

이와 같은 본 발명의 암호키 생성 장치 및 방법에 따르면 암호화 함수의 개수와 암호키 생성 클록을 조절함으로써 데이터 입력 전에 암호키 생성을 완성함으로써 100Gbps급의 고속 환경에서도 지연 없이 암호화 연산을 완료할 수 있는 효과가 있다.According to the encryption key generation apparatus and method of the present invention, by adjusting the number of encryption functions and the encryption key generation clock, the encryption key generation is completed before data input, so that the encryption operation can be completed without delay even in a 100 Gbps high-speed environment. there is

본 발명의 보호범위가 이상에서 명시적으로 설명한 실시예의 기재와 표현에 제한되는 것은 아니다. 또한, 본 발명이 속하는 기술분야에서 자명한 변경이나 치환으로 말미암아 본 발명이 보호범위가 제한될 수도 없음을 다시 한 번 첨언한다.The protection scope of the present invention is not limited to the description and expression of the embodiments explicitly described above. In addition, it is added once again that the scope of protection of the present invention cannot be limited due to obvious changes or substitutions in the technical field to which the present invention belongs.

Claims (9)

(a) 입력 클록(clock) 속도와 입력 데이터 길이에 의해 하나의 단위 데이터가 입력되는 시간을 계산하는 단계;
(b) 상기 입력 클록 속도의 배수, 상기 입력 데이터 길이, 암호화 함수 연산에 필요한 클록 수 및 입력 데이터 비트수를 한번에 처리하기 위한 암호화 함수의 개수의 배수에 의해 암호키 생성에 필요한 시간을 계산하는 단계; 및
(c) 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 입력 클록 속도의 배수를 조절하는 단계;를 포함하는, 저지연 블록암호 처리를 위한 암호키 생성 방법.
(a) calculating a time when one unit data is input by an input clock speed and an input data length;
(b) calculating a time required for generating an encryption key by a multiple of the input clock speed, the input data length, the number of clocks required for calculating the encryption function, and the number of encryption functions for processing the number of input data bits at once ; and
(c) adjusting a multiple of the input clock speed so that the time required to generate the encryption key is shorter than the time for inputting the one unit data; encryption key generation method for low-delay block cipher processing.
제1항에 있어서,
상기 (a) 단계는 상기 입력 데이터 길이를 상기 입력 클록 속도로 나눈 값에 의해 상기 하나의 단위 데이터가 입력되는 시간을 계산하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 방법.
According to claim 1,
Wherein step (a) is characterized in that calculating the time when the one unit data is input by dividing the input data length by the input clock speed, an encryption key generation method for low-delay block cipher processing.
제1항에 있어서,
상기 (b) 단계는 상기 입력 데이터 길이와 상기 암호화 함수 연산에 필요한 클록 수를 곱한 값을 상기 입력 클록 속도와 상기 입력 클록 속도의 배수와 상기 암호화 함수의 개수의 배수를 곱한 값으로 나눈 값으로 상기 암호키 생성에 필요한 시간을 계산하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 방법.
According to claim 1,
In the step (b), the value obtained by multiplying the input data length by the number of clocks required for calculating the encryption function is divided by the value obtained by multiplying the input clock speed by a multiple of the input clock speed and a multiple of the number of encryption functions. An encryption key generation method for low-delay block cipher processing, characterized in that for calculating the time required for encryption key generation.
제1항에 있어서,
상기 (c) 단계는 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 암호화 함수의 개수의 배수를 조절하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 방법.
According to claim 1,
In the step (c), an encryption key for low-latency block encryption processing is characterized in that the multiple of the number of encryption functions is adjusted so that the time required to generate the encryption key is shorter than the time required to input the one unit data. How to create.
제1항에 있어서,
상기 (c) 단계 이후에 상기 입력 클록 속도의 배수에 의해 조절된 암호키 생성 클록에 의해 암호키를 생성하는 단계;를 더 포함하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 방법.
According to claim 1,
Generating an encryption key by an encryption key generation clock adjusted by a multiple of the input clock rate after the step (c); characterized in that it further comprises, an encryption key generation method for low-latency block cipher processing .
암호키 생성 연산을 위한 클록을 생성하는 암호키 클록 생성부;
상기 클록에 의해 블록암호 처리를 위한 암호키를 생성하는 암호키 생성부; 및
하나 이상의 프로세서 및 메모리를 포함하며 상기 암호키 클록 생성부를 제어하는 제어부;를 포함하되,
상기 제어부는, 입력 클록 속도와 입력 데이터 길이에 의해 하나의 단위 데이터가 입력되는 시간을 계산하고, 상기 입력 클록 속도의 배수, 상기 입력 데이터 길이, 암호화 함수 연산에 필요한 클록 수 및 입력 데이터 비트수를 한번에 처리하기 위한 암호화 함수의 개수의 배수에 의해 암호키 생성에 필요한 시간을 계산하여, 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 입력 클록 속도의 배수를 결정하여 상기 암호키 클록 생성부의 클록을 조절하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 장치.
an encryption key clock generator for generating a clock for an encryption key generation operation;
an encryption key generator for generating an encryption key for block encryption processing by means of the clock; and
A control unit including one or more processors and memories and controlling the encryption key clock generation unit; including,
The control unit calculates a time when one unit data is input based on an input clock speed and an input data length, and calculates a multiple of the input clock speed, the input data length, the number of clocks required for calculating the encryption function, and the number of input data bits. By calculating the time required to generate an encryption key by a multiple of the number of encryption functions to be processed at one time, a multiple of the input clock speed is determined so that the time required to generate the encryption key is shorter than the time required to input the one unit data. Encryption key generation device for low-delay block cipher processing, characterized in that for controlling the clock of the encryption key clock generation unit.
제6항에 있어서,
상기 제어부는 상기 입력 데이터 길이를 상기 입력 클록 속도로 나눈 값에 의해 상기 하나의 단위 데이터가 입력되는 시간을 계산하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 장치.
According to claim 6,
Characterized in that the control unit calculates the time when the one unit data is input by dividing the input data length by the input clock speed, encryption key generation device for low-delay block cipher processing.
제6항에 있어서,
상기 제어부는 상기 입력 데이터 길이와 상기 암호화 함수 연산에 필요한 클록 수를 곱한 값을 상기 입력 클록 속도와 상기 입력 클록 속도의 배수와 상기 암호화 함수의 개수의 배수를 곱한 값으로 나눈 값으로 상기 암호키 생성에 필요한 시간을 계산하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 장치.
According to claim 6,
The controller generates the encryption key by dividing a value obtained by multiplying the length of the input data by the number of clocks required for the operation of the encryption function by a value obtained by multiplying the input clock speed by a multiple of the input clock speed and a multiple of the number of encryption functions. An encryption key generation device for low-latency block cipher processing, characterized in that for calculating the time required for.
제6항에 있어서,
상기 제어부는 상기 하나의 단위 데이터가 입력되는 시간보다 상기 암호키 생성에 필요한 시간이 짧아지도록 상기 암호화 함수의 개수의 배수를 조절하는 것을 특징으로 하는, 저지연 블록암호 처리를 위한 암호키 생성 장치.
According to claim 6,
The control unit is characterized in that for adjusting the multiple of the number of the encryption function so that the time required to generate the encryption key is shorter than the time when the one unit data is input, encryption key generation device for low-delay block encryption processing.
KR1020200182743A 2020-12-24 2020-12-24 Method and apparatus for processing low latency block encription KR102479689B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200182743A KR102479689B1 (en) 2020-12-24 2020-12-24 Method and apparatus for processing low latency block encription

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200182743A KR102479689B1 (en) 2020-12-24 2020-12-24 Method and apparatus for processing low latency block encription

Publications (2)

Publication Number Publication Date
KR20220091737A KR20220091737A (en) 2022-07-01
KR102479689B1 true KR102479689B1 (en) 2022-12-20

Family

ID=82397160

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200182743A KR102479689B1 (en) 2020-12-24 2020-12-24 Method and apparatus for processing low latency block encription

Country Status (1)

Country Link
KR (1) KR102479689B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100618733B1 (en) 2001-06-06 2006-08-31 인피네온 테크놀로지스 아게 Power controlled electronic circuit
KR102097702B1 (en) 2018-10-18 2020-04-07 주식회사 우리넷 Key generation method for low delay block cipher operating mode

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003217490A1 (en) * 2002-03-25 2003-10-08 Matsushita Electric Industrial Co., Ltd. Recording medium, recording apparatus, reading apparatus, and program and method therefore
KR20080073348A (en) * 2005-11-23 2008-08-08 코닌클리케 필립스 일렉트로닉스 엔.브이. Multi-lane high-speed encryption and decryption

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100618733B1 (en) 2001-06-06 2006-08-31 인피네온 테크놀로지스 아게 Power controlled electronic circuit
KR102097702B1 (en) 2018-10-18 2020-04-07 주식회사 우리넷 Key generation method for low delay block cipher operating mode

Also Published As

Publication number Publication date
KR20220091737A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US7978851B2 (en) Keystream encryption device, method, and program
US11546135B2 (en) Key sequence generation for cryptographic operations
KR20110129932A (en) Key recovery mechanism for cryptographic systems
US8724804B2 (en) Encryption processing apparatus
US8520845B2 (en) Method and apparatus for expansion key generation for block ciphers
US20170272239A1 (en) Authentication encryption method, authentication decryption method, and information-processing device
Stallings NIST block cipher modes of operation for confidentiality
CN105897406A (en) AES encryption and decryption device having equal-length plaintexts and ciphertexts
Pachori et al. Improved performance of advance encryption standard using parallel computing
Gouvêa et al. High speed implementation of authenticated encryption for the MSP430X microcontroller
CN116488794B (en) Method and device for realizing high-speed SM4 password module based on FPGA
Kim et al. Efficient Implementation of AES and CTR_DRBG on 8-bit AVR-based Sensor Nodes
CN109804596B (en) Programmable block cipher with masked input
KR102479689B1 (en) Method and apparatus for processing low latency block encription
Buell Modern symmetric ciphers—Des and Aes
US20100061551A1 (en) Encryption/decryption apparatus and method using aes rijndael algorithm
Dandass Using FPGAs to parallelize dictionary attacks for password cracking
JP5268001B2 (en) Pseudorandom number generator for stream cipher, program and method
Bilski et al. Implementation of symmetric cryptography in embedded systems for secure measurement systems
JP6631989B2 (en) Encryption device, control method, and program
KR20120131738A (en) Encryption apparatus and method according to CTR mode of AESadvanced encryption standard
EP1629626A1 (en) Method and apparatus for a low memory hardware implementation of the key expansion function
KR100546777B1 (en) Apparatus and method for SEED Encryption/Decryption, and F function processor therefor
Lanjewar et al. Implementation of AES-256 Bit: A Review
Kim et al. PDF 2.0 CRACKING on CUDA

Legal Events

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