KR101330071B1 - Security apparatus and method for protecting numeric data in database - Google Patents

Security apparatus and method for protecting numeric data in database Download PDF

Info

Publication number
KR101330071B1
KR101330071B1 KR1020130076512A KR20130076512A KR101330071B1 KR 101330071 B1 KR101330071 B1 KR 101330071B1 KR 1020130076512 A KR1020130076512 A KR 1020130076512A KR 20130076512 A KR20130076512 A KR 20130076512A KR 101330071 B1 KR101330071 B1 KR 101330071B1
Authority
KR
South Korea
Prior art keywords
data
length
database
encoding
unit
Prior art date
Application number
KR1020130076512A
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 KR1020130076512A priority Critical patent/KR101330071B1/en
Application granted granted Critical
Publication of KR101330071B1 publication Critical patent/KR101330071B1/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/6245Protecting personal data, e.g. for financial or medical purposes
    • 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)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention relates to a book scanner which automatically sets a book on a scanning surface in the mounting process for scanning of the book to prevent discomfort in the wrist and improve convenience in use. That is, the present invention comprises a book mounting part (100), which is formed to incline rearwards, in the book scanner. Therefore, the present invention allows the book to slide on the scanning surface by book weight to be automatically set to a right position in the mounting process of the book by the book mounting part which is formed to incline rearwards. The present invention can improve the convenience in use by minimizing the discomfort in the wrist when the book scanner is used. [Reference numerals] (S31) Calculate the length of plane language number type data;(S32) Decoding;(S33) Encryption;(S34) Encoding;(S35) Size conversion from the length of the encoded data into the length of plane language number type data

Description

데이터베이스의 숫자형 데이터의 보안 방법 및 장치{Security Apparatus and Method for Protecting Numeric Data in Database}Security Apparatus and Method for Protecting Numeric Data in Database

본 발명은 데이터베이스 보안 장치 및 방법에 관한 것으로, 보다 상세하게는, 데이터베이스의 숫자형 데이터를 보호하는 보안 장치 및 방법에 관한 것이다.The present invention relates to a database security apparatus and method, and more particularly, to a security apparatus and method for protecting numeric data in a database.

최근 다양한 기업, 회사, 공공기관에서는 대량의 고객정보를 데이터베이스(DB)로 관리하고 있으며 이를 기반으로 고객 인증이나 고객 맞춤형의 다양한 콘텐츠 서비스를 제공하고 있다.Recently, various companies, companies, and public institutions manage a large amount of customer information in a database, and provide various content services based on customer authentication or customer customization.

데이터베이스에 저장되는 많은 정보 중 법률이나 규정 등에 의해 보호되어야 하는 개인정보는 암호화가 필요한 데이터이다. 그러나, 암호화가 필요한 데이터는 암호화 및 인코딩(사람이 인지할 수 있는 문자로 변환) 과정을 거치면서 그 사이즈가 증가하므로, 데이터베이스의 저장 공간(칼럼 단위 등)의 사이즈를 늘려서 저장해야 한다.Among the many information stored in the database, personal information that must be protected by laws or regulations is data that requires encryption. However, data that needs to be encrypted increases in size through encryption and encoding (converted into human-recognizable characters). Therefore, the size of the storage space (column unit, etc.) of the database must be increased and stored.

현재 서비스 중인 대부분의 데이터베이스 보안 프로그램은 개인 정보의 보호를 위한 암호화 시 데이터베이스의 칼럼(Column) 사이즈를 증가시켜 암호화된 개인정보를 저장하고 있다. 따라서, 데이터베이스에서 이름, 주소, 주민번호, 카드번호 등의 개인 정보를 저장할 때 보안의 이유로 개인정보를 암호화해야 하므로 데이터베이스의 용량이 커지고 처리 속도가 떨어지는 단점이 있다.Most database security programs currently in service store encrypted personal information by increasing the column size of the database when encrypting to protect personal information. Therefore, when storing personal information such as name, address, social security number, and card number in the database, it is necessary to encrypt the personal information for security reasons, so that the capacity of the database becomes large and the processing speed decreases.

일례로, 주민번호, 카드번호 등과 같이 그 길이가 고정인 숫자형 데이터의 경우에도, 데이터를 암호화한 후에 그 사이즈가 커지기 때문에 원본 데이터가 저장되어 있던 저장 공간에 암호화된 데이터를 다시 저장할 수 없다.For example, even in the case of numeric data having a fixed length such as a social security number or a card number, the encrypted data cannot be stored again in the storage space in which the original data is stored because its size increases after the data is encrypted.

따라서, 종래의 데이터베이스 보안 장치에서는 암호화되지 않은 평문 숫자형 데이터의 암호화를 위해서도 데이터베이스에서 저장 공간의 사이즈를 늘리고 이 데이터를 사용하는 각종 서비스 시스템의 프로그램도 수정해야 하므로 인력과 시간에 대한 비용이 추가로 발생하는 문제가 있다.Therefore, in the conventional database security device, even for encryption of unencrypted plain text numeric data, the size of the storage space must be increased in the database, and the programs of various service systems that use the data must be modified. There is a problem that occurs.

본 발명은 상기의 문제점을 해결하기 위한 것으로 데이터베이스의 숫자형 데이터를 암호화할 때 그 길이를 동일하게 유지하는 데이터베이스의 숫자형 데이터의 보안 장치 및 방법을 제공하는 데 그 목적이 있다.An object of the present invention is to provide a security apparatus and method for numeric data in a database that maintains the same length when encrypting numeric data in a database.

전술한 기술적 과제를 해결하기 위하여 본 발명의 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 방법은, 데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 구하는 단계, 평문 숫자형 데이터의 길이가 감소하도록 평문 숫자형 데이터를 디코딩하는 단계, 디코딩한 데이터를 암호화하는 단계, 암호화한 데이터를 인코딩하는 단계, 및 인코딩한 데이터의 길이를 평문 숫자형 데이터의 길이로 사이즈 변환하는 단계를 포함한다.In order to solve the above technical problem, the security method of the numeric data of the database according to an embodiment of the present invention, the step of obtaining the length of the plain text numeric data input from the database and requested encryption, the length of the plain text numeric data Decoding the plain text numeric data so as to reduce the number, encrypting the decoded data, encoding the encrypted data, and size converting the length of the encoded data into the length of the plain text numeric data.

일 실시예에서, 평문 숫자형 데이터는 데이터베이스에서 암호화가 필요한 데이터이다. 암호화가 필요한 데이터는 주민번호, 생년월일, 전화번호, 카드번호, 금융계좌번호, 비밀번호 중 적어도 어느 하나를 포함하는 숫자형 사용자정보 또는 고객정보이다.In one embodiment, the plain text numeric data is data that requires encryption in the database. The data that requires encryption is numeric user information or customer information including at least one of social security number, date of birth, telephone number, card number, financial account number, and password.

일 실시예에서, 데이터베이스의 숫자형 데이터의 보안 방법은, 디코딩하는 단계 전에, 평문 숫자형 데이터의 길이가 기준 길이 이상인지를 판단하는 단계를 더 포함한다. 최소 기준 길이는 4일 수 있다.In one embodiment, the method of securing numeric data in a database further comprises, prior to the step of decoding, determining whether the length of the plain text numeric data is greater than or equal to the reference length. The minimum reference length may be four.

일 실시예에서, 디코딩하는 단계는, 16진법(Hexadecimal, HEX) 디코딩을 이용한다.In one embodiment, the decoding step uses Hexadecimal (HEX) decoding.

