KR101341944B1 - Database security method and apparatus for encrypting same plaintext data to ciphertext with different values - Google Patents

Database security method and apparatus for encrypting same plaintext data to ciphertext with different values Download PDF

Info

Publication number
KR101341944B1
KR101341944B1 KR1020130076513A KR20130076513A KR101341944B1 KR 101341944 B1 KR101341944 B1 KR 101341944B1 KR 1020130076513 A KR1020130076513 A KR 1020130076513A KR 20130076513 A KR20130076513 A KR 20130076513A KR 101341944 B1 KR101341944 B1 KR 101341944B1
Authority
KR
South Korea
Prior art keywords
data
database
encrypted
encryption
plain text
Prior art date
Application number
KR1020130076513A
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 KR1020130076513A priority Critical patent/KR101341944B1/en
Application granted granted Critical
Publication of KR101341944B1 publication Critical patent/KR101341944B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention relates to a database security method and apparatus thereof for encrypting plaintext data to a cipher text with different values every time the encryption process is performed and the database security method includes a step where plaintext data requested to be encrypted is received from a database, a step where random values are generated, a step where data ending identifiers are added to the plaintext data, a step where the random values are added to the plaintext data with the data ending identifiers being therebetween, and a step where data including the plaintext data, data ending identifiers, and random values arranged in the order of being written is encrypted. [Reference numerals] (S31) Input plaintext data;(S32) Create a random value;(S33) Add a data end identifier to the plaintext data;(S34) Add a random value to the plaintext data;(S35) Encryption;(S36) Encoding;(S37) Store the encrypted data

Description

동일 평문 데이터를 다른 값의 암호문으로 암호화하는 데이터베이스 보안 방법 및 장치{Database Security Method and Apparatus for Encrypting Same Plaintext Data to Ciphertext with Different Values}Database Security Method and Apparatus for Encrypting Same Plaintext Data to Ciphertext with Different Values}

본 발명은 데이터베이스 보안 방법 및 장치에 관한 것으로, 보다 상세하게는, 데이터베이스의 동일 평문 데이터를 매번 다른 값의 암호문으로 암호화하는 데이터베이스 보안 방법 및 장치에 관한 것이다.The present invention relates to a database security method and apparatus, and more particularly, to a database security method and apparatus for encrypting the same plain text data of the database each time with a different cipher text.

일반적으로 데이터를 암호화하는 경우, 키(Key) 또는 IV(Initial vector) 값이 같고, 암호 알고리즘이 동일하면 동일한 값으로 암호화된다.In general, when encrypting data, if the key or IV (initial vector) value is the same, and the encryption algorithm is the same, the same value is encrypted.

동일한 데이터를 암호화할 때, 매번 다른 값으로 암호화하기 위해서는 키 또는 IV값을 다르게 해야 한다. 그 경우 암호화된 데이터에는 사용된 키 또는 IV값 정보가 포함되고, 매핑 테이블에 실제 키 또는 IV값이 저장된다. 그리고, 복호화의 경우, 매핑 테이블에서 암호화 시에 사용된 키 또는 IV값을 찾아서 데이터를 복호화하게 된다.When encrypting the same data, the key or IV value must be different to encrypt different values each time. In that case, the encrypted data includes the used key or IV value information, and the actual key or IV value is stored in the mapping table. In case of decryption, the data is decrypted by finding a key or IV value used at the time of encryption in the mapping table.

그러나, 종래의 데이터베이스 암호와 방법에서는 동일한 데이터를 다른 값으로 암호화할 때 키 또는 IV값이 저장되는 매핑 테이블이 필요하므로 보안상 키 관리가 어렵다. 또한, 매 암호화 시, 키 또는 IV값을 새롭게 생성하고, 매핑 테이블에 저장하기 때문에 암호화 속도가 느려진다. 게다가, 복호화 시, 암호문에서 키 또는 IV값을 찾고, 이 값을 이용하여 매핑 테이블에서 실제 사용된 키 또는 IV값을 찾아서 복호화하므로 속도가 느려지는 단점이 있다.However, in the conventional database encryption method and method, when a same data is encrypted with a different value, a key or IV value is stored in a mapping table, which is difficult to manage keys for security. In addition, the encryption speed is slow because each key or IV value is newly generated and stored in the mapping table. In addition, when decrypting, it finds a key or IV value in the ciphertext, and finds the key or IV value actually used in the mapping table by using the value and decrypts it.

본 발명은 상기의 종래의 문제점을 해결하기 위한 것으로 데이터베이스의 동일 평문 데이터를 매번 다른 값의 암호문으로 암호화하는 데이터베이스 보안 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a database security method and apparatus for encrypting the same plain text data of a database with a different value of cipher text each time.

상기 기술적 과제를 해결하기 위하여 본 발명의 일 실시예에 따른 데이터베이스 보안 방법은, 데이터베이스로부터 암호화가 요청된 평문 데이터를 받는 단계, 랜덤 값을 생성하는 단계, 평문 데이터에 데이터 종료 식별자를 추가하는 단계, 데이터 종료 식별자를 사이에 두고 평문 데이터에 랜덤 값을 추가하는 단계, 및 평문 데이터, 데이터 종료 식별자 및 랜덤 값이 기재된 순서대로 나열된 데이터를 암호화하는 단계를 포함한다.In order to solve the above technical problem, the database security method according to an embodiment of the present invention, receiving a plain text data requested for encryption from the database, generating a random value, adding a data end identifier to the plain text data, Adding a random value to the plain text data with the data end identifier in between, and encrypting the data listed in the order in which the plain text data, the data end identifier and the random value are described.

