KR101330072B1 - Method and system for restoring data in database - Google Patents

Method and system for restoring data in database Download PDF

Info

Publication number
KR101330072B1
KR101330072B1 KR1020130082048A KR20130082048A KR101330072B1 KR 101330072 B1 KR101330072 B1 KR 101330072B1 KR 1020130082048 A KR1020130082048 A KR 1020130082048A KR 20130082048 A KR20130082048 A KR 20130082048A KR 101330072 B1 KR101330072 B1 KR 101330072B1
Authority
KR
South Korea
Prior art keywords
database
data
thread
encryption
multithreads
Prior art date
Application number
KR1020130082048A
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 KR1020130082048A priority Critical patent/KR101330072B1/en
Application granted granted Critical
Publication of KR101330072B1 publication Critical patent/KR101330072B1/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 method and a system for encoding or decoding data of a high-capacity table in a database and re-storing the data at high speeds. The method comprises the steps of: selecting a table to be encoded in the database; determining a number of multithreads; backing up the selected table; encoding a backup target column and storing the encoded backup target column in an original table; generating threads depending on the multithread number determined in the multithread number determination step; specifying an encoding range for each thread of the multithread; reading, through each thread and data in the encoding range given to each thread and encoding the read data; and storing the encoded data in the original table. [Reference numerals] (S30) Select table in DB;(S31) Determine the number of multithreads;(S32) Backup one table;(S33) Change one table;(S34) Generate thread;(S35) Designate an encoding range for each thread;(S36) Encode each thread;(S37) Store in one table

Description

데이터베이스 데이터 재저장 방법 및 시스템{Method and System for Restoring Data in Database}Method and System for Restoring Data in Database

본 발명은 데이터베이스 관리 기술에 관한 것으로, 보다 상세하게는, 데이터베이스 내 대용량 테이블의 데이터를 암호화 또는 복호화한 후 고속으로 재저장하는 방법 및 시스템에 관한 것이다. The present invention relates to a database management technology, and more particularly, to a method and system for encrypting or decrypting data of a large table in a database, and then restoring the data at high speed.

일반적으로 데이터베이스 관리 시스템에서 데이터베이스(Database, DB) 암호화를 도입하는 경우, 기존 데이터베이스에 이미 저장되어 있는 데이터를 암호화해야 한다. 그리고, 보통 암호화 테이블을 백업하게 된다. 그 경우, 칼럼은 전체 또는 암호화 대상만 백업하게 되며, 이때 로우넘버(ROWNUM)를 일련번호로 취득하여 함께 저장하는 것이 일반적이다.In general, when database (Database, DB) encryption is introduced in a database management system, it is necessary to encrypt data already stored in an existing database. Then, you usually back up the encryption table. In that case, the column will be backed up in its entirety or only for encryption. In this case, it is common to acquire a row number as a serial number and store it together.

또한, 암호화 시, 보안을 위해 암호화 대상 테이블의 인덱스, 제약조건 등을 제거하게 된다. 그리고, 백업한 테이블에서 데이터를 순차적으로 읽어서 암호화한 후 다시 원 테이블에 저장하게 된다.Also, during encryption, the indexes and constraints of the encryption target table are removed for security. Then, data is sequentially read from the backed up table, encrypted, and stored again in the original table.

그러나, 데이터베이스 내 대용량 테이블의 데이터를 암호화하거나 복호화한 후 다시 데이터베이스에 데이터를 저장할 때 대용량 데이터의 용량으로 인하여 시스템 자원을 상당히 소모하게 되고 그에 의해 데이터베이스 속도가 저하되는 단점이 있다.However, when encrypting or decrypting data of a large table in a database and storing the data in the database again, system resources are consumed considerably due to the capacity of the large data, thereby reducing the database speed.

일례로, 백업 테이블에서 데이터베이스의 대용량 테이블의 첫번째 데이터부터 순차적으로 읽어서 데이터를 암호화한 후 원 테이블에 다시 저장하는 경우, 데이터 처리 시간이 오래 걸리는 문제가 있다. 또한, 암호화에 소요되는 시간만큼 해당 데이터베이스를 사용하는 시스템의 서비스를 중지해야 하는 문제도 있다.For example, when data is sequentially read from the first data of the large table of the database in the backup table and the data is encrypted and stored again in the original table, data processing takes a long time. In addition, there is a problem that the service of the system using the database must be stopped for the time required for encryption.

