KR101991775B1 - Method for data encryption and decryption based on fpga - Google Patents

Method for data encryption and decryption based on fpga Download PDF

Info

Publication number
KR101991775B1
KR101991775B1 KR1020180163956A KR20180163956A KR101991775B1 KR 101991775 B1 KR101991775 B1 KR 101991775B1 KR 1020180163956 A KR1020180163956 A KR 1020180163956A KR 20180163956 A KR20180163956 A KR 20180163956A KR 101991775 B1 KR101991775 B1 KR 101991775B1
Authority
KR
South Korea
Prior art keywords
data
decryption
encryption
verification
key
Prior art date
Application number
KR1020180163956A
Other languages
Korean (ko)
Inventor
윤정환
Original Assignee
(주)엘에스시스텍
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)엘에스시스텍 filed Critical (주)엘에스시스텍
Priority to KR1020180163956A priority Critical patent/KR101991775B1/en
Application granted granted Critical
Publication of KR101991775B1 publication Critical patent/KR101991775B1/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/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
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/02Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits using specified components
    • H03K19/173Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits using specified components using elementary logic circuits as components
    • H03K19/177Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits using specified components using elementary logic circuits as components arranged in matrix form
    • 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/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention relates to a method for encryption and decryption based on FPGA. More particularly, the present invention relates to a technology for data encryption and decryption based on FPGA which provides confidentiality and integrity for data, by additionally generating encryption data encrypted using a one-time secret key and verification data corresponding to the encryption data and providing the generated encryption data and verification data to the outside as password information, and by determining the validity by comparing the verification data obtained by decrypting a received verification cipher text and decryption data obtained by decrypting the received encryption data when decrypting the password information.

Description

FPGA기반의 데이터 암복호화 방법{METHOD FOR DATA ENCRYPTION AND DECRYPTION BASED ON FPGA}METHOD FOR DATA ENCRYPTION AND DECRYPTION BASED ON FPGA

본 발명은 1회용 비밀키를 이용하여 암호화한 암호 데이터와, 암호 데이터에 대응되는 검증 데이터를 추가로 생성하여 암호 정보로서 외부로 제공하고, 암호 정보 복호화시에는 수신된 검증 암호문을 복호화하여 획득한 검증 데이터와, 수신된 암호 데이터를 복호화하여 획득한 복호 데이터를 비교하여 유효성 여부를 판단함으로써, 데이터에 대한 기밀성 및 무결성을 제공할 수 있도록 해 주는 FPGA기반의 데이터 암복호화하는 기술에 관한 것이다. The present invention further provides encryption data encrypted by using the one-time secret key and verification data corresponding to encrypted data, and provides the encryption data to the outside as encryption information, and decrypts the received verification ciphertext The present invention relates to a technology for FPGA-based data encryption and decryption that enables confidentiality and integrity of data to be verified by comparing validation data with decrypted data obtained by decrypting received encryption data to determine validity.

최근 방대한 데이터들을 처리하고 전송하는 과정에서 외부 공격자로부터 정보를 보호하는 처리는 매우 중요한 기술이슈가 되고 있으며, 데이터의 보호 기밀성 보장은 물론, 가용성을 높이기 위해 다수의 알고리즘이 개발되고 있다.In recent years, the process of protecting information from external attackers in the process of processing and transmitting vast amounts of data has become a very important technology issue, and a number of algorithms are being developed to increase the availability as well as to protect the confidentiality of data.

일반적으로 암호 기술의 기본 기능은 비밀성 기능('암호화 기술'이라고도 함)과 인증 기능('기본적인 암호 프로토콜 기술'이라고도 함)으로 나눌 수 있다.In general, the basic functions of cryptographic techniques can be divided into confidentiality functions (also called 'cryptographic techniques') and authentication functions (also called 'basic cryptographic protocol techniques').

비밀성 기능이란 정보통신망에서 전송되는 중요 데이터의 불법적인 노출을 방지하는 기능으로, 메시지를 제3자가 해독 불가능한 형태로 변형하거나 또는 암호화된 통신문을 해독 가능한 형태로 변환하기 위한 원리,수단, 방법 등을 취급하는 기술 또는 과학을 말한다.The confidentiality function is a function for preventing unauthorized exposure of important data transmitted from the information communication network. It is a function to convert a message into a form which can not be deciphered by a third party, or to convert an encrypted communication into a decipherable form Or technology that handles the

일반적으로, 암호화 방식은 키의 공개 여부에 따라 공개 키 방식과 비밀 키 방식으로 나누어진다. 공개 키 방식은 암호화 키와 복호화 키를 달리하는 대신 둘 중의 하나의 키를 공개하는 방식이다. 공개 키 방식은 키 관리 면에서는 효율적이나 암호화 및 복호화 속도가 느리다는 단점이 있다. 반면에, 비밀 키 방식은 암호화 키와 복호화 키를 동일하게 하는 대신에 이들을 공개하지 않는 방식이다. 비밀 키 방식은 키 관리 면에서는 다소 비효율적이나 암호화 및 복호화 속도가 빠르고 구현이 용이하다는 장점이 있다. 그리고 비밀 키 방식은 암호화의 기본 단위에 따라 블록 암호화 방식과 스트림 암호화 방식으로 분류한다. 스트림 암호화 방식(stream cipher method)은 비트 열로 입력되는 평문 데이터를 비트 단위로 암호화하는 방식이다.Generally, an encryption scheme is divided into a public key scheme and a secret key scheme depending on whether a key is disclosed or not. The public key method is a method of releasing one of the two keys instead of the encryption key and the decryption key. The public key scheme is efficient in terms of key management but has a disadvantage of slow encryption and decryption. On the other hand, the secret key scheme is a scheme that does not disclose the encryption key and the decryption key instead of making them identical. The secret key scheme is somewhat inefficient in terms of key management but has the advantages of fast encryption and decryption speed and easy implementation. The secret key scheme is classified into a block encryption scheme and a stream encryption scheme according to a basic unit of encryption. The stream cipher method is a method of encrypting plaintext data input as a bit stream in a bit unit.

현재 대부분의 응용에서 데이터 암호화를 위해서는 DES(Data Encryption Standard, 데이터 암호화 표준)와 같은 블록 암호를 사용하거나 RC4(Ron's Code 4)와 같은 스트림 암호를 사용한다. 이와 같은 대칭키 암호 기법을 이용하여 데이터를 암호화하기 위해서는 데이터를 주고 받는 두 당사자들이 항상 비밀키를 안전하게 공유하고 있어야 한다. 비밀키를 공유한 두 당사자를 제외한 다른 사용자들은 비밀키를 알지 못하기 때문에 암호화된 데이터의 내용을 알 수가 없다. 대칭키 암호 기법은 처리 속도가 매우 빠르기 때문에 현재 대부분의 정보 보호 응용에서는 데이터를 암호화하기 위해 대칭키 암호 기법을 사용한다. 하지만, 대칭키 암호 기법을 사용하는 경우에는 항상 키를 안전하게 공유하고 관리해야 하는 문제가 발생한다. 또한, 관리해야 하는 키의 개수가 통신하려는 당사자의 수의 제곱만큼 증가하게 된다.Currently, most applications use block ciphers such as DES (Data Encryption Standard) or stream ciphers such as RC4 (Ron's Code 4) for data encryption. In order to encrypt data using the symmetric key cryptosystem, both parties exchanging data must always share the secret key securely. Other than the two parties sharing the secret key, the users do not know the secret key, so they can not know the contents of the encrypted data. Since symmetric key cryptography is very fast, most symmetric key cryptography schemes are used to encrypt data in most current information protection applications. However, when symmetric key cryptography is used, there is always a problem that the key must be securely shared and managed. Also, the number of keys to be managed increases by the square of the number of parties to communicate with.

RSA와 같은 비대칭키 암호 기법을 사용하여 데이터를 암호화하는 경우에는 위의 대칭키 암호 기법에서의 키 공유와 키 개수의 증가 문제가 해결된다. 사용자는 항상 두 개의 키, 즉, 공개키(Public Key)와 비밀키(Private Key)의 쌍을 가진다. 공개키는 공개 디렉토리에 공개하고, 비밀키는 다른 사용자들이 알지 못하게 안전하게 유지한다. 사용자 A가 데이터를 암호화하여 사용자 B에게 전달하려고 하는 경우, 사용자 A는 데이터를 사용자 B의 공개키를 사용하여 암호화하여 전송한다. 사용자 B가 암호화된 데이터를 수신하면, 자신의 비밀키를 사용하여 데이터를 복호화하여 볼 수 있다. 다른 사용자들은 사용자의 A의 비밀키를 알지 못하기 때문에 암호화된 데이터의 내용을 알 수가 없다. 하지만, 비대칭키 암호 기법은 대칭키 암호 기법에 비해 처리 속도가 1000 배이상 느리기 때문에 대량의 데이터를 암호화하는 응용에는 거의 사용되지 않는다.In case of encrypting data using asymmetric key cryptosystem such as RSA, the problem of increase of key sharing and key number in the above symmetric key cryptosystem is solved. The user always has two keys, a public key and a private key pair. The public key is made public in the public directory, and the private key is kept secure so that no one else knows. When the user A encrypts the data and transmits it to the user B, the user A encrypts the data using the public key of the user B and transmits the encrypted data. When the user B receives the encrypted data, the user can decrypt and view the data using his / her secret key. Other users can not know the contents of the encrypted data because they do not know the secret key of the user. However, since the asymmetric key cryptography scheme is 1000 times slower than the symmetric key cryptography scheme, it is rarely used in applications that encrypt large amounts of data.