일 실시예에서, 데이터베이스의 숫자형 데이터의 보안 방법은, 디코딩하는 단계 전에, 10진수의 평문 숫자형 데이터를 16진수로 변환하는 단계를 더 포함한다.In one embodiment, the method of securing numeric data in a database further comprises converting the decimal plain text numeric data to hexadecimal before decoding.

일 실시예에서, 데이터베이스의 숫자형 데이터의 보안 방법은, 원문 데이터의 자리수 또는 16진수로 변환한 데이터의 자리수가 짝수인지를 판단한 후, 홀수이면 데이터의 자리수가 짝수가 되도록 맨 앞자리에 기설정 숫자를 추가하는 단계를 더 포함한다. 기설정 숫자는 0일 수 있다.In one embodiment, the security method of the numeric data of the database, after determining whether the number of digits of the original data or the data converted to hexadecimal number is even, if the odd number is a preset number to the first digit to the even number of digits of the data It further comprises the step of adding. The preset number may be zero.

일 실시예에서, 데이터베이스의 숫자형 데이터의 보안 방법은, 디코딩 단계 이전 또는 10진수의 평문 숫자형 데이터를 16진수로 변환하는 단계 전에, 평문 숫자형 데이터의 길이가 특정 길이인지를 판단하는 단계를 더 포함한다. 여기서, 평문 숫자형 데이터의 길이가 특정 길이가 아니면, 상기의 보안 방법은 10진수의 평문 숫자형 데이터를 16진수로 변환하는 단계를 수행하지 않고, 디코딩하는 단계를 바로 수행할 수 있다.In one embodiment, a method of securing numeric data in a database may include determining whether the length of the plain text numeric data is of a particular length before the decoding step or before converting the decimal plain text data into hexadecimal. It includes more. Here, if the length of the plain text numeric data is not a specific length, the security method may directly perform decoding without performing the step of converting the decimal plain text numeric data into hexadecimal.

일 실시예에서, 인코딩하는 단계는, 암호화한 데이터를 Base64 인코딩하는 것을 포함한다.In one embodiment, the step of encoding comprises Base64 encoding the encrypted data.

일 실시예에서, 인코딩하는 단계는, 암호화한 데이터의 자리수를 3으로 나누고 그 나머지를 올림한 후 얻은 정수에 4를 곱한 자리수로 암호화한 데이터의 자리수를 변환하는 것을 포함한다.In one embodiment, the step of encoding comprises dividing the number of digits of the encrypted data by dividing the number of digits of the encrypted data by three and rounding the remainder up to the number of digits multiplied by four.

일 실시예에서, 데이터베이스의 숫자형 데이터의 보안 방법은, 인코딩하는 단계 후에, 인코딩한 데이터의 길이를 평문 숫자형 데이터의 길이와 비교하는 단계, 및 비교 결과에 따라 Base64 인코딩에 설정된 패딩을 이용하여 자리수를 맞추는 단계를 더 포함한다.In one embodiment, a method of securing numeric data in a database comprises, after encoding, comparing the length of encoded data to the length of plain text numeric data, and using padding set to Base64 encoding according to the comparison result. It further includes the step of adjusting the number of digits.