이와 같이, 데이터베이스를 사용하는 단체, 회사, 기업, 관공서 등에서는 데이터베이스 사용의 보안성 고려시 고객 편의나 서비스 질 향상을 위하여 조금이라도 암호화 속도를 높여 암호화 시간을 단축하고, 그에 의해 서비스 중지 시간을 단축해야 하지만 아직까지 적절한 개선된 기능을 가진 솔루션이 제공되지 있지 않은 실정이다.As such, organizations, companies, corporations, and public offices that use the database reduce the encryption time by increasing the encryption speed even a little to improve customer convenience or service quality in consideration of the security of using the database. However, there is no solution yet with appropriate improvements.

본 발명은 상기의 종래의 문제점을 해결하기 위한 것으로 데이터베이스 내 대용량 테이블의 데이터를 암호화 또는 복호화한 후 고속으로 재저장하는 방법 및 시스템을 제공하고자 한다.The present invention is to solve the above-mentioned conventional problems, and to provide a method and system for re-storing at high speed after encrypting or decrypting data of a large table in a database.

상기 기술적 과제를 해결하기 위하여 본 발명의 일 실시예에 따른 데이터베이스 데이터 재저장 방법은, 데이터베이스 보안 시스템에서 데이터베이스 내 데이터를 암호화한 후 다시 저장하는 데이터베이스 데이터 재저장 방법으로서, 데이터베이스에서 암호화할 테이블을 선택하는 단계, 멀티쓰레드 개수를 결정하는 단계, 선택한 테이블을 백업하는 단계, 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장하는 단계, 멀티쓰레드의 개수를 결정하는 단계에서 결정된 멀티쓰레드 개수만큼 쓰레드를 생성하는 단계, 멀티쓰레드의 각 쓰레드별로 암호화 범위를 지정하는 단계, 각 쓰레드를 통해 쓰레드별로 부여된 범위의 데이터를 읽어서 암호화를 수행하는 단계, 및 암호화한 데이터를 커밋(Commit) 단위로 원 테이블에 저장하는 단계를 포함한다.In order to solve the above technical problem, a method of restoring database data according to an embodiment of the present invention is a method of restoring database data for encrypting and restoring data in a database in a database security system, and selecting a table to be encrypted in the database. Creating the number of multithreads determined in the step of determining the number of multithreads, determining the number of multithreads, backing up the selected table, encrypting the backup target column and storing it in the source table, and determining the number of multithreads. A step of specifying an encryption range for each thread of the multithread, a step of performing encryption by reading the data of the range granted for each thread through each thread, and storing the encrypted data in the original table as a commit unit. Steps.

일 실시예에 있어서, 상기의 백업하는 단계는, 원 테이블의 각 레코드별로 일련번호를 함께 저장하는 것을 포함한다.In one embodiment, the step of backing up includes storing the serial number together for each record of the original table.

일 실시예에서, 데이터베이스 데이터 재저장 방법은, 백업 대상 칼럼을 암호화한 후 원 테이블에 저장하는 단계 후에, 원 테이블의 인덱스(Index), 제약 조건을 제거하는 단계를 더 포함한다.In an embodiment, the method of restoring database data may further include removing an index and a constraint of the original table after encrypting the backup target column and storing the column in the original table.

일 실시예에서, 암호화 범위를 지정하는 단계는 원 테이블을 백업하는 단계에서 획득한 일련번호의 범위를 부여하는 것을 포함한다.In one embodiment, specifying the encryption range includes assigning a range of serial numbers obtained in the step of backing up the original table.

본 발명의 일 측면에 따른 데이터베이스 데이터 재저장 시스템은, 데이터베이스에서 암호화할 테이블을 선택하고 멀티쓰레드를 개수를 결정하는 쓰레드 개수 설정부, 쓰레드 개수 설정부에 의해 선택된 테이블을 백업하는 데이터 백업부, 백업된 테이블의 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장하는 테이블 변경부, 멀티쓰레드 개수 설정부에 의해 결정된 멀티쓰레드 개수만큼 쓰레드를 생성하는 쓰레드 생성부, 멀티쓰레드의 각 쓰레드별로 암호화 범위를 지정하고 각 쓰레드를 통해 쓰레드별로 부여된 범위의 데이터를 읽어서 암호화를 수행하는 암복호화부, 및 암복호화부를 통해 암호화한 데이터를 커밋(Commit) 단위로 데이터베이스의 원본 테이블에 저장하는 API(Application Programming Interface)를 포함한다.Database data storage system according to an aspect of the present invention, the thread number setting unit for selecting a table to encrypt in the database and determine the number of multi-thread, data backup unit for backing up the table selected by the thread number setting unit, backup The table changer that encrypts the backup target column of the stored table and stores it in the source table, the thread generator that creates as many threads as the number of multithreads determined by the multithread number setter, and the encryption range for each thread of the multithread. An encryption / decryption unit that reads the range of data assigned to each thread through each thread and performs encryption, and an API (Application Programming Interface) that stores the data encrypted through the encryption / decryption unit in the source table of the database in the unit of commit. Include.

