KR101678182B1 - Method of encryption and decryption - Google Patents
Method of encryption and decryption Download PDFInfo
- Publication number
- KR101678182B1 KR101678182B1 KR1020150064467A KR20150064467A KR101678182B1 KR 101678182 B1 KR101678182 B1 KR 101678182B1 KR 1020150064467 A KR1020150064467 A KR 1020150064467A KR 20150064467 A KR20150064467 A KR 20150064467A KR 101678182 B1 KR101678182 B1 KR 101678182B1
- Authority
- KR
- South Korea
- Prior art keywords
- token
- partial
- string
- temporary
- block
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000005192 partition Methods 0.000 claims abstract description 105
- 238000000638 solvent extraction Methods 0.000 claims description 24
- 230000001174 ascending effect Effects 0.000 claims description 6
- 238000010845 search algorithm Methods 0.000 claims description 4
- 230000011218 segmentation Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 8
- 230000014509 gene expression Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000000470 constituent Substances 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/065—Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/321—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
- H04L9/3213—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
암호화 방법에서, N~(N+M)자리의 모든 숫자열들을 암호화한 원문 암호문들 및 상기 N~(N+M)자리의 모든 숫자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성하고, 원문 숫자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하고, 원문 숫자열의 제1 측 끝에 분할 윈도우를 설정하고, 토큰 이미지 파일에 기초하여 원문 숫자열에서 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 원문 숫자열에서 부분 숫자열을 부분 토큰으로 대체하여 임시 숫자열을 생성하고, 분할 윈도우가 임시 숫자열의 제2 측 끝에 도달할 때까지 분할 윈도우를 제2 측 방향으로 한 자리씩 이동시키면서, 토큰 이미지 파일에 기초하여 임시 숫자열에서 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 임시 숫자열에서 부분 숫자열을 부분 토큰으로 대체하여 임시 숫자열을 갱신하고, 임시 숫자열의 제1 측 끝에 분할 윈도우를 설정하고, 토큰 이미지 파일에 기초하여 임시 숫자열에서 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 임시 숫자열에서 부분 숫자열을 부분 토큰으로 대체하여 원문 숫자열에 상응하는 보안 토큰으로서 출력한다.In the encryption method, the token ciphertexts encrypting all the numeric digits of N to (N + M) digits and the token ciphers corresponding to each of the numeric digits of the N to (N + M) A length of a division window is determined to be less than or equal to the number of digits of the original numeric string and equal to or greater than N digits and equal to or less than (N + M) digits, and a division window Generates a partial token corresponding to the partial numeric string included in the partition window in the original numeric string based on the token image file, generates a temporary numeric string by replacing the partial numeric string with the partial token in the original numeric string, Moving the split window one by one in the second lateral direction until the split window reaches the second side end of the temporary string of numbers, Updating the temporary numeric string by replacing the partial numeric string with the partial token in the temporary numeric string, setting the segmentation window at the first side end of the temporary numeric string, generating the token corresponding to the token Generates a partial token corresponding to the partial numeric string included in the partition window in the temporary numeric string based on the image file, and substitutes the partial numeric string into the partial numeric string in the temporary numeric string to output as the security token corresponding to the original numeric string.
Description
본 발명은 암호화 방법 및 복호화 방법에 관한 것으로, 보다 상세하게는 숫자열 또는 문자열을 암호화하는 방법 및 암호화된 숫자열 또는 문자열을 복호화하는 방법에 관한 것이다.The present invention relates to an encryption method and a decryption method, and more particularly, to a method of encrypting a numeric string or character string and a method of decrypting an encrypted numeric string or character string.
데이터베이스 관리 시스템에서 테이블 내의 필드 데이터를 일반적인 암호화 알고리즘을 사용하여 암호화하는 경우, 원문 데이터는 문자열들로 구성되는 텍스트(text) 포맷을 갖는데 반해, 암호화된 데이터는 이진수들로 구성되는 바이너리(binary) 포맷을 갖게 된다. 따라서 테이블의 각각의 필드의 타입 및 길이의 변경 없이는 암호화된 데이터를 원래의 테이블에 저장할 수 없다.When the field management system encrypts field data in a table using a general encryption algorithm, the original data has a text format composed of strings, whereas the encrypted data is a binary format composed of binary numbers . Thus, encrypted data can not be stored in the original table without changing the type and length of each field in the table.
원문 데이터의 포맷과 길이의 변화 없이 원문 데이터를 암호화하는 기술로서 토큰화 기술이 알려져 있다. 어플리케이션에서 원문 데이터와 일대일로 매핑되는 토큰을 생성하기 위해서는 별도의 토큰 서버에 원문 데이터를 제공하고, 토큰 서버로부터 원문 데이터에 상응하는 토큰을 수신하는 과정이 필요하다.Tokenization techniques are known as techniques for encrypting original text data without changing the format and length of the original text data. In order to generate tokens that are mapped on a one-to-one basis with the original data in the application, it is necessary to provide original text data to a separate token server and receive a token corresponding to the original text data from the token server.
이와 같이, 토큰 생성 과정에서 어플리케이션과 토큰 서버 사이에 데이터 통신이 수행되므로, 대용량의 데이터에 대한 토큰을 생성하는 경우 어플리케이션과 토큰 서버 사이의 통신 오버헤드로 인해 어플리케이션의 동작 속도가 늦어지는 문제점이 있다. 또한, 토큰 서버에 장애가 발생하는 경우, 어플리케이션은 암호화 동작을 수행할 수 없는 문제점이 있다.Since the data communication is performed between the application and the token server in the process of generating the token, when the token is generated for a large amount of data, there is a problem that the operation speed of the application is slowed due to the communication overhead between the application and the token server . In addition, when the token server fails, the application can not perform the encryption operation.
이에 따라, 본 발명의 일 목적은 암호화 과정 및 복호화 과정에서 어플리케이션과 토큰 서버 사이의 통신 오버헤드를 줄일 수 있고, 토큰 서버에 장애가 발생한 경우에도 암복호화 동작을 수행할 수 있으며, 연속되는 숫자열들 또는 문자열들에 대해서도 서로 유사하지 않은 토큰들을 제공할 수 있는 암호화 방법 및 이의 복호화 방법을 제공하는데 있다.Accordingly, it is an object of the present invention to reduce a communication overhead between an application and a token server in an encryption process and a decryption process, to perform an encryption / decryption operation even when a token server fails, And to provide tokens that are not similar to each other even for strings, and a decoding method therefor.
상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 암호화 방법에서, N~(N+M)자리의 모든 숫자열들을 암호화한 원문 암호문들 및 상기 N~(N+M)자리의 모든 숫자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성하고, 원문 숫자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하고, 상기 원문 숫자열의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 원문 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 원문 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 임시 숫자열을 생성하고, 상기 분할 윈도우가 상기 임시 숫자열의 제2 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제2 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 임시 숫자열을 갱신하고, 상기 임시 숫자열의 상기 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 원문 숫자열에 상응하는 보안 토큰으로서 출력한다.In order to achieve the above object, according to an embodiment of the present invention, there is provided an encryption method comprising: encrypting N * (N + M) ) Token image file that associates and stores the token ciphertexts encrypted with the tokens corresponding to each of the digit strings of the (N + 1) th digit, and generates a token image file that is smaller than or equal to N digits and smaller than or equal to (N + M) Determining a length of the partition window so as to have a length corresponding to a partial numeric string included in the partition window, setting the partition window at a first side end of the original numeric string, Generating a token, replacing the partial numeric string with the partial token in the original numeric string to generate a temporary numeric string, A partial token corresponding to a partial number sequence included in the partition window in the temporary number sequence is generated based on the token image file while moving the partition window one by one in the second lateral direction until reaching the side end , The temporary number column is replaced with the partial token to update the temporary number column in the temporary number column, the partition window is set to the first side end of the temporary number column, Generates a partial token corresponding to the partial numeric string included in the partition window in the numeric string, and replaces the partial numeric string with the partial numeric string in the temporary numeric string to output as a security token corresponding to the original numeric string.
일 실시예에 있어서, 상기 분할 윈도우의 길이를 결정하는 단계는, 상기 원문 숫자열의 자리수가 (N+M)자리 이상인 경우, 상기 분할 윈도우의 길이를 (N+M)자리로 결정하는 단계, 및 상기 원문 숫자열의 자리수가 (N+M)자리 미만인 경우, 상기 분할 윈도우의 길이를 상기 원문 숫자열의 자리수로 결정하는 단계를 포함할 수 있다.In one embodiment, the step of determining the length of the partition window may include determining the length of the partition window to be (N + M) digits when the number of digits in the original numeric string is (N + M) And determining the length of the partition window as the number of digits of the original numeric string when the number of digits in the original numeric string is less than (N + M) digits.
일 실시예에 있어서, 상기 분할 윈도우에 포함되는 상기 부분 숫자열에 상응하는 상기 부분 토큰은 상기 분할 윈도우의 길이와 동일한 자리의 숫자열에 상응할 수 있다.In one embodiment, the partial token corresponding to the partial number sequence included in the partitioning window may correspond to a numerical sequence of the same number as the length of the partitioning window.
일 실시예에 있어서, 상기 토큰 이미지 파일을 생성하는 단계는, K(K는 N 이상 (N+M) 이하의 정수)자리의 모든 숫자열들 각각에 상응하는 K-블록 토큰들을 생성하는 단계, 상기 K자리의 모든 숫자열들 각각을 암호화하여 K-블록 원문 암호문들을 생성하는 단계, 상기 K-블록 토큰들 각각을 암호화하여 K-블록 토큰 암호문들을 생성하는 단계, 서로 대응되는 상기 K-블록 원문 암호문들 및 상기 K-블록 토큰 암호문들의 쌍들을 상기 K-블록 토큰 암호문을 기준으로 오름차순으로 정렬하여 K-블록 쌍들을 생성하는 단계, 상기 K-블록 쌍들의 순서를 나타내는 일련번호들을 상기 K-블록 쌍들에 포함되는 상기 K-블록 원문 암호문을 기준으로 오름차순으로 정렬하여 K-블록 암호 인덱스를 생성하는 단계, 및 상기 K-블록 쌍들 및 상기 K-블록 암호 인덱스를 상기 토큰 이미지 파일로서 저장하는 단계를 포함할 수 있다.In one embodiment, generating the token image file comprises generating K-block tokens corresponding to each of all the digit strings of K (K is an integer equal to or greater than N + M) Generating K-block token ciphertexts by encrypting each of the K number of digit strings; generating K-block token ciphertexts by encrypting each of the K-block tokens; Block token ciphertexts in ascending order based on the K-block token ciphertext to generate K-block pairs, generating serial numbers representing the order of the K- Block cipher texts in the ascending order based on the K-block original text ciphertexts included in the pairs, and generating the K-block cipher pairs and the K- It may comprise the step of storing as a file.
상기 K-블록 원문 암호문들 및 상기 K-블록 토큰 암호문들 각각은 텍스트 포맷을 가질 수 있다.Each of the K-block text ciphertexts and the K-block token ciphertexts may have a text format.
상기 K자리의 모든 숫자열들 각각을 암호화하여 상기 K-블록 원문 암호문들을 생성하는 단계는, 상기 K자리의 모든 숫자열들 각각에 대해 암호화 알고리즘을 적용하여 K-블록 임시 원문 암호문들을 생성하는 단계, 및 상기 K-블록 임시 원문 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 상기 K-블록 원문 암호문들을 생성하는 단계를 포함하고, 상기 K-블록 토큰들 각각을 암호화하여 상기 K-블록 토큰 암호문들을 생성하는 단계는, 상기 K-블록 토큰들 각각에 대해 상기 암호화 알고리즘을 적용하여 K-블록 임시 토큰 암호문들을 생성하는 단계, 및 상기 K-블록 임시 토큰 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 상기 K-블록 토큰 암호문들을 생성하는 단계를 포함할 수 있다.Generating the K-block source text ciphertexts by encrypting each of the K digits of all the digit strings comprises generating K-block temporary text ciphertexts by applying an encryption algorithm to each of the K digits of all the digit strings And generating the K-block text ciphertexts by applying a BASE64 algorithm to each of the K-block temporary text ciphertexts, wherein each of the K-block tokens is encrypted to generate the K-block token ciphertexts Block temporary token ciphertexts by applying the encryption algorithm for each of the K-block tokens, and applying the BASE64 algorithm to each of the K-block temporary token ciphertexts to generate the K- And generating block token ciphertexts.
상기 K-블록 토큰들 각각은 K자리의 숫자열을 포함할 수 있다.Each of the K-block tokens may include a K digit string.
상기 부분 숫자열에 상응하는 상기 부분 토큰을 생성하는 단계는, 상기 부분 숫자열을 암호화하여 부분 숫자열 암호문을 생성하는 단계, 상기 토큰 이미지 파일로부터 상기 부분 숫자열 암호문에 상응하는 부분 토큰 암호문을 독출하는 단계, 및 상기 부분 토큰 암호문을 복호화하여 상기 부분 토큰을 생성하는 단계를 포함할 수 있다.Wherein the step of generating the partial token corresponding to the partial number sequence comprises the steps of generating the partial numeric string cipher text by encrypting the partial numeric string, reading the partial token cipher text corresponding to the partial numeric string cipher text from the token image file And decrypting the partial token ciphertext to generate the partial token.
상기 토큰 이미지 파일로부터 상기 부분 숫자열 암호문에 상응하는 상기 부분 토큰 암호문을 독출하는 단계는, 상기 부분 숫자열 암호문에 상응하는 상기 부분 숫자열의 자리수를 판단하는 단계, 상기 부분 숫자열이 K자리 숫자열인 경우, 상기 토큰 이미지 파일에 포함되는 상기 K-블록 암호 인덱스에 기초하여 상기 K-블록 쌍들 중에서 상기 부분 숫자열 암호문과 일치하는 상기 K-블록 원문 암호문을 포함하는 일치 K-블록 쌍을 판단하는 단계, 및 상기 일치 K-블록 쌍에 포함되는 상기 K-블록 토큰 암호문을 상기 부분 토큰 암호문으로서 독출하는 단계를 포함할 수 있다.Wherein the step of reading the partial token ciphertext corresponding to the partial numeric string cipher text from the token image file comprises the steps of: determining the number of digits in the partial numeric string corresponding to the partial numeric string cipher text; Block pair including the K-block text cipher text that matches the partial number column cipher text among the K-block pairs based on the K-block cipher index included in the token image file And reading the K-block token ciphertext included in the matched K-block pair as the partial token ciphertext.
상기 일치 K-블록 쌍을 판단하는 단계는, 상기 K-블록 암호 인덱스 및 상기 K-블록 쌍들에 이진 검색(binary search) 알고리즘을 적용하여 상기 K-블록 쌍들 중에서 상기 부분 숫자열 암호문과 일치하는 상기 K-블록 원문 암호문을 포함하는 상기 일치 K-블록 쌍을 결정하는 단계를 포함할 수 있다.The step of determining the matching K-block pair comprises: applying a binary search algorithm to the K-block cipher pair and the K-block pairs to determine whether the K- Block pair including the K-block original text ciphertext.
상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 복호화 방법에서, N~(N+M)자리의 모든 숫자열들을 암호화한 원문 암호문들 및 상기 N~(N+M)자리의 모든 숫자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성하고, 보안 토큰의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하고, 상기 보안 토큰의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 보안 토큰에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 보안 토큰에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 임시 숫자열을 생성하고, 상기 임시 숫자열의 제2 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 임시 숫자열에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 상기 임시 숫자열을 갱신하고, 상기 분할 윈도우가 상기 임시 숫자열의 제1 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제1 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 임시 숫자열에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 상기 임시 숫자열을 갱신하고, 상기 임시 숫자열을 상기 보안 토큰에 상응하는 원문 숫자열로서 출력한다.In order to achieve the above object, according to an embodiment of the present invention, there is provided a method of decrypting text in which N ~ (N + M) ) To generate a token image file that associates and stores token ciphertexts encrypted with tokens corresponding to each of the digit strings of the (N + 1) th digit, and generates a token image file that is smaller than or equal to N digits of the security token, Determining a length of the partition window to have a length of the security token, setting the partition window at a first side end of the security token, and generating a partial number corresponding to the partial token included in the partition window in the security token based on the token image file Generating a temporary number sequence by replacing the partial token with the partial token sequence in the security token and generating a temporary number sequence at the second side end of the temporary sequence of numbers; Generating a partial number sequence corresponding to a partial token included in the partition window in the temporary number sequence based on the token image file and replacing the partial token with the partial number sequence in the temporary number sequence, Updating the numeric column and moving the partition window one position in the first lateral direction until the partition window reaches the first side edge of the temporary numeric column, Generating a partial numeric string corresponding to a partial token included in the partition window, updating the temporary numeric string by replacing the partial token with the partial numeric string in the temporary numeric string, As the original numeric string corresponding to "
상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 암호화 방법에서, N~(N+M)자리의 모든 문자열들을 암호화한 원문 암호문들 및 상기 N~(N+M)자리의 모든 문자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성하고, 원문 문자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하고, 상기 원문 문자열의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 원문 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 원문 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 임시 문자열을 생성하고, 상기 분할 윈도우가 상기 임시 문자열의 제2 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제2 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 임시 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 상기 임시 문자열을 갱신하고, 상기 임시 문자열의 상기 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 임시 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 상기 원문 문자열에 상응하는 보안 토큰으로서 출력한다.In order to achieve the object of the present invention, there is provided an encryption method according to an embodiment of the present invention. In the encrypting method, the N + (N + M) A token image file for associating and storing token ciphertexts encrypted with tokens corresponding to each of all the strings of the digits, and generating a token image file having a length less than or equal to N digits and less than or equal to N + M digits Determining a length of the partition window to have the partition window to have the partition window, setting the partition window at the first side end of the original character string, and generating a partial token corresponding to the partial string included in the partition window in the original character string based on the token image file And generating a temporary string by replacing the partial string with the partial token in the original text string, Generating a partial token corresponding to the partial string included in the partitioned window in the temporary string based on the token image file while moving the partitioned window one by one in the second lateral direction until reaching the side end, Updating the temporary string by replacing the partial string with the partial token in the temporary string, setting the partition window at the first side end of the temporary string, and extracting the partial string from the temporary string based on the token image file, Generates a partial token corresponding to the partial string included in the window, replaces the partial string with the partial token in the temporary string, and outputs the partial token as a security token corresponding to the original character string.
상술한 본 발명의 일 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 복호화 방법에서, N~(N+M)자리의 모든 문자열들을 암호화한 원문 암호문들 및 상기 N~(N+M)자리의 모든 문자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성하고, 보안 토큰의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하고, 상기 보안 토큰의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 보안 토큰에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 보안 토큰에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 임시 문자열을 생성하고, 상기 임시 문자열의 제2 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 임시 문자열에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 상기 임시 문자열을 갱신하고, 상기 분할 윈도우가 상기 임시 문자열의 제1 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제1 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 임시 문자열에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 상기 임시 문자열을 갱신하고, 상기 임시 문자열을 상기 보안 토큰에 상응하는 원문 문자열로서 출력한다.In order to achieve the above object, according to an embodiment of the present invention, there is provided a method of decrypting text in which N ~ (N + M) (N + M) digits less than or equal to the number of digits of the security token, and the length of the token image file is greater than or equal to N digits Determining a length of the partition window to have the partition window to be partitioned, setting the partition window at a first side end of the security token, and generating a substring corresponding to the partial token included in the partition window in the security token based on the token image file And generating a temporary string by replacing the partial token with the partial token in the security token and setting the partition window at the second side of the temporary string And generates a substring corresponding to a partial token included in the partition window in the temporary string based on the token image file and updates the temporary string by replacing the partial token with the substring in the temporary string , The partition window is moved in the first lateral direction by one position until the partition window reaches the first side end of the temporary character string, and is included in the partition window in the temporary character string based on the token image file Generates a partial string corresponding to the partial token, updates the temporary string by replacing the partial token with the partial string in the temporary string, and outputs the temporary string as the original text string corresponding to the security token.
본 발명의 실시예들에 따른 암호화 방법 및 복호화 방법에 따르면, 암호화 과정 및 복호화 과정에서 토큰 서버와 데이터 통신을 수행할 필요가 없으므로, 암복호화 속도를 향상시킬 수 있고, 토큰 서버에 장애가 발생한 경우에도 암복호화 동작을 지속적으로 수행할 수 있으며, 연속되는 원문 숫자열들 또는 문자열들에 대해서도 서로 유사하지 않은 보안 토큰들을 생성하므로, 보안성을 향상시킬 수 있다.According to the encryption method and the decryption method according to the embodiments of the present invention, it is not necessary to perform data communication with the token server during the encryption and decryption processes, so that the encryption / decryption rate can be improved, and even when a failure occurs in the token server The encryption / decryption operation can be continuously performed, and security tokens that are not similar to each other with respect to successive original text strings or strings can be generated, thereby improving security.
도 1은 본 발명의 일 실시예에 따른 암호화 방법을 나타내는 순서도이다.
도 2는 본 발명의 일 실시예에 따른 암복호화 시스템을 나타내는 블록도이다.
도 3은 도 1의 토큰 이미지 파일을 생성하는 단계의 일 예를 나타내는 순서도이다.
도 4는 도 3의 토큰 이미지 파일을 생성하는 단계의 일 예를 설명하기 위한 도면이다.
도 5는 토큰 이미지 파일의 일 예를 나타내는 도면이다.
도 6은 도 2의 암복호화 시스템에 포함되는 응용 서버의 암호화 동작을 설명하기 위한 도면이다.
도 7은 도 1의 부분 숫자열에 상응하는 부분 토큰을 생성하는 단계의 일 예를 나타내는 순서도이다.
도 8은 본 발명의 일 실시예에 따른 복호화 방법을 나타내는 순서도이다.
도 9는 도 2의 암복호화 시스템에 포함되는 응용 서버의 복호화 동작을 설명하기 위한 도면이다.
도 10은 도 8의 부분 토큰에 상응하는 부분 숫자열을 생성하는 단계의 일 예를 나타내는 순서도이다.1 is a flowchart illustrating an encryption method according to an embodiment of the present invention.
2 is a block diagram illustrating an encryption / decryption system according to an embodiment of the present invention.
3 is a flowchart showing an example of a step of generating the token image file of FIG.
4 is a view for explaining an example of a step of generating the token image file of FIG.
5 is a diagram showing an example of a token image file.
FIG. 6 is a diagram for explaining an encryption operation of an application server included in the encryption / decryption system of FIG. 2. FIG.
7 is a flowchart showing an example of a step of generating a partial token corresponding to the partial number sequence of FIG.
8 is a flowchart illustrating a decoding method according to an embodiment of the present invention.
FIG. 9 is a diagram for explaining a decryption operation of an application server included in the encryption / decryption system of FIG. 2. FIG.
10 is a flowchart showing an example of a step of generating a partial digit sequence corresponding to the partial token of FIG.
본문에 개시되어 있는 본 발명의 실시예들에 대해서, 특정한 구조적 내지 기능적 설명들은 단지 본 발명의 실시예를 설명하기 위한 목적으로 예시된 것으로, 본 발명의 실시예들은 다양한 형태로 실시될 수 있으며 본문에 설명된 실시예들에 한정되는 것으로 해석되어서는 아니 된다.For the embodiments of the invention disclosed herein, specific structural and functional descriptions are set forth for the purpose of describing an embodiment of the invention only, and it is to be understood that the embodiments of the invention may be practiced in various forms, The present invention should not be construed as limited to the embodiments described in Figs.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는바, 특정 실시예들을 도면에 예시하고 본문에 상세하게 설명하고자 한다. 그러나 이는 본 발명을 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.The present invention is capable of various modifications and various forms, and specific embodiments are illustrated in the drawings and described in detail in the text. It is to be understood, however, that the invention is not intended to be limited to the particular forms disclosed, but on the contrary, is intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.
제 1, 제 2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로 사용될 수 있다. 예를 들어, 본 발명의 권리 범위로부터 이탈되지 않은 채 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 명명될 수 있다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms may be used for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Other expressions that describe the relationship between components, such as "between" and "between" or "neighboring to" and "directly adjacent to" should be interpreted as well.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprise", "having", and the like are intended to specify the presence of stated features, integers, steps, operations, elements, components, or combinations thereof, , Steps, operations, components, parts, or combinations thereof, as a matter of principle.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미이다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미인 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be construed as meaning consistent with meaning in the context of the relevant art and are not to be construed as ideal or overly formal in meaning unless expressly defined in the present application .
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.
도 1은 본 발명의 일 실시예에 따른 암호화 방법을 나타내는 순서도이다.1 is a flowchart illustrating an encryption method according to an embodiment of the present invention.
도 1을 참조하면, 본 발명에 따른 암호화 방법에서, N자리 내지 (N+M)자리의 모든 숫자열들을 암호화한 원문 암호문들 및 상기 N자리 내지 (N+M)자리의 모든 숫자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성한다(단계 S100). 여기서, N 및 M은 양의 정수를 나타낸다.Referring to FIG. 1, in the encryption method according to the present invention, there are provided original text ciphertexts in which all numeric digits of N digits to (N + M) digits are encrypted and all numeric digits of N digits to (N + M) (Step S100). The token image file is stored in association with the token ciphertexts encrypted with the corresponding tokens. Here, N and M represent positive integers.
예를 들어, N은 3이고 M은 2인 경우, 000 내지 999를 포함하는 세 자리의 모든 숫자열들, 0000 내지 9999를 포함하는 네 자리의 모든 숫자열들, 및 00000 내지 99999를 포함하는 다섯 자리의 모든 숫자열들 각각에 상응하는 상기 토큰들을 생성하고, 상기 세 자리의 모든 숫자열들, 상기 네 자리의 모든 숫자열들, 및 상기 다섯 자리의 모든 숫자열들을 암호화한 원문 암호문들을 생성하고, 상기 세 자리의 모든 숫자열들, 상기 네 자리의 모든 숫자열들, 및 상기 다섯 자리의 모든 숫자열들 각각에 상응하는 상기 토큰들을 암호화하여 상기 토큰 암호문들을 생성한 후, 상기 원문 암호문들과 상기 토큰 암호문들을 서로 연관시켜 상기 토큰 이미지 파일로서 저장할 수 있다.For example, if N is 3 and M is 2, all three-digit numeric sequences including 000 to 999, all four-digit sequences including 0000 to 9999, and five to 00000 to 99999 Generates the tokens corresponding to each of the digit strings of the place, generates the original text ciphertexts encrypting all the digit strings of the three digits, all the digit strings of the four digits, and all the digit strings of the five digits Encrypts the tokens corresponding to each of the three-digit numeric strings, all four-digit strings, and all five-digit strings to generate the token ciphertexts, The token ciphertexts can be associated with each other and stored as the token image file.
일 실시예에 있어서, 상기 N자리 내지 (N+M)자리의 모든 숫자열들 각각에 상응하는 상기 토큰들은 토큰 서버를 통해 생성될 수 있다.In one embodiment, the tokens corresponding to each of the N digits to (N + M) digit strings may be generated through the token server.
상기 원문 암호문들 및 상기 토큰 암호문들은 다양한 암호화 알고리즘을 사용하여 생성될 수 있다.The original text ciphertexts and the token ciphertexts may be generated using various encryption algorithms.
이후, 암호화를 수행하고자 하는 원문 숫자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정한다(단계 S200).Thereafter, the length of the partition window is determined to be less than or equal to the number of digits of the original text string to be encrypted, and to have a length of N digits or more and (N + M) digits or less (step S200).
일 실시예에 있어서, 상기 원문 숫자열의 자리수가 (N+M)자리 이상인 경우, 상기 분할 윈도우의 길이를 (N+M)자리로 결정하고, 상기 원문 숫자열의 자리수가 (N+M)자리 미만인 경우, 상기 분할 윈도우의 길이를 상기 원문 숫자열의 자리수로 결정할 수 있다.In one embodiment, the length of the partition window is determined to be (N + M) digits when the number of digits in the original numeric string is not less than (N + M) , The length of the division window can be determined as the number of digits of the original numeric string.
예를 들어, 상기 원문 숫자열이 일곱 자리 숫자열이고, N은 3이고 M은 2인 경우, 상기 원문 숫자열의 자리수가 (N+M)자리 이상이므로, 상기 분할 윈도우의 길이는 (N+M)자리, 즉, 다섯 자리로 결정될 수 있다.For example, if the original numeric string is a seven-digit string, N is 3, and M is 2, the length of the split window is (N + M) ) Digit, that is, five digits.
이후, 상기 원문 숫자열의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 원문 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 원문 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 임시 숫자열을 생성한다(단계 S300). 여기서, 상기 제1 측은 좌측일 수 있다. 후술하는 바와 같이, 상기 분할 윈도우에 포함되는 상기 부분 숫자열에 상응하는 상기 부분 토큰은 상기 분할 윈도우의 길이와 동일한 자리의 숫자열에 상응할 수 있다.Then, the division window is set at a first side end of the original numeric string, a partial token corresponding to a partial numeric string included in the division window is generated in the original numeric string based on the token image file, The partial number string is replaced with the partial token to generate a temporary number string (step S300). Here, the first side may be on the left side. As described later, the partial token corresponding to the partial number string included in the partitioning window may correspond to a numerical string having the same length as the length of the partitioning window.
이후, 상기 분할 윈도우가 상기 임시 숫자열의 제2 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제2 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 임시 숫자열을 갱신한다. 여기서, 상기 제2 측은 우측일 수 있다.Thereafter, while moving the partition window one by one in the second lateral direction until the partition window reaches the second side end of the temporary number column, the temporary window is shifted from the temporary number column to the partition window based on the token image file Generates a partial token corresponding to the partial numeric string included therein, and updates the temporary numeric string by replacing the partial numeric string with the partial token in the temporary numeric string. Here, the second side may be the right side.
예를 들어, 상기 단계 S300 이후에, 상기 분할 윈도우가 상기 임시 숫자열의 상기 제2 측 끝에 위치하는지 여부를 판단하고(단계 S400), 상기 분할 윈도우가 상기 임시 숫자열의 제2 측 끝에 위치하지 않는 경우(단계 S400; 아니오), 상기 분할 윈도우를 상기 임시 숫자열의 상기 제2 측 방향으로 한 자리 이동하고(단계 S500), 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 임시 숫자열을 갱신하는 동작(단계 S600)을 반복적으로 수행할 수 있다.For example, after step S300, it is determined whether the division window is located at the second side end of the temporary number string (step S400). If the division window is not located at the second side end of the temporary number string (Step S400; NO), the partitioning window is shifted by one position in the second lateral direction of the temporary number string (step S500), and the partial number included in the partitioning window in the temporary number string based on the token image file (Step S600) of generating the partial token corresponding to the column and replacing the partial number column with the partial token in the temporary number column to update the temporary number column.
상기 분할 윈도우가 상기 임시 숫자열의 상기 제2 측 끝에 도달한 경우(단계 S400; 예), 상기 임시 숫자열의 상기 제1 측 끝에 상기 분할 윈도우를 다시 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 임시 숫자열을 갱신한 후, 상기 임시 숫자열을 상기 원문 숫자열에 상응하는 보안 토큰으로서 출력한다(단계 S700).If the partition window reaches the second side end of the temporary number string (step S400; YES), the partitioning window is reset at the first side end of the temporary number string, and the temporary number A partial token corresponding to a partial number string included in the partition window in the column, and the partial number string is replaced with the partial token in the temporary number string to update the temporary string, As a security token corresponding to the original numeric string (step S700).
상술한 바와 같이, 본 발명에 따른 암호화 방법에 따르면, 상기 토큰 서버를 사용하여 상기 토큰 이미지 파일을 미리 생성한 후, 상기 미리 생성된 토큰 이미지 파일을 사용하여 상기 원문 숫자열을 암호화하여 상기 보안 토큰을 생성한다. 이와 같이, 상기 원문 숫자열에 대한 암호화 과정에서 상기 토큰 서버와 데이터 통신을 수행할 필요가 없으므로, 암호화 속도를 향상시킬 수 있고, 상기 토큰 서버에 장애가 발생한 경우에도 암호화 동작을 지속적으로 수행할 수 있다.As described above, according to the encryption method of the present invention, after the token image file is generated in advance using the token server, the original text string is encrypted using the previously generated token image file, . In this way, since there is no need to perform data communication with the token server in the encryption process for the original numeric string, the encryption speed can be improved and the encryption operation can be continuously performed even when the token server fails.
또한, 본 발명에 따른 암호화 방법에 따르면, 상기 원문 숫자열에서 상기 분할 윈도우를 상기 제1 측 끝에서 상기 제2 측 끝까지 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 부분 숫자열을 상기 부분 토큰으로 대체하는 과정을 반복적으로 수행하고, 마지막으로, 상기 분할 윈도우를 상기 제1 측 끝으로 다시 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 보안 토큰을 생성한다. 따라서 연속되는 원문 숫자열들에 대해서도 서로 유사하지 않은 보안 토큰들을 생성하므로, 상기 보안 토큰들을 통해 상기 원문 숫자열들을 유추하기는 어려울 수 있다. 따라서 본 발명에 따른 암호화 방법의 보안성은 보다 향상될 수 있다.According to the encrypting method of the present invention, the partition window is moved from the first side end to the second side end by one digit in the original numeric string, and is included in the partition window based on the token image file Repeatedly performing a process of generating a partial token corresponding to the partial digit sequence and replacing the partial digit sequence with the partial token, and finally, resetting the partition window to the first side end, Generates a partial token corresponding to a partial number string included in the partitioning window, and substitutes the partial number string with the partial token to generate the security token. Therefore, it is difficult to deduce the original numeric sequences through the security tokens because they generate security tokens that are not similar to each other in succession of original numeric sequences. Therefore, the security of the encryption method according to the present invention can be further improved.
도 2는 본 발명의 일 실시예에 따른 암복호화 시스템을 나타내는 블록도이다.2 is a block diagram illustrating an encryption / decryption system according to an embodiment of the present invention.
도 1의 암호화 방법은 도 2에 도시된 암복호화 시스템(10)을 통해 수행될 수 있다.The encryption method of FIG. 1 may be performed through the encryption /
이하, 도 1 및 2를 참조하여 암복호화 시스템(10)에 의해 수행되는 도 1의 암호화 방법에 대해 상세히 설명한다.Hereinafter, the encryption method of FIG. 1 performed by the encryption /
도 2를 참조하면, 암복호화 시스템(10)은 응용 서버(100) 및 토큰 서버(200)를 포함한다.Referring to FIG. 2, the encryption /
응용 서버(100)는 동작 초기에 토큰 서버(200)를 사용하여 N자리 내지 (N+M)자리의 모든 숫자열들을 암호화한 상기 원문 암호문들 및 상기 N자리 내지 (N+M)자리의 모든 숫자열들 각각에 상응하는 상기 토큰들을 암호화한 상기 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일(TIF)(110)을 생성할 수 있다(단계 S100).The
도 3은 도 1의 토큰 이미지 파일을 생성하는 단계의 일 예를 나타내는 순서도이고, 도 4는 도 3의 토큰 이미지 파일을 생성하는 단계의 일 예를 설명하기 위한 도면이다.FIG. 3 is a flowchart illustrating an example of a step of generating a token image file of FIG. 1, and FIG. 4 is a diagram illustrating an example of a step of generating a token image file of FIG.
도 2 내지 4를 참조하면, 응용 서버(100)는 토큰 서버(200)를 사용하여 K자리의 모든 숫자열들(K-NS) 각각에 상응하는 K-블록 토큰들(K-TK)을 생성할 수 있다(단계 S110). 여기서, K는 N 이상 (N+M) 이하의 정수를 나타낸다.2 to 4, the
일 실시예에 있어서, 도 2에 도시된 바와 같이, 응용 서버(100)는 K자리의 모든 숫자열들(K-NS)을 토큰 서버(200)에 제공하고, 토큰 서버(200)는 응용 서버(100)로부터 수신되는 K자리의 모든 숫자열들(K-NS) 각각과 일대일로 매핑되는 K-블록 토큰들(K-TK)을 생성하여 응용 서버(100)에 제공할 수 있다.2, the
예를 들어, N은 3이고 M은 2인 경우, 응용 서버(100)는 토큰 서버(200)를 사용하여 세 자리의 모든 숫자열들 각각과 일대일로 매핑되는 3-블록 토큰들을 생성하고, 토큰 서버(200)를 사용하여 네 자리의 모든 숫자열들 각각과 일대일로 매핑되는 4-블록 토큰들을 생성하고, 토큰 서버(200)를 사용하여 다섯 자리의 모든 숫자열들 각각과 일대일로 매핑되는 5-블록 토큰들을 생성할 수 있다.For example, if N is 3 and M is 2, the
도 4에는 예시적으로 K가 3인 경우, 000 내지 999를 포함하는 세 자리의 모든 숫자열들(K-NS) 및 세 자리의 모든 숫자열들(K-NS) 각각과 일대일로 매핑되는 3-블록 토큰들(K-TK)이 도시된다.FIG. 4 exemplarily shows a case where K is 3, and 3 (k-1), which is mapped on a one-to-one basis with all three-digit numerical strings (K-NS) including 000 to 999 and all three- Block tokens (K-TK) are shown.
도 4에 도시된 바와 같이, 토큰 서버(200)로부터 생성되어 응용 서버(100)에 제공되는 K-블록 토큰들(K-TK)은 K자리의 숫자열들(K-NS)과 동일한 포맷 및 동일한 길이를 가질 수 있다. 즉, K-블록 토큰들(K-TK) 각각은 K자리의 숫자열을 포함할 수 있다.4, the K-block tokens K-TK generated from the
응용 서버(100)는 K자리의 모든 숫자열들(K-NS) 각각을 암호화하여 K-블록 원문 암호문들(K-PED)을 생성하고(단계 S120), K-블록 토큰들(K-TK) 각각을 암호화하여 K-블록 토큰 암호문들(K-TED)을 생성할 수 있다(단계 S130).The
일 실시예에 있어서, 응용 서버(100)는 K자리의 모든 숫자열들(K-NS) 각각에 대해 암호화 알고리즘을 적용하여 K-블록 임시 원문 암호문들을 생성하고, 상기 K-블록 임시 원문 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 K-블록 원문 암호문들(K-PED)을 생성할 수 있다. 또한, 응용 서버(100)는 K-블록 토큰들(K-TK) 각각에 대해 상기 암호화 알고리즘을 적용하여 K-블록 임시 토큰 암호문들을 생성하고, 상기 K-블록 임시 토큰 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 K-블록 토큰 암호문들(K-TED)을 생성할 수 있다.In one embodiment, the
따라서, 도 4에 도시된 바와 같이, K-블록 원문 암호문들(K-PED) 및 K-블록 토큰 암호문들(K-TED) 각각은 문자열을 포함하는 텍스트 포맷을 가질 수 있다.Thus, as shown in FIG. 4, each of the K-block original text ciphertexts (K-PED) and the K-block token ciphertexts (K-TED) may have a text format including a character string.
상기 K-블록 임시 원문 암호문들 및 상기 K-블록 임시 토큰 암호문들은 국제표준인 3DES, AES, RSA 및 국내표준인 SEED, ARIA 등의 다양한 암호화 알고리즘을 사용하여 생성될 수 있다.The K-block temporary text ciphertexts and the K-block temporary token ciphertexts may be generated using various encryption algorithms such as 3DES, AES, RSA, and national standards such as SEED, ARIA, and the like.
이후, 응용 서버(100)는 서로 대응되는 K-블록 원문 암호문들(K-PED) 및 K-블록 토큰 암호문들(K-TED)의 쌍들을 K-블록 토큰 암호문(K-TED)을 기준으로 오름차순으로 정렬하여 K-블록 쌍들(K-PAIR)을 생성할 수 있다(단계 S140).Subsequently, the
K-블록 쌍들(K-PAIR)에는 상기 정렬된 순서대로 일련번호(K-SER)가 부여될 수 있다.The K-block pairs (K-PAIR) may be assigned a serial number (K-SER) in the ordered order.
응용 서버(100)는 K-블록 쌍들(K-PAIR)의 순서를 나타내는 일련번호들(K-SER)을 K-블록 쌍들(K-PAIR)에 포함되는 K-블록 원문 암호문(K-PED)을 기준으로 오름차순으로 정렬하여 K-블록 암호 인덱스(K-IDX)를 생성할 수 있다(단계 S150).The
이후, 응용 서버(100)는 K-블록 쌍들(K-PAIR) 및 K-블록 암호 인덱스(K-IDX)를 토큰 이미지 파일(110)로서 저장할 수 있다(단계 S160).The
응용 서버(100)는 N자리의 모든 숫자열들부터 (N+M)자리의 모든 숫자열들에 대해 도 2 내지 4를 참조하여 설명한 바와 같은 동작을 반복적으로 수행하여, N-블록 쌍들(N-PAIR) 및 N-블록 암호 인덱스(N-IDX)부터 (N+M)-블록 쌍들((N+M)-PAIR) 및 (N+M)-블록 암호 인덱스((N+M)-IDX)를 생성하고, 도 5에 도시된 바와 같이, 이를 토큰 이미지 파일(110)로서 저장할 수 있다.The
이와 같이, 응용 서버(100)는 동작 초기에 토큰 서버(200)를 사용하여 토큰 이미지 파일(110)을 미리 생성할 수 있다.In this way, the
다시 도 1 및 2를 참조하면, 응용 서버(100)는 미리 생성된 토큰 이미지 파일(110)을 메모리에 로딩하고, 토큰 이미지 파일(110)을 사용하여 암호화 동작을 수행할 수 있다.Referring again to Figures 1 and 2, the
도 6은 도 2의 암복호화 시스템에 포함되는 응용 서버의 암호화 동작을 설명하기 위한 도면이다.FIG. 6 is a diagram for explaining an encryption operation of an application server included in the encryption / decryption system of FIG. 2. FIG.
이하, 도 1 내지 6을 참조하여, 응용 서버(100)의 암호화 동작에 대해 설명한다.Hereinafter, the encryption operation of the
도 6을 참조하면, 응용 서버(100)는 암호화를 수행할 원문 숫자열(NS)(도 6의 경우, "1234567")의 자리수에 기초하여 분할 윈도우(DW)의 길이를 결정할 수 있다(단계 S200).6, the
일 실시예에 있어서, 원문 숫자열(NS)의 자리수가 (N+M)자리 이상인 경우, 분할 윈도우(DW)의 길이를 (N+M)자리로 결정하고, 원문 숫자열(NS)의 자리수가 (N+M)자리 미만인 경우, 분할 윈도우(DW)의 길이를 원문 숫자열(NS)의 자리수로 결정할 수 있다.The length of the division window DW is determined to be (N + M) digits, and when the number of digits of the original numeric string NS is greater than (N + M) Is less than (N + M) digits, the length of the division window DW can be determined as the number of digits of the original numeric sequence NS.
예를 들어, 도 6에 도시된 바와 같이, 원문 숫자열(NS)이 일곱 자리 숫자열이고, N은 3이고 M은 2인 경우, 원문 숫자열(NS)의 자리수가 (N+M)자리 이상이므로, 분할 윈도우(DW)의 길이는 (N+M)자리, 즉, 다섯 자리로 결정될 수 있다.For example, as shown in FIG. 6, when the original numeric string NS is a seven-digit string, N is 3 and M is 2, the digits of the original numeric string NS are (N + M) digits , The length of the division window DW can be determined to be (N + M) digits, that is, five digits.
도 6에 도시된 바와 같이, 응용 서버(100)는 원문 숫자열(NS)의 상기 제1 측(도 6에서는 좌측을 나타냄) 끝에 분할 윈도우(DW)를 설정하고, 토큰 이미지 파일(110)에 기초하여 원문 숫자열(NS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "12345")에 상응하는 부분 토큰(PTK)(도 6의 경우, "54934")을 생성할 수 있다(단계 S300).6, the
도 7은 도 1의 부분 숫자열에 상응하는 부분 토큰을 생성하는 단계의 일 예를 나타내는 순서도이다.7 is a flowchart showing an example of a step of generating a partial token corresponding to the partial number sequence of FIG.
도 6 및 7을 참조하면, 응용 서버(100)는 부분 숫자열(PNS)을 암호화하여 부분 숫자열 암호문(PNS_E)을 생성할 수 있다(단계 S310).Referring to FIGS. 6 and 7, the
이 때, 응용 서버(100)는 토큰 이미지 파일(110)을 생성하는 과정에서 K자리의 모든 숫자열들(K-NS) 각각을 암호화하여 K-블록 원문 암호문들(K-PED)을 생성하고, K-블록 토큰들(K-TK) 각각을 암호화하여 K-블록 토큰 암호문들(K-TED)을 생성할 때 사용되는 암호화 알고리즘과 동일한 알고리즘을 사용하여 부분 숫자열 암호문(PNS_E)을 생성할 수 있다.At this time, in the process of generating the
이후, 응용 서버(100)는 토큰 이미지 파일(110)로부터 부분 숫자열 암호문(PNS_E)에 상응하는 부분 토큰 암호문(PTK_E)을 독출할 수 있다(단계 S320).Subsequently, the
구체적으로, 응용 서버(100)는 부분 숫자열 암호문(PNS_E)에 상응하는 부분 숫자열(PNS)의 자리수를 판단할 수 있다. 도 6에 도시된 예시의 경우, 부분 숫자열(PNS)은 다섯 자리 숫자열일 수 있다.Specifically, the
응용 서버(100)는 부분 숫자열 암호문(PNS_E)에 상응하는 부분 숫자열(PNS)이 K자리 숫자열인 경우, 토큰 이미지 파일(110)에 포함되는 K-블록 암호 인덱스(K-IDX)에 기초하여 토큰 이미지 파일(110)에 포함되는 K-블록 쌍들(K-PAIR) 중에서 부분 숫자열 암호문(PNS_E)과 일치하는 K-블록 원문 암호문(K-PED)을 포함하는 일치 K-블록 쌍을 판단할 수 있다.The
일 실시예에 있어서, 응용 서버(100)는 K-블록 암호 인덱스(K-IDX) 및 K-블록 쌍들(K-PAIR)에 이진 검색(binary search) 알고리즘을 적용하여 K-블록 쌍들(K-PAIR) 중에서 부분 숫자열 암호문(PNS_E)과 일치하는 K-블록 원문 암호문(K-PED)을 포함하는 상기 일치 K-블록 쌍을 결정할 수 있다.In one embodiment,
응용 서버(100)는 상기 일치 K-블록 쌍에 포함되는 K-블록 토큰 암호문(K-TED)을 부분 토큰 암호문(PTK_E)으로서 독출할 수 있다.The
상술한 바와 같은 동작을 통해 응용 서버(100)는 토큰 이미지 파일(110)로부터 부분 숫자열 암호문(PNS_E)에 상응하는 부분 토큰 암호문(PTK_E)을 독출할 수 있다.The
이후, 응용 서버(100)는 부분 토큰 암호문(PTK_E)을 복호화하여 부분 토큰(PTK)을 생성할 수 있다(단계 S330).Then, the
따라서 부분 토큰(PTK)은 부분 숫자열(PNS)과 동일한 길이를 갖는 숫자열일 수 있다.Thus, the partial token PTK may be a numeric string having the same length as the partial numeric sequence PNS.
다시 도 1 내지 6을 참조하면, 응용 서버(100)는 원문 숫자열(NS)에서 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하여 임시 숫자열(TNS)을 생성할 수 있다(단계 S300).Referring again to Figures 1 to 6, the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제2 측(도 6에서는 우측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S400). 도 6에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제2 측 끝에 위치하지 않으므로(단계 S400; 아니오), 응용 서버(100)는 분할 윈도우(DW)를 임시 숫자열(TNS)의 상기 제2 측 방향으로 한 자리 이동하고(단계 S500), 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "49346")에 상응하는 부분 토큰(PTK)(도 6의 경우, "86593")을 생성하고, 임시 숫자열(TNS)에서 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하여 임시 숫자열(TNS)을 갱신할 수 있다(단계 S600).Thereafter, the
여기서, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "49346")에 상응하는 부분 토큰(PTK)(도 6의 경우, "86593")을 생성하는 과정은 도 7을 참조하여 설명한 과정과 동일한 방법으로 수행될 수 있다.Here, a partial token PTK corresponding to the partial numerical string PNS ("49346" in FIG. 6) included in the partition window DW in the temporary numeric string TNS based on the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제2 측(도 6에서는 우측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S400). 도 6에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제2 측 끝에 위치하지 않으므로(단계 S400; 아니오), 응용 서버(100)는 분할 윈도우(DW)를 임시 숫자열(TNS)의 상기 제2 측 방향으로 한 자리 이동하고(단계 S500), 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "65937")에 상응하는 부분 토큰(PTK)(도 6의 경우, "89549")을 생성하고, 임시 숫자열(TNS)에서 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하여 임시 숫자열(TNS)을 갱신할 수 있다(단계 S600).Thereafter, the
여기서, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "65937")에 상응하는 부분 토큰(PTK)(도 6의 경우, "89549")을 생성하는 과정은 도 7을 참조하여 설명한 과정과 동일한 방법으로 수행될 수 있다.Here, a partial token PTK corresponding to the partial numerical string PNS ("65937" in FIG. 6) included in the partition window DW at the temporary numeric string TNS based on the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제2 측(도 6에서는 우측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S400). 도 6에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제2 측 끝에 위치하므로(단계 S400; 예), 응용 서버(100)는 분할 윈도우(DW)를 임시 숫자열(TNS)의 상기 제1 측 끝에 다시 설정하고, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)(도 6의 경우, "58895")에 상응하는 부분 토큰(PTK)(도 6의 경우, "60639")을 생성하고, 임시 숫자열(TNS)에서 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하여 임시 숫자열(TNS)을 갱신한 후, 임시 숫자열(TNS)을 원문 숫자열(NS)(도 6의 경우, "1234567")에 상응하는 보안 토큰(STK)(도 6의 경우, "6063949")으로서 출력할 수 있다(단계 S700).Thereafter, the
이상, 설명의 편의를 위해 본 발명에 따른 암호화 동작은 토큰 이미지 파일(110)이 생성되는 응용 서버(100)에서 수행되는 것으로 설명하였으나, 토큰 이미지 파일(110)은 임의의 다른 서버로 복사될 수 있고, 토큰 이미지 파일(110)을 가지고 있는 임의의 서버는 상술한 바와 같은 암호화 동작을 수행함으로써 원문 숫자열(NS)에 상응하는 보안 토큰(STK)을 생성할 수 있다.Although the encryption operation according to the present invention has been described in the
도 1 내지 7을 참조하여 상술한 바와 같이, 본 발명에 따른 암호화 방법에 따르면, 토큰 서버(200)를 사용하여 토큰 이미지 파일(110)을 미리 생성한 후, 미리 생성된 토큰 이미지 파일(110)을 사용하여 원문 숫자열(NS)을 암호화하여 보안 토큰(STK)을 생성한다. 이와 같이, 원문 숫자열(NS)에 대한 암호화 과정에서 토큰 서버(200)와 데이터 통신을 수행할 필요가 없으므로, 암호화 속도를 향상시킬 수 있고, 토큰 서버(200)에 장애가 발생한 경우에도 암호화 동작을 지속적으로 수행할 수 있다.As described above with reference to Figs. 1 to 7, according to the encryption method of the present invention, the
또한, 본 발명에 따른 암호화 방법에 따르면, 원문 숫자열(NS)에서 분할 윈도우(DW)를 상기 제1 측 끝에서 상기 제2 측 끝까지 한 자리씩 이동시키면서, 토큰 이미지 파일(110)에 기초하여 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)에 상응하는 부분 토큰(PTK)을 생성하고, 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하는 과정을 반복적으로 수행하고, 마지막으로, 분할 윈도우(DW)를 상기 제1 측 끝으로 다시 설정하고, 토큰 이미지 파일(110)에 기초하여 분할 윈도우(DW)에 포함되는 부분 숫자열(PNS)에 상응하는 부분 토큰(PTK)을 생성하고, 부분 숫자열(PNS)을 부분 토큰(PTK)으로 대체하여 보안 토큰(STK)을 생성한다. 따라서 연속되는 원문 숫자열들(NS)에 대해서도 서로 유사하지 않은 보안 토큰들(STK)을 생성하므로, 보안 토큰들(STK)을 통해 원문 숫자열들(NS)을 유추하기는 어려울 수 있다. 따라서 본 발명에 따른 암호화 방법의 보안성은 보다 향상될 수 있다.According to the encrypting method of the present invention, the partition window DW is moved from the first side end to the second side end by one digit in the original numeric string NS, and based on the
도 8은 본 발명의 일 실시예에 따른 복호화 방법을 나타내는 순서도이다.8 is a flowchart illustrating a decoding method according to an embodiment of the present invention.
도 8의 복호화 방법은 도 2에 도시된 암복호화 시스템(10)을 통해 수행될 수 있다.The decoding method of FIG. 8 can be performed through the encryption /
도 8을 참조하면, 본 발명에 따른 복호화 방법에서, 응용 서버(100)는 N자리 내지 (N+M)자리의 모든 숫자열들을 암호화한 원문 암호문들 및 상기 N자리 내지 (N+M)자리의 모든 숫자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장하는 토큰 이미지 파일을 생성한다(단계 S100).Referring to FIG. 8, in the decryption method according to the present invention, the
도 8에 도시된 토큰 이미지 파일을 생성하는 단계(S100)는 도 1에 도시된 토큰 이미지 파일을 생성하는 단계(S100)와 동일하게 수행될 수 있다.The step S100 of generating the token image file shown in Fig. 8 may be performed in the same manner as the step S100 of generating the token image file shown in Fig.
응용 서버(100)는 미리 생성된 토큰 이미지 파일(110)을 메모리에 로딩하고, 토큰 이미지 파일(110)을 사용하여 복호화 동작을 수행할 수 있다.The
도 9는 도 2의 암복호화 시스템에 포함되는 응용 서버의 복호화 동작을 설명하기 위한 도면이다.FIG. 9 is a diagram for explaining a decryption operation of an application server included in the encryption / decryption system of FIG. 2. FIG.
도 9에 도시된 바와 같이, 도 8의 복호화 방법은 도 1의 암호화 방법의 역순으로 수행될 수 있다.As shown in FIG. 9, the decryption method of FIG. 8 can be performed in the reverse order of the encryption method of FIG.
이하, 도 1 내지 9를 참조하여, 응용 서버(100)의 복호화 동작에 대해 설명한다.Hereinafter, the decoding operation of the
도 9를 참조하면, 응용 서버(100)는 복호화를 수행할 보안 토큰(STK)(도 9의 경우, "6063949")의 자리수에 기초하여 분할 윈도우(DW)의 길이를 결정할 수 있다(단계 S201).9, the
일 실시예에 있어서, 보안 토큰(STK)의 자리수가 (N+M)자리 이상인 경우, 분할 윈도우(DW)의 길이를 (N+M)자리로 결정하고, 보안 토큰(STK)의 자리수가 (N+M)자리 미만인 경우, 분할 윈도우(DW)의 길이를 보안 토큰(STK)의 자리수로 결정할 수 있다.In one embodiment, if the number of digits of the security token (STK) is greater than or equal to (N + M), the length of the partition window DW is determined to be (N + M) N + M) digits, the length of the partition window DW can be determined as the number of digits of the security token (STK).
예를 들어, 도 9에 도시된 바와 같이, 보안 토큰(STK)이 일곱 자리 숫자열이고, N은 3이고 M은 2인 경우, 보안 토큰(STK)의 자리수가 (N+M)자리 이상이므로, 분할 윈도우(DW)의 길이는 (N+M)자리, 즉, 다섯 자리로 결정될 수 있다.For example, as shown in FIG. 9, when the security token (STK) is a seven-digit sequence, N is 3 and M is 2, the digit number of the security token (STK) is (N + M) digits or more , The length of the division window DW may be determined to be (N + M) digits, that is, five digits.
도 9에 도시된 바와 같이, 응용 서버(100)는 보안 토큰(STK)의 상기 제1 측(도 9에서는 좌측을 나타냄) 끝에 분할 윈도우(DW)를 설정하고, 토큰 이미지 파일(110)에 기초하여 보안 토큰(STK)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "60639")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "58895")을 생성할 수 있다(단계 S301).9, the
도 10은 도 8의 부분 토큰에 상응하는 부분 숫자열을 생성하는 단계의 일 예를 나타내는 순서도이다.10 is a flowchart showing an example of a step of generating a partial digit sequence corresponding to the partial token of FIG.
도 9 및 10을 참조하면, 응용 서버(100)는 부분 토큰(PTK)을 암호화하여 부분 토큰 암호문(PTK_E)을 생성할 수 있다(단계 S311).Referring to FIGS. 9 and 10, the
이 때, 응용 서버(100)는 토큰 이미지 파일(110)을 생성하는 과정에서 K자리의 모든 숫자열들(K-NS) 각각을 암호화하여 K-블록 원문 암호문들(K-PED)을 생성하고, K-블록 토큰들(K-TK) 각각을 암호화하여 K-블록 토큰 암호문들(K-TED)을 생성할 때 사용되는 암호화 알고리즘과 동일한 알고리즘을 사용하여 부분 토큰 암호문(PTK_E)을 생성할 수 있다.At this time, in the process of generating the
이후, 응용 서버(100)는 토큰 이미지 파일(110)로부터 부분 토큰 암호문(PTK_E)에 상응하는 부분 숫자열 암호문(PNS_E)을 독출할 수 있다(단계 S321).Then, the
구체적으로, 응용 서버(100)는 부분 토큰 암호문(PTK_E)에 상응하는 부분 토큰(PTK)의 자리수를 판단할 수 있다. 도 9에 도시된 예시의 경우, 부분 토큰(PTK)은 다섯 자리 숫자열일 수 있다.Specifically, the
응용 서버(100)는 부분 토큰 암호문(PTK_E)에 상응하는 부분 토큰(PTK)이 K자리 숫자열인 경우, 토큰 이미지 파일(110)에 포함되는 K-블록 쌍들(K-PAIR) 중에서 부분 토큰 암호문(PTK_E)과 일치하는 K-블록 토큰 암호문(K-TED)을 포함하는 일치 K-블록 쌍을 판단할 수 있다.When the partial token (PTK) corresponding to the partial token cipher text (PTK_E) is a K-digit sequence, the
일 실시예에 있어서, 토큰 이미지 파일(110)에 포함되는 K-블록 쌍들(K-PAIR)은 K-블록 토큰 암호문(K-TED)을 기준으로 오름차순으로 정렬되어 있으므로, 응용 서버(100)는 K-블록 쌍들(K-PAIR)에 이진 검색(binary search) 알고리즘을 적용하여 K-블록 쌍들(K-PAIR) 중에서 부분 토큰 암호문(PTK_E)과 일치하는 K-블록 토큰 암호문(K-TED)을 포함하는 상기 일치 K-블록 쌍을 결정할 수 있다.In one embodiment, the K-block pairs (K-PAIR) included in the
응용 서버(100)는 상기 일치 K-블록 쌍에 포함되는 K-블록 원문 암호문(K-PED)을 부분 숫자열 암호문(PNS_E)으로서 독출할 수 있다.The
상술한 바와 같은 동작을 통해 응용 서버(100)는 토큰 이미지 파일(110)로부터 부분 토큰 암호문(PTK_E)에 상응하는 부분 숫자열 암호문(PNS_E)을 독출할 수 있다.The
이후, 응용 서버(100)는 부분 숫자열 암호문(PNS_E)을 복호화하여 부분 숫자열(PNS)을 생성할 수 있다(단계 S331).Thereafter, the
따라서 부분 숫자열(PNS)은 부분 토큰(PTK)과 동일한 길이를 갖는 숫자열일 수 있다.Thus, the partial numeric sequence PNS may be a numeric sequence having the same length as the partial token PTK.
다시 도 1 내지 9를 참조하면, 응용 서버(100)는 보안 토큰(STK)에서 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하여 임시 숫자열(TNS)을 생성할 수 있다(단계 S301).Referring again to Figures 1 to 9, the
이후, 응용 서버(100)는 임시 숫자열(TNS)의 상기 제2 측(도 9에서는 우측을 나타냄) 끝에 분할 윈도우(DW)를 설정하고, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "89549")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "65937")을 생성하고, 임시 숫자열(TNS)에서 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하여 임시 숫자열(TNS)을 갱신할 수 있다(단계 S401).Then, the
여기서, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "89549")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "65937")을 생성하는 과정은 도 10을 참조하여 설명한 과정과 동일한 방법으로 수행될 수 있다.Here, the partial numerical string PNS corresponding to the partial token PTK ("89549" in FIG. 9) included in the partition window DW at the temporary numeric string TNS based on the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제1 측(도 9에서는 좌측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S501). 도 9에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제1 측 끝에 위치하지 않으므로(단계 S501; 아니오), 응용 서버(100)는 분할 윈도우(DW)를 임시 숫자열(TNS)의 상기 제1 측 방향으로 한 자리 이동하고(단계 S601), 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "86593")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "49346")을 생성하고, 임시 숫자열(TNS)에서 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하여 임시 숫자열(TNS)을 갱신할 수 있다(단계 S701).Thereafter, the
여기서, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "86593")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "49346")을 생성하는 과정은 도 10을 참조하여 설명한 과정과 동일한 방법으로 수행될 수 있다.Here, the partial numeric string PNS corresponding to the partial token PTK ("86593" in FIG. 9) contained in the partition window DW at the temporary numeric string TNS based on the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제1 측(도 9에서는 좌측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S501). 도 9에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제1 측 끝에 위치하지 않으므로(단계 S501; 아니오), 응용 서버(100)는 분할 윈도우(DW)를 임시 숫자열(TNS)의 상기 제1 측 방향으로 한 자리 이동하고(단계 S601), 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "54934")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "12345")을 생성하고, 임시 숫자열(TNS)에서 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하여 임시 숫자열(TNS)을 갱신할 수 있다(단계 S701).Thereafter, the
여기서, 토큰 이미지 파일(110)에 기초하여 임시 숫자열(TNS)에서 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)(도 9의 경우, "54934")에 상응하는 부분 숫자열(PNS)(도 9의 경우, "12345")을 생성하는 과정은 도 10을 참조하여 설명한 과정과 동일한 방법으로 수행될 수 있다.Here, a partial numeric string PNS corresponding to the partial token PTK ("54934" in FIG. 9) contained in the partition window DW at the temporary numeric string TNS based on the
이후, 응용 서버(100)는 분할 윈도우(DW)가 임시 숫자열(TNS)의 상기 제1 측(도 9에서는 좌측을 나타냄) 끝에 위치하는지 여부를 판단할 수 있다(단계 S501). 도 9에 도시된 바와 같이, 현재 분할 윈도우(DW)는 임시 숫자열(TNS)의 상기 제1 측 끝에 위치하므로(단계 S501; 예), 응용 서버(100)는 임시 숫자열(TNS)을 보안 토큰(STK)(도 9의 경우, "6063949")에 상응하는 원문 숫자열(NS)(도 9의 경우, "1234567")로서 출력할 수 있다(단계 S801).Thereafter, the
이상, 설명의 편의를 위해 본 발명에 따른 복호화 동작은 토큰 이미지 파일(110)이 생성되는 응용 서버(100)에서 수행되는 것으로 설명하였으나, 토큰 이미지 파일(110)은 임의의 다른 서버로 복사될 수 있고, 토큰 이미지 파일(110)을 가지고 있는 임의의 서버는 상술한 바와 같은 복호화 동작을 수행함으로써 보안 토큰(STK)에 상응하는 원문 숫자열(NS)을 생성할 수 있다.Although the decryption operation according to the present invention has been described in the
도 1 내지 10을 참조하여 상술한 바와 같이, 본 발명에 따른 복호화 방법에 따르면, 토큰 서버(200)를 사용하여 토큰 이미지 파일(110)을 미리 생성한 후, 미리 생성된 토큰 이미지 파일(110)을 사용하여 보안 토큰(STK)을 복호화하여 원문 숫자열(NS)을 생성한다. 이와 같이, 보안 토큰(STK)에 대한 복호화 과정에서 토큰 서버(200)와 데이터 통신을 수행할 필요가 없으므로, 복호화 속도를 향상시킬 수 있고, 토큰 서버(200)에 장애가 발생한 경우에도 복호화 동작을 지속적으로 수행할 수 있다.As described above with reference to FIGS. 1 to 10, according to the decoding method of the present invention, the
또한, 본 발명에 따른 복호화 방법에 따르면, 보안 토큰(STK)에서 분할 윈도우(DW)를 상기 제1 측 끝에 설정하고, 토큰 이미지 파일(110)에 기초하여 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)에 상응하는 부분 숫자열(PNS)을 생성하고, 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하고, 이후, 분할 윈도우(DW)를 상기 제2 측 끝에서 상기 제1 측 끝까지 한 자리씩 이동시키면서, 토큰 이미지 파일(110)에 기초하여 분할 윈도우(DW)에 포함되는 부분 토큰(PTK)에 상응하는 부분 숫자열(PNS)을 생성하고, 부분 토큰(PTK)을 부분 숫자열(PNS)로 대체하는 과정을 반복적으로 수행하여 원문 숫자열(NS)을 생성한다. According to the decryption method according to the present invention, the partition window DW is set at the first side end in the security token STK, and the partial token included in the partition window DW based on the token image file 110 (PNS) corresponding to the first side (PTK), replacing the partial token (PTK) with the partial number sequence (PNS), and thereafter dividing the window (PNS) corresponding to the partial token (PTK) included in the partition window DW based on the
따라서 본 발명에 따른 암복호화 방법에 따르면, 연속되는 원문 숫자열들(NS)에 대해서도 서로 유사하지 않은 보안 토큰들(STK)을 생성하고, 이를 정상적으로 복호화하므로, 보안 토큰들(STK)을 통해 원문 숫자열들(NS)을 유추하기는 어려울 수 있다. 따라서 본 발명에 따른 암복호화 방법의 보안성은 보다 향상될 수 있다.Therefore, according to the encryption / decryption method according to the present invention, since security tokens (STK) that are not similar to each other are generated for successive original numeric sequences NS and normally decrypted, the security tokens (STK) It may be difficult to infer the numeric sequences (NS). Therefore, the security of the encryption / decryption method according to the present invention can be further improved.
이상, 도 1 내지 10을 참조하여, 연속되는 원문 숫자열들에 대해서도 서로 유사하지 않은 보안 토큰들을 생성하고, 상기 보안 토큰들을 정상적으로 복호화하여 상기 원문 숫자열들을 생성할 수 있는 암복호화 방법에 대해 설명하였으나, 본 발명은 이에 한정되지 않는다. 즉, 숫자열에 대한 암복호화 방법은 본 발명의 실시예들에 따른 암복호화 방법의 일 예에 불과하고, 실시예에 따라서, 문자열에 대해서도 도 1 내지 10을 참조하여 상술한 바와 동일한 암복호화 방법을 통해 암호화 동작 및 복호화 동작을 수행할 수 있다. As described above, with reference to FIGS. 1 to 10, a description will be given of an encryption / decryption method capable of generating security tokens that are not similar to each other with respect to successive original text strings, and can generate the original text strings by normally decrypting the security tokens However, the present invention is not limited to this. That is, the encryption / decryption method for the numeric string is merely an example of the encryption / decryption method according to the embodiments of the present invention. According to the embodiment, the same encryption / decryption method as described above with reference to Figs. Lt; RTI ID = 0.0 > and / or < / RTI >
이 경우, 토큰 이미지 파일(110)은 N자리 내지 (N+M)자리의 모든 숫자열들 대신에 N자리 내지 (N+M)자리의 모든 문자열들을 암호화한 원문 암호문들 및 상기 N자리 내지 (N+M)자리의 모든 문자열들 각각에 상응하는 토큰들을 암호화한 토큰 암호문들을 서로 연관시켜 저장할 수 있다.In this case, the
예를 들어, N은 3이고 M은 2인 경우, aaa 내지 zzz를 포함하는 세 자리의 모든 문자열들, aaaa 내지 zzzz를 포함하는 네 자리의 모든 문자열들, 및 aaaaa 내지 zzzzz를 포함하는 다섯 자리의 모든 문자열들 각각에 상응하는 상기 토큰들을 생성하고, 상기 세 자리의 모든 문자열들, 상기 네 자리의 모든 문자열들, 및 상기 다섯 자리의 모든 문자열들을 암호화한 원문 암호문들을 생성하고, 상기 세 자리의 모든 문자열들, 상기 네 자리의 모든 문자열들, 및 상기 다섯 자리의 모든 문자열들 각각에 상응하는 상기 토큰들을 암호화하여 상기 토큰 암호문들을 생성한 후, 상기 원문 암호문들과 상기 토큰 암호문들을 서로 연관시켜 토큰 이미지 파일(110)로서 저장할 수 있다.For example, when N is 3 and M is 2, all three-digit strings including aaa to zzz, all four-digit strings including aaaa to zzzz, and five-digit strings including aaaaa to zzzzz Generates the tokens corresponding to each of all the strings, generates the original text ciphertexts in which all the three-digit strings, the four-digit all strings, and all the strings of the five digits are encrypted, Encrypts the tokens corresponding to each of the strings, all the four-digit strings, and all the strings of the five digits to generate the token pass phrases, and associates the to-
토큰 이미지 파일(110)에 기초하여, 원문 문자열을 암호화하여 보안 토큰을 생성하고, 상기 보안 토큰을 복호화하여 상기 원문 문자열을 생성하는 동작은 도 1 내지 10을 참조하여 상술한 원문 숫자열에 대한 암복호화 방법과 동일하게 수행될 수 있다. 따라서 원문 문자열에 대한 암복호화 방법에 대한 중복되는 설명은 생략한다.The operation of encrypting the original text string based on the
본 발명의 실시예들에 따른 암호화 방법 및 복호화 방법은 숫자열에 대해 암호화 및 복호화를 수행하는 장치에 적용되어 토큰 서버의 장애 발생시에도 서비스 중단 없이 빠른 속도로 높은 보안 수준의 암복호화 서비스를 제공하는 데에 유용하게 사용될 수 있다. The encryption method and the decryption method according to the embodiments of the present invention are applied to a device that performs encryption and decryption on a numeric string to provide a high-security encryption / decryption service at a high speed without service interruption even when a token server fails . ≪ / RTI >
상술한 바와 같이, 본 발명의 바람직한 실시예를 참조하여 설명하였지만 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims. It will be understood that the invention may be modified and varied without departing from the scope of the invention.
Claims (13)
원문 숫자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하는 단계;
상기 원문 숫자열의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 원문 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 원문 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 임시 숫자열을 생성하는 단계;
상기 분할 윈도우가 상기 임시 숫자열의 제2 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제2 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 임시 숫자열을 갱신하는 단계; 및
상기 임시 숫자열의 상기 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 숫자열에 상응하는 부분 토큰을 생성하고, 상기 임시 숫자열에서 상기 부분 숫자열을 상기 부분 토큰으로 대체하여 상기 원문 숫자열에 상응하는 보안 토큰으로서 출력하는 단계를 포함하고,
상기 부분 토큰은 상기 분할 윈도우의 길이와 동일한 자리의 숫자열에 상응하는 암호화 방법.Token ciphertexts that associate and encrypt tokens ciphertexts encrypting all numeric strings of N ~ (N + M) digits and tokens corresponding to each of the N ~ (N + M) Generating an image file (N and M are positive integers);
Determining a length of the partition window to be less than or equal to the number of digits in the original text string, and having a length of N digits or more and (N + M) digits or less;
The method comprising: setting the partition window at a first side end of the original numeric string, generating a partial token corresponding to a partial numeric string included in the partition window in the original numeric string based on the token image file, Replacing the partial number sequence with the partial token to generate a temporary sequence of numbers;
Wherein the temporary window is shifted by one digit in the second lateral direction until the partition window arrives at the second side edge of the temporary number string, Generating a partial token corresponding to the partial numeric string, and replacing the partial numeric string with the partial token in the temporary numeric string to update the temporary string; And
Setting the partition window at the first side end of the temporary number column and generating a partial token corresponding to the partial number column included in the partition window in the temporary number column based on the token image file, Replacing the partial number string with the partial token and outputting the same as a security token corresponding to the original numeric string;
Wherein the partial token corresponds to a numeric string in the same position as the length of the partition window.
상기 원문 숫자열의 자리수가 (N+M)자리 이상인 경우, 상기 분할 윈도우의 길이를 (N+M)자리로 결정하는 단계; 및
상기 원문 숫자열의 자리수가 (N+M)자리 미만인 경우, 상기 분할 윈도우의 길이를 상기 원문 숫자열의 자리수로 결정하는 단계를 포함하는 암호화 방법.2. The method of claim 1, wherein determining the length of the partitioning window comprises:
Determining a length of the division window to be (N + M) digits when the number of digits in the original numeric string is (N + M) digits or more; And
And determining the length of the partition window as the number of digits in the original numeric string when the number of digits in the original numeric string is less than (N + M) digits.
K(K는 N 이상 (N+M) 이하의 정수)자리의 모든 숫자열들 각각에 상응하는 K-블록 토큰들을 생성하는 단계;
상기 K자리의 모든 숫자열들 각각을 암호화하여 K-블록 원문 암호문들을 생성하는 단계;
상기 K-블록 토큰들 각각을 암호화하여 K-블록 토큰 암호문들을 생성하는 단계;
서로 대응되는 상기 K-블록 원문 암호문들 및 상기 K-블록 토큰 암호문들의 쌍들을 상기 K-블록 토큰 암호문을 기준으로 오름차순으로 정렬하여 K-블록 쌍들을 생성하는 단계;
상기 K-블록 쌍들의 순서를 나타내는 일련번호들을 상기 K-블록 쌍들에 포함되는 상기 K-블록 원문 암호문을 기준으로 오름차순으로 정렬하여 K-블록 암호 인덱스를 생성하는 단계; 및
상기 K-블록 쌍들 및 상기 K-블록 암호 인덱스를 상기 토큰 이미지 파일로서 저장하는 단계를 포함하는 암호화 방법.2. The method of claim 1, wherein generating the token image file comprises:
Generating K-block tokens corresponding to each of all the digit strings of K (where K is an integer equal to or greater than N and equal to or less than (N + M));
Encrypting each of the digit strings of the K digits to generate K-block original text ciphertexts;
Encrypting each of the K-block tokens to generate K-block token pass phrases;
Generating K-block pairs by sorting the pairs of the K-block text ciphertexts and the K-block token ciphertexts corresponding to each other in ascending order based on the K-block token ciphertext;
Generating a K-block cipher index by sorting the serial numbers representing the order of the K-block pairs in ascending order based on the K-block original cipher text included in the K-block pairs; And
Storing the K-block pairs and the K-block encryption index as the token image file.
상기 K자리의 모든 숫자열들 각각에 대해 암호화 알고리즘을 적용하여 K-블록 임시 원문 암호문들을 생성하는 단계; 및
상기 K-블록 임시 원문 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 상기 K-블록 원문 암호문들을 생성하는 단계를 포함하고,
상기 K-블록 토큰들 각각을 암호화하여 상기 K-블록 토큰 암호문들을 생성하는 단계는,
상기 K-블록 토큰들 각각에 대해 상기 암호화 알고리즘을 적용하여 K-블록 임시 토큰 암호문들을 생성하는 단계; 및
상기 K-블록 임시 토큰 암호문들 각각에 대해 BASE64 알고리즘을 적용하여 상기 K-블록 토큰 암호문들을 생성하는 단계를 포함하는 암호화 방법.6. The method of claim 5, wherein generating the K-block text ciphertexts by encrypting each of the K digits of all the digit strings comprises:
Generating K-block temporary text ciphertexts by applying an encryption algorithm to each of the K digits of all the digit strings; And
And applying the BASE64 algorithm to each of the K-block temporary text ciphertexts to generate the K-block text ciphertexts,
Wherein the step of encrypting each of the K-block tokens to generate the K-block token pass phrases comprises:
Applying the encryption algorithm to each of the K-block tokens to generate K-block temporary token ciphertexts; And
And applying the BASE64 algorithm to each of the K-block temporary token ciphertexts to generate the K-block token ciphertexts.
상기 부분 숫자열을 암호화하여 부분 숫자열 암호문을 생성하는 단계;
상기 토큰 이미지 파일로부터 상기 부분 숫자열 암호문에 상응하는 부분 토큰 암호문을 독출하는 단계; 및
상기 부분 토큰 암호문을 복호화하여 상기 부분 토큰을 생성하는 단계를 포함하는 암호화 방법.5. The method of claim 4, wherein generating the partial token corresponding to the partial number sequence comprises:
Encrypting the partial numeric string to generate a partial numeric string cipher text;
Reading a partial token cipher text corresponding to the partial numeric string cipher text from the token image file; And
And decrypting the partial token ciphertext to generate the partial token.
상기 부분 숫자열 암호문에 상응하는 상기 부분 숫자열의 자리수를 판단하는 단계;
상기 부분 숫자열이 K자리 숫자열인 경우, 상기 토큰 이미지 파일에 포함되는 상기 K-블록 암호 인덱스에 기초하여 상기 K-블록 쌍들 중에서 상기 부분 숫자열 암호문과 일치하는 상기 K-블록 원문 암호문을 포함하는 일치 K-블록 쌍을 판단하는 단계; 및
상기 일치 K-블록 쌍에 포함되는 상기 K-블록 토큰 암호문을 상기 부분 토큰 암호문으로서 독출하는 단계를 포함하는 암호화 방법.9. The method of claim 8, wherein reading the partial token ciphertext corresponding to the partial number column ciphertext from the token image file comprises:
Determining a digit number of the partial numeric string corresponding to the partial numeric string cipher text;
Block cipher text that matches the partial numeric column cipher text in the K-block pairs based on the K-block cipher index included in the token image file when the partial numeric string is a K- Determining a matching K-block pair; And
And reading the K-block token ciphertext included in the matched K-block pair as the partial token ciphertext.
상기 K-블록 암호 인덱스 및 상기 K-블록 쌍들에 이진 검색(binary search) 알고리즘을 적용하여 상기 K-블록 쌍들 중에서 상기 부분 숫자열 암호문과 일치하는 상기 K-블록 원문 암호문을 포함하는 상기 일치 K-블록 쌍을 결정하는 단계를 포함하는 암호화 방법.10. The method of claim 9, wherein determining the coincident K-
Block ciphers corresponding to the K-block cipher text and the K-block cipher text matching the K-block ciphertext by applying a binary search algorithm to the K-block cipher pairs and the K- And determining a block pair.
보안 토큰의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하는 단계;
상기 보안 토큰의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 보안 토큰에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 보안 토큰에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 임시 숫자열을 생성하는 단계;
상기 임시 숫자열의 제2 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 임시 숫자열에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 상기 임시 숫자열을 갱신하는 단계;
상기 분할 윈도우가 상기 임시 숫자열의 제1 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제1 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 숫자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 숫자열을 생성하고, 상기 임시 숫자열에서 상기 부분 토큰을 상기 부분 숫자열로 대체하여 상기 임시 숫자열을 갱신하는 단계; 및
상기 임시 숫자열을 상기 보안 토큰에 상응하는 원문 숫자열로서 출력하는 단계를 포함하고,
상기 보안 토큰은 숫자들로 구성된 숫자열에 상응하는 복호화 방법.Token ciphertexts that associate and encrypt tokens ciphertexts encrypting all numeric strings of N ~ (N + M) digits and tokens corresponding to each of the N ~ (N + M) Generating an image file (N and M are positive integers);
Determining a length of the partition window to be less than or equal to the number of digits of the security token and having a length of N digits or more and (N + M) digits or less;
Establishing the partition window at a first side end of the security token, generating a partial numeric sequence corresponding to a partial token included in the partition window in the security token based on the token image file, Replacing the token with the partial numeric string to generate a temporary numeric string;
Setting the partition window at a second side end of the temporary number column and generating a partial number column corresponding to the partial token included in the partition window in the temporary number column based on the token image file, Updating the temporary number string by replacing the partial token with the partial number string;
Wherein the partitioning window is included in the partitioning window in the temporary number sequence based on the token image file, while moving the partitioning window one by one in the first lateral direction until the partitioning window reaches the first side end of the temporary number string Generating a partial numeric string corresponding to the partial token and replacing the partial token with the partial numeric string in the temporary numeric string to update the temporary string; And
And outputting the temporary numeric string as a source text string corresponding to the security token,
Wherein the security token corresponds to a numeric string consisting of numbers.
원문 문자열의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하는 단계;
상기 원문 문자열의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 원문 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 원문 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 임시 문자열을 생성하는 단계;
상기 분할 윈도우가 상기 임시 문자열의 제2 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제2 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 임시 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 상기 임시 문자열을 갱신하는 단계; 및
상기 임시 문자열의 상기 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 문자열에 상응하는 부분 토큰을 생성하고, 상기 임시 문자열에서 상기 부분 문자열을 상기 부분 토큰으로 대체하여 상기 원문 문자열에 상응하는 보안 토큰으로서 출력하는 단계를 포함하고,
상기 부분 토큰은 상기 분할 윈도우의 길이와 동일한 자리의 문자열에 상응하는 암호화 방법.A token image file for associating and storing tokens and ciphertexts encrypting all of the N to M + N character strings and the token ciphers corresponding to the N to (N + M) (Where N and M are positive integers);
Determining a length of the partition window to be less than or equal to the number of digits of the original text string and having a length of N digits or more and (N + M) digits or less;
Setting a partition window at a first side end of the original text string, generating a partial token corresponding to the substring included in the partition window in the original text string based on the token image file, Replacing the partial token with the partial token to generate a temporary string;
Wherein the dividing window is shifted by one digit in the second lateral direction until the dividing window reaches the second side end of the temporary string, Generating a partial token corresponding to the string, and replacing the partial string with the partial token in the temporary string to update the temporary string; And
Setting the partition window at the first side end of the temporary string, generating a partial token corresponding to the partial character string included in the partition window in the temporary character string based on the token image file, Replacing the string with the partial token and outputting it as a security token corresponding to the original character string,
Wherein the partial token corresponds to a string of the same length as the length of the partition window.
보안 토큰의 자리수보다 작거나 같고, N자리 이상 (N+M)자리 이하의 길이를 갖도록 분할 윈도우의 길이를 결정하는 단계;
상기 보안 토큰의 제1 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 보안 토큰에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 보안 토큰에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 임시 문자열을 생성하는 단계;
상기 임시 문자열의 제2 측 끝에 상기 분할 윈도우를 설정하고, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 임시 문자열에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 상기 임시 문자열을 갱신하는 단계;
상기 분할 윈도우가 상기 임시 문자열의 제1 측 끝에 도달할 때까지 상기 분할 윈도우를 상기 제1 측 방향으로 한 자리씩 이동시키면서, 상기 토큰 이미지 파일에 기초하여 상기 임시 문자열에서 상기 분할 윈도우에 포함되는 부분 토큰에 상응하는 부분 문자열을 생성하고, 상기 임시 문자열에서 상기 부분 토큰을 상기 부분 문자열로 대체하여 상기 임시 문자열을 갱신하는 단계; 및
상기 임시 문자열을 상기 보안 토큰에 상응하는 원문 문자열로서 출력하는 단계를 포함하고,
상기 보안 토큰은 문자들로 구성된 문자열에 상응하는 복호화 방법.A token image file for associating and storing tokens and ciphertexts encrypting all of the N to M + N character strings and the token ciphers corresponding to the N to (N + M) (Where N and M are positive integers);
Determining a length of the partition window to be less than or equal to the number of digits of the security token and having a length of N digits or more and (N + M) digits or less;
Establishing the partition window at a first side end of the security token, generating a substring corresponding to the partial token included in the partition window in the security token based on the token image file, With the substring to generate a temporary string;
Setting the partition window at a second side end of the temporary string, generating a substring corresponding to the partial token included in the partitioning window in the temporary string based on the token image file, Replacing the temporary string with the temporary string to update the temporary string;
The portion of the temporary string that is included in the partitioning window in the temporary string based on the token image file, while moving the partitioning window one by one in the first lateral direction until the partitioning window reaches the first side end of the temporary string, Generating a substring corresponding to the token and replacing the partial token with the substring in the temporary string to update the temporary string; And
And outputting the temporary string as a source text string corresponding to the security token,
Wherein the security token corresponds to a string of characters.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150064467A KR101678182B1 (en) | 2015-05-08 | 2015-05-08 | Method of encryption and decryption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150064467A KR101678182B1 (en) | 2015-05-08 | 2015-05-08 | Method of encryption and decryption |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20160131624A KR20160131624A (en) | 2016-11-16 |
KR101678182B1 true KR101678182B1 (en) | 2016-11-21 |
Family
ID=57537816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150064467A Expired - Fee Related KR101678182B1 (en) | 2015-05-08 | 2015-05-08 | Method of encryption and decryption |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101678182B1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220224530A1 (en) * | 2019-05-21 | 2022-07-14 | Digifiance Pte. Ltd. | System for restoring lost private key |
KR102377987B1 (en) * | 2020-04-03 | 2022-03-22 | 디지파이낸스(영업소) | Restoration System For Lost Private Key |
CN117113383B (en) * | 2023-10-19 | 2024-01-26 | 山东万世机械科技有限公司 | Privacy protection method and system for local production data of equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101428648B1 (en) | 2014-01-29 | 2014-08-13 | (주)케이사인 | Method of block token-based encryption and method of block token-based decryption |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4887232A (en) * | 1987-05-15 | 1989-12-12 | Digital Equipment Corporation | Apparatus and method for performing a shift operation in a multiplier array circuit |
-
2015
- 2015-05-08 KR KR1020150064467A patent/KR101678182B1/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101428648B1 (en) | 2014-01-29 | 2014-08-13 | (주)케이사인 | Method of block token-based encryption and method of block token-based decryption |
Also Published As
Publication number | Publication date |
---|---|
KR20160131624A (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11057293B2 (en) | Method and system for validating ordered proof of transit of traffic packets in a network | |
US8345876B1 (en) | Encryption/decryption system and method | |
KR102413846B1 (en) | A method for protecting encryption processes using SBOX from higher-order side-channel attacks | |
CN110941817B (en) | Method and device for encrypting password and decrypting ciphertext | |
KR20190107044A (en) | Ambiguity Augmented Dynamic Security System | |
CA3007348A1 (en) | Fast format-preserving encryption for variable length data | |
CN108173640A (en) | The character string symmetric cryptography and decryption method of a kind of high security | |
JP2015158665A (en) | Variable-length block encrypting device and method for form storage encryption | |
JP6961324B2 (en) | Searchable cryptographic processing system | |
US20140044262A1 (en) | Low Latency Encryption and Authentication in Optical Transport Networks | |
KR100546375B1 (en) | Hardware encryption device of interdependent parallel operation method with self error detection function and hardware encryption method | |
JP2014175970A (en) | Information distribution system, information processing device, and program | |
KR101678182B1 (en) | Method of encryption and decryption | |
CN111052670B (en) | Encryption device, decryption device, encryption method, decryption method, and computer-readable storage medium | |
CN103095449A (en) | Dynamic encryption and decryption method based on stream ciphers | |
CN103500294B (en) | A kind of file encryption-decryption method and device | |
Dey | Amalgamation of cyclic bit operation in sd-ei image encryption method: An advanced version of sd-ei method: Sd-ei ver-2 | |
US11463235B2 (en) | Encryption device, encryption method, program, decryption device, and decryption method | |
KR101428648B1 (en) | Method of block token-based encryption and method of block token-based decryption | |
CN107846422A (en) | A kind of configuration file ciphered compressed of gateway and the method for decryption decompression | |
CN112818404A (en) | Data access permission updating method, device, equipment and readable storage medium | |
CN117294429A (en) | Public resource transaction data encryption and decryption method, system and medium based on blockchain | |
CN114826562B (en) | Data encryption method, device, electronic device and storage medium | |
KR101584220B1 (en) | Encoding Method for Maintaining Sorting Order of Encrypted Data | |
CN106027553A (en) | Encryption/decryption method based on dynamic password |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20150508 |
|
PA0201 | Request for examination | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20160303 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20160922 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20161115 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20161116 End annual number: 3 Start annual number: 1 |
|
PG1501 | Laying open of application | ||
PG1601 | Publication of registration | ||
PC1903 | Unpaid annual fee |
Termination category: Default of registration fee Termination date: 20200826 |