이에, 보다 신속하면서도 안전한 데이터 보호를 위해 암복호화 처리 속도를 유지하면서도 데이터에 대한 기밀성 및 무결성을 유지할 수 있도록 해 주는 암복호화 알고리즘이 요구된다.Therefore, in order to protect data more rapidly and securely, an encryption / decryption algorithm is required to maintain confidentiality and integrity of data while maintaining encryption / decryption processing speed.

1. 한국공개특허 제10-2013-0067849호 (명칭 : 비트스트림 보호를 위한 FPGA 장치 및 그 방법)1. Korean Patent Publication No. 10-2013-0067849 (titled: FPGA device for bitstream protection and its method)

이에, 본 발명은 상기한 사정을 감안하여 창출된 것으로, 암복호화 장치를 FPGA 내에 구현하여 기본적으로 키 정보가 외부로 유출되는 것을 방지하되, 고유한 1회용 비밀키를 생성하여 데이터를 암호화하여 전송함과 더불어, 암호화된 데이터를 다양한 종류의 키정보를 이용하여 다중적으로 암호화한 검증 암호문을 추가로 생성하여 전송하며, 수신된 검증 암호문을 복호화하여 획득한 검증 데이터와, 수신된 암호 데이터를 복조하여 획득한 복호 데이터를 비교하여 유효성 여부를 판단함으로써, 데이터의 기밀성 및 무결성을 제공할 수 있도록 하는 FPGA기반의 데이터 암복호화 방법을 제공함에 그 기술적 목적이 있다. SUMMARY OF THE INVENTION Accordingly, the present invention has been made in view of the above circumstances, and it is an object of the present invention to implement an encryption / decryption apparatus in an FPGA to basically prevent leakage of key information to the outside, In addition, a verification ciphertext in which encrypted data is multiplexed by using various types of key information is additionally generated and transmitted. The verification data obtained by decoding the received verification ciphertext and the encrypted data received are demodulated The present invention provides a data encryption / decryption method based on an FPGA, which is capable of providing confidentiality and integrity of data by comparing decrypted data obtained by decrypting the decrypted data and determining validity.

상기 목적을 달성하기 위한 본 발명의 일측면에 따르면, FPGA 내에 암호화 대상 데이터를 암호화하여 외부로 전송하고, 외부로부터 수신된 암호 데이터에 대해서는 복호화하는 암복호화장치가 구현되는 FPGA기반의 데이터 암복호화 방법에 있어서, 난수 발생 모듈로부터 인가되는 난수를 이용하여 1회용 비밀키를 생성하는 1회용 비밀키 생성 단계와, 암호화 대상 데이터를 1회용 비밀키로 암호화하여 암호 데이터 생성한 후 이를 외부로 전송하는 단계, 암호화 대상 데이터를 1회용 비밀키로 암호화하여 생성된 암호 데이터를 제1 암호문으로 인식하여 제1 암호문에 대한 제1 해쉬값을 산출하고, 제1 해쉬값과 공유키를 키유도함수에 적용하여 암호화키를 생성하는 단계, 암호화키로 1회용 비밀키와 제1 암호문 및 제1 해쉬값을 암호화함으로써 제2 암호문을 생성하는 단계, 제2 암호문에 대한 제2 해쉬값을 산출하고 제2 암호문과 제1 해쉬값 및 제2 해쉬값을 개인키를 이용하여 암호화함으로써 검증 암호문을 생성하고, 이 검증 암호문을 암호 데이터와 쌍을 형성하도록 외부로 전송하는 단계를 포함하는 데이터 암호화 과정과, 데이터 복호화부에서 쌍을 이루는 암호 데이터와 검증 암호문이 수신되면, 암호화를 수행한 장치의 공유키를 이용하여 검증 암호문을 복호화함으로써 제2 복호 암호문과 제1 복호 해쉬값 및 제2 복호 해쉬값을 획득하는 단계와, 암호화를 수행한 장치의 공유키와 제1 복호 해쉬값을 기 설정된 키유도함수에 적용하여 복호화키를 생성하는 단계, 복호화키를 이용하여 제2 복호 암호문을 복호화함으로써 1회용 복호 비밀키와 제1 복호 암호문을 획득하는 단계, 1회용 복호 비밀키를 이용하여 암호화를 수행한 장치로부터 수신된 암호 데이터를 복호화함으로써 복호 데이터를 획득함과 더불어, 1회용 복호 비밀키를 이용하여 제1 복호 암호문을 복호화하여 검증 데이터를 획득하고, 복호 데이터와 검증 데이터가 동일한 경우 해당 복호 데이터를 유효한 복호 데이터로 결정하는 단계를 포함하는 데이터 복호화 과정을 포함하여 구성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법이 제공된다.According to an aspect of the present invention, there is provided an FPGA-based data encryption / decryption method in which an encryption / decryption device for encrypting data to be encrypted in an FPGA and transmitting the encrypted data to the outside and decrypting encrypted data received from the outside is implemented Generating a one-time secret key by using a random number applied from a random number generating module, generating a one-time secret key by encrypting the data to be encrypted with a one-time secret key to generate encrypted data, A first hash value for the first ciphertext is calculated by recognizing the cipher data to be encrypted with the one-time secret key and the generated cipher data as the first cipher text, and the first hash value and the shared key are applied to the key derivation function, Encrypting the one-time secret key, the first cipher text and the first hash value with the encryption key, thereby generating the second cipher text A second hash value for the second cipher text is generated, a second cipher text, a first hash value and a second hash value are encrypted using a private key to generate a verification cipher text, And transmitting the ciphertext data and the verification ciphertext to the data decryption unit. The data decryption unit decrypts the deciphered ciphertext using the shared key of the device that has performed the encryption, 2 decryption hash value, a second decryption hash value and a second decryption hash value, applying a shared key and a first decryption hash value of the device that has performed the encryption to the predetermined key derivation function to generate a decryption key Acquiring a first decryption secret key and a first decryption ciphertext by decrypting the second decryption ciphertext using the decryption key, Decrypts the encrypted data received from the device that has performed encryption, obtains the decrypted data, decrypts the first decrypted ciphertext using the one-time decryption secret key to obtain the verification data, and if the decrypted data and the verification data are the same And deciding the decoded data as effective decoded data. The FPGA-based encryption / decryption method is provided.

또한, 상기 복호화 과정에서 제2 복호 암호문에 대한 제2 검증 해쉬값을 산출하여 제2 복호 해쉬값과 동일한지를 판단하여 1차 검증을 수행하는 단계와, 제1 복호 암호문에 대한 제1 검증 해쉬값을 산출하여 제1 복호 해쉬값과 동일한지를 판단함으로써 2차 검증을 수행하는 단계를 추가로 포함하여 구성되고, 상기 1차 검증 결과 유효상태로 판단되는 경우, 복호화키를 생성하는 단계를 수행하며, 상기 2차 검증 결과 유효상태로 판단되는 경우, 1회용 복호 비밀키를 이용하여 복호 데이터와 검증 데이터를 획득하는 과정을 수행하는 것을 특징으로 하는 FPGA 기반의 암복호화 방법이 제공된다.The method of claim 1, further comprising the steps of: calculating a second verification hash value for a second deciphered ciphertext in the decryption process and determining whether the second verification hash value is equal to a second decryption hash value; And performing a secondary verification by determining whether the hash value is equal to a first decryption hash value, and when the primary verification result is determined to be valid, performing a step of generating a decryption key, And decrypting data and verification data using the one-time decryption secret key when it is determined that the second verification result is valid.

또한, 상기 암호화 과정에서 1회용 비밀키는 난수 발생모듈에서 발생된 난수와 해당 FPGA에 할당된 고유번호를 조합하여 생성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법이 제공된다.Also, in the encryption process, the one-time secret key is generated by combining a random number generated in the random number generation module and a unique number assigned to the corresponding FPGA, thereby providing an FPGA-based encryption / decryption method.