본 발명에 의하면, 데이터베이스 내 대용량 테이블을 여러 개의 쓰레드가 동시에 읽어서 암호화 속도를 향상시키고, 그에 의해 데이터베이스의 서비스 중지 시간을 최소화할 수 있는 효과를 제공한다.According to the present invention, a large number of threads in a database can be read simultaneously by several threads to improve the encryption speed, thereby providing an effect of minimizing the downtime of the database.

또한, 본 발명에 의하면, 데이터베이스 암호화 시스템 도입 시 데이터베이스에 존재하는 기존 대용량 평문 데이터를 고속으로 암호화하여 재저장함으로써 고객사의 서비스 중단 시간을 단축하고, 그에 의해 데이터베이스 관리 시스템 또는 데이터베이스 보안 시스템에 대한 신뢰성을 향상시킬 수 있다.In addition, according to the present invention, when the database encryption system is introduced, the existing large-capacity plain text data existing in the database is encrypted and restored at a high speed, thereby reducing the service downtime of the customer, thereby improving reliability of the database management system or the database security system. Can be improved.

도 1은 본 발명의 일 실시예에 따른 데이터베이스 데이터 재저장 시스템을 설명하기 위한 개략적인 블록도.
도 2는 도 1의 데이터베이스 데이터 재저장 시스템의 블록도.
도 3은 도 2의 데이터베이스 데이터 재저장 시스템에 적용할 수 있는 데이터베이스 데이터 재저장 방법의 순서도.
도 4는 도 3의 데이터베이스 데이터 재저장 방법에 적용할 수 있는 복호화 과정을 설명하기 위한 순서도.
1 is a schematic block diagram illustrating a system for restoring database data according to an embodiment of the present invention.
2 is a block diagram of the database data storage system of FIG.
3 is a flow chart of a method for restoring database data applicable to the system for restoring database data of FIG. 2.
4 is a flowchart illustrating a decoding process applicable to the method of restoring database data 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 data storage system according to an embodiment of the present invention.

도 1을 참조하면, 본 실시예에 따른 데이터베이스 데이터 재저장 시스템(20)은, 데이터베이스 내 대용량 데이터를 암호화하거나 복호화한 후에 다시 원 데이블에 저장할 때 데이터베이스의 처리 속도를 향상시키기 위하여, API(Application Programming Interface) 암호화 방식에서 멀티쓰레드의 병렬 처리를 이용한다.Referring to FIG. 1, the database data restoring system 20 according to the present exemplary embodiment may use an API (Application Programming) to improve a processing speed of a database when encrypting or decrypting a large amount of data in a database and storing the data in a single table again. Interface) It uses multithreaded parallel processing in the encryption method.

다시 말해서, 데이터베이스 데이터 재저장 시스템(20)은, 데이터베이스 내 데이터 중 암호화/복호화할 테이블을 선택하고, 멀티쓰레드의 개수를 결정한 후, 데이터가 저장된 원 테이블을 백업한다. 그리고, 시스템은 백업 대상 칼럼을 암호화/복호화한 후 원본 데이블에 저장하고, 기결정된 개수의 멀티쓰레드를 생성한다. 그런 다음, 데이터베이스 데이터 재저장 시스템(20)은 각 쓰레드별 암호화/복호화 범위를 지정하고, 각 쓰레드를 통해 각기 부여된 범위의 데이터를 읽어내어 복호화하며, 각 쓰레드의 암호화/복호화가 완료되면, API를 통해 데이터(암호문/평문 데이터)를 데이터베이스에 저장한다.In other words, the database data restorage system 20 selects a table to be encrypted / decrypted among the data in the database, determines the number of multithreads, and then backs up the original table in which the data is stored. Then, the system encrypts / decrypts the backup target column, stores it in the original table, and creates a predetermined number of multithreads. Then, the database data storage system 20 specifies the encryption / decryption range for each thread, reads and decrypts the data of each given range through each thread, and when the encryption / decryption of each thread is completed, the API Stores data (password / plain text data) in the database.