일 실시예에서, 데이터 종료 식별자는 Null 값이다.In one embodiment, the data end identifier is a null value.

일 실시예에서, 랜덤 값의 길이는 일정하게 설정된다.In one embodiment, the length of the random value is set constant.

일 실시예에서, 데이터베이스 보안 방법은, 암호화한 데이터를 인코딩하는 단계, 및 인코딩하는 단계에서 생성된 암호화 데이터를 데이터베이스에 저장하는 단계를 더 포함한다.In one embodiment, the database security method further comprises encoding the encrypted data and storing the encrypted data generated in the encoding in a database.

일 실시예에서, 데이터베이스 보안 방법은, 데이터베이스로부터 암호화 데이터를 포함한 암호문을 받는 단계, 암호문을 디코딩하는 단계, 디코딩한 암호문을 복호화하여 복호화된 데이터를 생성하는 단계, 및 복호화된 데이터에서 평문 데이터를 추출하는 단계를 더 포함한다.In one embodiment, a database security method includes receiving a cipher text including encrypted data from a database, decoding a cipher text, decrypting the decoded cipher text, generating decrypted data, and extracting plain text data from the decrypted data. It further comprises the step.

본 발명의 일 실시예에 따른 데이터베이스 보안 장치는, 데이터베이스로부터 암호화가 요청된 평문 데이터를 받는 입출력부, 랜덤 값을 생성하는 랜덤값 생성부, 평문 데이터에 데이터 종료 식별자를 추가하며 데이터 종료 식별자를 사이에 두고 평문 데이터에 랜덤 값을 추가하는 데이터 삽입부, 및 평문 데이터, 데이터 종료 식별자 및 랜덤 값이 기재된 순서대로 나열된 데이터를 암호화하는 암호화부를 포함한다.The database security device according to an embodiment of the present invention includes an input / output unit that receives plain text data that is encrypted from a database, a random value generator that generates a random value, and adds a data end identifier to the plain text data and intersects the data end identifier. A data insertion unit for adding a random value to the plain text data, and an encryption unit for encrypting the data listed in the order in which the plain text data, the data end identifier, and the random value are described.

일 실시예에서, 데이터베이스 보안 장치는, 암호화한 데이터를 인코딩하는 인코딩부, 암호문을 디코딩하는 디코딩부, 디코딩한 암호문에서 복호화된 데이터를 생성하는 복호화부, 및 복호화된 데이터에서 평문 데이터를 추출하는 추출부를 더 포함한다. 여기서, 입출력부는 인코딩부에서 생성된 암호화 데이터를 데이터베이스로 전송하고, 데이터베이스로부터 복호화가 요청된 암호화 데이터를 포함하는 암호문을 받을 수 있다.In one embodiment, the database security device, the encoding unit for encoding the encrypted data, the decoding unit for decoding the cipher text, the decryption unit for generating the decrypted data from the decoded cipher text, and the extraction to extract the plain text data from the decrypted data Includes more wealth. Here, the input / output unit may transmit the encrypted data generated by the encoding unit to the database and receive a cipher text including the encrypted data requested to be decrypted from the database.

본 발명에 의하면, 동일한 평문 데이터를 동일한 암호 알고리즘(동일한 키 또는 IV값을 이용함)으로 암호화를 하더라도 매번 다른 값의 암호문으로 데이터베이스의 데이터를 암호화할 수 있다. 더욱이, 본 실시예에 따른 데이터베이스 보안 방법의 동일 평문 데이터에 대한 암호문은 암호화 시마다 매번 서로 다른 값을 가지지만 키 또는 IV값이 동일하므로 종래의 암호화 시의 키 또는 IV값을 매핑하기 위해 사용되는 반복적인 매핑 테이블의 생성 과정을 생략할 수 있고, 그에 의해 데이터 암호화 및 복호화 시 데이터베이스의 처리 속도를 크게 향상시킬 수 있다.According to the present invention, even if the same plain text data is encrypted with the same encryption algorithm (using the same key or IV value), the data of the database can be encrypted each time with a different value of the cipher text. Furthermore, the ciphertext for the same plaintext data of the database security method according to the present embodiment has a different value each time encryption, but the key or IV value is the same, so that iteratively used to map the key or IV value in the conventional encryption. The process of generating the in-mapping table can be omitted, thereby greatly improving the processing speed of the database during data encryption and decryption.

도 1은 본 발명의 일 실시예에 따른 데이터베이스 보안 장치를 설명하기 위한 개략적인 블록도.
도 2는 도 1의 데이터베이스 보안 장치에 적용할 수 있는 구조에 대한 블록도.
도 3은 도 2의 데이터베이스 보안 장치에 적용된 데이터베이스 보안 방법의 일 실시예에 대한 순서도.
도 4는 도 3의 데이터베이스 보안 방법에 적용할 수 있는 복호화 과정을 나타낸 순서도.
1 is a schematic block diagram illustrating a database security device according to an embodiment of the present invention.
2 is a block diagram of a structure applicable to the database security device of FIG.
3 is a flow chart of an embodiment of a database security method applied to the database security device of FIG.
4 is a flowchart illustrating a decryption process applicable to the database security method of FIG. 3.