또한, 상기 암호화 과정에서 제1 암호문은 기 설정된 단위로 암호화 대상 데이터를 분할하고, 분할 단위의 암호화 대상 데이터를 1회용 비밀키를 이용하여 각각 암호화한 후, 암호화된 분할 단위의 암호화 대상 데이터를 조합하여 생성되고, 상기 복호화 과정에서 검증 데이터는 기 설정된 단위로 제1 복호 암호문을 분할하고, 분할 단위의 검증 데이터를 1회용 복호 비밀키를 이용하여 각각 복호화한 후, 복호화된 분할 단위의 검증 데이터를 조합하여 생성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법이 제공된다.In addition, in the encryption process, the first ciphertext divides the encryption target data in a predetermined unit, encrypts the encryption target data in units of division using the one-time secret key, and then encrypts the encrypted target data In the decryption process, the verification data is divided into a first decryption ciphertext in a predetermined unit, each decryption unit decrypts the verification data using the one-time decryption secret key, and then decrypts the decrypted verification data in the decryption unit And an FPGA-based encryption / decryption method is provided.

본 발명에 의하면, 암복호화 장치를 FPGA 내에 구현하여 기본적으로 키 정보가 외부로 유출되는 것을 방지할 수 있다.According to the present invention, the encryption / decryption apparatus can be implemented in the FPGA to basically prevent the key information from being leaked to the outside.

또한, 본 발명에 의하면, 고유한 1회용 비밀키를 이용하여 암호화한 암호 데이터와, 암호 데이터에 대응되는 검증 암호문은 추가로 생성하여 암호 정보로서 외부로 제공하고, 암호 정보 복호화시 수신된 검증 암호문을 복호화하여 획득한 검증 데이터와, 수신된 암호 데이터를 복호하여 획득한 복호 데이터를 비교하여 유효성 여부를 판단함으로써, 보다 향상된 데이터의 기밀성 및 무결성을 제공할 수 있다.According to the present invention, the cryptographic data encrypted using the unique one-time secret key and the verification ciphertext corresponding to the cryptographic data are additionally generated and provided to the outside as the cryptographic information, and the verification ciphertext And comparing the decrypted data obtained by decrypting the received decrypted data with the decrypted data obtained by decrypting the decrypted decrypted data to judge whether the decrypted data is valid or not, thereby providing more improved data confidentiality and integrity.

또한, 본 발명에 의하면, 암호 데이터에 대응되는 검증 암호문은 암호 데이터에 대해 서로 다른 다수의 키정보를 이용하여 다중 암호화처리를 통해 생성함으로써, 보다 안전하게 데이터를 보호하는 것이 가능하다. Further, according to the present invention, the verification ciphertext corresponding to the cipher data can be protected more securely by generating multiple cipher processes using a plurality of different pieces of key information for the cipher data.

도1은 본 발명이 적용되는 FPGA기반의 데이터 암복호화 장치의 개략적인 구성을 나타낸 도면.
도2는 도1에 도시된 암호화 처리모듈(240)을 기능적으로 분리하여 나타낸 블록구성도.
도3은 도1에 도시된 복호화 처리모듈(310)을 기능적으로 분리하여 나타낸 블록 구성도.
도4는 본 발명에 따른 FPGA기반의 데이터 암호화 방법을 설명하기 위한 플로우챠트.
도5는 본 발명에 따른 FPGA기반의 데이터 복호화 방법을 설명하기 위한 플로우챠트.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of an FPGA-based data encryption / decryption apparatus to which the present invention is applied.
FIG. 2 is a block diagram showing the encryption processing module 240 shown in FIG. 1 functionally separated. FIG.
FIG. 3 is a block diagram showing the decryption processing module 310 shown in FIG. 1 functionally separated. FIG.
4 is a flowchart illustrating an FPGA-based data encryption method according to the present invention.
FIG. 5 is a flowchart illustrating an FPGA-based data decoding method according to the present invention. FIG.

본 발명에 기재된 실시예 및 도면에 도시된 구성은 본 발명의 바람직한 실시예에 불과할 뿐이고, 본 발명의 기술적 사상을 모두 표현하는 것은 아니므로, 본 발명의 권리범위는 본문에 설명된 실시예 및 도면에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The scope of the present invention is not limited to the embodiments and drawings described in the present specification, and the scope of the present invention is not limited to these embodiments. Should not be construed as limited by That is, the embodiments are to be construed as being variously embodied and having various forms, so that the scope of the present invention should be understood to include equivalents capable of realizing technical ideas. Also, the purpose or effect of the present invention should not be construed as limiting the scope of the present invention, since it does not mean that a specific embodiment should include all or only such effect.

여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Commonly used predefined terms should be interpreted to be consistent with the meanings in the context of the relevant art and can not be construed as having ideal or overly formal meanings which are not expressly defined in the present invention.

도1은 본 발명이 적용되는 FPGA기반의 데이터 암복호화 장치의 개략적인 구성을 나타낸 도면이다.FIG. 1 is a diagram showing a schematic configuration of an FPGA-based data encryption / decryption apparatus to which the present invention is applied.

도1을 참조하면, 본 발명이 적용되는 FPGA기반의 데이터 암복호화 장치는 데이터 입출력부(100)와 데이터 암호화부(200), 데이터 복호화부(300) 및, 데이터 저장부(400)를 포함한다. 여기서, 이러한 장치는 FPGA 내에 배치되고, 데이터 암호화부(200)와 데이터 복호화부(300) 및 데이터 저장부(400)는 FPGA 내에서만 접근이 가능하다.Referring to FIG. 1, an FPGA-based data encryption / decryption apparatus to which the present invention is applied includes a data input / output unit 100, a data encryption unit 200, a data decoding unit 300, and a data storage unit 400 . Here, such an apparatus is disposed in the FPGA, and the data encryption unit 200, the data decoding unit 300, and the data storage unit 400 are accessible only in the FPGA.

데이터 입출력부(100)는 외부로부터 수신 데이터를 확인하여 암호화 대상 데이터는 데이터 암호화부(200)로 전송하고, 복호화 대상 데이터는 데이터 복호화부(300)로 전송함과 더불어, 데이터 암호화부(200) 및 데이터 복호화부(300)를 통해 생성된 암호 정보 및 복호 데이터를 외부로 전송하는 데이터 경로처리를 수행한다. The data input and output unit 100 checks the received data from the outside and transmits the data to be encrypted to the data encryption unit 200. The data to be decrypted is transmitted to the data decryption unit 300, And data path processing for transferring the encryption information and decryption data generated through the data decryption unit 300 to the outside.

상기 암호 정보는 데이터 암호화부(200)에 의해 생성된 암호 데이터와 검증 암호문으로, 데이터 입출력부(100)는 이들을 쌍으로 형성하여 외부 단말로 전송한다. 예컨대, 암호 데이터와 검증 암호문에 페어 형성을 위한 정보를 각각 추가하여 외부 단말로 전송할 수 있다.The encryption information is encrypted data generated by the data encryption unit 200 and a verification cipher text, and the data input / output unit 100 forms them in pairs and transmits them to the external terminal. For example, information for forming a pair can be added to the encrypted data and the verification ciphertext, respectively, and then transmitted to the external terminal.

이때, 데이터 입출력부(100)는 외부의 다른 FPGA기반의 데이터 암복호화 장치를 구비한 단말 또는 해당 FPGA기반의 데이터 암복호화 장치가 구비되는 단말의 다른 영역과의 데이터 경로처리를 수행할 수 있으며, 본 실시예에서는 외부의 다른 FPGA기반의 데이터 암복호화 장치를 구비한 단말에 대한 데이터 경로처리에 대해 설명한다. 이에 따라 데이터 입출력부(100)는 복호 데이터 수신시 해당 복호 데이터에 포함된 암호 데이터에 대한 암호화 처리를 수행한 상대 단말의 공유키 즉, 상대 공유키를 수집한다. At this time, the data input / output unit 100 can perform a data path process with a terminal having another external FPGA-based data encryption / decryption device or another area of a terminal equipped with the FPGA-based data encryption / decryption device, In this embodiment, data path processing for a terminal having another external FPGA-based data encryption / decryption device will be described. Accordingly, the data input / output unit 100 collects the shared key of the counterpart terminal, that is, the counterpart shared key, which has performed the encryption processing on the encrypted data included in the decrypted data when receiving the decrypted data.