데이터베이스(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)를 통해 연결되는 보안 장치의 적어도 일부 기능부나 이러한 기능부에 상응하는 기능을 수행하는 구성부로 구현될 수 있다. 애플리케이션 서버(12)는 데이터베이스 서버나 데이터베이스 관리 시스템을 구비할 수 있다.When the database data storage system 20 according to the present embodiment operates in an API manner, the database data storage system 20 may include an application server 12 and an API (which has a function of mounting a database and encrypting and decrypting the database). 30 may be implemented as at least some of the functional units of the security device connected through or a component that performs a function corresponding to these functional units. The application server 12 may include a database server or a database management system.

데이터베이스 데이터 재저장 시스템(20)에 적용할 수 있는 구성 및 작동원리는 도 2 내지 도 4를 참조하여 상세히 설명하기로 한다.The configuration and operation principle applicable to the database data storage system 20 will be described in detail with reference to FIGS. 2 to 4.

도 2는 도 1의 데이터베이스 데이터 재저장 시스템의 블록도이다.FIG. 2 is a block diagram of the database data storage system of FIG. 1.

도 2를 참조하면, 본 실시예에 따른 데이터베이스 데이터 재저장 시스템(20)은, 쓰레드 개수 설정부(21), 데이터 백업부(22), 원 테이블 변경부(23), 쓰레드 생성부(24), 암복호화부(25) 및 API(26)를 구비한다.Referring to FIG. 2, the database data storage system 20 according to the present embodiment includes a thread number setting unit 21, a data backup unit 22, an original table changing unit 23, and a thread generation unit 24. And an encryption / decryption unit 25 and an API 26.

쓰레드 개수 설정부(21)는 데이터베이스에서 암호화할 테이블을 선택하고 멀티쓰레드를 개수를 결정한다. 쓰레드 개수 설정부(21)는 The thread number setting unit 21 selects a table to be encrypted in the database and determines the number of multithreads. Thread count setting unit 21

데이터 백업부(22)는 쓰레드 개수 설정부에 의해 선택된 테이블을 백업한다. 데이터 백업부(22)는 백업 작업시 각 레코드별로 일련번호를 함께 저장한다. 일련번호는 일반적으로 데이터베이스에서 제공하는 로우넘버(ROWNUM)를 이용할 수 있다.The data backup unit 22 backs up the table selected by the thread number setting unit. The data backup unit 22 stores the serial number for each record together during the backup operation. The serial number can generally use the row number provided by the database.

테이블 변경부(23)는 백업 저장된 테이블의 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장한다. 테이블 변경부(23)는 암호화 데이터를 원본 테이블(또는, 원 테이블)에 저장하는 방법에 따라 다른 처리 방식으로 작동될 수 있다. 예를 들어, 인서트 방식, 업데이트 방식 등에 따라 원 테이블의 모든 칼럼을 백업하거나 암호화 대상만 백업할 수 있고, 또한 로우아이디를 함께 백업하여 업데이트 데이터 조건을 이용할 수 있다.The table changing unit 23 encrypts a backup target column of the backup stored table and stores the column in the original table. The table changing unit 23 may be operated in a different processing manner depending on how the encrypted data is stored in the original table (or the original table). For example, all columns of the original table can be backed up or only the encryption target can be backed up according to the insert method, update method, etc., and the update data condition can be used by backing up the row ID together.

쓰레드 생성부(24)는 멀티쓰레드 개수 설정부에 의해 결정된 멀티쓰레드 개수만큼 쓰레드를 생성한다. 멀티쓰레드는 데이터베이스 또는 데이터베이스 관리 시스템의 성능에 따라 적절한 개수로 결정될 수 있다.The thread generation unit 24 generates threads as many as the number of multithreads determined by the multithread number setting unit. Multithreading may be determined in an appropriate number depending on the performance of the database or database management system.