이하에서는 첨부한 도면을 참조하여 바람직한 실시 형태들에 대해서 상세히 설명한다. 다만, 실시형태를 설명함에 있어서, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략한다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙여 설명하기로 한다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail to avoid unnecessarily obscuring the subject matter of the present invention. In order to clearly explain the present invention in the drawings, parts not related to the description are omitted, and similar parts are denoted by similar reference numerals throughout the specification.

도 1은 본 발명의 일 실시예에 따른 데이터베이스 보안 장치를 설명하기 위한 개략적인 블록도이다.1 is a schematic block diagram illustrating a database security device according to an embodiment of the present invention.

도 1을 참조하면, 본 실시예에 따른 데이터베이스 보안 장치(20)는 데이터베이스(10)의 동일 데이터를 암호화할 때 암호화된 데이터가 매번 다른 값을 갖도록 암호화하고, 서로 다른 값으로 암화화된 데이터를 복호화하여 동일 데이터를 추출한다. 이러한 구성에 의하면, 암호화 시 키 또는 IV(Initial vector) 값이 저장되는 매핑 테이블을 매번 다시 생성할 필요가 없고, 복호화 시 암호문에서 키 또는 IV 값을 찾고, 매핑 데이블에서 앞서 찾은 값에 실제 사용된 키 또는 IV를 찾아서 복호화해야 하는 복잡한 암호화/복호화 과정을 대부분 생략할 수 있고, 그에 의해 데이터베이스의 관리 및 성능(처리 속도 등)을 향상시킬 수 있다.Referring to FIG. 1, when encrypting the same data in the database 10, the database security device 20 according to the present embodiment encrypts the encrypted data to have different values each time, and encrypts the data encrypted with different values. The same data is extracted by decoding. This configuration eliminates the need to regenerate a mapping table each time a key or IV (Initial Vector) value is stored during encryption, finds the key or IV value in the ciphertext during decryption, and actually uses the value previously found in the mapping table. Most of the complicated encryption / decryption process, which requires finding and decrypting keys or IVs, can be omitted, thereby improving database management and performance (such as processing speed).

데이터베이스(Database, DB) 암호화 방식을 간략히 설명하면, DB 암호화 방식은 크게 칼럼 단위로 데이터베이스를 암호화하는 플러그인(Plug-in) 방식 및 API(Application Programming Interface) 방식과 블록 단위로 데이터베이스를 암호화하는 TDE(Transparent Data Encryption) 방식 및 파일(File) 암호화 방식이 있다.Briefly describing the database (DB) encryption method, DB encryption method is largely a plug-in method and an API (Application Programming Interface) method and a TDE (Encryption) database in block units. Transparent data encryption) and file encryption.

플러그인 방식은 암/복호화 모듈이 DBMS 안에서 실행되고, 원래의 테이블과 동일한 이름의 뷰를 생성하고, 실제 테이블을 변경하기 위해 IOT(Instead of Trigger)를 생성하며, 현재 오라클(Oracle), MS-SQL, DB2 등을 사용하는 환경에 적합한 DB 암호화 방식이다. 그리고, API 방식은 암/복호화 모듈이 애플리케이션에서 실행되고, 데이터 저장 또는 변경 시 데이터베이스의 데이터를 암호화하고 데이터 조회 시 복호화하는 API 함수를 호출하도록 동작하며, 뷰나 트리거 등을 생성하지 않는 DB 암호화 방식이다.The plug-in method runs the encryption / decryption module inside a DBMS, creates a view with the same name as the original table, creates an Int of Trigger to change the actual table, and currently uses Oracle and MS-SQL. DB encryption method suitable for the environment using DB2. In addition, the API method is a DB encryption method in which an encryption / decryption module is executed in an application and operates to call an API function that encrypts data in a database when the data is stored or changed, and decrypts it when the data is retrieved, and does not generate a view or trigger. .

TDE 방식은 DB 커널에서 암호화된 데이블 스페이스를 생성하고, 암호화 대상 테이블을 해당 테이블 스페이스로 이동하며, DBMS 커널에서 DB의 블록 단위로 자동 암/복호화를 수행하며, HSM(Hard Security machine) 어플라이언스와 연동하여 키 관리를 행하는 DB 암호화 방식이다. 그리고, 파일 암호화 방식은 암호화 파일을 사용하여 테이블 스페이스를 생성하고, 암호화 대상 테이블을 해당 테이블 스페이스로 이동하며, OS 커널에서 DB를 블록 단위로 자동 암/복호화를 수행하며, HSM 어플라이언스와 연동하여 키 관리를 행하는 DB 암호화 방식이다.The TDE method creates an encrypted table space in the DB kernel, moves the table to be encrypted to the corresponding table space, performs automatic encryption / decryption on a block basis of the DB in the DBMS kernel, and works with a hard security machine (HSM) appliance. DB encryption method for key management. In addition, the file encryption method creates a table space using an encrypted file, moves the table to be encrypted to the table space, performs automatic encryption / decryption of the DB block by block in the OS kernel, and interlocks with the HSM appliance. DB encryption method to manage.