데이터 암호화부(200)는 암호화 대상 데이터를 고유로 생성된 1회용 비밀키를 이용하여 암호화한 암호 데이터와, 검증 암호문을 생성한다. 검증 암호문은 암호 데이터 및 검증용 정보를 암호화하여 생성되고, 검증용 정보는 암호문에 대한 해쉬값 및 적어도 둘 이상의 키정보를 포함한다. 이때, 데이터 암호화부(200)는 ISO 표준인 시드(SEED)와 함께 사용될 국가 표준 128비트 블록 암호화 알고리즘인 ARIA(학회(Academy), 연구소(Research Institute), 정부기관(Agency)의 첫 머리글을 딴 명칭) 등을 포함하여 다양한 암호화 알고리즘을 이용하여 암호화 처리를 수행할 수 있다. The data encryption unit 200 generates cryptographic data in which the encryption target data is encrypted using the generated one-time secret key and a verification ciphertext. The verification ciphertext is generated by encrypting cipher data and verification information, and the verification information includes a hash value for ciphertext and at least two key information. At this time, the data encryption unit 200 encrypts and decrypts the encrypted data using the ARIA (Academy, Research Institute, Name), and the like, by using various encryption algorithms.

데이터 암호화부(200)는 난수 발생모듈(210)과, 1회용 비밀키 생성모듈(220), 데이터 분할모듈(230) 및, 암호화 처리모듈(240)을 포함한다.The data encryption unit 200 includes a random number generation module 210, a one-time secret key generation module 220, a data division module 230, and an encryption processing module 240.

난수 발생모듈(210)은 암호화용 키 즉, 난수를 발생한다. The random number generation module 210 generates a key for encryption, that is, a random number.

1회용 비밀키 생성모듈(220)은 난수 발생모듈(210)에서 발생된 난수와 해당 FPGA 고유번호를 이용하여 1회용 비밀키를 생성하고, 이를 암호화 처리모듈(240)로 전송함과 더불어, 데이터 메모리(400)에 저장한다. 여기서, 1회용 비밀키 생성 알고리즘은 난수를 이용한 공지의 각종 키 생성 알고리즘이 이용될 수 있다. The one-time secret key generation module 220 generates a one-time secret key using the random number generated by the random number generation module 210 and the corresponding FPGA unique number, transmits the generated one-time secret key to the encryption processing module 240, And stores it in the memory 400. Here, the disposable secret key generation algorithm may be a known various key generation algorithm using random numbers.

데이터 분할모듈(230)은 암호화 대상 데이터를 기 설정된 단위, 예컨대 일정 크기의 비트스트림 단위로 분할하여 암호화 처리모듈(240)로 전송한다.The data division module 230 divides the data to be encrypted into a predetermined unit, for example, a bitstream unit of a predetermined size, and transmits the divided data to the encryption processing module 240.