암복호화부(25)는 멀티쓰레드의 각 쓰레드별로 암호화 범위를 지정하고, 각 쓰레드를 통해 각기 부여된 범위의 데이터를 읽어서 암호화를 수행한다. 암복호화부(25)는 데이터 백업 시 획득한 일련번호의 범위를 각 쓰레드별로 부여하는 것으로 각 쓰레드별 암호화 범위를 지정할 수 있다.The encryption / decryption unit 25 specifies an encryption range for each thread of the multi-thread, and performs encryption by reading data of a range given through each thread. The encryption / decryption unit 25 assigns a range of serial numbers obtained at the time of data backup for each thread to designate an encryption range for each thread.

API(26)는 암복호화부를 통해 암호화한 데이터를 커밋(Commit) 단위로 데이터베이스의 원본 테이블에 저장되도록 기능한다. 여기서 커밋은 메모리에서 변경된 테이블의 데이터를 실제 디스크로 저장하는 것을 지칭하며, 커밋 단위는 시스템의 성능이나 용량에 따라 다를 수 있다.The API 26 functions to store the data encrypted through the encryption / decryption unit in the original table of the database in units of commits. In this case, the commit refers to storing the data of the changed table in memory on the physical disk. The commit unit may vary depending on the performance or capacity of the system.

도 3은 본 발명의 일 실시예에 따른 데이터베이스 데이터 재저장 방법의 흐름도이다.3 is a flowchart of a method of restoring database data according to an embodiment of the present invention.

본 실시예에 따른 데이터베이스 데이터 재저장 방법은 도 1 및 도 2의 데이터베이스 데이터 재저장 시스템에 적용될 수 있다.The method of restoring database data according to the present embodiment may be applied to the database data restoration system of FIGS. 1 and 2.

도 3을 참조하면, 본 실시예에 따른 데이터베이스 데이터 재저장 방법은, 먼저 데이터베이스 보안 시스템에서 암호화할 테이블을 선택한다(S30).Referring to FIG. 3, in the method of restoring database data according to the present embodiment, first, a table to be encrypted is selected by the database security system (S30).

다음, 멀티쓰레드를 몇 개로 수행할지 결정한다(S31). 멀티쓰레드는 시스템의 성능에 따라서 적절한 개수로 결정한다.Next, it is determined how many multithreads to perform (S31). Multithreading determines the appropriate number depending on the performance of the system.

데이터베이스 보안 시스템은 데이터베이스 데이터 재저장 방법을 이용하는 시스템으로서, 상술한 데이터베이스 데이터 재저장 시스템을 포함할 수 있다. 또한, 구현에 따라서 데이터베이스 보안 시스템은 데이터베이스 관리 시스템에 탑재되어 본 실시예의 데이터베이스 데이터 재저장 기능을 수행하는 수단이나 이러한 수단의 기능을 수행하는 구성부를 지칭할 수 있다.The database security system is a system using a method for restoring database data, and may include the above-described database data restoration system. In addition, depending on the implementation, the database security system may refer to a means mounted on a database management system to perform a database data restore function of the present embodiment, or a component that performs a function of such a means.

다음, 원 테이블을 백업한다(S32). 백업시 각 레코드별로 일련번호를 함께 저장한다. 일련번호는 일반적으로 데이터베이스에서 제공하는 로우넘버(ROWNUM)를 이용할 수 있다.Next, the original table is backed up (S32). The serial number is saved for each record at the time of backup. The serial number can generally use the row number provided by the database.

다음, 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장한다(S33). 암호화 데이터를 원본 테이블(이하, 원 테이블이라고도 함)에 저장하는 방법에 따라 그 처리 과정이 달라질 수 있다.Next, the backup target column is encrypted and stored in the original table (S33). Depending on how the encrypted data is stored in the original table (hereinafter referred to as the original table), the processing may vary.

인서트(Insert) 방식으로 저장하는 경우, 원 테이블의 모든 칼럼을 백업한다. 그리고, 업데이트(Update) 방식으로 저장하는 경우, 암호화 대상만 백업한다. 업데이트 방식인 경우 로우아이디(rowid)를 함께 백업하여 업데이트 데이터의 조건으로 로우아이디를 사용할 수 있다.If you save by insert method, back up all columns of the original table. In case of storing by the update method, only the encryption target is backed up. In the case of the update method, the row ID can be backed up together to use the row ID as a condition of the update data.