전술한 API 방식은 많은 금융회사 등에서 차세대 DB 암호화 기술로 연구 개발 중 기술이며, DB 서버에 부하가 없고, 플러그인 방식 등에 비해 속도가 빠른 장점이 있다.The above-described API method is a technology under research and development as a next generation DB encryption technology in many financial companies, and there is no load on the DB server, and it is faster than the plug-in method.

본 실시예에 따른 데이터베이스 보안 장치(20)가 API 방식으로 작동하는 경우, 보안 장치(20)는 데이터베이스를 탑재하고 데이터베이스를 암복호화하는 기능을 가진 애플리케이션 서버(12)와 API(30)를 통해 연결되는 암호화 서버(Encryption Server)로 구현될 수 있다. 여기서, 애플리케이션 서버(12)는 데이터베이스 서버나 데이터베이스 관리 시스템을 구비할 수 있다.When the database security device 20 according to the present embodiment operates in an API manner, the security device 20 connects through an API 30 and an application server 12 having a function of mounting a database and encrypting and decrypting the database. It may be implemented as an encryption server (Encryption Server). Here, the application server 12 may include a database server or a database management system.

데이터베이스 보안 장치(20)의 상세 구성 및 작동 원리는 도 2 내지 도 4을 참조하여 설명하기로 한다.The detailed configuration and operating principle of the database security device 20 will be described with reference to FIGS. 2 to 4.

도 2는 도 1의 데이터베이스 보안 장치에 적용할 수 있는 구조에 대한 블록도이다.FIG. 2 is a block diagram of a structure applicable to the database security device of FIG. 1.

도 2를 참조하면, 본 실시예에 따른 데이터베이스 보안 장치(20)는, 입출력부(21), 랜덤값 생성부(22), 데이터 삽입부(23), 암호화부(24) 및 인코딩부(25)를 구비한다.Referring to FIG. 2, the database security device 20 according to the present embodiment includes an input / output unit 21, a random value generation unit 22, a data insertion unit 23, an encryption unit 24, and an encoding unit 25. ).

입출력부(21)는, 데이터베이스로부터 암호화가 요청된 평문 데이터를 받는다. 평문 데이터는 암호화되어 있지 않은 데이터로서 원문 데이터로 지칭될 수 있다. 입출력부(21)는, 인코딩부(25)에서 생성된 암호화 데이터를 데이터베이스로 전송한다.The input / output unit 21 receives the plain text data for which encryption is requested from the database. Plain text data may be referred to as original data as unencrypted data. The input / output unit 21 transmits the encrypted data generated by the encoding unit 25 to the database.

또한, 입출력부(21)는, 구현에 따라서 데이터베이스로부터 복호화가 요청된 암호화 데이터를 포함하는 암호문을 받고, 암호문에서 추출된 평문 데이터를 데이터베이스로 전송할 수 있다.In addition, the input / output unit 21 may receive a cipher text including the encrypted data requested to be decrypted from the database according to an implementation, and transmit the plain text data extracted from the cipher text to the database.

랜덤값 생성부(22)는 랜덤 값을 생성한다. 랜덤 값은 난수이며, 기본적으로 그 길이가 다르다. 한편, 랜덤값 생성부(22)는 구현에 따라서 램덤 값의 길이를 특정 길이로 일정하게 생성할 수 있다. 그 경우, 랜덤값의 길이가 일정 길이로 고정되므로, 본 실시예의 데이터베이스 보안 장치에서 구현되는 보안 방법을 본 출원인의 데이터베이스의 숫자형 데이터의 보안 방법의 선택적인 구성으로 간단히 추가할 수 있고, 그에 의해 데이터베이스 관리 및 보안 성능을 더욱 향상시킬 수 있는 이점이 있다.The random value generator 22 generates a random value. The random value is a random number, basically different in length. Meanwhile, the random value generator 22 may constantly generate the length of the random value to a specific length according to the implementation. In that case, since the length of the random value is fixed to a certain length, the security method implemented in the database security device of the present embodiment can be simply added as an optional configuration of the security method of the numeric data of the applicant's database, thereby This has the advantage of further improving database management and security performance.

데이터 삽입부(23)는, 평문 데이터에 데이터 종료 식별자를 추가하며, 데이터 종료 식별자를 사이에 두고 평문 데이터에 랜덤 값을 추가한다. 다시 말해, 데이터 삽입부(23)는 평문 데이터의 마지막 비트 다음에 데이터 종료 식별자를 추가하고, 데이터 종료 식별자의 마지막 비트 다음에 랜덤값을 추가한다.The data insertion unit 23 adds a data end identifier to the plain text data, and adds a random value to the plain text data with the data end identifier interposed therebetween. In other words, the data insertion unit 23 adds a data end identifier after the last bit of the plain text data and adds a random value after the last bit of the data end identifier.

암호화부(24)는, 평문 데이터, 데이터 종료 식별자 및 랜덤 값이 기재된 순서대로 나열된 데이터를 암호화한다. 암호화부(24)는 기설정된 보안 정책 또는 암호화 방식에 따라 데이터를 암호화할 수 있다. 또한, 암호화부(24)는 구현에 따라서 암호문을 복호화하는 복호화부로 기능할 수 있다.The encryption unit 24 encrypts the data listed in the order in which the plain text data, the data end identifier, and the random value are described. The encryption unit 24 may encrypt data according to a predetermined security policy or encryption method. In addition, the encryption unit 24 may function as a decryption unit that decrypts the cipher text depending on the implementation.

