KR20160087561A - Encryption device, decryption device and system for performing padding in block cipher mode - Google Patents
Encryption device, decryption device and system for performing padding in block cipher mode Download PDFInfo
- Publication number
- KR20160087561A KR20160087561A KR1020150006673A KR20150006673A KR20160087561A KR 20160087561 A KR20160087561 A KR 20160087561A KR 1020150006673 A KR1020150006673 A KR 1020150006673A KR 20150006673 A KR20150006673 A KR 20150006673A KR 20160087561 A KR20160087561 A KR 20160087561A
- Authority
- KR
- South Korea
- Prior art keywords
- unit
- block
- padding
- valid data
- initial vector
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic 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/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic 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/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Storage Device Security (AREA)
Abstract
Description
본 발명은 블록 암호 방식에서 패딩을 수행하고, 비어 있는 열에 난수 및 마지막 블록의 유효 데이터의 크기값을 삽입하여 암호화하고, 이를 복호화하는 기술에 관한 것이다.
The present invention relates to a technology for performing padding in a block cipher system, encrypting a random number in a blank column and a size value of valid data of the last block, encrypting the same, and decoding the same.
블록 암호 알고리즘은 주어진 데이터를 정해진 길이의 블럭(16비트, 64비트 혹은 128 비트 등)으로 나누어 블록단위로 암호화를 수행하는 알고리즘이다. 다양한 '모드'로 구현되며 '패딩(padding:덧붙이기)'이 필요하다. 64 비트 블록 암호에는 DES, DES3, DESX, RC5, BLOWFISH, CAST128, IDEA, SAFER , RC2 등이 있으며, 128 비트 블록 암호에는 SEED, CRYPTON, RIJNDAEL, CAST256, RC6, TWOFISH, MARS, SERPENT 등이 있다.The block cipher algorithm is an algorithm that divides the given data into blocks (16-bit, 64-bit or 128-bit, etc.) of a predetermined length and performs encryption on a block-by-block basis. It is implemented in various 'modes' and requires 'padding'. 64-bit block ciphers include DES, DES3, DESX, RC5, BLOWFISH, CAST128, IDEA, SAFER, RC2 and 128-bit block ciphers include SEED, CRYPTON, RIJNDAEL, CAST256, RC6, TWOFISH, MARS and SERPENT.
상기 암호중 64 비트 블록 암호인 DES와 128비트 블록 암호인 SEED를 살펴보면, DES는 입력 데이터의 길이를 8의 배수로, SEED는 16의 배수로 나누며, 만약 입력 데이터의 길이가 8이나 16의 배수가 되지 않는 경우에는, 8의 배수나 16의 배수가 되도록 데이터를 더하게 되는데 이를 '패딩'이라고 한다.DES is a 64-bit block cipher DES and 128-bit block cipher SEED. DES divides the input data length by a multiple of 8 and SEED divides by a multiple of 16. If the input data length is not a multiple of 8 or 16 If not, the data is added so that it is a multiple of 8 or a multiple of 16, which is called 'padding'.
이 중 SEED 방식을 이용한 블록 암호화 기술은 대한민국 공개특허 제10-2005-0058629호 (2005. 06. 17)에 개시되어 있다.
Among them, the block encryption technique using the SEED scheme is disclosed in Korean Patent Laid-Open No. 10-2005-0058629 (2005. 06. 17).
본 발명은 패딩된 열에 난수와 마지막 블록의 유효 데이터의 크기 값을 삽입함으로써, 랜덤화된 암호화 결과를 얻을 수 있는 암호화 장치, 복호화 장치 및 시스템을 제공하기 위한 것이다.The present invention is intended to provide an encryption apparatus, a decryption apparatus, and a system capable of obtaining a randomized encryption result by inserting a random number and a size value of valid data of a last block into a padded column.
본 발명은 마지막 블록의 유효 데이터의 크기에 기초하여 패딩의 열의 크기를 결정함으로써, 패딩되는 크기를 최소화할 수 있는 암호화 장치, 복호화 장치 및 시스템을 제공하기 위한 것이다.The present invention is to provide a cryptographic apparatus, a decryption apparatus, and a system capable of minimizing a padded size by determining the size of columns of padding based on the size of valid data of the last block.
본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있으며, 본 발명의 실시예에 의해 보다 분명하게 알게 될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.Other objects and advantages of the present invention will become apparent from the following description, and it will be understood by those skilled in the art that the present invention is not limited thereto. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.
상술한 과제를 해결하기 위하여 안출된 본 발명의 일실시예인 블록 암호 방식에서 패딩을 수행하는 암호화 장치는 입력 데이터의 길이가 1개의 블록 크기인 n의 배수인지를 판단하는 판단부와, 상기 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)하는 패딩부 및 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 상기 패딩된 입력 데이터를 암호화하는 암호화부를 포함할 수 있다.According to an aspect of the present invention, there is provided an encryption apparatus for performing padding in a block cipher system, the apparatus comprising: a determination unit for determining whether a length of input data is a multiple of n, A padding unit, an encryption key and a first initial vector for padding by inserting a random number and a size value of valid data into a column excluding valid data of the last block, if the length is not a multiple of n And an encryption unit for encrypting the padded input data using the encryption unit.
패딩부는 마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록을 더 생성하고, 상기 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다.The padding unit further generates one block when the size of the valid data of the last block is equal to or larger than n-1. The padding unit generates a random number and a valid data size You can insert a value.
패딩부는 상기 유효 데이터의 크기 값을 상기 마지막 블록의 맨 마지막 열에 삽입할 수 있다.The padding unit may insert the size value of the valid data into the last column of the last block.
블록 암호 방식에서 패딩을 수행하는 암호화 장치는 상기 난수에 기초하여 해쉬(hash) 값을 연산하는 제 1 연산부 및 상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 1 생성부를 더 포함하고, 암호화부는 상기 제 1 초기 벡터를 이용하여 상기 마지막 블록을 암호화하고, 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 암호화할 수 있다.
An encryption apparatus for performing padding in a block cipher system includes a first computation unit for computing a hash value based on the random number and a second computation unit for generating a second initial vector using the computed hash value, And the encryption unit may encrypt the last block using the first initial vector and encrypt the remaining blocks except for the last block using the second initial vector.
본 발명의 또 다른 일실시예인 복호화 장치는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 입력 데이터를 복호화하는 복호화부 및 복호화된 데이터로부터 유효 데이터를 추출하는 추출부를 포함할 수 있다.According to another embodiment of the present invention, a decoding apparatus includes a decoding unit that decodes input data including a random number and a size value of valid data using an encryption key and a first initial vector, And an extracting unit for extracting valid data from the received data.
복호화부는 입력 데이터 중 마지막 블록을 상기 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화할 수 있다.The decryption unit may decrypt the last block of the input data using the encryption key and the first initial vector.
블록 암호 방식에서 패딩을 수행하는 복호화 장치는 복호화된 데이터 유효 데이터의 크기 값에 기초하여 난수를 추출하고, 추출된 난수에 기초하여 해쉬(hash) 값을 연산하는 제 2 연산부 및 상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 2 생성부를 더 포함하고, 복호화부는 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 복호화할 수 있다.
A decoding apparatus for performing padding in a block cipher system includes a second arithmetic unit for extracting a random number based on the size value of the decrypted data valid data and calculating a hash value based on the extracted random number, And a second generating unit for generating a second initial vector by using the second initial vector, and the decoding unit may decode the remaining blocks excluding the last block using the second initial vector.
본 발명의 또 다른 일실시예인 암복호화 시스템은 입력 데이터의 길이가 1개의 블록 크기인 n의 배수인지를 판단하는 판단부와, 상기 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)하는 패딩부와, 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 상기 패딩된 입력 데이터를 암호화하는 암호화부를 구비하는 블록 암호 방식에서 패딩을 수행하는 암호화 장치 및, 상기 암호화 키(key) 및 상기 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 입력 데이터를 복호화하는 복호화부와, 복호화된 데이터 중 유효 데이터의 크기 값에 기초하여, 복호화된 데이터로부터 유효 데이터를 추출하는 추출부를 구비하는 블록 암호 방식에서 패딩을 수행하는 복호화 장치를 포함할 수 있다.According to another embodiment of the present invention, there is provided an encryption and decryption system comprising: a determination unit for determining whether a length of input data is a multiple of n, which is a block size; and, if the length of the input data is not a multiple of n, A padding unit for padding a random number and a size value of valid data in a column except for a column and an encryption unit for encrypting the padded input data using an encryption key and a first initial vector A decryption unit for decrypting input data including a random number and an effective data size value using the encryption key and the first initial vector, And an extracting unit for extracting valid data from the decrypted data based on the size value of the valid data among the decrypted data, In may include a decoding unit for performing padding.
패딩부는 마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록을 더 생성하고, 상기 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다.The padding unit further generates one block when the size of the valid data of the last block is equal to or larger than n-1. The padding unit generates a random number and a valid data size You can insert a value.
패딩부는 유효 데이터의 크기 값을 마지막 블록의 맨 마지막 열에 삽입할 수 있다.The padding unit may insert the size value of the valid data into the last column of the last block.
암호화 장치는 난수에 기초하여 해쉬(hash) 값을 연산하는 제 1 연산부 및 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 1 생성부를 더 포함하고, 암호화부는 상기 제 1 초기 벡터를 이용하여 상기 마지막 블록을 암호화하고, 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 암호화할 수 있다.The encrypting apparatus further comprises a first computing section for computing a hash value based on the random number and a first generating section for generating a second initial vector using the computed hash value, Encrypts the last block using the initial vector, and encrypts the remaining blocks except for the last block using the second initial vector.
복호화부는 입력 데이터 중 마지막 블록을 상기 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화할 수 있다.The decryption unit may decrypt the last block of the input data using the encryption key and the first initial vector.
복호화 장치는 복호화된 데이터로부터 난수를 추출하고, 추출된 난수에 기초하여 해쉬(hash) 값을 연산하는 제 2 연산부 및 상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 2 생성부를 더 포함하고, 복호화부는 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 복호화할 수 있다.
The decoding apparatus includes a second arithmetic unit for extracting a random number from the decoded data, calculating a hash value based on the extracted random number, and a second arithmetic unit for generating a second initial vector using the calculated
상술한 구성을 가지는 본 발명의 일실시예에 따르면, 패딩된 열에 난수와 마지막 블록의 유효 데이터의 크기 값을 삽입함으로써, 랜덤화된 암호화 결과를 얻을 수 있다. According to an embodiment of the present invention having the above-described configuration, a randomized encryption result can be obtained by inserting a random number and a size value of valid data of a last block into a padded column.
또한, 마지막 블록의 유효 데이터의 크기에 기초하여 추가될 패딩 열의 크기를 결정함으로써, 패딩되는 크기를 최소화할 수 있다.
Also, by determining the size of the padding column to be added based on the size of the valid data of the last block, the padded size can be minimized.
도 1은 본 발명의 일실시예인 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템을 설명하기 위한 블록 구성도이다.
도 2는 본 발명의 일 실시예에 따른 암복호화 시스템의 구동 방법을 설명하기 위한 도면이다.
도 3은 본 발명의 또 다른 일 실시예에 따른 암복호화 시스템의 구동 방법을 설명하기 위한 도면이다.1 is a block diagram illustrating an encryption / decryption system for performing padding in a block cipher system according to an embodiment of the present invention.
2 is a diagram for explaining a method of driving an encryption / decryption system according to an embodiment of the present invention.
3 is a view for explaining a method of driving an encryption / decryption system according to another embodiment of the present invention.
이하, 본 발명의 바람직한 실시 예들을 첨부된 도면을 참고하여 더욱 상세히 설명한다. 본 발명의 실시 예들은 여러 가지 형태로 변형될 수 있으며, 본 발명의 범위가 아래에서 설명하는 실시 예들에 한정되는 것으로 해석되어서는 안 된다. 본 실시예들은 당해 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 본 발명을 더욱 상세하게 설명하기 위해서 제공되는 것이다.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiments of the present invention can be modified in various forms, and the scope of the present invention should not be construed as being limited to the embodiments described below. The embodiments are provided to explain the present invention to a person having ordinary skill in the art to which the present invention belongs.
도 1은 본 발명의 일실시예인 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템을 설명하기 위한 블록 구성도이다.1 is a block diagram illustrating an encryption / decryption system for performing padding in a block cipher system according to an embodiment of the present invention.
도 1을 참조하면, 암복호화 시스템(100)은 암호화 장치(110) 및 복호화 장치(120)를 포함할 수 있다.Referring to FIG. 1, the encryption /
암호화 장치(110)는 제 1 통신부(111), 판단부(112), 패딩부(113), 제 1 연산부(114), 제 1 생성부(115) 및 암호화부(116)를 포함한다.The
제 1 통신부(111)는 데이터를 복호화 장치(120)로 송수신할 수 있는 유선 또는 무선 장치일 수 있다. 예를 들면, 제 1 통신부(111)는 유선 인터넷 모듈, 이동 통신 모듈, 무선 인터넷 모듈, 근거리 통신 모듈 등과 같은 통신 가능한 모듈을 포함할 수 있다.The
판단부(112)는 입력 데이터의 길이가 1개의 블록 크기인 n의 배수인지를 판단할 수 있다. 예를 들면, 블록 크기가 16 바이트인 경우, 판단부(112)는 입력 데이터의 길이가 16의 배수인지를 판단할 수 있다.The
패딩부(113)는 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)할 수 있다. 패딩부(113)는 마지막 블록의 유효 데이터의 크기 값을 마지막 블록의 맨 마지막 열에 삽입할 수 있다. 예를 들면, 패딩부(113)는 마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록을 더 생성할 수 있다. 패딩부(113)는 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다. 이에 대한 구체적인 설명은 이하의 도 2 및 도 3을 참조하여 구체적으로 설명하겠다.If the length of the input data is not a multiple of n, the
제 1 연산부(114)는 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다.The
제 1 생성부(115)는 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다. 제 2 초기 벡터의 크기는 제 1 초기 벡터의 크기와 동일하다.The
암호화부(116)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 패딩된 입력 데이터를 암호화할 수 있다. The
암호화부(116)는 제 1 초기 벡터를 이용하여 마지막 블록을 암호화하고, 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록을 암호화할 수 있다.
The
복호화 장치(120)는 제 2 통신부(121), 제 2 연산부(122), 제 2 생성부(123), 복호화부(124) 및 추출부(125)를 포함한다.The
제 2 통신부(121)는 데이터를 암호화 장치(110)로 송수신할 수 있는 유선 또는 무선 장치일 수 있다. 예를 들면, 제 2 통신부(121)는 암호화 장치(110)로부터 암호화 키(key) 및 제 1 초기 벡터를 수신할 수 있다. 예를 들면, 제 2 통신부(121)는 유선 인터넷 모듈, 이동 통신 모듈, 무선 인터넷 모듈, 근거리 통신 모듈 등과 같은 통신 가능한 모듈을 포함할 수 있다.The
제 2 연산부(122)는 마지막 블록에 대해 복호화된 데이터로부터 난수를 추출할 수 있다. 제 2 연산부(122)는 추출된 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다. 예를 들면, 제 2 연산부(122)는 마지막 블록에 포함된 데이터 중 유효 데이터 및, 유효 데이터의 크기 값에 대응되는 데이터를 제외한 부분을 난수로 추출할 수 있다.The
제 2 생성부(123)는 제 2 연산부(122)에서 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다.The
복호화부(124)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 입력 데이터를 복호화할 수 있다.The
복호화부(124)는 입력 데이터 중 마지막 블록을 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화할 수 있다. 그 다음, 복호화부(124)는 제 2 생성부(123)에서 생성된 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록을 복호화할 수 있다.The
추출부(125)는 복호화된 데이터로부터 유효 데이터를 추출할 수 있다. 예를 들면, 추출부(125)는 마지막 블록을 제외한 블록들로부터 유효 데이터를 추출하고, 마지막 블록의 유효 데이터의 크기 값에 기초하여 마지막 블록으로부터 유효 데이터를 추출할 수 있다.The extracting
블록 암호 방식에서 패딩을 수행하는 암복호화 시스템은 패딩된 열에 난수와 마지막 블록의 유효 데이터의 크기 값을 삽입함으로써, 랜덤화된 암호화 결과를 얻을 수 있다. An encryption and decryption system that performs padding in a block cipher system can obtain a randomized encryption result by inserting a random number and a size value of valid data of the last block into a padded column.
또한, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템은 마지막 블록의 유효 데이터의 크기에 기초하여 추가될 패딩 열의 크기를 결정함으로써, 패딩되는 크기를 최소화할 수 있다.
Also, the encryption / decryption system that performs padding in the block cipher system can minimize the padded size by determining the size of the padding column to be added based on the size of the valid data of the last block.
도 2는 본 발명의 일 실시예에 따른 암복호화 시스템의 구동 방법을 설명하기 위한 도면이다.2 is a diagram for explaining a method of driving an encryption / decryption system according to an embodiment of the present invention.
도 1 및 도 2의 (a)를 참조하면, 입력데이터는 총 24바이트 일 수 있으며, 본 실시예에서는 블록 단위가 16 바이트인 경우를 기준으로 설명하겠다.Referring to FIGS. 1 and 2 (a), the input data may be a total of 24 bytes, and the present embodiment will be described with reference to the case where the block unit is 16 bytes.
도 1 및 도 2의 (b)를 참조하면, 판단부(112)는 입력 데이터의 길이가 1개의 블록 크기인 16바이트의 배수인지를 판단할 수 있다. 본 실시예에 따르면, 판단부(112)는 2번째 블록(block)이 16바이트의 배수가 아니라는 것을 판단할 수 있다.Referring to FIGS. 1 and 2 (b), the
도 1 및 도 2의 (c)를 참조하면, 패딩부(113)는 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)할 수 있다. 본 실시예에 따르면, 패딩부(113)는 7바이트의 난수를 삽입하여 패딩할 수 있다.Referring to FIGS. 1 and 2C, if the length of the input data is not a multiple of n, the
도 1 및 도 2의 (d)를 참조하면, 패딩부(113)는 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)할 수 있다. 본 실시예에 따르면, 패딩부(113)는 1바이트의 유효 데이터의 크기 값을 삽입하여 패딩할 수 있다. 예를 들면, 유효 데이터의 크기 값은 -1 ~ (블록 크기-1)의 범위 내에 있을 수 있다. 본 실시예에 따르면, 유효 데이터의 크기 값은 8이다. 이때, 패딩부(113)는 패딩부(113)는 마지막 블록의 유효 데이터의 크기 값을 마지막 블록의 맨 마지막 열(2번째 블록의 맨 마지막 열)에 삽입할 수 있다.Referring to FIG. 1 and FIG. 2 (d), if the length of the input data is not a multiple of n, the
암호화의 일 실시예에 따르면, 암호화부(116)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 도 2의 (d)의 패딩된 입력 데이터를 암호화할 수 있다. According to one embodiment of encryption, the
암호화의 또 다른 일 실시예에 따르면, 제 1 연산부(114)는 7바이트의 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다. 제 1 생성부(115)는 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다. 제 2 초기 벡터의 크기는 제 1 초기 벡터의 크기와 동일하다. 암호화부(116)는 제 1 초기 벡터를 이용하여 마지막 블록(2번째 블록)을 암호화하고, 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록(1번째 블록)을 암호화할 수 있다.
According to another embodiment of encryption, the
복호화의 일 실시예에 따르면, 복호화부(124)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 암호화된 입력 데이터를 복호화할 수 있다.According to one embodiment of the decryption, the
복호화의 또 다른 일 실시예에 따르면, 복호화부(124)는 입력 데이터 중 마지막 블록(2번째 블록)을 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화할 수 있다. 제 2 연산부(122)는 마지막 블록(2번째 블록)에 대해 복호화된 데이터로부터 7바이트의 난수를 추출할 수 있다. 제 2 연산부(122)는 추출된 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다. 제 2 생성부(123)는 제 2 연산부(122)에서 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다. 복호화부(124)는 제 2 생성부(123)에서 생성된 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록(1번째 블록)을 복호화할 수 있다.According to another embodiment of the decoding, the
추출부(125)는 복호화된 데이터로부터 유효 데이터를 추출할 수 있다. 예를 들면, 추출부(125)는 마지막 블록을 제외한 블록들로부터 유효 데이터를 추출하고, 마지막 블록의 유효 데이터의 크기 값에 기초하여 마지막 블록으로부터 유효 데이터를 추출할 수 있다.
The extracting
도 3은 본 발명의 또 다른 일 실시예에 따른 암복호화 시스템의 구동 방법을 설명하기 위한 도면이다.3 is a view for explaining a method of driving an encryption / decryption system according to another embodiment of the present invention.
도 1 및 도 3의 (a)를 참조하면, 입력데이터는 총 31바이트 일 수 있으며, 본 실시예에서는 블록 단위가 16 바이트인 경우를 기준으로 설명하겠다.Referring to FIGS. 1 and 3 (a), the input data may be a total of 31 bytes, and the present embodiment will be described with reference to the case where the block unit is 16 bytes.
도 1 및 도 3의 (b)를 참조하면, 판단부(112)는 입력 데이터의 길이가 1개의 블록 크기인 16바이트의 배수인지를 판단할 수 있다. 본 실시예에 따르면, 판단부(112)는 2번째 블록(block)이 16바이트의 배수가 아니라는 것을 판단할 수 있다.Referring to FIG. 1 and FIG. 3 (b), the
도 1 및 도 3의 (c)를 참조하면, 패딩부(113)는 마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록(3번째 블록)을 더 생성할 수 있다. 패딩부(113)는 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다. 본 실시예에 따르면, 패딩부(113)는 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 16 바이트의 난수를 삽입하여 패딩을 할 수 있다.Referring to FIG. 1 and FIG. 3 (c), the
도 1 및 도 3의 (d)를 참조하면, 패딩부(113)는 마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록(3번째 블록)을 더 생성할 수 있다. 패딩부(113)는 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다. 본 실시예에 따르면, 패딩부(113)는 1바이트의 유효 데이터의 크기 값을 삽입하여 패딩할 수 있다. 본 실시예에 따르면, 유효 데이터의 크기 값은 -1이다. 이때, 패딩부(113)는 패딩부(113)는 마지막 블록(2번째 블록)의 유효 데이터의 크기 값을 새롭게 생성된 블록(3번째 블록)의 맨 마지막 열에 삽입할 수 있다. 이와 같이, 마지막 블록 중 유효 데이터의 크기가 n-1인 경우, 패딩부(113)는 n+1 바이트(17 바이트)의 열을 추가한 후 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입할 수 있다.Referring to FIG. 1 and FIG. 3 (d), the
암호화의 일 실시예에 따르면, 암호화부(116)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 도 3의 (d)의 패딩된 입력 데이터를 암호화할 수 있다. According to one embodiment of encryption, the
암호화의 또 다른 일 실시예에 따르면, 제 1 연산부(114)는 새롭게 생성된 블록(3번째 블록)에 존재하는 15바이트의 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다. 제 1 생성부(115)는 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다. 제 2 초기 벡터의 크기는 제 1 초기 벡터의 크기와 동일하다. 암호화부(116)는 제 1 초기 벡터를 이용하여 마지막 블록(3번째 블록)을 암호화하고, 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록(1번째 블록 및 2번째 블록)을 암호화할 수 있다.
According to another embodiment of encryption, the
복호화의 일 실시예에 따르면, 복호화부(124)는 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 암호화된 입력 데이터를 복호화할 수 있다.According to one embodiment of the decryption, the
복호화의 또 다른 일 실시예에 따르면, 복호화부(124)는 입력 데이터 중 마지막 블록(3번째 블록)을 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화할 수 있다. 제 2 연산부(122)는 마지막 블록(3번째 블록)에 대해 복호화된 데이터로부터 15바이트의 난수를 추출할 수 있다. 제 2 연산부(122)는 추출된 난수에 기초하여 해쉬(hash) 값을 연산할 수 있다. 제 2 생성부(123)는 제 2 연산부(122)에서 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성할 수 있다. 복호화부(124)는 제 2 생성부(123)에서 생성된 제 2 초기 벡터를 이용하여 마지막 블록을 제외한 나머지 블록(1번째 블록 및 2번째 블록)을 복호화할 수 있다.According to another embodiment of the decryption, the
추출부(125)는 복호화된 데이터로부터 유효 데이터를 추출할 수 있다. 예를 들면, 추출부(125)는 마지막 블록을 제외한 블록들로부터 유효 데이터를 추출하고, 마지막 블록의 유효 데이터의 크기 값에 기초하여 마지막 블록으로부터 유효 데이터를 추출할 수 있다.
The extracting
설명된 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.The embodiments described may be constructed by selectively combining all or a part of each embodiment so that various modifications can be made.
또한, 실시예는 그 설명을 위한 것이며, 그 제한을 위한 것이 아님을 주의하여야 한다. 또한, 본 발명의 기술분야의 통상의 전문가라면 본 발명의 기술사상의 범위에서 다양한 실시예가 가능함을 이해할 수 있을 것이다.
It should also be noted that the embodiments are for explanation purposes only, and not for the purpose of limitation. In addition, it will be understood by those of ordinary skill in the art that various embodiments are possible within the scope of the technical idea of the present invention.
100 : 암복호화 시스템
111 : 제 1 통신부
112 : 판단부
113 : 패딩부
114 : 제 1 연산부
115 : 제 1 생성부
116 : 암호화부
120 : 복호화 장치
121 : 제 2 통신부
122 : 제 2 연산부
123 : 제 2 생성부
124 : 복호화부
125 : 추출부100: encryption / decryption system
111: first communication section
112:
113: padding portion
114: first operation section
115: first generating unit
116:
120: Decryption device
121:
122: second operation section
123: second generating unit
124:
125:
Claims (13)
상기 입력 데이터의 길이가 n의 배수가 아니면, 마지막 블록 중 유효 데이터를 제외한 열에 난수 및 유효 데이터의 크기 값을 삽입하여 패딩(padding)하는 패딩부; 및
암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 상기 패딩된 입력 데이터를 암호화하는 암호화부를 포함하는, 블록 암호 방식에서 패딩을 수행하는 암호화 장치.
A determination unit for determining whether the length of the input data is a multiple of n, which is the size of one block;
A padding unit for inserting a random number and a size value of valid data into a column of the last block excluding valid data, if the length of the input data is not a multiple of n; And
And an encryption unit for encrypting the padded input data using an encryption key and a first initial vector.
상기 패딩부는,
마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록을 더 생성하고, 상기 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입하는, 블록 암호 방식에서 패딩을 수행하는 암호화 장치.
The method according to claim 1,
The padding unit,
If the size of the valid data in the last block is equal to or greater than n-1, one block is further generated, and a random number and a size value of valid data are added to the column excluding the valid data in the last block and the column of the newly generated block A cryptographic unit that performs padding in a block cipher system to insert.
상기 패딩부는,
상기 유효 데이터의 크기 값을 상기 마지막 블록의 맨 마지막 열에 삽입하는, 블록 암호 방식에서 패딩을 수행하는 암호화 장치.
The method according to claim 1,
The padding unit,
And inserting the size value of the valid data into the last column of the last block.
상기 난수에 기초하여 해쉬(hash) 값을 연산하는 제 1 연산부; 및
상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 1 생성부;를 더 포함하고,
상기 암호화부는,
상기 제 1 초기 벡터를 이용하여 상기 마지막 블록을 암호화하고, 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 암호화하는, 블록 암호 방식에서 패딩을 수행하는 암호화 장치.
The method according to claim 1,
A first calculation unit for calculating a hash value based on the random number; And
And a first generator for generating a second initial vector using the computed hash value,
The encryption unit,
And encrypts the last block using the first initial vector, and encrypts the remaining blocks excluding the last block using the second initial vector.
복호화된 데이터로부터 유효 데이터를 추출하는 추출부;를 포함하는, 블록 암호 방식에서 패딩을 수행하는 복호화 장치.
A decryption unit for decrypting input data including a random number and a size value of valid data using an encryption key and a first initial vector; And
And an extracting unit for extracting valid data from the decrypted data.
상기 복호화부는,
입력 데이터 중 마지막 블록을 상기 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화하는, 블록 암호 방식에서 패딩을 수행하는 복호화 장치.
6. The method of claim 5,
Wherein the decoding unit comprises:
And decrypts the last block of the input data using the encryption key and the first initial vector.
복호화된 데이터 유효 데이터의 크기 값에 기초하여 난수를 추출하고, 추출된 난수에 기초하여 해쉬(hash) 값을 연산하는 제 2 연산부; 및
상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 2 생성부;를 더 포함하고,
상기 복호화부는,
상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 복호화하는, 블록 암호 방식에서 패딩을 수행하는 복호화 장치.
The method according to claim 6,
A second operation unit for extracting a random number based on the size value of the decrypted data valid data and calculating a hash value based on the extracted random number; And
And a second generator for generating a second initial vector using the computed hash value,
Wherein the decoding unit comprises:
And decodes the remaining blocks except for the last block using the second initialization vector.
상기 암호화 키(key) 및 상기 제 1 초기 벡터(initial vector)를 이용하여, 난수 및 유효 데이터의 크기 값을 포함하는 입력 데이터를 복호화하는 복호화부와, 복호화된 데이터 중 유효 데이터의 크기 값에 기초하여, 복호화된 데이터로부터 유효 데이터를 추출하는 추출부를 구비하는 블록 암호 방식에서 패딩을 수행하는 복호화 장치를 포함하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.
A determination unit for determining whether the length of the input data is a multiple of n, which is one block size; and, if the length of the input data is not a multiple of n, And a cryptographic unit for encrypting the padded input data using an encryption key and a first initial vector, the encryption unit performing padding in a block cipher scheme; And
A decryption unit for decrypting the input data including the random number and the size of the valid data using the encryption key and the first initial vector, And an extraction unit for extracting valid data from the decrypted data, wherein the padding unit performs padding in the block cipher system.
상기 패딩부는,
마지막 블록 중 유효 데이터의 크기가 n-1보다 크거나 같은 경우, 1개의 블록을 더 생성하고, 상기 마지막 블록 중 유효 데이터를 제외한 열 및, 새롭게 생성된 블록의 열에 난수 및 유효 데이터의 크기 값을 삽입하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.
9. The method of claim 8,
The padding unit,
If the size of the valid data in the last block is equal to or greater than n-1, one block is further generated, and a random number and a size value of valid data are added to the column excluding the valid data in the last block and the column of the newly generated block An encryption / decryption system for performing padding in a block cipher system to be inserted.
상기 패딩부는,
상기 유효 데이터의 크기 값을 상기 마지막 블록의 맨 마지막 열에 삽입하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.
9. The method of claim 8,
The padding unit,
And inserting the size value of the valid data into the last column of the last block, the padding being performed in a block cipher system.
상기 암호화 장치는,
상기 난수에 기초하여 해쉬(hash) 값을 연산하는 제 1 연산부; 및
상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 1 생성부;를 더 포함하고,
상기 암호화부는,
상기 제 1 초기 벡터를 이용하여 상기 마지막 블록을 암호화하고, 상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 암호화하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.
9. The method of claim 8,
The encryption apparatus includes:
A first calculation unit for calculating a hash value based on the random number; And
And a first generator for generating a second initial vector using the computed hash value,
The encryption unit,
Encrypting the last block using the first initial vector, and encrypting the remaining blocks excluding the last block using the second initial vector.
상기 복호화부는,
입력 데이터 중 마지막 블록을 상기 암호화 키(key) 및 제 1 초기 벡터(initial vector)를 이용하여 복호화하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.
9. The method of claim 8,
Wherein the decoding unit comprises:
And decrypting the last block of the input data using the encryption key and the first initial vector, wherein the padding is performed in a block cipher system.
상기 복호화 장치는,
복호화된 데이터로부터 난수를 추출하고, 추출된 난수에 기초하여 해쉬(hash) 값을 연산하는 제 2 연산부; 및
상기 연산된 해쉬 값을 이용하여 제 2 초기 벡터(initial vector)를 생성하는 제 2 생성부;를 더 포함하고,
상기 복호화부는,
상기 제 2 초기 벡터를 이용하여 상기 마지막 블록을 제외한 나머지 블록을 복호화하는, 블록 암호 방식에서 패딩을 수행하는 암복호화 시스템.13. The method of claim 12,
The decoding apparatus includes:
A second operation unit for extracting a random number from the decrypted data and calculating a hash value based on the extracted random number; And
And a second generator for generating a second initial vector using the computed hash value,
Wherein the decoding unit comprises:
And decrypting the remaining blocks except for the last block using the second initial vector, wherein the padding is performed in a block cipher system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150006673A KR101663274B1 (en) | 2015-01-14 | 2015-01-14 | Encryption device, decryption device and system for performing padding in block cipher mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150006673A KR101663274B1 (en) | 2015-01-14 | 2015-01-14 | Encryption device, decryption device and system for performing padding in block cipher mode |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20160087561A true KR20160087561A (en) | 2016-07-22 |
KR101663274B1 KR101663274B1 (en) | 2016-10-07 |
Family
ID=56681208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150006673A KR101663274B1 (en) | 2015-01-14 | 2015-01-14 | Encryption device, decryption device and system for performing padding in block cipher mode |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101663274B1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190024064A (en) * | 2017-08-31 | 2019-03-08 | 동국대학교 산학협력단 | Code-based encryption apparatus and method capable of preventing replay attack |
KR20200009649A (en) * | 2018-07-19 | 2020-01-30 | 부산대학교 산학협력단 | Cryptographic Operation Processing Method And Server For Performing High-speed to Light-Weight Cipher Encryption on Server Environment |
CN112187732A (en) * | 2020-09-09 | 2021-01-05 | 北京幻想纵横网络技术有限公司 | Data encryption and loading method and device |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3584991A1 (en) * | 2018-06-18 | 2019-12-25 | Koninklijke Philips N.V. | Device for data encryption and integrity |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002023624A (en) * | 2000-07-07 | 2002-01-23 | Murata Mach Ltd | Block cipher communication method and device therefor, and recording medium with block cipher communication program recorded thereon |
JP2004158981A (en) * | 2002-11-05 | 2004-06-03 | Toshiba Corp | Communication equipment and communication method |
JP2011091494A (en) * | 2009-10-20 | 2011-05-06 | Nippon Hoso Kyokai <Nhk> | Data distribution device, data reception device, data distribution program and data reception program |
-
2015
- 2015-01-14 KR KR1020150006673A patent/KR101663274B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002023624A (en) * | 2000-07-07 | 2002-01-23 | Murata Mach Ltd | Block cipher communication method and device therefor, and recording medium with block cipher communication program recorded thereon |
JP2004158981A (en) * | 2002-11-05 | 2004-06-03 | Toshiba Corp | Communication equipment and communication method |
JP2011091494A (en) * | 2009-10-20 | 2011-05-06 | Nippon Hoso Kyokai <Nhk> | Data distribution device, data reception device, data distribution program and data reception program |
Non-Patent Citations (1)
Title |
---|
A. Menezes 외 2명, Handbook of Applied Cryptography, Chapter.9, CRC Press (1996.)* * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190024064A (en) * | 2017-08-31 | 2019-03-08 | 동국대학교 산학협력단 | Code-based encryption apparatus and method capable of preventing replay attack |
KR20200009649A (en) * | 2018-07-19 | 2020-01-30 | 부산대학교 산학협력단 | Cryptographic Operation Processing Method And Server For Performing High-speed to Light-Weight Cipher Encryption on Server Environment |
CN112187732A (en) * | 2020-09-09 | 2021-01-05 | 北京幻想纵横网络技术有限公司 | Data encryption and loading method and device |
Also Published As
Publication number | Publication date |
---|---|
KR101663274B1 (en) | 2016-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mahajan et al. | A study of encryption algorithms AES, DES and RSA for security | |
KR101516574B1 (en) | Variable length block cipher apparatus for providing the format preserving encryption, and the method thereof | |
KR101632658B1 (en) | Methods and devices for instruction level software encryption | |
JP6030103B2 (en) | Data protection apparatus and method | |
KR101847492B1 (en) | Apparatus and method for data encryption, apparatus and method for data decryption | |
JP5779434B2 (en) | Security device and security system | |
US10009170B2 (en) | Apparatus and method for providing Feistel-based variable length block cipher | |
KR101744748B1 (en) | Contents protection, encryption and decryption apparatus using white-box cryptography | |
CN105871550B (en) | A kind of system for realizing digital signal encryption transmission | |
KR101663274B1 (en) | Encryption device, decryption device and system for performing padding in block cipher mode | |
KR20160024965A (en) | Method and apparatus to encrypt plaintext data | |
KR20130093557A (en) | System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction | |
JP7362676B2 (en) | Devices for data encryption and integrity | |
EP2904731B1 (en) | Method and device for digital data blocks encryption and decryption | |
US7773753B2 (en) | Efficient remotely-keyed symmetric cryptography for digital rights management | |
JP2016075765A (en) | Authentication encryption device, authentication decryption device, and program therefor | |
Abbas et al. | An efficient implementation of PBKDF2 with RIPEMD-160 on multiple FPGAs | |
CN111314053B (en) | Data encryption and decryption method | |
CN114826558A (en) | Mass data rapid encryption method and system | |
JP4287397B2 (en) | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program | |
CN111314052B (en) | Data encryption and decryption method | |
JP2015022269A (en) | Encryption device, decryption device, encryption method, decryption method, and program | |
KR101566416B1 (en) | Method and device of data encription with increased security | |
Charru et al. | Improved Cryptography Algorithm to Enhanced Data Security | |
CN110581759A (en) | UOEC-HEX symmetric encryption algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
N231 | Notification of change of applicant | ||
E701 | Decision to grant or registration of patent right | ||
FPAY | Annual fee payment |
Payment date: 20190930 Year of fee payment: 4 |
|
R401 | Registration of restoration |