또한, 원 테이블 변경 시, 인덱스(Index), 제약 조건 등을 제거하고, 데이터 저장 시 데이터베이스 자체적으로 로그를 남기지 않도록 변경할 수 있다. 본 단계에서, 암호화 대상 칼럼의 데이터 타입은 모두 가변 문자형으로 변환될 수 있다.In addition, when the original table is changed, indexes and constraints can be removed, and the database itself can be changed so as not to leave a log when the data is stored. In this step, all data types of the column to be encrypted may be converted into a variable character type.

그리고, 인서트 방식으로 암호화 데이터를 저장한 경우, 원본 데이터는 본 단계(S33)에서 모두 삭제될 수 있다.And, if the encrypted data is stored in the insert method, all original data can be deleted in this step (S33).

다음, 상기의 단계(S31)에서 입력된 멀티쓰레드 개수만큼 쓰레드를 생성한다(S34).Next, as many threads as the number of multi-threads input in the above step (S31) is created (S34).

다음, 각 쓰레드별로 암호화 범위를 지정한다(S35). 암호화 범위 부여는 데이터 백업 시 획득한 일련번호의 범위를 부여하는 것으로 실행될 수 있다.Next, an encryption range is designated for each thread (S35). Encrypting range can be performed by assigning a range of serial numbers obtained at the time of data backup.

다음, 각 쓰레드는 부여된 범위의 데이터를 읽어서 암호화를 수행한다(S36).Next, each thread reads the data in the given range and performs encryption (S36).

마지막으로, 데이터베이스 데이터 재저장 시스템은 암호화한 데이터를 커밋(Commit) 단위로 원 테이블에 저장한다(S37).Finally, the database data restoring system stores the encrypted data in the original table in units of commits (S37).

본 실시예에 의하면, 데이터베이스 내 대용량 테이블의 데이터를 복수의 쓰레드를 통해 분산 처리함으로써 데이터 암호화 후 암호문을 저장하는 속도를 향상시킬 수 있다. 상술한 데이터베이스 데이터 재저장 방법은 특히 대용량 평문 데이터를 저장한 데이터베이스의 최초 DB 암호화 도입시에 매우 유용하다.According to the present embodiment, the speed of storing ciphertext after data encryption can be improved by distributing data of a large table in a database through a plurality of threads. The above-described method for restoring database data is particularly useful when the first DB encryption of a database storing a large amount of plain text data is introduced.

도 4는 도 3의 데이터베이스 데이터 재저장 방법에 적용할 수 있는 복호화 과정을 설명하기 위한 순서도이다.FIG. 4 is a flowchart illustrating a decoding process applicable to the method of restoring database data of FIG. 3.

본 실시예의 데이터베이스 데이터 재저장 방법은 도 3의 데이터베이스 데이터 재저장 방법에서와 같이 데이터베이스 내 평문 데이터의 암호화시에 적용될 수 있을 뿐만 아니라 데이터베이스 내 암호문의 복호화 시에도 실질적으로 동일하게 적용될 수 있다.The method of restoring database data of the present embodiment can be applied not only to encryption of plain text data in a database, but also to decryption of cipher text in a database as in the method of restoring database data of FIG. 3.

도 4를 참조하면, 데이터베이스 보안 시스템 또는 데이터베이스 데이터 재저장 시스템은 먼저 데이터베이스 내 암호문 중 복호화할 테이블을 선택하고, 멀티쓰레드의 개수를 결정한 후, 암호문이 저장된 원 테이블을 백업한다. 그리고, 시스템은 백업 대상 칼럼을 복호화한 후 원본 데이블에 저장하고, 기결정된 개수의 멀티쓰레드를 생성한다. 여기까지의 처리 과정은 도 3을 참조하여 앞서 설명한 단계들(S30 ~ S34)과 유사하다.Referring to FIG. 4, a database security system or a database data storage system first selects a table to be decrypted among cipher texts in a database, determines the number of multithreads, and then backs up the original table in which the cipher text is stored. The system decrypts the backup target column and stores it in the original table, and generates a predetermined number of multithreads. The processing up to this point is similar to the steps S30 to S34 described above with reference to FIG. 3.

다음, 데이터베이스 데이터 재저장 시스템은 각 쓰레드별 복호화 범위를 지정한다(S35A). 각 쓰레드별 복호화 범위는 암호문 백업 시에 획득한 데이터 테이블의 일련번호를 쓰레드의 개수로 나눈 것들 중 어느 하나일 수 있다.Next, the database data storage system designates a decryption range for each thread (S35A). The decryption range for each thread may be one of those obtained by dividing the serial number of the data table obtained at the time of the ciphertext by the number of threads.