인코딩부(25)는 암호화한 데이터를 인코딩한다. 인코딩부는 사람이 인지할 수 있는 문자열로 데이터를 변환하는 것으로, Base64 인코딩 방식으로 동작하도록 구현될 수 있다.The encoding unit 25 encodes the encrypted data. The encoding unit converts data into a human-readable string and can be implemented to operate in a Base64 encoding scheme.

또한, 인코딩부(25)는 구현에 따라서 암호문을 디코딩하는 디코딩부로 기능할 수 있다. 디코딩부는 복호화된 데이터에서 평문 데이터를 추출하는 추출부로서도 기능할 수 있다. 그 경우, 추출부는 복호화된 데이터에서 데이터 종료 식별자를 인식하고 복호화된 데이터에서 데이터 종료 식별자와 랜덤값을 제거한 평문 데이터를 추출한다.In addition, the encoding unit 25 may function as a decoding unit for decoding the cipher text depending on the implementation. The decoding unit may also function as an extraction unit for extracting the plain text data from the decoded data. In that case, the extractor recognizes the data end identifier from the decoded data and extracts the plain text data from which the data end identifier and the random value are removed from the decoded data.

도 3은 도 2의 데이터베이스 보안 장치에 적용된 데이터베이스 보안 방법의 일 실시예에 대한 순서도이다.3 is a flowchart of an embodiment of a database security method applied to the database security device of FIG.

도 3을 참조하면, 본 실시예에 따른 데이터베이스 보안 방법은, 먼저 데이터베이스 서버나 데이터베이스 관리 시스템으로부터 보안 정책과 데이터베이스에 대한 암호화 요청 및 암호화하고자 하는 데이터 입력을 받으면, 암호화하고자 하는 평문 데이터와 암호화 정책을 확인한다(S31).Referring to FIG. 3, the database security method according to the present embodiment first receives an encryption request for an encryption policy and a data input from a database server or a database management system and inputs data to be encrypted. Check (S31).

다음, 임의의 값을 추출하여 블록 사이즈와 동일한 크기의 랜덤 값을 생성한다(S32).Next, a random value is extracted to generate a random value having the same size as the block size (S32).

다음, 평문 데이터의 맨 마지막 비트 뒤에 데이터 종료 식별자를 추가한다(S33). 데이터 종료 식별자는 일반적으로 아직 지정되지 않았거나 정의되지 않은 값을 의미하는 널(Null) 값을 이용하여 구현될 수 있다. Null 값을 이용하면, 데이터베이스 보안 장치가 문자형 데이터인 평문 데이터의 끝을 인식할 수 있다.Next, the data end identifier is added after the last bit of the plain text data (S33). The data termination identifier may be implemented using a null value, which generally means a value that is not yet specified or defined. Null values allow the database security to recognize the end of plain text data that is character data.

한편, 본 실시예에서는 데이터 종료 식별자로 Null 값을 이용하지만, 본 발명은 그러한 구성으로 한정되지 않고, 특정 값(예컨대, 00x0, 0xx0, xx0x, 0a00, 00m0 등에서 선택되는 값)이 이용될 수 있다. 특정 값을 이용하는 경우, 암호화 정책이나 데이터베이스 암호화 함수 내에는 데이터 종료 식별자에 대한 별도의 정의가 추가될 수 있다.Meanwhile, in the present embodiment, a null value is used as the data end identifier, but the present invention is not limited to such a configuration, and a specific value (eg, a value selected from 00x0, 0xx0, xx0x, 0a00, 00m0, etc.) may be used. . In the case of using a specific value, a separate definition of the data termination identifier may be added in the encryption policy or the database encryption function.

다음, 데이터 종료 식별자의 맨 마지막 비트 뒤에 랜덤 값을 추가한다(S34). 랜덤 값은 난수 생성기나 난수 생성 프로그램에 의해 생성된 값이 될 수 있다.Next, a random value is added after the last bit of the data end identifier (S34). The random value may be a value generated by a random number generator or a random number generator.

다음, 평문 데이터, 데이터 종료 식별자 및 랜덤 값이 기재된 순서대로 나열하여 생성한 데이터를 기설정 보안 정책 또는 암호화 정책에 따라 암호화한다(S35).Next, the plain text data, the data end identifier, and the random values are arranged in the order described, and the generated data is encrypted according to a preset security policy or encryption policy (S35).

다음, 암호화한 데이터를 인코딩하여 변환한다(S36). 암호화한 데이터를 인코딩하는 것은 사람이 인지할 수 있는 문자열로 변환하기 위한 것으로, Base64 인코딩 방식이 이용될 수 있다.Next, the encrypted data is encoded and converted (S36). Encoding the encrypted data is for converting to a human-readable string, Base64 encoding can be used.

구체적인 예를 들어 전술한 암호화 과정을 설명하면 다음과 같다.For example, the above-described encryption process will be described.