본 발명의 다른 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 방법은, 데이터베이스로부터 입력되고 복호화가 요청된 암호문의 길이를 구하는 단계, 암호문을 Base64 디코딩하는 단계, 디코딩한 데이터를 복호화하는 단계, 복호화한 데이터를 HEX((Hexadecimal) 인코딩하는 단계, 및 인코딩한 데이터의 길이가 암호문의 길이와 다를 때 인코딩한 데이터의 앞자리에 0을 추가하는 사이즈 변환 단계를 포함한다.According to another aspect of the present invention, there is provided a method of securing numeric data in a database, the method comprising: obtaining a length of a cipher text input from the database and requested to be decrypted, base64 decoding the cipher text, decrypting the decoded data, and decrypting HEX (Hexadecimal) encoding of one data, and a size conversion step of adding zeros to the front of the encoded data when the length of the encoded data is different from the length of the cipher text.

본 발명의 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치는, 데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 산출하는 길이산출부, 평문 숫자형 데이터의 길이가 작아지도록 평문 숫자형 데이터를 디코딩하는 디코딩부, 디코딩부의 디코딩 데이터를 암호화하는 암호화부, 암호화부의 암호화 데이터를 인코딩하는 인코딩부, 인코딩부의 인코딩 데이터의 길이를 평문 숫자형 데이터의 길이로 사이즈 변환하는 사이즈 변환부를 포함한다.Security apparatus for numeric data of a database according to an embodiment of the present invention, the length calculation unit for calculating the length of the plain text numeric data input from the database and the encryption is requested, the plain text number so that the length of the plain text numeric data is reduced A decoding unit for decoding the type data, an encryption unit for encrypting the decoding data of the decoding unit, an encoding unit for encoding the encryption data of the encryption unit, and a size conversion unit for size-converting the length of the encoding data of the encoding unit to the length of the plain text data. .

본 발명의 다른 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치는, 데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 산출하는 길이산출부, 평문 숫자형 데이터의 길이가 기준길이 이상인지를 판단하는 길이판단부, 평문 숫자형 데이터를 HEX(Hexadecimal) 디코딩하는 디코딩부, 디코딩부의 디코딩 데이터를 암호화하는 암호화부, 암호화부의 암호화 데이터를 Base64 인코딩하는 인코딩부, 및 인코딩부의 인코딩 데이터에 패딩을 삽입하는 패딩삽입부를 포함한다.Security device for numeric data of a database according to another embodiment of the present invention, the length calculation unit for calculating the length of the plain text numeric data input from the database and the encryption is requested, the length of the plain text numeric data is more than the reference length A length determining unit for determining recognition, a decoding unit for HEX (Hexadecimal) decoding of plain text numeric data, an encryption unit for encrypting the decoding data of the decoding unit, an encoding unit for Base64 encoding the encryption data of the encryption unit, and padding the encoded data in the encoding unit. It includes a padding insert for inserting.

본 발명의 또 다른 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치는, 데이터베이스로부터 입력되고 복호화가 요청된 암호문의 길이를 산출하는 길이산출부, 암호문을 Base64 디코딩하는 디코딩부; 디코딩부에서 디코딩한 데이터를 복호화하는 복호화부, 복호화부에서 복호화한 데이터를 HEX((Hexadecimal) 인코딩하는 인코딩부, 및 인코딩부에서 인코딩한 데이터의 길이가 암호문의 길이와 다를 때 인코딩한 데이터의 앞자리에 0을 추가하는 사이즈 변환부를 포함한다.In accordance with still another aspect of the present invention, there is provided a security apparatus for numeric data in a database, comprising: a length calculator configured to calculate a length of a cipher text inputted from the database and requested to be decrypted; A decoder which decodes the data decoded by the decoder, an encoder which encodes the data decoded by the decoder, HEX (Hexadecimal) encoding, and a leading digit of the encoded data when the length of the data encoded by the encoder is different from the length of the ciphertext. Includes a size converter that adds zeros to.

본 발명에 의하면, 주민번호, 카드번호 등의 숫자형 데이터를 암호화한 후에도 그 길이를 동일하게 유지함으로써 데이터베이스의 저장 공간에 대한 사이즈 변환 없이 암호화된 숫자형 데이터를 데이터베이스의 기존 저장 공간에 저장하여 데이터베이스의 관리 및 운용을 효율적으로 수행할 수 있도록 하는 효과를 제공한다.According to the present invention, the encrypted numeric data is stored in the existing storage space of the database without changing the size of the storage space of the database by maintaining the same length even after encrypting the numeric data such as social security number and card number. It provides the effect of efficient management and operation of the system.

또한, 데이터베이스의 평문 숫자형 데이터의 길이와 동일한 길이로 암호화한 데이터를 동일한 데이터베이스에 저장함으로써 개인정보의 보안 요구를 충족하면서 데이터의 암호화 시간을 단축하고 데이터베이스의 실시간 처리 속도를 향상시키는 효과를 제공한다.In addition, by storing the data encrypted with the same length as the length of the plain-text numeric data of the database in the same database, it provides the effect of reducing the encryption time of the data and the real-time processing speed of the database while meeting the security requirements of personal information .

또한, 본 발명에 의하면, 데이터베이스의 숫자형 데이터를 기존 대비 고속으로 암복호화하는 API(Application Programming Interface) 방식의 고성능 데이터베이스 보안 알고리즘을 제공할 수 있다.In addition, according to the present invention, it is possible to provide a high performance database security algorithm of an API (Application Programming Interface) method for encrypting and decrypting numeric data of a database at a higher speed than the existing one.

도 1은 본 발명에 따른 데이터베이스의 숫자형 데이터의 보안 장치를 설명하기 위한 개략적인 블록도.
도 2는 본 발명의 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치의 개략적인 블록도.
도 3은 도 2의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터의 보안 방법에 대한 순서도.
도 4는 본 발명의 다른 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치의 개략적인 블록도.
도 5 및 도 6은 도 4의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터의 보안 방법에 대한 순서도.
도 7은 도 4의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터의 보안 방법의 복호화 과정에 대한 순서도.
1 is a schematic block diagram illustrating an apparatus for securing numeric data in a database according to the present invention.
2 is a schematic block diagram of an apparatus for securing numeric data in a database according to an embodiment of the present invention.
3 is a flow chart of a method for securing numeric data in a database applicable to the security device of FIG.
4 is a schematic block diagram of an apparatus for securing numeric data in a database according to another embodiment of the present invention.
5 and 6 are flowcharts of a method for securing numeric data in a database applicable to the security device of FIG. 4.
7 is a flowchart illustrating a decryption process of a security method of numeric data of a database applicable to the security device of FIG. 4.

이하에서는 첨부한 도면을 참조하여 바람직한 실시 형태들에 대해서 상세히 설명한다. 다만, 실시형태를 설명함에 있어서, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략한다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙여 설명하기로 한다.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 an apparatus for securing numeric data in a database according to an embodiment of the present invention.

도 1을 참조하면, 본 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치(이하, 간략히 보안 장치라 한다)(20)는 데이터베이스(10)의 평문 숫자형 데이터를 암호화할 때 암호화된 데이터의 길이를 원문 데이터의 길이와 동일하게 한다. 이러한 구성에 의하면, 데이터베이스에 저장된 평문 숫자형 데이터를 암호화하여 다시 저장할 때 데이터베이스의 칼럼 사이즈를 변경하지 않고 데이터를 저장할 수 있으므로 데이터베이스의 관리와 보안을 효율적으로 수행할 수 있다.Referring to FIG. 1, a security device (hereinafter, simply referred to as a security device) 20 of numeric data of a database according to the present embodiment 20 is a length of encrypted data when encrypting plain text numeric data of a database 10. Is equal to the length of the original data. According to such a configuration, when the plain text numeric data stored in the database is encrypted and stored again, the data can be stored without changing the column size of the database, thereby efficiently managing and securing 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)를 통해 연결되는 암호화 서버(Encryption Server)로 구현될 수 있다. 여기서, 애플리케이션 서버(12)는 데이터베이스 서버나 데이터베이스 관리 시스템을 구비할 수 있다.When the security device 20 according to the present embodiment operates in an API manner, the security device 20 is connected 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. Here, the application server 12 may include a database server or a database management system.

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

도 2는 본 발명의 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치의 개략적인 블록도이다.2 is a schematic block diagram of an apparatus for securing numeric data in a database according to an embodiment of the present invention.

도 2를 참조하면, 본 실시예에 따른 보안 장치(20)는, 길이산출부(21), 디코딩부(22), 암호화부(23), 인코딩부(24) 및 사이즈변환부(25)를 구비한다.Referring to FIG. 2, the security device 20 according to the present embodiment includes a length calculator 21, a decoder 22, an encryption unit 23, an encoding unit 24, and a size conversion unit 25. Equipped.

길이산출부(21)는 암호화가 요청된 평문 숫자형 데이터의 길이를 계산한다. 여기서, 평문 숫자형 데이터는 데이터베이스에서 암호화가 필요한 데이터이다. 암호화가 필요한 데이터는 암호화 정책이나 규정에 따라 암호화하여 데이터베이스에 저장하는 데이터로서, 주민번호, 생년월일, 전화번호, 카드번호, 금융계좌번호, 비밀번호 등의 숫자형 개인정보를 지칭한다.The length calculator 21 calculates the length of the plain text numeric data for which encryption is requested. Here, the plain text numeric data is data that requires encryption in a database. Data that requires encryption is data stored in a database encrypted according to an encryption policy or regulation, and refers to numeric personal information such as social security number, date of birth, telephone number, card number, financial account number, and password.

디코딩부(22)는 평문 숫자형 데이터를 디코딩하여 평문 숫자형 데이터의 길이를 원하는 길이로 감소시킨다.The decoding unit 22 decodes the plain text numeric data to reduce the length of the plain text numeric data to a desired length.

암호화부(23)는 디코딩부(22)에서 출력되는 데이터를 암호화한다. 암호화부(23)는 데이터베이스 서버나 데이터베이스 관리 시스템 측으로부터 획득한 보안 정책이나 암호화 정책 설정에 따라 평문 숫자형 데이터를 암호화한다.The encryption unit 23 encrypts the data output from the decoding unit 22. The encryption unit 23 encrypts the plain text numeric data according to the security policy or encryption policy setting obtained from the database server or the database management system.

보안 정책이나 암호화 정책은 기존의 다양한 데이터베이스 암호화 방식 중에서 선택되어 이용될 수 있다. 예를 들어, AES(Advanced Encryption Standard), Three DES(Data Encryption Standard) 등의 알고리즘을 이용하는 TDE(Transparent Data Encryption) 암호화 방식이나, 칼럼(Column) 암호화 방식, 테이블스페이스(Tablespace) 암호화 방식, 트리거 및 뷰 암호화 방식 등이 이용될 수 있다. 각 암호화 방식은 이미 잘 알려져 있는 기술이므로 그것들에 대한 상세 설명은 생략한다.The security policy or encryption policy may be selected and used from various existing database encryption methods. For example, transparent data encryption (TDE) encryption using algorithms such as AES (Advanced Encryption Standard), Three DES (Data Encryption Standard), column encryption, tablespace encryption, triggers, and View encryption schemes and the like may be used. Since each encryption method is a well-known technique, a detailed description thereof will be omitted.

인코딩부(24)는 암호화부(23)에서 암호화된 데이터를 인코딩한다. 인코딩부(24)는 암호화된 데이터의 길이가 원문 데이터인 평문 숫자형 데이터의 길이와 동일한 길이를 갖도록 하는데 있어서 암호화된 데이터의 길이를 원하는 길이로 조정한다. 일 실시예에서, 인코딩부(24)는 암호화부(23)에서 암호화된 데이터의 자리수를 3으로 나눈 후 나머지를 올림 처리한 정수(Integer)에 4를 곱한 크기의 자리수로 조정한다. 이러한 인코딩부의 동작에 의하면, 이후의 사이즈변환부(25)에서 간단하게 암호화된 데이터의 자리수를 원문 데이터(평문 숫자형 데이터)의 길이와 동일하게 맞출 수 있게 된다.The encoding unit 24 encodes the data encrypted by the encryption unit 23. The encoding section 24 adjusts the length of the encrypted data to a desired length so that the length of the encrypted data has the same length as that of the plain text numeric data that is the original data. In one embodiment, the encoding unit 24 divides the number of digits encrypted by the encryption unit 23 by 3 and adjusts the number of digits multiplied by 4 to the integer rounded up. According to the operation of the encoding unit, the number of digits of the data simply encrypted in the subsequent size conversion unit 25 can be equally matched to the length of the original data (plain text numeric data).

사이즈변환부(25)는 인코딩부(24)에서 인코딩한 데이터의 길이를 길이산출부(21)에서 산출한 평문 숫자형 데이터의 길이와 동일하게 변환한다. 인코딩한 데이터의 길이가 평문 숫자형 데이터의 길이보다 작을 때, 사이즈변환부(25)는 기설정된 임의의 값을 삽입하여 인코딩한 데이터의 사이즈(길이)를 변환한다. 일 실시예에서 사이즈변환부(25)는 인코딩부(24)의 인코딩시에 사용하는 패딩(Padding)을 이용하여 인코딩한 데이터의 길이를 평문 숫자형 데이터의 길이와 동일하게 맞출 수 있다.The size converting section 25 converts the length of the data encoded by the encoding section 24 to be equal to the length of the plain text numeric data calculated by the length calculating section 21. When the length of the encoded data is smaller than the length of the plain text numeric data, the size converter 25 inserts a predetermined value and converts the size (length) of the encoded data. In one embodiment, the size converter 25 may match the length of the encoded data using padding used when encoding the encoder 24 to be equal to the length of the plain text data.

도 3은 도 2의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터의 보안 방법에 대한 순서도이다.3 is a flowchart illustrating a method of securing numeric data in a database applicable to the security device of FIG. 2.

도 3을 참조하면, 본 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 방법(이하, 간단히 보안 방법이라 함)에서는, 먼저 데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 구한다(S31). 예를 들어, 주민번호 앞자리와 같이 6자리의 숫자형 데이터인 '999999'의 길이를 구하면, '6'이다.Referring to FIG. 3, in the method of securing numeric data of a database according to the present embodiment (hereinafter, simply referred to as a security method), first, a length of plaintext numeric data inputted from a database and requested for encryption is calculated (S31). . For example, if you obtain the length of '999999', which is 6-digit numeric data, such as the social security number, it is '6'.

다음, 평문 숫자형 데이터의 길이가 감소하도록 평문 숫자형 데이터를 디코딩한다(S32). 예를 들어, '999999'를 16진수(Hexadecimal, HEX) 디코딩하면, '0x99, 0x99, 0x99'로 3자리수가 된다. 본 디코딩 과정에 의하면, 평문 숫자형 데이터의 자리수가 1/2로 줄어든다.Next, the plaintext numeric data is decoded so that the length of the plaintext numeric data is reduced (S32). For example, when '999999' is hexadecimal (Hexadecimal, HEX) decoded, '0x99, 0x99, 0x99' becomes three digits. According to this decoding process, the number of digits of the plain text numeric data is reduced to 1/2.

다음, 디코딩한 데이터를 암호화한다(S33). 데이터의 암호화는 데이터베이스에 기설정된 보안 정책에 따라 기존의 다양한 방법으로 수행될 수 있다. 일 실시예에서, 데이터는 OFB 모드(Output Feedback Mode)와 None Padding으로 암호화된다.Next, the decoded data is encrypted (S33). Encryption of data may be performed by various existing methods according to a security policy set in a database. In one embodiment, the data is encrypted in OFB mode (Output Feedback Mode) and None Padding.

다음, 암호화한 데이터를 인코딩한다(S34). 일 실시예에서, 암호화부에 의해 암호화된 데이터는 Base64로 인코딩될 수 있다. 본 실시예에서 Base64 인코딩을 통해 '0x12 Oxbe 0x3f'를 암호화하고 인코딩한 결과는 'Er4/'이다. 인코딩 과정에서는 디코딩한 데이터의 자리수를 3으로 나누고 그 나머지를 올림 처리하여 얻은 정수에 4를 곱한 크기의 자리수로 변환된 데이터가 출력된다. 본 실시예에서 인코딩한 데이터의 자리수는 '4'가 된다.Next, the encrypted data is encoded (S34). In one embodiment, the data encrypted by the encryption unit may be Base64 encoded. In this embodiment, the result of encrypting and encoding '0x12 Oxbe 0x3f' through Base64 encoding is 'Er4 /'. In the encoding process, data obtained by dividing the number of digits of the decoded data by 3 and rounding the remainder up to 4 digits of the integer obtained by multiplying the integer is output. In the present embodiment, the number of digits of encoded data is '4'.

다음, 인코딩한 데이터의 길이를 평문 숫자형 데이터의 길이로 사이즈 변환한다(S35). 사이즈 변환부는 인코딩 과정에서 삽입할 수 있도록 설정된 패딩(Padding)을 인코딩한 데이터의 두 앞자리에 삽입하여, 인코딩한 데이터의 길이를 원문 데이터의 길이(6 자리수)와 동일하게 사이즈 변환할 수 있다. 일 실시예에서 사이즈 변환된 데이터는 '==Er4/'로 최초 숫자의 자리수와 동일한 6자리가 된다.Next, the length of the encoded data is size converted to the length of the plain text numeric data (S35). The size converting unit inserts padding set to be inserted in the encoding process at two leading positions of the encoded data, and sizes the length of the encoded data to be equal to the length (6 digits) of the original data. In one embodiment, the size-converted data is 6 digits equal to the number of digits of the first number with '== Er4 /'.

패딩은 Base64 인코딩에 사용되는 값 '='일 수 있으나, 본 사이즈 변환 과정에 사용되는 패딩은 그러한 구성으로 한정되지 않고 인코딩부의 종류에 따라 변경가능한다.The padding may be a value '=' used for Base64 encoding, but the padding used in this size conversion process is not limited to such a configuration and may be changed according to the type of encoding unit.

본 실시예에 의하면, 원본 데이터(평문 숫자형 데이터)의 암호화시 그 길이와 동일한 길이를 갖는 암호화 데이터를 생성하여 데이터베이스에 그대로 저장할 수 있다. 이러한 구성에 의하면, 데이터베이스의 관리 및 보안을 효율적으로 수행할 수 있다. 특히, 데이터베이스의 속도를 크게 향상시킬 수 있다.According to the present embodiment, when encrypting original data (plain text numeric data), encrypted data having the same length as that of the original data can be generated and stored in the database as it is. According to such a structure, management and security of a database can be performed efficiently. In particular, the speed of the database can be greatly improved.

다시 말해서, 최근 개인정보가 내부 CRM(Customer Relationship Management) 및 DW(Data Warehouse), OLAP(Online Analytical Processing) 등의 다양한 내부 마케팅 업무에 이용되면서 개인정보 데이터의 활용과 관리되는 전반적인 과정을 고려한 효율적인 암호화 정책 수립이 강조되고 있다. 즉, 수천 개의 애플리케이션이 수십 개의 데이터베이스를 동시에 사용하는 전사적 데이터베이스 이용 환경에서, 본 실시예의 보안 장치 및 방법을 이용하면 주민번호, 카드번호 등의 평문 숫자형 데이터의 동일 길이 암호화를 통해 데이터베이스의 데이터 처리 속도를 크게 높일 수 있다.In other words, recently, personal information has been used in various internal marketing tasks such as internal customer relationship management (CRM), data warehouse (DW), and online analytical processing (OLAP), and efficient encryption considering the overall process of utilizing and managing personal information data. Policy making is emphasized. In other words, in an enterprise-wide database environment where thousands of applications simultaneously use dozens of databases, using the security device and method of this embodiment, data processing of the database is performed through the same length encryption of plain text numeric data such as social security number and card number. You can greatly speed up.

도 4는 본 발명의 다른 일 실시예에 따른 데이터베이스의 숫자형 데이터의 보안 장치의 개략적인 블록도이다.4 is a schematic block diagram of an apparatus for securing numeric data in a database according to another embodiment of the present invention.

도 4를 참조하면, 본 실시예에 따른 보안 장치(20)는, 데이터베이스 서버나 데이터베이스 관리 시스템 측으로부터의 암호화 요청에 따라, 입력되는 원문 데이터(평문 숫자형 데이터)를 암호화하여 원문 데이터와 동일한 길이의 암호화 데이터를 생성한다. 이를 위해, 보안 장치(20)는 길이산출부(41), 길이판단부(42), 16진수 변환부(43), 숫자추가부(44), HEX 디코딩부(45), 암호화부(46), Base64 인코딩부(47), 자리수 변환부(48), 패딩삽입부(49)를 구비한다.Referring to FIG. 4, the security device 20 according to the present embodiment encrypts input text data (plain text numeric data) according to an encryption request from a database server or a database management system, and has the same length as the text data. Create encrypted data. To this end, the security device 20 is the length calculation unit 41, the length determination unit 42, the hexadecimal conversion unit 43, the number adding unit 44, the HEX decoding unit 45, the encryption unit 46 And a Base64 encoding unit 47, a digit conversion unit 48, and a padding insertion unit 49.

본 실시예의 보안 장치(20)에 있어서, 길이산출부(41), HEX 디코딩부(45), 암호화부(46) 및 Base64 인코딩부(47)는 도 2를 참조하여 앞서 설명한 보안 장치의 대응 구성요소 즉, 길이산출부(21), 디코딩부(22), 암호화부(23) 및 인코딩부(24)와 실질적으로 동일하므로 그것들의 상세 설명에 있어서 중복되는 내용은 생략한다.In the security device 20 of the present embodiment, the length calculation section 41, the HEX decoding section 45, the encryption section 46, and the Base64 encoding section 47 correspond to the configuration of the security device described above with reference to FIG. That is, the elements, that is, the length calculator 21, the decoder 22, the encryptor 23, and the encoder 24, are substantially the same, so that duplicate descriptions thereof will be omitted.

길이산출부(41)에 의해 길이가 계산된 원문 데이터(평문 숫자형 데이터)에 대하여, 길이판단부(42)는 원문 데이터가 본 실시예에 따른 암호화 방식을 적용할 수 있는 길이를 가졌는지 판단한다. 일 실시예에서, 길이판단부(42)는 원문 데이터의 길이가 기준길이 이상인지를 판단할 수 있다.With respect to the original text data (plain text numeric data) whose length is calculated by the length calculating section 41, the length determining section 42 determines whether the original text data has a length to which the encryption scheme according to the present embodiment can be applied. . In one embodiment, the length determination unit 42 may determine whether the length of the original data is greater than or equal to the reference length.

16진수 변환부(43)는 원문 데이터가 10진수 데이터인 경우, 원문 데이터를 16진수 데이터로 변환한다. 또한, 구현에 따라서 16진수 변환부(43)는 모든 원문 데이터에 대하여 수행되지 않고 원문 데이터의 길이가 7인 경우에만 에러 발생의 방지를 위해 수행될 수 있다.When the original data is decimal data, the hexadecimal converter 43 converts the original data into hexadecimal data. In addition, depending on the implementation, the hexadecimal converter 43 may not be performed on all original data, but may be performed only to prevent an error from occurring when the length of the original text data is seven.

숫자추가부(44)는 16진수 변환부(43)에서 변환된 평문 숫자형 데이터의 자리수 또는 모든 원문 데이터의 자리수를 짝수로 변환한다. HEX 디코딩부(45)는 짝수 자리수의 데이터를 디코딩하므로, 숫자추가부(44)는 원문 데이터의 자리수나 16진수 변환부(43)에서 생성된 데이터의 자리수가 짝수가 되도록 기능한다.The number adding unit 44 converts the number of digits of the plain text numeric data converted by the hexadecimal converter 43 or the number of digits of all original data into even numbers. Since the HEX decoding unit 45 decodes even-digit data, the number adding unit 44 functions to make the digits of the original data or the digits of the data generated by the hexadecimal converter 43 even.

HEX 디코딩부(45) 및 암호화부(46)를 통해 원문 데이터가 사이즈 축소되고 암호화되면, Base64 인코딩부(47)는 암호화된 데이터의 자리수를 소정 값(기준길이-1)으로 나누고, 그 나머지를 올림한 후 얻은 정수값에 기준길이를 곱한 자리수로 변환한다.When the original data is reduced in size and encrypted through the HEX decoding unit 45 and the encryption unit 46, the Base64 encoding unit 47 divides the number of digits of the encrypted data into a predetermined value (reference length-1), and the rest of the original data. Converts the integer value obtained after rounding up to the number of digits multiplied by the reference length.

패딩삽입부(48)는 먼저 Base64 인코딩부(47)에서 생성된 암호문의 길이가 원문 데이터인 평문 숫자형 데이터의 길이와 동일한지 혹은 평문 숫자형 데이터의 길이보다 작은지를 판단한 후, 암호문의 자리수가 평문 숫자형 데이터보다 적으면, 암호문에 패딩을 삽입하여 암호문의 자리수가 평문 숫자형 데이터의 자리수와 동일하게 되도록 한다.The padding inserter 48 first determines whether the length of the ciphertext generated by the Base64 encoding unit 47 is equal to the length of the plaintext numeric data that is the original data or is smaller than the length of the plaintext numeric data. If less than plaintext numeric data, padding is inserted in the ciphertext so that the number of digits in the ciphertext is the same as the digits of the plaintext numeric data.

원문 데이터(평문 숫자형 데이터)의 길이와 동일한 길이의 암호문은 API(49)를 통해 보안 장치로부터 데이터베이스에 전송되어 저장될 수 있다.A cipher text having a length equal to the length of the original data (plain text numeric data) may be transmitted from the security device to the database via the API 49 and stored.

도 5 및 도 6은 도 4의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터를 보호하는 보안 방법에 대한 순서도이다.5 and 6 are flowcharts of a security method for protecting numeric data of a database applicable to the security device of FIG. 4.

먼저, 도 5를 참조하면, 데이터베이스로부터 데이터가 입력되면(S51), 보안 장치는 평문 숫자형 데이터(원문 데이터)의 길이를 산출한다(S52).First, referring to FIG. 5, when data is input from a database (S51), the security apparatus calculates the length of plain text numeric data (original text data) (S52).

다음, 보안 장치는 원문 데이터의 길이가 기준길이 이상인지를 판단한다(S53). 본 실시예에서 기준길이는 4이다. 원문 데이터의 길이가 기준길이보다 작으면, 보안 장치는 본 실시예의 데이터베이스 암호화 방식을 적용할 수 없는 데이터로 인식하고 그에 대한 에러 절차(에러 메시지 출력 등)를 수행할 수 있다(S54).Next, the security apparatus determines whether the length of the original data is greater than or equal to the reference length (S53). In this embodiment, the reference length is four. If the length of the original data is smaller than the reference length, the security apparatus may recognize the data as the data that cannot be applied to the database encryption scheme of the present embodiment and perform an error procedure (error message output, etc.) thereto (S54).

원문 데이터의 길이가 기준길이 이상이면, 보안 장치는 원문 데이터의 길이가 특정 길이인지를 판단한다(S55). 본 실시예에서 특정 길이는 '7'이다.If the length of the original data is greater than or equal to the reference length, the security apparatus determines whether the length of the original data is a specific length (S55). In this embodiment, the specific length is '7'.

원문 데이터의 길이가 특정 길이이면, 보안 장치는 원문 데이터를 16진수로 변환한다(S56). 원문 데이터가 '9999999'이면, 16진수로 변환된 데이터는 '98967f'가 된다.If the length of the original data is a specific length, the security device converts the original data into hexadecimal (S56). If the original data is '9999999', the data converted to hexadecimal is '98967f'.

다음, 보안 장치는 16진수로 변환된 데이터의 길이가 짝수인지를 판단한다(S57). 16진수로 변환된 데이터의 길이가 짝수가 아니면, 보안 장치는 기설정 숫자를 데이터의 맨 앞자리에 추가한다(S58). 본 실시예에서 기설정 숫자는 '0'이다.Next, the security device determines whether the length of the data converted to hexadecimal is even (S57). If the length of the data converted to hexadecimal is not even, the security device adds a preset number to the first digit of the data (S58). In this embodiment, the preset number is '0'.

상기의 단계(S58)에서 데이터의 맨 앞자리에 기설정 숫자가 추가되거나, 16진수로 변환된 데이터의 길이가 짝수이거나, 또는 상기의 단계(S55)에서 데이터의 길이가 특정 길이가 아니면, 보안 장치는 아직 암호화되지 않은 원문 데이터를 HEX 디코딩하여 그 길이를 축소한다(S59).If the predetermined number is added to the beginning of the data in the step S58 above, the length of the data converted to hexadecimal is even, or the length of the data in the step S55 above is not a specific length, the security device HEX decodes the original data, which is not yet encrypted, and reduces its length (S59).

다음, 보안 장치는 디코딩된 데이터를 기설정 보안 정책 또는 암호화 정책에 따라 암호화한다(S60). 일 실시예에서, HEX 디코딩 데이터는 '0x98, 0x96, 0x7f'이고, 암호화한 데이터는 '0x34, 0x63, 0x29'일 수 있다.Next, the security device encrypts the decoded data according to a preset security policy or an encryption policy (S60). In one embodiment, the HEX decoding data may be '0x98, 0x96, 0x7f', and the encrypted data may be '0x34, 0x63, 0x29'.

다음, 도 6에 도시한 바와 같이, 보안 장치는 암호화한 데이터를 Base64 인코딩 방식으로 인코딩한다(S61). Base64 인코딩 방식은 데이터의 자리수를 특정 값(기준길이-1)으로 나누고 그 나머지를 올림한 후 얻은 정수(Integer)에 기준길이를 곱한 자리수로 변환하는 것을 포함한다.Next, as shown in Fig. 6, the security device encodes the encrypted data by the Base64 encoding method (S61). The Base64 encoding method involves dividing the number of digits of a data by a specific value (base length-1) and rounding the remainder up to an integer obtained by multiplying the base length by an integer.

다음, 보안 장치는 인코딩한 데이터(암호문)의 길이가 평문 숫자형 데이터(원문 데이터)의 길이와 동일한지 판단한다(S62). 암호문의 길이가 원문 데이터의 길이와 동일하지 않으면, 보안 장치는 현재 데이터(암호문)에 Base64 인코딩에서 이용하는 패딩을 삽입하여 암호문의 길이가 원문 데이터의 길이와 동일하게 되도록 한다(S63).Next, the security apparatus determines whether the length of the encoded data (the cipher text) is the same as the length of the plain text numeric data (the original data) (S62). If the length of the cipher text is not the same as the length of the original data, the security device inserts the padding used in Base64 encoding into the current data (cipher text) so that the length of the cipher text is equal to the length of the original data (S63).

다음, 보안 장치는, 패딩삽입부에 의해 패딩이 삽입된 현재의 데이터, 혹은 인코딩부에서 생성되고 암호문의 길이가 원문 데이터의 길이와 동일한 현재 데이터를 출력하여 데이터베이스(DB)에 저장한다(S64).Next, the security device outputs the current data in which the padding is inserted by the padding insertion unit, or the current data generated by the encoding unit and whose length of the cipher text is equal to the length of the original text data, and stored in the database DB (S64). .

본 실시예에 의하면, 주민번호, 카드번호 등과 같은 고정형 사용자정보를 암호화하여 데이터베이스에 저장할 때, 데이터베이스에 저장되어 있던 사용자정보(원문 데이터 또는 평문 숫자형 데이터)의 길이와 동일한 길이의 암호문을 생성하여 데이터베이스에 다시 저장함으로써, 데이터베이스의 관리 및 성능(처리 속도 등)을 향상시킬 수 있다. 아울러, 암호문의 길이가 원문 데이터보다 짧아 데이터베이스에 스페이스가 입력되지 않으므로 스페이스 입력에 따른 데이터베이스의 오류를 방지할 수 있다. 또한, 암호문의 길이가 원문 데이터보다 길어 데이터베이스의 칼럼 사이즈를 변경해야함으로 인해 발생하는 인력과 비용의 손실을 방지할 수 있다.According to this embodiment, when the fixed user information such as social security number, card number, etc. is encrypted and stored in the database, a cipher text having the same length as the length of the user information (original data or plain text numeric data) stored in the database is generated. By saving back to the database, you can improve the management and performance of the database (such as processing speed). In addition, since the length of the ciphertext is shorter than the original data, no space is input to the database, thereby preventing an error in the database due to the space input. In addition, the length of the ciphertext is longer than the original data, thereby preventing the loss of manpower and cost caused by changing the column size of the database.

도 7은 도 4의 보안 장치에 적용할 수 있는 데이터베이스의 숫자형 데이터의 보안 방법에서의 복호화 과정에 대한 순서도이다.FIG. 7 is a flowchart illustrating a decryption process in a security method of numeric data of a database applicable to the security device of FIG. 4.

도 7에 도시한 바와 같이, 먼저 암호문이 입력되면(S70), 보안 장치 또는 암호문 복호화 장치(여기서, 암호문 복호화 장치는 보안 장치에서 암호문 복호화 기능을 수행하는 수단이나 이러한 수단에 상응하는 기능을 수행하는 구성부를 지칭함)는, 암호문의 길이를 산출하고(S71), 암호문의 길이가 기준길이 이상인지를 판단한다(S72). 암호문의 길이가 기준길이보다 작으면, 보안 장치는 본 실시예의 숫자형 데이터의 보안 방법으로 암호화된 암호문이 아닌 것으로 인식하고 에러 정책에 따라 에러 메시지를 출력할 수 있다.As shown in FIG. 7, when the ciphertext is first input (S70), the security apparatus or the ciphertext decryption apparatus (here, the ciphertext decryption apparatus performs means for performing a ciphertext decryption function in the security apparatus or performs a function corresponding to such means). The length of the ciphertext is calculated (S71), and it is determined whether the length of the ciphertext is greater than or equal to the reference length (S72). If the length of the ciphertext is smaller than the reference length, the security device may recognize that the ciphertext is not an encrypted ciphertext by the security method of the numeric data of the present embodiment and output an error message according to an error policy.

암호문의 길이가 기준길이 이상이면, 보안 장치는 암호문에 대하여 Base64 디코딩을 수행한다(S73). 일 실시예에서, 보안 장치는 Base64 디코딩 과정을 수행하기 전에 암호문의 앞자리에 있는 패딩을 제거할 수 있다. 예를 들어, 보안 장치는 암호문 '==NGMP'에서 패딩을 제거하여 'NGMP'로 변환할 수 있다. 일 실시예에서, Base64 디코딩한 데이터는 Base64 인코딩하기 전의 암호문 '0x34 0x63 0x29'로 변환된다.If the length of the cipher text is greater than or equal to the reference length, the security device performs Base64 decoding on the cipher text (S73). In one embodiment, the security device may remove the padding preceding the cipher text before performing the Base64 decoding process. For example, the security device may remove the padding from the ciphertext '== NGMP' and convert it to 'NGMP'. In one embodiment, Base64 decoded data is converted to ciphertext '0x34 0x63 0x29' prior to Base64 encoding.

다음, 보안 장치는 보안 정책 설정 및/또는 암호문 복호화 정책에 따라 Base64 디코딩한 데이터를 복호화한다(S74). 일 실시예에서, 복호화된 데이터는 '0x98, 0x96, 0x7f'가 된다.Next, the security device decrypts the Base64 decoded data according to the security policy setting and / or the ciphertext decryption policy (S74). In one embodiment, the decoded data is '0x98, 0x96, 0x7f'.

다음, 보안 장치는 복호화한 데이터를 HEX 인코딩한다(S75). 일 실시예에서, HEX 인코딩된 데이터는 '98967f'가 된다.Next, the security apparatus HEX encodes the decrypted data (S75). In one embodiment, the HEX encoded data is '98967f'.

다음, 보안 장치는 암호문의 길이가 특정 길이(예컨대, 7)인지를 판단하고(S76), 암호문의 길이가 특정 길이이면, HEX 인코딩된 데이터를 10진수로 변환한다(S77). 일 실시예에서, 10진수로 변환된 데이터는 '9999999'가 된다.Next, the security apparatus determines whether the length of the ciphertext is a specific length (for example, 7) (S76), and if the length of the ciphertext is a specific length, converts the HEX encoded data into a decimal number (S77). In one embodiment, the data converted to decimal is '9999999'.

다음, 보안 장치는 10진수로 변환한 데이터 또는 특정 길이가 아닌 인코딩된 데이터의 길이가 암호문의 길이와 동일한지 판단한다(S78). 데이터의 길이가 암호문의 길이보다 작으면, 보안 장치의 사이즈 변환부는 현재 데이터의 앞자리에 0을 추가하여 자리수를 동일하게 맞춘다(S79). 한편, 데이터의 길이가 암호문의 길이와 동일하면, 보안 장치는 상기의 사이즈 변환 과정을 생략할 수 있다. 그리고, 보안 장치는 복호화된 데이터를 출력한다(S80).Next, the security apparatus determines whether the length of the data converted into decimal or encoded data other than a specific length is equal to the length of the cipher text (S78). If the length of the data is smaller than the length of the cipher text, the size converting unit of the security device adjusts the number of digits equally by adding 0 to the first digit of the current data. On the other hand, if the length of the data is the same as the length of the cipher text, the security device may omit the size conversion process. The security device then outputs the decrypted data (S80).

이상에서와 같이 실시 예들을 중심으로 본 발명을 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시 예의 본질적인 기술내용을 벗어나지 않는 범위에서 실시예에 예시되지 않은 여러 가지의 조합 또는 변형과 응용이 가능함을 알 수 있을 것이다. 따라서, 본 발명의 실시 예들로부터 용이하게 도출가능한 변형과 응용에 관계된 기술내용들은 본 발명에 포함되는 것으로 해석되어야 할 것이다.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 (8)

데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 구하는 단계;
상기 길이가 감소하도록 상기 평문 숫자형 데이터를 디코딩하는 단계;
디코딩한 데이터를 암호화하는 단계;
암호화한 데이터를 인코딩하는 단계; 및
인코딩한 데이터의 길이를 상기 평문 숫자형 데이터의 길이로 사이즈 변환하는 단계;를 포함하는 데이터베이스의 숫자형 데이터의 보안 방법.
Obtaining the length of the plain text numeric data inputted from the database and requested for encryption;
Decoding the plain text numeric data so that the length is reduced;
Encrypting the decoded data;
Encoding the encrypted data; And
And converting the length of the encoded data into the length of the plain text numeric data.
청구항 1에 있어서,
상기 디코딩하는 단계 전에 데이터의 자리수가 짝수인지를 판단한 후, 홀수이면 상기 데이터의 자리수가 짝수가 되도록 맨 앞자리에 기설정 숫자를 추가하는 단계를 더 포함하는 데이터베이스 의 숫자형 데이터의 보안 방법.
The method according to claim 1,
And after determining whether the number of digits of the data is even before the decoding, adding a predetermined number to the first digit so that the number of digits of the data is even.
청구항 1에 있어서,
상기 인코딩하는 단계는, 상기 암호화한 데이터의 자리수를 3으로 나누고 그 나머지를 올림한 후 얻은 정수에 4를 곱한 자리수로 상기 암호화한 데이터의 자리수를 변환하는 것인 데이터베이스의 숫자형 데이터의 보안 방법.
The method according to claim 1,
The encoding method comprises converting the number of digits of the encrypted data into a number obtained by dividing the number of digits of the encrypted data by three and rounding the remainder up to four.
청구항 1에 있어서,
상기 사이즈 변환하는 단계는, 상기 인코딩하는 단계에서 기 설정된 패딩을 삽입하여 상기 인코딩한 데이터의 길이를 상기 평문 숫자형 데이터의 길이와 동일하게 하는 것인 데이터베이스의 숫자형 데이터의 보안 방법.
The method according to claim 1,
The converting of the size may include inserting predetermined padding in the encoding to make the length of the encoded data equal to the length of the plain text numeric data.
데이터베이스로부터 입력되고 복호화가 요청된 암호문의 길이를 구하는 단계;
상기 암호문을 Base64 디코딩하는 단계;
디코딩한 데이터를 복호화하는 단계;
복호화한 데이터를 HEX((Hexadecimal) 인코딩하는 단계; 및
인코딩한 데이터의 길이가 상기 암호문의 길이와 다를 때 상기 인코딩한 데이터의 앞자리에 0을 추가하는 단계;
를 포함하는 데이터베이스의 숫자형 데이터의 보안 방법.
Obtaining a length of a cipher text input from a database and requesting decryption;
Base64 decoding the cipher text;
Decoding the decoded data;
HEX (Hexadecimal) encoding of the decoded data; And
Adding zeros to the beginning of the encoded data when the length of the encoded data is different from the length of the ciphertext;
Security method of numeric data in a database comprising a.
데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 산출하는 길이산출부;
상기 길이가 작아지도록 상기 평문 숫자형 데이터를 디코딩하는 디코딩부;
상기 디코딩부의 디코딩 데이터를 암호화하는 암호화부;
상기 암호화부의 암호화 데이터를 인코딩하는 인코딩부; 및
상기 인코딩부의 인코딩 데이터의 길이를 상기 평문 숫자형 데이터의 길이로 사이즈 변환하는 사이즈 변환부;
를 포함하는 데이터베이스의 숫자형 데이터의 보안 장치.
A length calculation unit for calculating a length of the plain text numeric data inputted from the database and requested for encryption;
A decoding unit for decoding the plain text numeric data so that the length is reduced;
An encryption unit for encrypting the decoded data of the decoding unit;
An encoding unit for encoding encrypted data of the encryption unit; And
A size conversion unit for size-converting the length of encoding data of the encoding unit to the length of the plain text numeric data;
Security device of the numeric data of the database comprising a.
데이터베이스로부터 입력되고 암호화가 요청된 평문 숫자형 데이터의 길이를 산출하는 길이산출부;
상기 평문 숫자형 데이터의 길이가 기준길이 이상인지를 판단하는 길이판단부;
상기 기준길이 이상일 때 상기 평문 숫자형 데이터를 HEX(Hexadecimal) 디코딩하는 디코딩부;
상기 평문 숫자형 데이터 또는 상기 디코딩부의 디코딩 데이터를 암호화하는 암호화부;
상기 암호화부의 암호화 데이터를 Base64 인코딩하는 인코딩부; 및
상기 인코딩부의 인코딩 데이터에 패딩을 삽입하는 패딩삽입부;
를 포함하는 데이터베이스의 숫자형 데이터의 보안 장치.
A length calculation unit for calculating a length of the plain text numeric data inputted from the database and requested for encryption;
A length determination unit determining whether the length of the plain text numeric data is greater than or equal to a reference length;
A decoder configured to decode the HEX (Hexadecimal) decoding of the plain text numeric data when the reference length is greater than or equal to the reference length;
An encryption unit for encrypting the plain text numeric data or the decoded data of the decoding unit;
An encoding unit for base64 encoding the encrypted data of the encryption unit; And
A padding insertion unit inserting padding into the encoding data of the encoding unit;
Security device of the numeric data of the database comprising a.
데이터베이스로부터 입력되고 복호화가 요청된 암호문의 길이를 산출하는 길이산출부;
상기 암호문을 Base64 디코딩하는 디코딩부;
상기 디코딩부에서 디코딩한 데이터를 복호화하는 복호화부;
상기 복호화부에서 복호화한 데이터를 HEX((Hexadecimal) 인코딩하는 인코딩부; 및
상기 인코딩부에서 인코딩한 데이터의 길이가 상기 암호문의 길이와 다를 때 상기 인코딩한 데이터의 앞자리에 0을 추가하는 사이즈 변환부;
를 포함하는 데이터베이스의 숫자형 데이터의 보안 장치.
A length calculator configured to calculate a length of a cipher text inputted from a database and requested to be decrypted;
A decoding unit for base64 decoding the cipher text;
A decoder which decodes the data decoded by the decoder;
An encoder for encoding HEX (Hexadecimal) encoding of the data decoded by the decoder; and
A size converter for adding zeros to the first position of the encoded data when the length of the data encoded by the encoder is different from the length of the ciphertext;
Security device of the numeric data of the database comprising a.
KR1020130076512A 2013-07-01 2013-07-01 Security apparatus and method for protecting numeric data in database KR101330071B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130076512A KR101330071B1 (en) 2013-07-01 2013-07-01 Security apparatus and method for protecting numeric data in database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130076512A KR101330071B1 (en) 2013-07-01 2013-07-01 Security apparatus and method for protecting numeric data in database

Publications (1)

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

Family

ID=49857871

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130076512A KR101330071B1 (en) 2013-07-01 2013-07-01 Security apparatus and method for protecting numeric data in database

Country Status (1)

Country Link
KR (1) KR101330071B1 (en)

Cited By (2)

* 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
CN114257442A (en) * 2021-12-20 2022-03-29 山石网科通信技术股份有限公司 Method and device for detecting transmission loophole and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3782351B2 (en) 1999-10-20 2006-06-07 富士通株式会社 Variable length key cryptosystem
KR20090108051A (en) * 2007-01-26 2009-10-14 탈레스 Data encoding method
JP4464046B2 (en) 2001-04-03 2010-05-19 三菱電機株式会社 ENCRYPTION DEVICE, DECRYPTION DEVICE, AND RADIO COMMUNICATION DEVICE

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3782351B2 (en) 1999-10-20 2006-06-07 富士通株式会社 Variable length key cryptosystem
JP4464046B2 (en) 2001-04-03 2010-05-19 三菱電機株式会社 ENCRYPTION DEVICE, DECRYPTION DEVICE, AND RADIO COMMUNICATION DEVICE
KR20090108051A (en) * 2007-01-26 2009-10-14 탈레스 Data encoding method

Cited By (2)

* 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
CN114257442A (en) * 2021-12-20 2022-03-29 山石网科通信技术股份有限公司 Method and device for detecting transmission loophole and storage medium

Similar Documents

Publication Publication Date Title
US8694467B2 (en) Random number based data integrity verification method and system for distributed cloud storage
CN104333580B (en) A kind of account management system and its method based on cloud service
US10608813B1 (en) Layered encryption for long-lived data
KR101989813B1 (en) Generating and verifying the alternative data in a specified format
CN110868287B (en) Authentication encryption ciphertext coding method, system, device and storage medium
US8769302B2 (en) Encrypting data and characterization data that describes valid contents of a column
KR20130039354A (en) Database management system and encrypting method thereof
US10476663B1 (en) Layered encryption of short-lived data
US20090285396A1 (en) Database processing on externally encrypted data
CN104967693A (en) Document similarity calculation method facing cloud storage based on fully homomorphic password technology
GB2528959A (en) Encoder, decoder and method
WO2020253107A1 (en) Blockchain two-stage supervision method, apparatus, and device, and storage medium
Joshi et al. An efficient cryptographic scheme for text message protection against brute force and cryptanalytic attacks
Cui et al. A data masking scheme for sensitive big data based on format-preserving encryption
CN105827582A (en) Communication encryption method, device and system
KR101825838B1 (en) Method of partially encrypting data, method of decrypting a partially-encrpted data, storage medium for a program decrypting a partially-encrpted data
CN104038336A (en) Data encryption method based on 3DES
CN103731423A (en) Safe method for repeated data deleting
CN110543778A (en) linear random encryption and decryption algorithm for character data
CN1588365A (en) Ciphertext global search technology
CN102222188A (en) Information system user password generation method
CN113078992B (en) High-performance data multi-stage encryption and decryption method and system based on complete homomorphic encryption
CA3061776A1 (en) Key information processing method and apparatus, electronic device and computer readable medium
KR101330071B1 (en) Security apparatus and method for protecting numeric data in database
CN104794243B (en) Third party's cipher text retrieval method based on filename

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