다음, 각 쓰레드는 부여된 범위의 데이터를 읽어서 복호화를 수행한다(S36A).Next, each thread reads the data in the given range and performs decryption (S36A).

각 쓰레드의 복호화가 완료되면, 복호화된 데이터(평문 데이터)는 API를 통해 데이터베이스에 전송되어 커밋 단위로 저장될 수 있다.When the decryption of each thread is completed, the decrypted data (plain text data) may be transmitted to the database through the API and stored in a commit unit.

이상에서와 같이 실시 예들을 중심으로 본 발명을 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 예의 본질적인 기술내용을 벗어나지 않는 범위에서 실시예에 예시되지 않은 여러 가지의 조합 또는 변형과 응용이 가능함을 알 수 있을 것이다. 따라서, 본 발명의 실시 예들로부터 용이하게 도출가능한 변형과 응용에 관계된 기술내용들은 본 발명에 포함되는 것으로 해석되어야 할 것이다.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: 보안 장치 또는 데이터베이스 데이터 재저장 시스템
30: API(Application Programming Interface)
10: database
12: application server
20: Security device or database data restore system
30: Application Programming Interface

Claims (5)

데이터베이스 보안 시스템에서 데이터베이스 내 데이터를 암호화한 후 다시 저장하는 데이터베이스 데이터 재저장 방법으로서,
데이터베이스에서 암호화할 테이블을 선택하는 단계;
멀티쓰레드의 개수를 결정하는 단계;
상기 선택한 테이블을 백업하는 단계;
상기 백업하는 단계에서 백업된 테이블의 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장하는 단계;
상기 멀티쓰레드의 개수를 결정하는 단계에서 결정된 멀티쓰레드 개수만큼 쓰레드를 생성하는 단계;
상기 멀티쓰레드의 각 쓰레드별로 암호화 범위를 지정하는 단계;
상기 각 쓰레드를 통해 각기 부여된 범위의 데이터를 읽어서 암호화를 수행하는 단계; 및
암호화한 데이터를 상기 데이터베이스의 원본 테이블에 저장하는 단계;
를 포함하는 데이터베이스 데이터 재저장 방법.
A method of restoring database data in which a database security system encrypts and then stores data in a database again.
Selecting a table to encrypt in the database;
Determining the number of multithreads;
Backing up the selected table;
Encrypting a backup target column of the backed up table in the backup step and storing it in the original table;
Creating threads as many as the number of multithreads determined in the step of determining the number of multithreads;
Designating an encryption range for each thread of the multithread;
Performing encryption by reading data of a range assigned through each thread; And
Storing the encrypted data in an original table of the database;
Database data restore method comprising a.
청구항 1에 있어서,
상기 백업하는 단계는, 상기 원본 테이블의 각 레코드별로 일련번호를 함께 저장하는 것을 포함하는 데이터베이스 데이터 재저장 방법.
The method according to claim 1,
The step of backing up, database data storage method comprising storing the serial number for each record of the original table together.
청구항 1에 있어서,
상기 백업 대상 칼럼을 암호화한 후 상기 원본 테이블에 저장하는 단계 후에, 상기 원본 테이블의 인덱스(Index), 제약 조건을 제거하는 단계를 더 포함하는 데이터베이스 데이터 재저장 방법.
The method according to claim 1,
And after the encrypting the backup target column and storing the column in the original table, removing the index and the constraint of the original table.
청구항 1에 있어서,
상기 암호화 범위를 지정하는 단계는 상기 원본 테이블을 백업하는 단계에서 획득한 일련번호의 범위를 부여하는 것인 데이터베이스 데이터 재저장 방법.
The method according to claim 1,
The step of specifying the encryption range is to give a range of the serial number obtained in the step of backing up the original table.
데이터베이스에서 암호화할 테이블을 선택하고 멀티쓰레드를 개수를 결정하는 쓰레드 개수 설정부;
상기 쓰레드 개수 설정부에 의해 선택된 테이블을 백업하는 데이터 백업부;
상기 백업된 테이블의 백업 대상 칼럼을 암호화한 후 원본 테이블에 저장하는 테이블 변경부;
상기 멀티쓰레드 개수 설정부에 의해 결정된 멀티쓰레드 개수만큼 쓰레드를 생성하는 쓰레드 생성부;
상기 멀티쓰레드의 각 쓰레드별로 암호화 범위를 지정하고, 각 쓰레드를 통해 각기 부여된 범위의 데이터를 읽어서 암호화를 수행하는 암복호화부; 및
상기 암복호화부를 통해 암호화한 데이터를 상기 데이터베이스의 원본 테이블에 저장하는 입출력부;를 포함하는 데이터베이스 데이터 재저장 시스템.
A thread count setting unit for selecting a table to be encrypted in the database and determining the number of multithreads;
A data backup unit which backs up the table selected by the thread number setting unit;
A table changing unit which encrypts a backup target column of the backed up table and stores the encrypted column in an original table;
A thread generation unit generating threads as many as the number of multithreads determined by the multithread number setting unit;
An encryption / decryption unit that specifies an encryption range for each thread of the multithread, and performs encryption by reading data of a range given through each thread; And
And an input / output unit which stores the data encrypted by the encryption / decryption unit in an original table of the database.
KR1020130082048A 2013-07-12 2013-07-12 Method and system for restoring data in database KR101330072B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130082048A KR101330072B1 (en) 2013-07-12 2013-07-12 Method and system for restoring data in database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130082048A KR101330072B1 (en) 2013-07-12 2013-07-12 Method and system for restoring data in database