먼저, 랜덤 값을 생성한다. 본 실시예에서 랜덤 값은 "7&aBklQ4)aQbI#t0"이다. 다음, 암호화하고자 하는 평문 데이터 "ABCDEFG" 뒤에 데이터 종료 식별자로써 Null(0x00)을 추가하고, 데이터 종료 식별자 뒤에 랜덤 값을 추가한다. 본 단계에서 생성된 암호화 전처리 데이터를 나타내면 다음과 같다.First, a random value is generated. In this embodiment, the random value is "7 & aBklQ4) aQbI # t0". Next, after the plain text data "ABCDEFG" to be encrypted, Null (0x00) is added as a data termination identifier, and a random value is added after the data termination identifier. The encryption preprocessing data generated in this step is as follows.

"ABCDEFG" + 0x00 + "7&aBklQ4)aQbI#t0""ABCDEFG" + 0x00 + "7 & aBklQ4) aQbI # t0"

다음, 암호화 전처리 데이터를 기지정된 암호화 정책으로 암호화한다.Next, the encryption preprocessing data is encrypted with a predetermined encryption policy.

암호화한 데이터는 사람이 인지할 수 없는 값이므로 이를 사람이 인지할 수 있는 16진수(Hexadecimal) 값으로 나타내면 다음과 같다.Since the encrypted data is not recognized by humans, it is expressed as Hexadecimal that humans can recognize.

"0e 8a e7 da cd a1 00 3b 23 bc 05 f6 43 25 75 f7 b7 18 b6 a2 6e 14 17 0a b2 ef 95 2d ac 52 89 df""0e 8a e7 da cd a1 00 3b 23 bc 05 f6 43 25 75 f7 b7 18 b6 a2 6e 14 17 0a b2 ef 95 2d ac 52 89 df"

다음, 구현에 따라서 암호화한 데이터를 인코딩하여 사람이 인지할 수 있는 문자열로 변환한다. 암호화한 데이터의 인코딩은 Base64 인코딩 방식으로 수행될 수 있다.Next, the implementation encodes the encrypted data and converts it into a human-readable string. Encoding of the encrypted data may be performed by Base64 encoding.

본 실시예에 의하면, 동일한 데이터를 동일한 암호 알고리즘(동일한 키 또는 IV 값)으로 암호화하더라도 매번 다른 값으로 암호화를 할 수 있고, 키와 IV가 같으므로 이것들의 매핑 테이블을 생략할 수 있고, 그에 의해 안전하게 키 관리를 할 수 있으며, 암호화 속도를 향상시킬 수 있다.According to this embodiment, even if the same data is encrypted with the same encryption algorithm (same key or IV value), it can be encrypted with a different value every time. Since the keys and IV are the same, these mapping tables can be omitted, thereby It can securely manage keys and improve encryption speed.

도 4는 도 3의 데이터베이스 보안 방법에 적용할 수 있는 복호화 과정을 나타낸 순서도이다.4 is a flowchart illustrating a decryption process applicable to the database security method of FIG. 3.

도 4를 참조하면, 본 실시예에 따른 데이터베이스 보안 방법은, 먼저 데이터베이스로부터 입력되는 암호문 데이터와 기설정된 보안 정책 또는 암호화/복호화 정책을 확인한다(S41).Referring to FIG. 4, in the database security method according to the present embodiment, first, a ciphertext data input from a database and a predetermined security policy or an encryption / decryption policy are checked (S41).

다음, 데이터베이스 보안 장치는 암호문을 디코딩한다(S42). 디코딩은 Base64 디코딩 방식으로 수행될 수 있다.Next, the database security device decodes the cipher text (S42). Decoding may be performed by Base64 decoding.

다음, 데이터베이스 보안 장치는 디코딩한 데이터를 지정된 암호화 정책으로 복호화한다(S43).Next, the database security device decrypts the decoded data with a specified encryption policy (S43).

복호화 과정의 일례에서 데이터베이스 보안 장치는, HEX값 '0e 8a e7 da cd a1 00 3b 23 bc 05 f6 43 25 75 f7 b7 18 b6 a2 6e 14 17 0a b2 ef 95 2d ac 52 89 df'를 복호화하여 'ABCDEFG0x007&aBklQ4)aQbI#t0'를 생성할 수 있다.In an example of decryption, the database security device decrypts the HEX value '0e 8a e7 da cd a1 00 3b 23 bc 05 f6 43 25 75 f7 b7 18 b6 a2 6e 14 17 0a b2 ef 95 2d ac 52 89 df'. ABCDEFG0x007 & aBklQ4) aQbI # t0 'can be generated.

다음, 데이터베이스 보안 장치는, 복호화된 데이터에서 암호화 과정에서 추가로 삽입한 데이터 종료 식별자(본 실시예에서는 Null 값)을 인식하고, Null 값과 랜덤 값을 제거한 평문 데이터 'ABCDEFG'를 추출한다(S44).Next, the database security device recognizes the data end identifier (Null value in this embodiment) additionally inserted in the decrypted data from the decrypted data, and extracts plain text data 'ABCDEFG' from which the null value and the random value are removed (S44). ).

본 실시예에 의하면, 암호문의 복호화 시, 서로 다른 값으로 암호화된 하나의 평문 데이터를 간단하고 신속하게 복호화하여 추출할 수 있다.According to the present embodiment, when decrypting a cipher text, it is possible to simply and quickly decrypt and extract one plain text data encrypted with different values.