암호화 처리모듈(240)은 데이터 입출력부(100)로부터 인가되는 암호대상 데이터를 1회용 비밀키를 이용하여 암호화함으로써, 암호 데이터를 생성하고 이를 데이터 입출력부(100)로 전송한다. 또한, 암호화 처리모듈(240)은 데이터 분할모듈(230)로부터 수신된 비트스트림 단위의 암호대상 데이터를 1회용 비밀키로 암호화하여 암호문을 생성하고, 암호문에 대응되는 암호화키를 생성하며, 암호문에 대한 해쉬값 및 키정보들을 이용하여 다중 암호화함으로써 검증 암호문을 생성한 후 이를 데이터 입출력부(100)로 전송한다. The encryption processing module 240 encrypts the encryption target data supplied from the data input / output unit 100 using the one-time secret key to generate encrypted data and transmits the encrypted data to the data input / output unit 100. In addition, the encryption processing module 240 generates ciphertext by encrypting the data to be encrypted in bitstream units received from the data segmentation module 230 with a one-time secret key, generates an encryption key corresponding to the ciphertext, The hash value, and the key information to generate a verification cipher text, and transmits the verification cipher text to the data input / output unit 100. [

즉, 암호화 처리모듈(240)은 암호화 요구되는 암호 대상 데이터에 대해 암호 데이터와 이에 대응되는 검증암호문을 생성하여 데이터 입출력부(110)로 전송함과 더불어 데이터 메모리(400)에 저장한다.That is, the encryption processing module 240 generates cipher data and a cipher verification ciphertext corresponding to the cipher object data to be encrypted, transmits the cipher data to the data input / output unit 110, and stores the cipher data in the data memory 400.

데이터 복호화부(300)는 암호 데이터와 검증 암호문으로 이루어지는 복호 대상 대상 데이터가 수신되면, 검증 암호문을 복호화하여 생성된 검증 데이터와 암호 데이터를 복호화하여 생성된 복호 데이터를 비교함으로써, 복호 데이터에 대한 유효성을 판단하도록 구성된다.The data decryption unit 300 compares the verification data generated by decoding the verification ciphertext with the decryption data generated by decrypting the encrypted data when receiving the decryption target data composed of the encrypted data and the verification ciphertext, .

데이터 복호화부(300)는 암호 정보가 변조되지 않은 것으로 판단된 유효한 복호 데이터를 데이터 입출력부(100)를 통해 외부로 전송하도록 한다.The data decoding unit 300 allows the decoded data, which is determined not to be modulated, to be transmitted through the data input / output unit 100 to the outside.

이러한 데이터 복호화부(300)는 복호화 처리모듈(310)과 검증모듈(320)을 포함하여 구성된다. 복호화 처리모듈(310)과 검증모듈(320)은 상호 연동하여 동작되며, 복호화 처리모듈(310)에서 수행되는 각 복조화 결과를 검증모듈(320)로 전송하여 검증모듈(320)에서 변조된 데이터로 확인되면 해당 복호 대상 데이터에 대한 복호화처리를 종료한다. 이때, 데이터 복호화부(300)는 미국의 연방 표준 알고리즘인 AES를 포함하여 각종 복호화 알고리즘을 적용하여 복호화처리를 수행할 수 있다. The data decoding unit 300 includes a decoding processing module 310 and a verification module 320. The decryption processing module 310 and the verification module 320 operate in cooperation with each other and transmit the respective demodulation results performed by the decryption processing module 310 to the verification module 320, The decoding process for the decoded data ends. At this time, the data decoding unit 300 may perform decryption processing by applying various decryption algorithms including AES, which is a federal standard algorithm of the US.

복호화 처리모듈(310)은 데이터 입출력부(100)로부터 복조대상 데이터 즉, 암호 데이터와 검증 암호문이 수신되면, 검증 암호문을 복호화하여 1회용 복호 비밀키를 획득하고, 1회용 복호 비밀키를 이용하여 검증 암호문에서 획득한 암호 데이터를 복호화함으로써 검증 데이터를 생성함과 더불어, 1회용 복호 비밀키를 이용하여 데이터 입출력부(100)로부터 수신된 암호 데이터를 복호화하여 복호 데이터를 생성한다.The decryption processing module 310 receives the demodulation target data, that is, the encryption data and the verification ciphertext from the data input / output unit 100, decrypts the verification ciphertext to obtain the one-time decryption secret key, Generates verification data by decrypting the encrypted data obtained in the verification ciphertext, and decrypts encrypted data received from the data input / output unit 100 using the one-time decryption secret key to generate decryption data.

검증모듈(320)은 검증 암호문에 대응되는 검증 해쉬값을 산출하고, 복호처리를 통해 획득한 복호 해쉬값과 검증 해쉬값의 일치여부를 근거로 복호 단계별 검증처리를 수행함과 더불어, 최종 복호화단계에서 획득한 복호 데이터와 검증 데이터를 비교하여 복호 데이터에 대한 유효성 여부를 판단한다. 그리고, 검증 데이터와 복호 데이터가 일치하는 경우 변조가 안된 정상 복호 데이터로 판단하여 해당 복호 데이터를 데이터 입출력부(100)로 전송한다.The verification module 320 calculates the verification hash value corresponding to the verification ciphertext, performs the verification process for each decoding step based on whether the decoding hash value obtained through the decoding process matches the verification hash value, And compares the obtained decrypted data with the verification data to judge whether the decryption data is valid or not. If the verification data and the decoded data match, it is determined that the decoded data is unmodulated, and the corresponding decoded data is transmitted to the data input / output unit 100.

데이터 메모리(400)는 암복호화를 수행하기 위한 각종 키정보를 저장하는 키정보 저장부(410)와, 암복호화시 생성되는 암호문과 복호문을 저장하는 암호문 저장부(420)를 포함하여 구성된다. The data memory 400 includes a key information storage unit 410 for storing various kinds of key information for performing encryption and decryption, and a ciphertext storage unit 420 for storing ciphertexts and decryption keys generated during encryption and decryption .

키정보 저장부(410)에는 해당 단말에 할당된 공유키와 공유키에 대응되는 개인키, 1회용 비밀키를 포함하는 키정보가 저장된다. 이때, 키정보 저장부(410)는 상기 데이터 암호화부(200)와 데이터 복호화부(300)만 접근 가능하도록 설정될 수 있다. 여기서, 상대 공유키는 데이터 입력부(100)를 통해 상대 단말로부터 수집될 수 있다.The key information storage 410 stores key information including a shared key assigned to the corresponding terminal, a private key corresponding to the shared key, and a one-time secret key. At this time, the key information storage unit 410 can be set to be accessible only to the data encryption unit 200 and the data decryption unit 300. Here, the relative shared key may be collected from the counterpart terminal through the data input unit 100. [

이어, 도2를 참조하여 암호화 처리모듈(240)에 대해 보다 상세히 설명한다. Next, the encryption processing module 240 will be described in more detail with reference to FIG.

도2를 참조하면, 암호화 처리모듈(240)은 제1 암호화블럭(241) 내지 제3 암호화블럭(243)을 포함하여 구성된다. Referring to FIG. 2, the encryption processing module 240 includes a first encryption block 241 to a third encryption block 243.

제1 암호화블럭(241)은 암호 대상 데이터와 1회용 비밀키가 수신되면, 1회용 비밀키를 근거로 암호 대상 데이터를 암호화함으로써, 외부로 전송할 암호 데이터를 생성하고, 암호 데이터를 데이터 입출력부(100)로 전송한다.When the data to be encrypted and the one-time secret key are received, the first encryption block 241 encrypts the data to be encrypted on the basis of the one-time secret key to generate encryption data to be transmitted to the outside, and transmits the encryption data to the data input / 100).

또한, 제1 암호화블럭(241)은 데이터 분할모듈(230)로부터 수신된 비트스트림 단위의 암호대상 데이터를 1회용 비밀키를 이용하여 암호화함으로써 제1 암호문(CD1)을 생성하고, 이 제1 암호문(CD1)에 대한 제1 해쉬값(H1)을 산출하며, 공유키와 제1 해쉬값(H1)을 기 설정된 암복화키 생성함수에 적용하여 암호화키를 생성한다. 제1 암호화블럭(241)은 제1 암호문(CD1)과 제1 해쉬값(H1) 및 암호화키를 제2 암호화블럭(242)으로 전송한다. Also, the first encryption block 241 generates the first cipher text CD1 by encrypting the encryption target data in bitstream units received from the data division module 230 using the one-time secret key, The first hash value H1 for the first encryption key CD1 is generated and the encryption key is generated by applying the shared key and the first hash value H1 to the predetermined encryption key generating function. The first encryption block 241 transmits the first cipher text CD1, the first hash value H1, and the encryption key to the second encryption block 242.

여기서, 암복호화키 생성함수는 각 단말(장치)간 보유하고 있으며, 동일한 입력에 대해 동일한 출력값을 만들어 내는 키유도함수로서, 본 실시예에서 암호화키에 대응되는 복호화키를 생성한다. Here, the encryption / decryption key generation function is a key derivation function which holds between the terminals (apparatuses) and produces the same output value for the same input, and generates a decryption key corresponding to the encryption key in this embodiment.

제2 암호화블럭(242)은 암호화키를 이용하여 1회용 비밀키와 제1 암호문(CD1) 및 제1 해쉬값(H1)을 암호화함으로써 제2 암호문(CD2)을 생성하고, 제2 암호문(CD2)에 대한 제2 해쉬값(H2)을 산출한다. 제2 암호화블럭(242)은 제2 암호문(CD2)과 제1 해쉬값(H1), 제2 해쉬값(H2)을 제3 암호화블럭(243)으로 전송한다.The second encryption block 242 generates the second cipher text CD2 by encrypting the one-time secret key, the first cipher text CD1 and the first hash value H1 using the encryption key, and the second cipher text CD2 The second hash value H2 is calculated. The second encryption block 242 transmits the second cipher text CD2, the first hash value H1 and the second hash value H2 to the third encryption block 243.

제3 암호화블럭(243)은 개인키를 이용하여 제2 암호문(CD2)과 제1 해쉬값(H1) 및 제2 해쉬값(H2)을 암호화함으로써 검증을 위한 제3 암호문(CD3)을 생성한다. 제3 암호화블럭(243)은 제3 암호문(CD3, 검증 암호문)을 데이터 입출력부(100)로 전송함과 더불어, 데이터 메모리(400)에 저장한다. The third encryption block 243 generates a third cipher text CD3 for verification by encrypting the second cipher text CD2 and the first hash value H1 and the second hash value H2 using the private key . The third encryption block 243 transmits the third cipher text (CD3, verification cipher text) to the data input / output unit 100 and stores it in the data memory 400. [

이어, 도3을 참조하여 복호화 처리모듈(310)에 대해 보다 상세히 설명한다. Next, the decryption processing module 310 will be described in more detail with reference to FIG.

복호화 처리모듈(310)은 도3에 도시된 바와 같이 제1 내지 제3 복호화 블럭(311~313)을 포함하여 구성된다.The decryption processing module 310 includes first through third decryption blocks 311 through 313 as shown in FIG.

제1 복호화블럭(311)은 암호 데이터를 전송한 장치(상대 장치)의 공유키 즉, 상대 공유키를 이용하여 검증 암호문 즉, 제3 암호문을 복호화함으로써, 제2 복호 암호문(CD2')과 제2 복호 해쉬값(H2') 및 제1 복호 해쉬값(H1')을 획득한다. 제1 복호화 블럭(311)은 제2 복호 암호문(CD2')과 제2 복호 해쉬값(H2')을 검증 모듈(320)로 전송하여 1차 검증을 수행하도록 요청한다. The first decryption block 311 decrypts the verification ciphertext, that is, the third cipher text, using the shared key of the device (the counterpart device) that has transmitted the cipher data, that is, the relative shared key, 2 decryption hash value H2 'and the first decryption hash value H1'. The first decryption block 311 requests the verification module 320 to perform the first verification by transmitting the second decryption cipher text CD2 'and the second decryption hash value H2'.

이때, 검증 모듈(320)은 제2 복호 암호문(CD2')에 대한 제2 검증 해쉬값(H2'')과 제2 복호 해쉬값(H2')의 일치 여부를 근거로 1차 검증을 수행한다. At this time, the verification module 320 performs the primary verification based on whether the second verification hash value H2 '' and the second decryption hash value H2 'match the second decryption ciphertext CD2' .

또한, 제1 복호화 블럭(311)은 상대 공유키와 제1 복호 해쉬값(H1')을 기 설정된 암복호화키 생성함수에 적용하여 복호화키를 생성한다. 제1 복호화 블럭(311)은 복호화키와 제2 복호 암호문(CD2') 및 제1 복호 해쉬값(H1')을 제2 복호화블럭(312)으로 전송한다. Also, the first decryption block 311 applies the relative shared key and the first decryption hash value H1 'to the predetermined encryption / decryption key generating function to generate a decryption key. The first decryption block 311 transmits the decryption key, the second deciphered cipher text CD2 'and the first decryption hash value H1' to the second decryption block 312.

제2 복호화 블럭(312)은 복호화키를 이용하여 제2 복호 암호문(CD2')을 복호화함으로써, 1회용 복호 비밀키와 제1 복호 암호문(CD1')을 획득한다. 제2 복호화 블럭(312)은 제1 복호 암호문(CD1')과 제1 복호 해쉬값(H1')을 검증 모듈(320)로 전송하여 2차 검증을 수행하도록 요청함과 더불어, 이를 제3 복호화 블럭(313)으로 전송한다.The second decryption block 312 decrypts the second deciphered cipher text CD2 'using the decryption key to obtain the first deciphered secret key and the first deciphered cipher text CD1'. The second decryption block 312 sends the first decryption cipher text CD1 'and the first decryption hash value H1' to the verification module 320 to request the secondary verification block to perform the secondary verification, To block 313.

이때, 검증 모듈(320)은 제1 복호 암호문(CD1')에 대한 제1 검증 해쉬값(H1'')과 제1 복호 해쉬값(H1')의 일치 여부를 근거로 2차 검증을 수행한다. At this time, the verification module 320 performs the secondary verification based on whether or not the first verification hash value H1 '' and the first decryption hash value H1 'match the first decryption ciphertext CD1' .

제3 복호화 블럭(313)은 1회용 복호 비밀키를 이용하여 제1 복호 암호문(CD1') 및 암호 데이터를 각각 복호화하여 제1 암호문(CD1')에 대응되는 검증 데이터와, 암호 데이터에 대응되는 복호 데이터를 획득하고, 이를 검증 모듈(320)로 전송한다.The third decryption block 313 decrypts the first deciphered cipher text CD1 'and the deciphered data using the one-time decryption secret key to generate verification data corresponding to the first cipher text CD1' And transmits the decoded data to the verification module 320.

이때, 검증 모듈(313)은 최종 복호화 단계를 수행하는 제3 복호화 블럭(313)으로부터 인가되는 복호 데이터와 검증 데이터의 일치 여부를 근거로 해당 복호 데이터에 대한 유효성 여부를 판단한다. At this time, the verification module 313 determines whether the decoded data is valid based on whether the decoded data and the verification data match from the third decryption block 313 performing the final decryption step.

이어, 본 발명에 따른 FPGA기반의 데이터 보호장치의 동작을 도4 및 도5를 참조하여 설명한다.Next, the operation of the FPGA-based data protection apparatus according to the present invention will be described with reference to FIGS. 4 and 5. FIG.

먼저, 서로 다른 각 FPGA에 대해서는 고유 번호가 미리 할당되어 저장되고, 이러한 FPGA의 고유번호는 1회용 비밀키 생성모듈(220)에 저장될 수 있다.First, unique numbers are pre-allocated and stored for each different FPGA, and the unique number of the FPGA can be stored in the disposable secret key generation module 220. [

또한, FPGA의 데이터 메모리(400)에는 공유키 및 이에 대응되는 개인키가 미리 저장되고, 암복화키를 생성하기 위한 암복호화 키생성 함수가 미리 저장된다.Also, a shared key and a corresponding private key are stored in advance in the data memory 400 of the FPGA, and an encryption / decryption key generating function for generating an encryption key is stored in advance.

상기한 상태에서, 데이터 입출력부(100)는 입력되는 데이터의 명령을 근거로 암호대상 데이터인지 복호대상 데이터인지를 판단하고, 암호대상 데이터는 암호화 처리부(200)로 전송하고, 복호대상 데이터는 데이터 복호화부(300)로 전송함으로써, 암호화 및 복호화 처리를 수행한다.In the above-described state, the data input / output unit 100 determines whether the data to be decrypted is data to be decrypted or not based on a command of data to be input, transmits the decrypted data to the encryption processing unit 200, Decryption unit 300, thereby performing encryption and decryption processing.

1. 암호화 방법 1. Encryption method

도4를 참조하면, 먼저 암호화 처리부(200)로 암호대상 데이터가 입력되면, 난수 발생모듈(210)로부터 인가되는 난수 정보와 FPGA 고유정보를 이용하여 1회용 비밀키를 생성함과 더불어 1회용 비밀키를 데이터 메모리(400)에 저장한다(ST110, ST120).4, when data to be encrypted is input to the encryption processing unit 200, a one-time secret key is generated using the random number information and the FPGA-specific information supplied from the random number generation module 210, Key in the data memory 400 (ST110, ST120).

이어, 암호화 처리부(200)는 1회용 비밀키를 이용하여 암호대상 데이터를 암호화하고 이를 데이터 입출력부(100)를 통해 타 단말로 전송한다(ST130).Then, the encryption processing unit 200 encrypts the encryption target data using the one-time secret key and transmits it to the other terminal through the data input / output unit 100 (ST130).

또한, 암호화 처리부(200)는 데이터 입출력부(100)로부터 수신된 암호대상 데이터를 일정 단위로 분할하여 다수의 비트스트림을 생성하고, 각 비트스트림을 ST120에서 생성된 1회용 비밀키를 이용하여 암호화한 후, 이들을 조합함으로써, 제1 암호문을 생성한다(ST140).Also, the encryption processing unit 200 generates a plurality of bit streams by dividing the encryption target data received from the data input / output unit 100 into a predetermined unit, and encrypts each bit stream using the one-time secret key generated in ST 120 And then combines them to generate a first cipher text (ST140).

또한, 암호화 처리부(200)는 제1 암호문에 대한 제1 해쉬값을 산출하고, 제1 해쉬값과 자신의 공유키를 암복호화 키생성 함수에 적용함으로써, 암호화키를 생성한다(ST150,ST160). In addition, the encryption processing unit 200 generates the encryption key by calculating the first hash value for the first cipher text, applying the first hash value and its own shared key to the encryption / decryption key generating function (ST150, ST160) .

이어, 암호화 처리부(200)는 암호화키를 이용하여 상기 ST120 단계에서 생성한 1회용 비밀키와 제1 암호문 및 제1 해쉬값을 암호화함으로써, 제2 암호문을 생성한다. 그리고, 제2 암호문에 대한 제2 해쉬값을 산출한다(ST170, ST180).Then, the encryption processing unit 200 generates the second cipher text by encrypting the one-time secret key, the first cipher text, and the first hash value generated in step ST 120 using the encryption key. Then, the second hash value for the second cipher text is calculated (ST170, ST180).

또한, 암호화 처리부(200)는 자신의 개인키를 이용하여 제2 암호문과 제1 해쉬값 및 제2 해쉬값을 암호화함으로써, 제3 암호문을 생성한다.In addition, the encryption processing unit 200 generates a third cipher text by encrypting the second cipher text, the first hash value, and the second hash value using its own private key.

그리고, 암호화 처리부(200)는 제3 암호문을 검증 암호문으로써 상기 ST130 단계에서 암호 데이터를 전송한 단말과 동일한 단말로 검증 암호문을 전송한다(ST190).In step ST190, the encryption processing unit 200 transmits the verification ciphertext to the same terminal as the terminal that transmitted the encryption data in step ST130, using the third cipher text as the verification cipher text.

즉, 암호화처리부(200)는 암호대상 데이터를 1회용 비밀키를 이용하여 생성한 암호 데이터와, 암호 데이터를 각종 키정보를 이용하여 다중 암호화하여 생성된 검증 암호데이터를 데이터 입출력부(100)를 통해 데이터 암호화를 요구한 타 데이터보호장치로 전송한다. 이때, 암호 데이터와 검증 암호문을 일정 시차를 두고 전송될 수 있다.That is, the encryption processing unit 200 encrypts the encryption target data using the one-time secret key and the verification data generated by multiplexing the encryption data using the various key information into the data input / output unit 100 To other data protection devices that require data encryption. At this time, the cipher data and the verification cipher text can be transmitted with a predetermined time difference.

2. 복호화 방법2. Decryption method

도5를 참조하면, 먼저 데이터 복호화부(300)는 복호 대상 데이터 즉, 암호 데이터와 검증 암호문을 수신한다(ST310). 이때 데이터 복호화부(300)는 해당 복호 대상 데이터를 암호화한 상대 단말의 공유키 즉, 상대 공유키를 획득한다. 상대 공유키는 미리 획득되어 FPGA 내에서만 접근이 가능한 데이터 저장부(400)에 미리 저장되거나, 검증 암호문 수신시 수집될 수 있다. Referring to FIG. 5, the data decryption unit 300 receives data to be decrypted, that is, encrypted data and a validated ciphertext (ST310). At this time, the data decryption unit 300 acquires the shared key of the counterpart terminal, that is, the counterpart shared key, which has encrypted the decrypted data. The relative share key may be stored in advance in the data storage unit 400 that is acquired in advance and accessible only in the FPGA, or may be collected upon receipt of the verification cipher.

데이터 복호화부(300)는 수신된 검증 암호 데이터를 해당 데이터를 암호화한 상대 단말의 공유키 즉, 상대 공유키를 이용하여 복호화한다. 이를 통해 제2 복호 암호문과 제1 복호 해쉬값 및 제2 복호 해쉬값을 획득한다(ST320).The data decryption unit 300 decrypts the received verification cipher data using the shared key of the counterpart terminal, that is, the counterpart shared key. The second decryption hash value and the second decryption hash value are obtained (ST 320).

데이터 복호화부(300)는 제2 복호 암호문에 대한 해쉬값 즉, 제2 검증 해쉬값을 산출하고, 상기 ST320 단계에서 획득한 제2 복호 해쉬값과 제2 검증 해쉬값을 비교하여 동일여부를 판단한다(ST330, ST340). 즉, 복호 데이터에 대한 1차 검증처리를 수행한다. 이때, 제2 복호 해쉬값과 제2 검증 해쉬값이 동일하지 않으면, 변조된 데이터로 판단하고 복호화를 종료한다.The data decoding unit 300 calculates a hash value of the second decrypted cipher text, that is, a second verification hash value, compares the second decryption hash value acquired in step ST320 with the second verification hash value, (ST330, ST340). That is, the primary verification processing for the decrypted data is performed. At this time, if the second decryption hash value is not equal to the second verification hash value, it is determined that the data is modulated and the decryption is ended.

한편, 상기 ST340 단계에서 제2 복호 해쉬값과 제2 검증 해쉬값이 동일하면, 상기 ST320 단계에서 이용된 상대 공유키와 제1 복호 해쉬값을 암복호화 키생성 함수에 적용함으로써, 복호화키를 생성한다(ST350).If the second decryption hash value and the second verification hash value are the same in step ST340, the decryption key is generated by applying the relative shared key and the first decryption hash value used in step ST320 to the encryption decryption key generation function (ST350).

이어 데이터 복호화부(300)는 ST350 단계에서 생성된 복호화키를 이용하여 제2 복호 암호문을 복호화한다. 이를 통해 제1 복호 암호문과 1회용 복호 비밀키를 획득한다(ST360).The data decryption unit 300 decrypts the second decryption ciphertext using the decryption key generated in step ST350. The first decryption ciphertext and the first decryption decryption secret key are obtained (ST360).

데이터 복호화부(300)는 제1 복호 암호문에 대한 해쉬값 즉, 제1 검증 해쉬값을 산출하고, 상기 ST320 단계에서 획득한 제1 복호 해쉬값과 제1 검증 해쉬값을 비교하여 동일여부를 판단한다(ST370, ST380). 즉, 복호 데이터에 대한 2차 검증처리를 수행한다. 이때, 제1 복호 해쉬값과 제1 검증 해쉬값이 동일하지 않으면, 변조된 데이터로 판단하고 복호화를 종료한다. The data decryption unit 300 calculates a hash value for the first decrypted cipher text, that is, a first verification hash value, and compares the first decryption hash value acquired in step ST320 with the first verification hash value (ST370, ST380). That is, the secondary verification processing for the decrypted data is performed. At this time, if the first decryption hash value is not equal to the first verification hash value, it is determined that the data is modulated and the decryption is ended.

한편, 상기 ST380 단계에서 제1 복호 해쉬값과 제1 검증 해쉬값이 동일하면, 데이터 복호화부(300)는 상기 ST360 단계에서 획득한 1회용 복호 비밀키를 이용하여 데이터 입출력부(100)로부터 수신된 암호 데이터를 복호화함으로써, 복호 데이터를 획득한다(ST390).On the other hand, if the first decryption hash value and the first verification hash value are the same in step ST380, the data decryption unit 300 receives the decryption decryption secret key from the data input / output unit 100 using the decryption secret key obtained in step ST360 And decrypts the decrypted data (ST390).

또한, 데이터 복호화부(300)는 상기 ST360 단계에서 획득한 1회용 복호 비밀키를 이용하여 ST360 단계에서 획득한 제1 복호 암호문을 복호화하여 검증 데이터를 획득한다(ST400). 이때, 검증 데이터는 기 설정된 단위로 제1 복호 암호문을 분할하고, 분할 단위의 검증 데이터를 1회용 복호 비밀키를 이용하여 각각 복호화한 후, 복호화된 분할 단위의 검증 데이터를 조합하여 생성된다.In operation ST400, the data decoder 300 decrypts the first decryption ciphertext obtained in operation ST360 using the one-time decryption secret key obtained in operation ST360 to obtain verification data. At this time, the verification data is generated by dividing the first decryption ciphertext in a predetermined unit, decrypting the verification data of each division unit using the one-time decryption secret key, and combining the decrypted division unit verification data.

그리고, 데이터 복호화부(300)는 상기 ST390 단계에서 획득한 복호 데이터와 상기 ST400 단계에서 획득한 검증 데이터를 비교하여 동일 여부를 판단한다(ST410). 이때, 데이터 복호화부(300)는 복호 데이터와 검증 데이터가 일치하지 안는 경우, 변조된 데이터로 판단하고 복호화를 종료한다. Then, the data decoding unit 300 compares the decryption data obtained in step ST390 with the verification data acquired in step ST400, and determines whether the decryption data is the same (ST410). At this time, if the decoded data and the verification data do not coincide with each other, the data decoding unit 300 determines that the data is modulated and ends the decoding.

한편, 상기 ST410 단계에서 복호 데이터와 검증 데이터가 동일하면, 데이터 복호화부(300)는 ST390 단계에서 획득한 복호 데이터가 변조되지 않은 정상 복호 데이터로 판단하고 데이터 입출력부(100)를 통해 데이터 복호화를 요구한 타 단말로 전송한다(ST420).On the other hand, if the decoded data and the verification data are the same in step ST410, the data decoding unit 300 determines that the decoded data obtained in step ST390 is normal decoded data that has not been modulated and decodes the data through the data input / output unit 100 To the other terminal (ST420).

즉, 상기 실시예에 의하면, 암호 대상 데이터에 대해 1회용 비밀키를 이용하여 생성된 암호 데이터와, 암호 데이터를 검증하기 위한 검증 암호문을 생성하여 전송하고, 암호 데이터와 검증 암호문으로 이루어지는 복호 대상 데이터에 대해 검증 암호문으로부터 획득한 해쉬값과 키정보를 이용하여 변조 여부를 판단함으로써, 복호 데이터에 대한 검증을 수행하도록 구성된다. That is, according to the above embodiment, the encryption data generated using the one-time secret key for the encryption target data and the verification ciphertext for verifying the encryption data are generated and transmitted, and the decryption target data composed of the encryption data and the verification ciphertext By using the hash value and the key information obtained from the verification ciphertext, the verification of the decryption data is performed.

100 : 데이터 입출력부, 200 : 데이터 암호화부,
210 : 난수 발생모듈, 220 : 1회용 비밀키 생성모듈,
230 : 데이터 분할모듈, 240 : 암호화 처리모듈,
300 : 데이터 복호화부, 310 : 복호화 처리모듈,
320 : 검증 모듈, 400 : 데이터 메모리,
410 : 키정보 저장부, 420 : 암/복호문 저장부.
100: data input / output unit, 200: data encryption unit,
210: a random number generating module, 220: a one-time secret key generating module,
230: data division module, 240: encryption processing module,
300: a data decoding unit, 310: a decoding processing module,
320: verification module, 400: data memory,
410: Key information storage unit, 420: Cancellation / decryption storage unit.

Claims (4)

FPGA 내에 암호화 대상 데이터를 암호화하여 외부로 전송하고, 외부로부터 수신된 암호 데이터에 대해서는 복호화하는 암복호화장치가 구현되는 FPGA기반의 데이터 암복호화 방법에 있어서,
난수 발생 모듈로부터 인가되는 난수를 이용하여 1회용 비밀키를 생성하는 1회용 비밀키 생성 단계와, 암호화 대상 데이터를 1회용 비밀키로 암호화하여 암호 데이터 생성한 후 이를 외부로 전송하는 단계, 암호화 대상 데이터를 1회용 비밀키로 암호화하여 생성된 암호 데이터를 제1 암호문으로 인식하여 제1 암호문에 대한 제1 해쉬값을 산출하고, 제1 해쉬값과 공유키를 키유도함수에 적용하여 암호화키를 생성하는 단계, 암호화키로 1회용 비밀키와 제1 암호문 및 제1 해쉬값을 암호화함으로써 제2 암호문을 생성하는 단계, 제2 암호문에 대한 제2 해쉬값을 산출하고 제2 암호문과 제1 해쉬값 및 제2 해쉬값을 개인키를 이용하여 암호화함으로써 검증 암호문을 생성하고, 이 검증 암호문을 암호 데이터와 쌍을 형성하도록 외부로 전송하는 단계를 포함하는 데이터 암호화 과정과,
데이터 복호화부에서 쌍을 이루는 암호 데이터와 검증 암호문이 수신되면, 암호화를 수행한 장치의 공유키를 이용하여 검증 암호문을 복호화함으로써 제2 복호 암호문과 제1 복호 해쉬값 및 제2 복호 해쉬값을 획득하는 단계와, 암호화를 수행한 장치의 공유키와 제1 복호 해쉬값을 기 설정된 키유도함수에 적용하여 복호화키를 생성하는 단계, 복호화키를 이용하여 제2 복호 암호문을 복호화함으로써 1회용 복호 비밀키와 제1 복호 암호문을 획득하는 단계, 1회용 복호 비밀키를 이용하여 암호화를 수행한 장치로부터 수신된 암호 데이터를 복호화함으로써 복호 데이터를 획득함과 더불어, 1회용 복호 비밀키를 이용하여 제1 복호 암호문을 복호화하여 검증 데이터를 획득하고, 복호 데이터와 검증 데이터가 동일한 경우 해당 복호 데이터를 유효한 복호 데이터로 결정하는 단계를 포함하는 데이터 복호화 과정을 포함하여 구성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법.
An FPGA-based data encryption / decryption method in which an encryption / decryption device for encrypting data to be encrypted in an FPGA and externally transmitting and decrypting encryption data received from the outside is implemented,
A secret key generation step of generating a one-time secret key by using a random number applied from a random number generation module, a step of encrypting the encryption target data with a one-time secret key to generate encrypted data, The first hash value for the first cipher text is calculated, and the first hash value and the shared key are applied to the key derivation function to generate the encryption key Generating a second cipher text by encrypting the one-time secret key, the first cipher text and the first hash value with the encryption key, calculating a second hash value for the second cipher text, calculating a second cipher text and a first hash value, Generating a verification ciphertext by encrypting the two hash values using a private key, and transmitting the verification ciphertext to the outside so as to form a pair with the encryption data A data encryption process,
When the cipher data and the ciphered ciphertext are received in the data decryption unit, the second decryption ciphertext and the first decryption hash value and the second decryption hash value are obtained by decrypting the verification ciphertext using the shared key of the device that has performed the encryption Generating a decryption key by applying a shared key and a first decryption hash value of a device that has performed encryption to a predetermined key derivation function to decrypt the second decryption ciphertext using the decryption key, Acquiring decrypted data by decrypting encrypted data received from a device that has performed encryption using the one-time decryption secret key, acquiring decrypted data by using the one-time decryption secret key, Decrypts the decrypted ciphertext to obtain verification data, and when the decrypted data and the verification data are the same, Decryption of the FPGA-based method which is characterized in that comprising: a data decoding process, comprising the step of determining a data.
제1항에 있어서,
상기 복호화 과정에서 제2 복호 암호문에 대한 제2 검증 해쉬값을 산출하여 제2 복호 해쉬값과 동일한지를 판단하여 1차 검증을 수행하는 단계와, 제1 복호 암호문에 대한 제1 검증 해쉬값을 산출하여 제1 복호 해쉬값과 동일한지를 판단함으로써 2차 검증을 수행하는 단계를 추가로 포함하여 구성되고,
상기 1차 검증 결과 유효상태로 판단되는 경우, 복호화키를 생성하는 단계를 수행하며,
상기 2차 검증 결과 유효상태로 판단되는 경우, 1회용 복호 비밀키를 이용하여 복호 데이터와 검증 데이터를 획득하는 과정을 수행하는 것을 특징으로 하는 FPGA 기반의 암복호화 방법.
The method according to claim 1,
Calculating a second verification hash value for a second deciphered ciphertext in the decryption process and determining whether the second verification hash value is equal to a second decryption hash value to perform a first verification; calculating a first verification hash value for the first deciphered ciphertext; And performing a secondary verification by determining whether the hash value is equal to the first decryption hash value,
And a step of generating a decryption key when it is determined that the primary verification result is valid,
And decrypting data and verification data using the one-time decryption secret key when it is determined that the second verification result is valid.
제1항에 있어서,
상기 암호화 과정에서 1회용 비밀키는 난수 발생모듈에서 발생된 난수와 해당 FPGA에 할당된 고유번호를 조합하여 생성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법.
The method according to claim 1,
Wherein the one-time secret key in the encryption process is generated by combining a random number generated in the random number generation module and a unique number assigned to the corresponding FPGA.
제1항에 있어서,
상기 암호화 과정에서 제1 암호문은 기 설정된 단위로 암호화 대상 데이터를 분할하고, 분할 단위의 암호화 대상 데이터를 1회용 비밀키를 이용하여 각각 암호화한 후, 암호화된 분할 단위의 암호화 대상 데이터를 조합하여 생성되고,
상기 복호화 과정에서 검증 데이터는 기 설정된 단위로 제1 복호 암호문을 분할하고, 분할 단위의 검증 데이터를 1회용 복호 비밀키를 이용하여 각각 복호화한 후, 복호화된 분할 단위의 검증 데이터를 조합하여 생성되는 것을 특징으로 하는 FPGA 기반의 암복호화 방법.
The method according to claim 1,
In the encryption process, the first ciphertext divides the encryption target data in a preset unit, encrypts the encryption target data in units of division using the one-time secret key, and then combines the encrypted target data in the encrypted division unit And,
In the decryption process, the verification data is obtained by dividing the first decryption ciphertext in a predetermined unit, decrypting the verification data of each division unit using the one-time decryption secret key, and combining the decryption data of the decryption unit Wherein the FPGA-based encryption / decryption method comprises:
KR1020180163956A 2018-12-18 2018-12-18 Method for data encryption and decryption based on fpga KR101991775B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180163956A KR101991775B1 (en) 2018-12-18 2018-12-18 Method for data encryption and decryption based on fpga

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180163956A KR101991775B1 (en) 2018-12-18 2018-12-18 Method for data encryption and decryption based on fpga

Publications (1)

Publication Number Publication Date
KR101991775B1 true KR101991775B1 (en) 2019-06-21

Family

ID=67056415

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180163956A KR101991775B1 (en) 2018-12-18 2018-12-18 Method for data encryption and decryption based on fpga

Country Status (1)

Country Link
KR (1) KR101991775B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800257A (en) * 2020-06-01 2020-10-20 青岛海尔智能技术研发有限公司 3D model encryption transmission method and decryption method
WO2021100907A1 (en) * 2019-11-20 2021-05-27 (주)이더블유비엠 Fido-based silent authentication method, system, and program
CN113656845A (en) * 2021-08-18 2021-11-16 福州锐迪优通讯科技有限公司 FPGA program volume production batch encryption method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070103467A (en) * 2005-01-21 2007-10-23 닛본 덴끼 가부시끼가이샤 Signing device, verifying device, certifying device, encrypting device, and decrypting device
KR20130067849A (en) 2011-12-14 2013-06-25 한국전자통신연구원 Fpga apparatus and method for protecting bitstream
KR20140033824A (en) * 2012-09-10 2014-03-19 남성학 Encryption systems and methods using hash value as symmetric key in the smart device
KR20180089670A (en) * 2017-02-01 2018-08-09 주식회사 더루프 Method for generating and verifying an digital signature or message authentication code based on a block chain that does not require key management
KR20180096699A (en) * 2016-01-10 2018-08-29 애플 인크. Pairing secure devices
KR20180108008A (en) * 2017-03-23 2018-10-04 삼성에스디에스 주식회사 Apparatus and method for generating key, apparatus and method for encryption

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070103467A (en) * 2005-01-21 2007-10-23 닛본 덴끼 가부시끼가이샤 Signing device, verifying device, certifying device, encrypting device, and decrypting device
KR20130067849A (en) 2011-12-14 2013-06-25 한국전자통신연구원 Fpga apparatus and method for protecting bitstream
KR20140033824A (en) * 2012-09-10 2014-03-19 남성학 Encryption systems and methods using hash value as symmetric key in the smart device
KR20180096699A (en) * 2016-01-10 2018-08-29 애플 인크. Pairing secure devices
KR20180089670A (en) * 2017-02-01 2018-08-09 주식회사 더루프 Method for generating and verifying an digital signature or message authentication code based on a block chain that does not require key management
KR20180108008A (en) * 2017-03-23 2018-10-04 삼성에스디에스 주식회사 Apparatus and method for generating key, apparatus and method for encryption

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021100907A1 (en) * 2019-11-20 2021-05-27 (주)이더블유비엠 Fido-based silent authentication method, system, and program
CN111800257A (en) * 2020-06-01 2020-10-20 青岛海尔智能技术研发有限公司 3D model encryption transmission method and decryption method
CN113656845A (en) * 2021-08-18 2021-11-16 福州锐迪优通讯科技有限公司 FPGA program volume production batch encryption method
CN113656845B (en) * 2021-08-18 2024-04-12 福州锐迪优通讯科技有限公司 FPGA program mass production batch encryption method

Similar Documents

Publication Publication Date Title
KR101520617B1 (en) Method for encrypting message for keeping integrity of message and apparatus and Method for decrypting message for keeping integrity of message and apparatus
CA2197915C (en) Cryptographic key recovery system
US5937066A (en) Two-phase cryptographic key recovery system
CA2213096C (en) Key management system for mixed-trust environments
JP2019533384A (en) Data transmission method, apparatus and system
EP3476078B1 (en) Systems and methods for authenticating communications using a single message exchange and symmetric key
US11870891B2 (en) Certificateless public key encryption using pairings
US9130744B1 (en) Sending an encrypted key pair and a secret shared by two devices to a trusted intermediary
KR101991775B1 (en) Method for data encryption and decryption based on fpga
KR101516114B1 (en) Certificate-based proxy re-encryption method and its system
CN107534558B (en) Method for protecting the information security of data transmitted via a data bus and data bus system
KR20120040127A (en) Method for generating an encryption/ decryption key
CN105554031A (en) Encryption method, encryption apparatus, decryption method, decryption apparatus and terminal
JP2020532177A (en) Computer-implemented systems and methods for advanced data security, high-speed encryption, and transmission
CN112738133A (en) RSA authentication method
CN112532648A (en) Security access method and system based on hybrid cryptosystem
KR20040009766A (en) Apparatus and method for transmitting and receiving in encryption system
CN101296077A (en) Identity authentication system based on bus type topological structure
WO2020115266A1 (en) Methods and devices for secured identity-based encryption systems with two trusted centers
KR100388059B1 (en) Data encryption system and its method using asymmetric key encryption algorithm
KR101793528B1 (en) Certificateless public key encryption system and receiving terminal
JP2009141767A (en) Generation system of encryption key, generation method of encryption key, encryption authentication system, and encrypted communication system
CN108737093B (en) Encryption method, device and system
CN114070549A (en) Key generation method, device, equipment and storage medium
CN101500147B (en) Digital television receiving control method and apparatus based on bi-directional network

Legal Events

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