Publications (1)

Publication Number Publication Date
KR101330072B1 true KR101330072B1 (en) 2013-11-18

Family

ID=49857872

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130082048A KR101330072B1 (en) 2013-07-12 2013-07-12 Method and system for restoring data in database

Country Status (1)

Country Link
KR (1) KR101330072B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101728878B1 (en) * 2015-05-08 2017-05-02 (주)케이사인 Personal information transfer system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3736293B2 (en) 2000-05-31 2006-01-18 日本電信電話株式会社 Service quality control method and device service quality control program in encrypted communication
KR20090067342A (en) * 2007-12-21 2009-06-25 (주)이글로벌시스템 Zero-downtime column-level encrypting method for database
JP2010186163A (en) 2009-01-23 2010-08-26 Nec (China) Co Ltd Method and apparatus for k-anonymity update on encrypted inverted index table

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3736293B2 (en) 2000-05-31 2006-01-18 日本電信電話株式会社 Service quality control method and device service quality control program in encrypted communication
KR20090067342A (en) * 2007-12-21 2009-06-25 (주)이글로벌시스템 Zero-downtime column-level encrypting method for database
JP2010186163A (en) 2009-01-23 2010-08-26 Nec (China) Co Ltd Method and apparatus for k-anonymity update on encrypted inverted index table

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101728878B1 (en) * 2015-05-08 2017-05-02 (주)케이사인 Personal information transfer system

Similar Documents

Publication Publication Date Title
CN101587479B (en) Database management system kernel oriented data encryption/decryption system and method thereof
Demertzis et al. Fast searchable encryption with tunable locality
US10169606B2 (en) Verifiable data destruction in a database
CN111183420B (en) Log structured storage system
US9548866B2 (en) Deletion of content in digital storage systems
US10721062B2 (en) Utilizing error correction for secure secret sharing
CN101808095A (en) Encryption copy organization method under distributed storage environment
CN111837113A (en) Log structure storage system
CN111566611A (en) Log structure storage system
US20130097430A1 (en) Encrypting data and characterization data that describes valid contents of a column
US20140095889A1 (en) Encrypted search database device, encrypted search data adding/deleting method and adding/deleting program
CN106713334B (en) Encryption method, decryption method, access method and device for virtual storage volume
US8694798B2 (en) Generating and securing multiple archive keys
CN106682521B (en) File transparent encryption and decryption system and method based on driver layer
CN103248632A (en) Synchronous disc data security protection writing and reading method
CN111782625A (en) Core intelligence technology embedded remote file system software
KR101330072B1 (en) Method and system for restoring data in database
CN101908361B (en) Method for hiding private information of U disk
CN103248713A (en) Synchronous disc data security protection method
US20210224242A1 (en) Systems and methods for indexing and searching data
CN113360478B (en) Multi-data-source integration method
KR20190087720A (en) Data backup management apparatus that can prevent hacking of storage for data backup and operating method thereof
US11275849B2 (en) Crytography data management
CN113641694A (en) Massive historical data backup method and recovery method for database
KR20160131622A (en) Personal information transfer system

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: 20171103

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20180927

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20191104

Year of fee payment: 7