본 실시예의 복호화 방법은 도 2 또는 도 3을 참조하여 앞서 설명한 암호화 방법을 구현하는 데이터베이스 보안 장치나 방법에 탑재되거나, 구현에 따라서 전술한 암호화 방법을 구현하지 않는 별도의 데이터베이스 보안 장치에 탑재될 수 있다.The decryption method of the present embodiment may be mounted in a database security device or method that implements the encryption method described above with reference to FIG. 2 or 3, or may be mounted in a separate database security device that does not implement the encryption method described above depending on the implementation. have.

한편, 전술한 실시예의 데이터베이스 보안 방법 및 장치를 동일 데이터베이스에 대한 다른 베이터베이스 보안 방법(본 출원인의 데이터베이스의 숫자형 데이터의 보안 방법 등)이나 다른 암호화 방식과 조합하여 이용하는 경우, 고객정보에 대한 암호화 규정 등에 대한 데이터베이스의 보안 규정을 준수하면서 신속하고 안전하게 데이터를 암호화하여 데이터베이스의 관리 및 보안 성능을 더욱 향상시킬 수 있다.On the other hand, when using the database security method and apparatus of the above-described embodiment in combination with another database security method (such as the security method of the numeric data of the applicant's database) or another encryption method for the same database, encryption for customer information Enhance your database's management and security by encrypting data quickly and securely while complying with database security regulations for regulations and more.

이상에서와 같이 실시 예들을 중심으로 본 발명을 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 예의 본질적인 기술내용을 벗어나지 않는 범위에서 실시예에 예시되지 않은 여러 가지의 조합 또는 변형과 응용이 가능함을 알 수 있을 것이다. 따라서, 본 발명의 실시 예들로부터 용이하게 도출가능한 변형과 응용에 관계된 기술내용들은 본 발명에 포함되는 것으로 해석되어야 할 것이다.As described above, the present invention has been described based on the embodiments, which are merely exemplary and are not intended to limit the present invention, and those skilled in the art to which the present invention pertains do not depart from the essential technical details of the present embodiment. It will be appreciated that various combinations or modifications and applications not illustrated in the embodiments are possible. Therefore, technical matters related to modifications and applications easily derivable from embodiments of the present invention should be interpreted as being included in the present invention.

10: 데이터베이스
12: 애플리케이션 서버
20: 보안 장치
10: database
12: application server
20: security device

Claims (7)

데이터베이스로부터 암호화가 요청된 평문 데이터를 받는 단계;
랜덤 값을 생성하는 단계;
상기 평문 데이터의 맨 마지막 비트 뒤에 데이터 종료 식별자를 추가하는 단계;
상기 데이터 종료 식별자를 사이에 두고 상기 평문 데이터에 상기 랜덤 값을 추가하는 단계; 및
상기 평문 데이터, 상기 데이터 종료 식별자 및 상기 랜덤 값이 기재된 순서대로 나열된 데이터를 암호화하는 단계;
를 포함하는 데이터베이스 보안 방법.
Receiving plaintext data for which encryption is requested from a database;
Generating a random value;
Adding a data termination identifier after the last bit of plain text data;
Adding the random value to the plain text data with the data end identifier interposed therebetween; And
Encrypting the data listed in the order in which the plain text data, the data end identifier, and the random value are described;
Database security method comprising a.
청구항 1에 있어서,
상기 데이터 종료 식별자는 Null 값 또는 미리 정의된 특정 값을 포함하는 데이터베이스 보안 방법.
The method according to claim 1,
And the data termination identifier comprises a null value or a predefined specific value.
삭제delete 청구항 1에 있어서,
상기 암호화한 데이터를 인코딩하는 단계; 및
상기 인코딩하는 단계에서 생성된 암호화 데이터를 상기 데이터베이스에 저장하는 단계;를 더 포함하는 데이터베이스 보안 방법.
The method according to claim 1,
Encoding the encrypted data; And
And storing the encrypted data generated in the encoding step in the database.
청구항 4에 있어서,
상기 데이터베이스로부터 상기 암호화 데이터를 포함한 암호문을 받는 단계;
상기 암호문을 디코딩하는 단계;
상기 디코딩한 암호문을 복호화하여 복호화된 데이터를 생성하는 단계; 및
상기 복호화된 데이터에서 상기 데이터 종료 식별자를 인식하고 상기 데이터 종료 식별자 이하의 비트를 제거하여 상기 평문 데이터를 추출하는 단계;
를 더 포함하는 데이터베이스 보안 방법.
The method of claim 4,
Receiving a cipher text including the encrypted data from the database;
Decoding the cipher text;
Decrypting the decoded cipher text to generate decrypted data; And
Recognizing the data end identifier from the decoded data and extracting the plain text data by removing a bit less than or equal to the data end identifier;
Database security method comprising more.
데이터베이스로부터 암호화가 요청된 평문 데이터를 받는 입출력부;
랜덤 값을 생성하는 랜덤값 생성부;
상기 평문 데이터의 맨 마지막 비트 뒤에 데이터 종료 식별자를 추가하며, 상기 데이터 종료 식별자를 사이에 두고 상기 평문 데이터에 상기 랜덤 값을 추가하는 데이터 삽입부; 및
상기 평문 데이터, 상기 데이터 종료 식별자 및 상기 랜덤 값이 기재된 순서대로 나열된 데이터를 암호화하는 암호화부;
를 포함하는 데이터베이스 보안 장치.
An input / output unit that receives plain text data for which encryption is requested from a database;
A random value generator for generating a random value;
A data insertion unit for adding a data end identifier after the last bit of the plain text data and adding the random value to the plain text data with the data end identifier interposed therebetween; And
An encryption unit for encrypting the data listed in the order in which the plain text data, the data end identifier, and the random value are described;
Database security device comprising a.
청구항 6에 있어서,
상기 암호화한 데이터를 인코딩하는 인코딩부-여기서, 상기 입출력부는 상기 인코딩부에서 생성된 암호화 데이터를 상기 데이터베이스로 전송하고, 상기 데이터베이스로부터 복호화가 요청된 상기 암호화 데이터를 포함하는 암호문을 받음-;
상기 암호문을 디코딩하는 디코딩부;
상기 디코딩한 암호문에서 복호화된 데이터를 생성하는 복호화부; 및
상기 복호화된 데이터에서 상기 데이터 종료 식별자를 인식하고 상기 데이터 종료 식별자 이하의 비트를 제거하여 상기 평문 데이터를 추출하는 추출부;
를 더 포함하는 데이터베이스 보안 장치.
The method of claim 6,
An encoding unit for encoding the encrypted data, wherein the input / output unit transmits the encrypted data generated in the encoding unit to the database, and receives an encrypted text including the encrypted data requested to be decrypted from the database;
A decoding unit for decoding the cipher text;
A decryption unit generating data decrypted from the decoded cipher text; And
An extracting unit that recognizes the data end identifier from the decoded data and extracts the plain text data by removing a bit less than or equal to the data end identifier;
Database security device further comprising.
KR1020130076513A 2013-07-01 2013-07-01 Database security method and apparatus for encrypting same plaintext data to ciphertext with different values KR101341944B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130076513A KR101341944B1 (en) 2013-07-01 2013-07-01 Database security method and apparatus for encrypting same plaintext data to ciphertext with different values

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130076513A KR101341944B1 (en) 2013-07-01 2013-07-01 Database security method and apparatus for encrypting same plaintext data to ciphertext with different values

Publications (1)

Publication Number Publication Date
KR101341944B1 true KR101341944B1 (en) 2013-12-17

Family

ID=49988400

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130076513A KR101341944B1 (en) 2013-07-01 2013-07-01 Database security method and apparatus for encrypting same plaintext data to ciphertext with different values

Country Status (1)

Country Link
KR (1) KR101341944B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9646176B2 (en) 2015-03-24 2017-05-09 TmaxData Co., Ltd. Method for encrypting database

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3145407B2 (en) * 1994-07-15 2001-03-12 株式会社エヌ・ティ・ティ・ドコモ Signal transmission system and communication system
KR101174058B1 (en) * 2008-12-18 2012-08-16 한국전자통신연구원 Method for saving and serching of encrypted data on database

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3145407B2 (en) * 1994-07-15 2001-03-12 株式会社エヌ・ティ・ティ・ドコモ Signal transmission system and communication system
KR101174058B1 (en) * 2008-12-18 2012-08-16 한국전자통신연구원 Method for saving and serching of encrypted data on database

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9646176B2 (en) 2015-03-24 2017-05-09 TmaxData Co., Ltd. Method for encrypting database

Similar Documents

Publication Publication Date Title
CN101340279B (en) Method, system and apparatus for data ciphering and deciphering
CN105760764B (en) Encryption and decryption method and device for embedded storage device file and terminal
CN104283668B (en) The method and device of applied cryptography is obtained based on mobile terminal
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN103795533A (en) Id-based encryption and decryption method, and apparatus for executing same
CN105100115A (en) Data storage method for privacy protection based on encryption password and data fractionation
KR101989813B1 (en) Generating and verifying the alternative data in a specified format
US20200226952A1 (en) Digital cryptosystem with re-derivable hybrid keys
CN103634114A (en) Verifying method and system for intelligent secret key
CN103731475A (en) Data protection system
GB2528959A (en) Encoder, decoder and method
CN107528689B (en) Password modification method based on Ukey
CN102063598A (en) Data encryption and decryption methods and devices
CN102236756A (en) File encryption method based on TCM (trusted cryptography module) and USBkey
CN103731423A (en) Safe method for repeated data deleting
CN103414727A (en) Encryption protection system for input password input box and using method thereof
CN107306254B (en) Digital copyright protection method and system based on double-layer encryption
CN104038336A (en) Data encryption method based on 3DES
CN102694650A (en) Secret key generating method based on identity encryption
CN115603907A (en) Method, device, equipment and storage medium for encrypting storage data
CN105187418B (en) Weak signature algorithm
JP2019519176A5 (en)
CN104794243B (en) Third party's cipher text retrieval method based on filename
CN104978542B (en) The method and system of safe data storage and access data
CN113722741A (en) Data encryption method and device and data decryption method and device

Legal Events

Date Code Title Description
A201 Request for examination
A302 Request for accelerated examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20171206

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20180927

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20191204

Year of fee payment: 7