KR100551992B1 - encryption/decryption method of application data - Google Patents

encryption/decryption method of application data Download PDF

Info

Publication number
KR100551992B1
KR100551992B1 KR1020030018444A KR20030018444A KR100551992B1 KR 100551992 B1 KR100551992 B1 KR 100551992B1 KR 1020030018444 A KR1020030018444 A KR 1020030018444A KR 20030018444 A KR20030018444 A KR 20030018444A KR 100551992 B1 KR100551992 B1 KR 100551992B1
Authority
KR
South Korea
Prior art keywords
message
value
initial vector
vector value
encryption
Prior art date
Application number
KR1020030018444A
Other languages
Korean (ko)
Other versions
KR20040083794A (en
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 KR1020030018444A priority Critical patent/KR100551992B1/en
Publication of KR20040083794A publication Critical patent/KR20040083794A/en
Application granted granted Critical
Publication of KR100551992B1 publication Critical patent/KR100551992B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

본 발명은 보안통신(secure communication)에 있어서, 랜덤하게 생성된 초기 벡터(Initial Vector)를 사용하는 어플리케이션 데이터의 암호화 및 복호화 방법에 관한 것으로, 어플리케이션 데이터를 암호화하고 복호화할 때 송신측과 수신측이 서로 공유하는 암호화 키 값(K)과 초기벡터 값(IV)에서 새롭게 생성되는 랜덤한 초기 벡터 값을 사용함으로써, 데이터 분실 등에 의한 가용성 저하 문제와 네트워크 도청 등에 의한 안전성 저하 문제를 해결할 수 있는 어플리케이션 데이터의 암호화 및 복호화 방법에 관한 것이다.The present invention relates to a method of encrypting and decrypting application data using a randomly generated initial vector in secure communication. The present invention relates to a method for encrypting and decrypting application data. By using random initial vector values newly generated from the encryption key value (K) and the initial vector value (IV) shared with each other, application data that can solve the problem of availability deterioration due to data loss and safety deterioration due to network eavesdropping It relates to a method of encryption and decryption.

대칭키 암호화, 블록 암호화, CBC 모드, 초기벡터(IV), 암호화 키Symmetric Key Encryption, Block Encryption, CBC Mode, Initial Vector (IV), Encryption Key

Description

어플리케이션 데이터의 암호화 및 복호화 방법{encryption/decryption method of application data}Encryption / decryption method of application data

도 1A 내지 도 1D는 종래 기술에 따른 블록 암호화의 운영 모드들의 구성 원리를 나타낸 도면. 1A-1D illustrate the principle of construction of operating modes of block encryption according to the prior art;

도 2는 종래 기술에 따른 CBC(Cipher Block Chaining) 모드의 상세 구성 원리를 나타낸 도면. 2 is a view showing a detailed configuration principle of the Cipher Block Chaining (CBC) mode according to the prior art.

도 3은 SSL에서 정의되는 암호화 절차를 나타낸 도면.3 is a diagram illustrating an encryption procedure defined in SSL.

도 4는 본 발명의 제1 실시 예에 따른 암호화 및 복호화 절차를 나타낸 도면.4 is a diagram illustrating an encryption and decryption procedure according to a first embodiment of the present invention.

도 5a 내지 도 5b는 랜덤하게 생성된 초기벡터 값을 사용하는 본 발명의 실시 예들에 따른 암호화 절차를 나타낸 도면.5A to 5B illustrate an encryption procedure according to embodiments of the present invention using randomly generated initial vector values.

도 6은 본 발명의 제2 실시 예에 따른 암호화 및 복호화 절차를 나타낸 도면.6 is a diagram illustrating an encryption and decryption procedure according to a second embodiment of the present invention.

도 7a 내지 도 7b는 랜덤하게 생성된 초기벡터 값과 암호화 키 값을 사용하는 본 발명의 실시 예들에 따른 암호화 절차를 나타낸 도면.7A to 7B illustrate an encryption procedure according to embodiments of the present invention using randomly generated initial vector values and encryption key values.

본 발명은 보안통신(secure communication)에 관한 것으로서, 특히 어플리케이션 데이터를 블록 단위로 암호화하고 복호화하는 방법에 관한 것이다.The present invention relates to secure communication, and more particularly, to a method for encrypting and decrypting application data in units of blocks.

일반적으로 보안통신 프로토콜 구조를 통해 송수신되는 어플리케이션 데이터(application data)는 적절한 길이의 조각(fragment)들로 나뉘어 암호화된다. 이 때 적절한 길이의 조각(fragment)들이 어플리케이션 데이터를 구성하는 메시지들이다. In general, application data transmitted and received through a secure communication protocol structure is divided into fragments of an appropriate length and encrypted. The fragments of the appropriate length are the messages that make up the application data.

보안통신의 프로토콜의 구조는 크게 두 부분으로 구분된다. 하나는 인증 및 키 교환을 수행하는 부분이고, 다른 하나는 하나의 키를 이용하여 어플리케이션 데이터를 보호하는 부분이다. The protocol structure of secure communication is divided into two parts. One is to perform authentication and key exchange, and the other is to protect application data using one key.

어플리케이션 데이터를 보호하는데는 크게 두 종류의 암호함수가 이용된다. 하나는 메시지의 기밀성을 확보하기 위해 이용되는 대칭키 암호화 함수이며, 다른 하나는 메시지의 무결성 및 인증성을 확보하기 위해 이용되는 메시지 인증 코드(message authentication code ; 이하, MAC 이라 약칭함) 함수이다.Two types of cryptographic functions are used to protect application data. One is a symmetric key encryption function used to secure the confidentiality of the message, the other is a message authentication code (hereinafter abbreviated as MAC) function used to secure the integrity and authenticity of the message.

특히 대칭키 암호화 함수에 의한 대칭키 암호화는 블록 암호화(block cipher)와 스트림 암호화(stream cipher)로 구분된다.In particular, symmetric key encryption by symmetric key encryption function is divided into block cipher and stream cipher.

블록 암호화는 메시지를 고정된 길이의 데이터 블록(block) 단위로 암호화하며, 스트림 암호화는 메시지를 다양한 길이의 비트스트림 단위로 암호화한다.Block encryption encrypts messages in fixed-length data blocks, and stream encryption encrypts messages in bitstreams of varying lengths.

블록 암호화는 전술된 바와 같이 고정된 길이의 데이터 블록(block) 단위로 암호화한다. 일 예로, 국내 표준 암호화 함수인 SEED는 128비트 블록 암호화 알고 리즘으로써, 16-바이트(128-비트) 길이의 메시지만을 암호화한다.Block encryption encrypts data blocks of fixed length as described above. For example, SEED, a national standard encryption function, is a 128-bit block encryption algorithm that encrypts only 16-byte (128-bit) long messages.

결국 블록 암호화를 사용해서는 긴 길이의 메시지를 전송할 수 없기 때문에, 일반적으로 데이터 블록 사이를 유기적으로 연결시켜주는 운영 모드(Operation mode)가 그 블록 암호화에 사용된다.After all, block ciphers cannot be used to send long messages, so an operation mode is typically used for block ciphers that provides an organic connection between data blocks.

블록 암호화에서는 상기한 운영 모드를 사용함으로써 보다 긴 길이의 메시지를 암호화하여 전송할 수 있다. 참고로 메시지를 블록 크기의 정수 배로 만들어주는 패딩 구조(Padding Scheme)도 블록 암호화에 함께 사용되어 보다 긴 길이의 메시지를 암호화하여 전송할 수 있도록 해준다. In block encryption, a message of a longer length can be encrypted and transmitted by using the above operation mode. For reference, the Padding Scheme, which makes a message an integer multiple of the block size, can also be used for block encryption to encrypt and send longer messages.

현재까지 많은 종류의 운영 모드들이 개발되어 있다. 그 블록 암호화의 운영 모드로는 ECB, CBC(Cipher Block Chaining ; 이하, CBC 라 약칭함), OFB, CFB 등이 있다.Many types of operating modes have been developed to date. The operation modes of the block cipher include ECB, Cipher Block Chaining (hereinafter, abbreviated as CBC), OFB, CFB, and the like.

ECB(electronic code book)는 각각의 암호화된 블록을 단지 순차적으로 연결해 주는 모드이며, 운영 모드를 특별히 지정해 주지 않는 경우에 기본적으로 선택되어 사용된다. The ECB (electronic code book) is a mode that only connects each encrypted block sequentially, and is selected and used by default when the operation mode is not specified.

나머지 세 가지 운영 모드들은 암호문을 생성하기 위해 입력되는 파라미터들로써, 암호화 키와 평문 메시지(plaintext message)와 초기벡터(initial vector ; 이하, IV 라 약칭함)가 요구된다. 특히 CBC나 OFB나 CFB는 IV를 사용하여 각각 암호화된 블록들을 배타적 논리합(eXclusive OR) 등의 연산을 통해 유기적으로 연결시킨다.The other three modes of operation are input parameters for generating the ciphertext, and require an encryption key, a plaintext message, and an initial vector (hereinafter, abbreviated as IV). In particular, the CBC, OFB, or CFB use IV to link the encrypted blocks, respectively, through an operation such as exclusive OR.

도 1A 내지 도 1D는 블록 암호화의 운영 모드들의 구성 원리를 나타낸 도면 으로 도 1A는 ECB의 구성 원리이고, 도 1B는 CBC의 구성 원리이고, 도 1C는 OFB의 구성 원리이고, 도 1D는 CFB의 구성 원리이다.1A to 1D are diagrams showing the construction principle of the operation modes of the block encryption, in which FIG. 1A is the construction principle of the ECB, FIG. 1B is the construction principle of the CBC, FIG. 1C is the construction principle of the OFB, and FIG. 1D is of the CFB. It is the principle of construction.

도 1에서 m은 입력 메시지(즉, 평문), c는 블록 단위 암호문, E(k)는 k를 키로 사용하는 블록 암호화 알고리즘을 나타낸다. In FIG. 1, m denotes an input message (ie, plain text), c denotes a block-by-block ciphertext, and E (k) denotes a block encryption algorithm using k as a key.

그리고 도 2는 현재 가장 많이 이용되고 있는 운영 모드 중 하나인 CBC(cipher block chaining) 모드의 구성 원리를 보다 상세히 나타낸 것이다.2 illustrates the configuration principle of a cipher block chaining (CBC) mode, which is one of the most used operating modes.

특히 도 2는 블록 암호화 알고리즘으로써 대칭키 암호화 알고리즘 중 하나인 DES(Data Encryption Standard)가 사용되는 예를 나타낸 것이다.In particular, FIG. 2 illustrates an example in which DES (Data Encryption Standard), which is one of symmetric key encryption algorithms, is used as a block encryption algorithm.

DES는 8-바이트(64-비트)의 평문을 한 번에 암호화 할 수 있다. 따라서 도 2에서 Pi(1≤i≤N인 정수)의 길이는 8-바이트이다. DES can encrypt 8-byte (64-bit) plaintext at once. Thus in FIG. 2 the length of P i (an integer of 1 ≦ i ≦ N) is 8 bytes.

도 2를 참조하여 블록 암호화의 구성 원리를 설명하면, 처음 데이터 블록인 P1과 IV를 배타적 논리합(XOR : eXclusive-OR) 한 후에 그 결과 값을 DES용 암호화 키인 K를 사용하여 암호화한다.Referring to FIG. 2, the principle of block ciphering is explained. After exclusively ORing the first data blocks P 1 and IV (XOR: eXclusive-OR), the resulting value is encrypted using K, the DES encryption key.

그 첫 번째 암호화된 값인 C1이 처음 데이터 블록의 암호화 값이다. 이 처음 데이터 블록의 암호화 값은 다음 데이터 블록인 P2의 IV로써 사용된다.The first encrypted value, C 1, is the encryption value of the first data block. The encryption value of this first data block is used as the IV of the next data block, P 2 .

즉 다음의 데이터 블록인 P2와 처음 데이터 블록의 암호화 값 C1을 배타적 논리합(XOR) 한 후에 그 결과 값을 DES용 암호화 키인 K를 사용하여 암호화한다.That is, after an exclusive OR (XOR) of the next data block P 2 and the encryption value C 1 of the first data block, the result is encrypted using K, the encryption key for DES.

그 두 번째 암호화된 값인 C2가 두 번째 데이터 블록의 암호화 값이다. 이 두 번째 데이터 블록의 암호화 값은 다음의 세 번째 데이터 블록인 P3의 IV로써 사용된다.The second encrypted value, C 2, is the encryption value of the second data block. The encryption value of this second data block is used as the IV of the next third data block, P 3 .

이러한 식으로 이전 데이터 블록의 암호화 값인 CN-1이 현재 데이터 블록 PN의 IV로써 사용되고, 그 결과 값을 DES용 암호화 키인 K를 사용하여 암호화함으로써 N번에 걸쳐서 모든 평문을 암호화한다.In this way, C N-1, the encryption value of the previous data block, is used as the IV of the current data block P N , and the result is encrypted using N, the encryption key for DES, to encrypt all plaintext N times.

암호화된 메시지의 복호화는 상기한 암호화 순서의 역순으로 진행된다. 즉 처음 데이터 블록의 암호화 값인 C1을 DES용 키 K를 사용하여 복호화하고, 그 복호화된 값을 IV와 배타적 논리합 함으로써 처음의 평문 블록인 P1 값이 복원된다. 그리고 두 번째 데이터 블록의 암호화 값인 C2를 DES용 키 K를 사용하여 복호화하고, 그 복호화된 값을 IV로써 사용되는 처음 데이터 블록의 암호화 값인 C1과 배타적 논리합 함으로써 두 번째 평문 블록인 P2 값이 복원된다.Decryption of the encrypted message proceeds in the reverse order of the encryption order described above. That is, by decrypting C 1, which is the encryption value of the first data block, using the DES key K, and exclusively ORing the decrypted value with IV, the P 1 value, which is the first plaintext block, is restored. And a second cryptographic value C 2 of the data block decrypted by using the key K for DES, and the encrypted value of the first data block to be used on the decoded value as IV C 1 and the exclusive-OR by the second plaintext block in P 2 value Is restored.

이러한 식으로 (N-1)번째에 복호화될 이전 데이터 블록의 암호화 값인 CN-1을 현재 암호화 값인 CN의 복호화된 결과와 배타적 논리합되는 IV로써 사용하여 현재의 평문 블록인 PN 값을 복원한다.In this way, the current plaintext block, P N , is restored by using C N-1 , the encryption value of the previous data block to be decrypted at (N-1), as an IV that is exclusively ORed with the decrypted result of the current encryption value, C N. do.

지금까지 기술한 바를 통해 알 수 있듯이, CBC 모드의 블록 암호화/복호화를 위해서는 메시지를 교환하는 양측이 암호화 키인 K와 IV를 공유해야 된다. 그렇지 못할 경우에는 즉, 암호화 키와 IV를 공유하지 못할 경우에는 암호화된 메시지를 복호화하지 못한다.As can be seen from the above description, block encryption / decryption in CBC mode requires that both sides of the message exchange share the encryption keys K and IV. Otherwise, if the IV cannot be shared with the encryption key, the encrypted message cannot be decrypted.

이러한 암호화 키(K)와 IV는 보안통신의 프로토콜 구조에서 인증 및 키 교환을 수행하는 부분에 의한 정보 공유를 통해 설정된다. These encryption keys K and IV are established through information sharing by the part performing authentication and key exchange in the protocol structure of secure communication.

보안통신 프로토콜로써 개발된 SSL(Secure Sockets Layer)은 가장 많이 사용되는 암호화 프로토콜 중에 하나로써, 그 SSL에서 이용되는 IV 설정 방법을 포함하는 암호화 절차는 다음과 같다.Secure Sockets Layer (SSL) developed as a secure communication protocol is one of the most used encryption protocols. The encryption procedure including the IV setting method used in the SSL is as follows.

도 3은 SSL에서 정의되는 암호화 절차를 나타낸 도면이다.3 is a diagram illustrating an encryption procedure defined in SSL.

우선적으로 어플리케이션 데이터를 교환할 양측은 인증된 키 교환 프로토콜을 통해 암호화 키인 K와 IV 값을 공유하는 초기화 과정을 거친다. 여기서 IV 값은 난수적으로 생성된 값이며, 어플리케이션 데이터는 정의된 길이보다 길다라고 가정하여 여러 메시지(m1, m2, ...)로 분리되어 전송된다. First of all, both sides of the application data exchange process is initialized to share the K and IV values of the encryption key through the authenticated key exchange protocol. In this case, the IV value is a randomly generated value, and the application data is transmitted by being divided into several messages (m1, m2, ...) on the assumption that the application data is longer than the defined length.

이후에 송신측은 암호화 키 K와 IV1을 사용하여 첫 번째 송신 메시지(m1)의 첫 번째 블록(P11)부터 암호화를 시작한다. 그런데 여기서 IV1은 인증된 키 교환 프로토콜을 통해 수신측과 사전에 공유한 IV 값과 동일한 값이다. 그리고 첫 번째 송신 메시지(m1)는 N개의 블록들(P11, P12, ... , P1N)로 나뉘어 암호화된다. Thereafter, the sender starts encryption from the first block P 11 of the first transmission message m1 using the encryption keys K and IV 1 . Here, IV 1 is the same value as the IV value previously shared with the receiver through the authenticated key exchange protocol. The first transmission message m1 is divided into N blocks P 11 , P 12 , ..., P 1N and encrypted.

그리고 첫 번째 송신 메시지(m1)의 두 번째 블록(P12)을 암호화하기 위해서는 이전 블록(P11)의 암호화 값(C11)을 초기 벡터(IV)로써 사용한다.In order to encrypt the second block P 12 of the first transmission message m1, the encryption value C 11 of the previous block P 11 is used as the initial vector IV.

이후에 송신측은 암호화 키 K와 IV2를 사용하여 두 번째 송신 메시지(m2)의 첫 번째 블록(P21)부터 암호화를 시작한다. 이 때 IV2로는 첫 번째 송신 메시지(m1)의 마지막 블록(P1N)의 암호화된 값(C1N)이 사용된다.Thereafter, the transmitting side starts encryption from the first block P 21 of the second transmission message m2 using the encryption keys K and IV 2 . In this case, as IV 2 , the encrypted value C 1N of the last block P 1N of the first transmission message m1 is used.

그리고 두 번째 송신 메시지(m2)의 두 번째 블록(P22)을 암호화하기 위해서는 이전 블록(P21)의 암호화 값(C21)을 초기 벡터로써 사용한다.In order to encrypt the second block P 22 of the second transmission message m2, the encryption value C 21 of the previous block P 21 is used as an initial vector.

이후에 송신측은 암호화 키 K와 두 번째 송신 메시지(m2)의 마지막 블록(P2M)의 암호화된 값(C2M)을 IV3로써 사용하여 세 번째 송신 메시지(m3)의 첫 번째 블록(P31)부터 암호화를 시작한다. The sender then uses the encryption key K and the encrypted value (C 2M ) of the last block (P 2M ) of the second transmission message (m2) as IV 3 as the first block (P 31 ) of the third transmission message (m3). Starts encryption.

결국 송신측은 어플리케이션 데이터를 구성하는 메시지들을 암호화함에 있어서, 첫 번째 송신 메시지의 첫 번째 블록(P11)을 제외하고 첫 번째 송신 메시지의 두 번째 블록(P12)부터는 사전에 공유된 암호화 키 K와 이전 블록의 암호화된 값을 IV로써 사용하여 암호화를 수행한다.End according as the sender encrypts the message constituting the application data, the first the first block (P 11) and the second block of the first transmission message, except for the second transmission message (P 12) Since the encryption key shared in advance K and Encryption is performed using the encrypted value of the previous block as the IV.

그러나 전술된 SSL에서 지원하는 암호화 방식은 메시지를 전송하는 과정에서 데이터의 분실과 같은 문제가 발생했을 때 향후 메시지에 대한 복호화가 불가능하다는 단점이 있다. 이는 현재 메시지의 복호화에 이전 메시지의 암호 정보가 반드시 필요하기 때문이다.However, the encryption method supported by the above-described SSL has a disadvantage in that it is impossible to decrypt the future message when a problem such as data loss occurs in the process of transmitting the message. This is because the encryption information of the previous message is necessary to decrypt the current message.

특히 SSL 방식에서 정의된 암호화 방식에서 i번째 메시지를 블록 단위로 복호화하기 위해서는 (i-1)번째 메시지의 여러 블록들 중에서 마지막 블록의 암호화 값이 IV로써 필요하다. 따라서 (i-1)번째 메시지가 전송 도중에 분실된다면 i번째 메시지는 복호화될 수 없다. In particular, in order to decrypt the i-th message in units of blocks in the encryption scheme defined in the SSL scheme, the encryption value of the last block is required as IV among several blocks of the (i-1) th message. Therefore, if the (i-1) th message is lost during transmission, the i th message cannot be decrypted.

결국 SSL에서 정의된 암호화 방식은 전송 환경이 나쁠 때 그의 가용성이 저하된다는 문제점이 있다.After all, the encryption method defined in SSL has a problem that its availability is degraded when the transmission environment is bad.

여러 개의 메시지를 암호화하기 위한 또다른 방식으로는 IV를 고정하여 암호화하는 방식이 있다. Another way to encrypt multiple messages is to use a fixed IV encryption.

이 방식은 처음 메시지의 암호화에 사용되는 IV1 값과 두 번째 메시지의 암호화에 사용되는 IV2 값이 동일하도록 설정하여 암호화하는 방식이다. 즉 하나의 어플리케이션 데이터를 구성하는 메시지들의 암호화에 사용되는 IV 값들이 모두 동일하도록 설정하여 암호화한다.This method encrypts by setting the IV 1 value used to encrypt the first message and the IV 2 value used to encrypt the second message to be the same. That is, the IV values used for encrypting messages constituting one application data are set to be the same and encrypted.

이러한 방식을 이용하면 SSL에서 정의된 방식에서 발생되었던 데이터 분실로 인한 가용성 저하 문제가 어느 정도 해결하기는 하지만 이 방식 또한 다음과 같은 안전성의 문제점을 갖는다.This approach solves the problem of poor availability due to data loss caused by the SSL defined method, but this method also has the following safety problems.

예를 들어 설명하면, 철수가 영이에게 동일한 메시지를 2번 전송한다고 하자. 그리고 불법 공격자에 의한 네트워크의 도청이 가능하다고 가정하자.For example, suppose Bob sends the same message twice to Young. And suppose that the eavesdropping of network by illegal attacker is possible.

그에 따라 송신측은 전송될 메시지에 대한 동일한 암호문을 두 개 생성시켜 전송한다.Accordingly, the sender generates and transmits two identical ciphertexts for the message to be transmitted.

그러면 불법 공격자는 철수가 영이에게 한 번 전송하는 메시지가 또한번 전송되는 메시지와 동일한 것인지를 확인할 수 있다.Illegal attackers can then verify that the message sent by Bob to Young is the same as the message sent once.

그리고 불법 공격자는 메시지들의 전송 패턴을 분석하여 보다 쉽게 암호화된 메시지를 복호화할 수 있다.The illegal attacker can more easily decrypt the encrypted message by analyzing the transmission pattern of the messages.

결국 불법 공격자에 의해 철수의 메시지는 쉽게 복원될 수 있어 안전성이 떨어진다.As a result, the message of withdrawal can be easily restored by an illegal attacker, making it less secure.

블록 암호화 알고리즘은 공개키 암호화 알고리즘과 달리 난수화된 확률적 알고리즘(probabilistic algorithm)의 형태를 가지고 있지 않기 때문에, 전술된 바와 같은 일반적으로 안전성 문제가 발생한다.Since the block encryption algorithm does not have the form of a randomized probabilistic algorithm unlike the public key encryption algorithm, a security problem generally occurs as described above.

따라서, 본 발명의 목적은 상기한 점들을 감안하여 안출한 것으로써, 어플리케이션 데이터를 암호화하고 복호화할 때 송신측과 수신측이 서로 공유하는 암호화 키 값(K)과 초기벡터 값(IV)에서 새롭게 생성되는 랜덤한 초기 벡터 값을 사용하는 어플리케이션 데이터의 암호화 및 복호화 방법을 제공하는데 있다.Accordingly, an object of the present invention has been devised in view of the above points, and when the application data is encrypted and decrypted, a new encryption key value (K) and initial vector value (IV) shared by each other are used. The present invention provides a method of encrypting and decrypting application data using a random initial vector value.

본 발명의 또다른 목적은 송신측과 수신측이 서로 공유하는 암호화 키 값(K)과 초기벡터 값(IV)으로부터 어플리케이션 데이터의 각 메시지(msg)별로 랜덤한 암호화 키 값(Ki) 및 초기벡터 값(IVi)을 생성하여 사용하는 어플리케이션 데이터의 암호화 및 복호화 방법을 제공하는데 있다. Another object of the present invention is to randomize the encryption key value (K i ) and the initial value for each message (msg) of the application data from the encryption key value (K) and the initial vector value (IV) shared between the sender and the receiver The present invention provides a method of encrypting and decrypting application data used to generate and use a vector value IV i .

상기한 목적을 달성하기 위한 본 발명에 따른 어플리케이션 데이터의 암호화 및 복호화 방법의 특징은, 복수 개의 메시지(messages)로 구성되는 어플리케이션 데이터를 송신하고자 하는 송신측과 그 어플리케이션 데이터를 수신할 수신측이 암호화 키 값(K)과 초기벡터 값(IV)을 서로 공유하는 제1단계, 상기 송신측에서, 상 기 공유하는 초기벡터 값(IV)과 i번째 메시지(msgi)에 부여된 시퀀스 번호(i)를 사용하여, 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 제2단계, 상기 송신측에서, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)를 블록 단위로 암호화하는 제3단계, 상기 수신측이 상기 i번째 메시지의 암호문을 수신하여 블록 단위로 복호화하는 제4단계로 이루어지는 것이 특징이다.A feature of the method for encrypting and decrypting application data according to the present invention for achieving the above object is that the transmitting side to transmit application data consisting of a plurality of messages and the receiving side to receive the application data are encrypted. The first step of sharing the key value (K) and the initial vector value (IV) with each other, the sequence number (i) given to the i-th message (msg i ) and the initial vector value (IV) shared in the transmitting side ), A second step of generating a random initial vector value IV i of the i-th message, at the transmitting side, the generated random initial vector value IV i and the encryption key value K ) the use of cryptographic functions to the input parameters, the i-th message (the fourth to the third stage, the recipient to encrypt the msg i) a block-by-block basis is decoded on a block-by-block basis to receive the encrypted text of the i-th message It is characterized by comprising step.

보다 바람직하게 상기 제2단계는, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지에 부여된 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것이 특징이다. 또는 상기 공유하는 초기벡터 값(IV)에 특정 플래그(flag) 비트열이 전단에 스트링(string)된 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것이 특징이다.More preferably, in the second step, after concatenating the shared initial vector value (IV) and the sequence number (i) assigned to the i-th message, the concatenated value is compressed into a hash function and the i-th It is characterized by generating a random initial vector value IV i of the message. Or after concatenating the sequence number (i) of the i-th message in which a specific flag bit string is stringed to the shared initial vector value (IV), and converting the concatenated value into a hash function. Compression generates a random initial vector value IV i of the i-th message.

보다 바람직하게 상기 제2단계는, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시키는 (a)단계와, 상기 연결된 값을 해쉬함수로 암호화하는 (b)단계와, 상기 해쉬함수로 암호화된 값에서 상기 각 블록의 길이만큼을 취하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 (c)단계로 이루어지는 것이 특징이다. 특히 상기 (a)단계는, 전단에 특정 플래그(flag) 비트열을 스트링(string)시킨 상기 i번째 메시지의 시퀀스 번호(i)를 상기 공유하는 초기벡터 값(IV)에 연결(concatenation)시킨다.More preferably, the second step includes (a) concatenating the shared initial vector value (IV) and the sequence number (i) of the i-th message, and encrypting the connected value with a hash function. and (c) generating a random initial vector value IV i of the i-th message by taking the length of each block from the value encrypted by the hash function. In particular, step (a) concatenates the sequence number (i) of the i-th message in which a specific flag bit string is stringed to the shared initial vector value (IV).

보다 바람직하게 상기 제2단계는, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것이 특징이다.More preferably, in the second step, the sequence number (i) of the i-th message is input to a key derivation function (KDF) using the shared initial vector value (IV) as a key. It is characterized by generating the initial vector value IV i .

보다 바람직하게 상기 제4단계는, 상기 수신된 암호문으로부터 추출된 상기 i번째 메시지의 시퀀스 번호(i)와 상기 공유하는 초기벡터 값(IV)을 사용하여, 상기 i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산하는 (A)단계와, 상기 계산된 초기벡터 값(IVi)과 상기 공유하는 암호화 키 값(K)을 입력 파라미터로 하는 복호화 함수를 사용하여 상기 i번째 메시지(msgi)를 블록 단위로 복원하는 (B)단계로 이루어지는 것이 특징이다. 특히 상기 (A)단계는, 상기 수신 암호문으로부터 추출된 상기 i번째 메시지의 시퀀스 번호(i)와 상기 공유하는 초기벡터 값(IV)을 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 계산하거나, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 수신 암호문으로부터 추출된 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 계산한다.More preferably, the fourth step is to encrypt the i-th message msg i using the sequence number i of the i-th message extracted from the received ciphertext and the shared initial vector value IV. the initial vector value (IV i) a and calculate (a) the method comprising, the calculated initial vector value (IV i), and wherein the using the decoding function of the encryption key value (K) to the shared input parameters used in the (B) restoring the i-th message msg i in units of blocks. Particularly, in step (A), after concatenating the sequence number (i) of the i-th message extracted from the received cipher text and the shared initial vector value (IV), the concatenated value is compressed into a hash function. A sequence number of the i-th message extracted from the received ciphertext in a key derivation function KDF that calculates a random initial vector value IV i of the i-th message or uses the shared initial vector value IV as a key. By inputting (i), a random initial vector value IV i of the i-th message is calculated.

상기한 목적을 달성하기 위한 본 발명은, 복수 개의 메시지로 구성된 어플리 케이션 데이터를 송신하고자 하는 송신측과 그 어플리케이션 데이터를 수신할 수신측이 암호화 키 값(K)과 초기벡터 값(IV)을 서로 공유하는 제1단계, 상기 송신측에서 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 제2단계, 상기 송신측에서 상기 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 제3단계, 상기 송신측이 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 생성된 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 하는 암호화 함수를 사용하여 상기 i번째 메시지(msgi)를 암호화하는 제4단계, 상기 수신측이 상기 i번째 메시지의 암호문을 수신하여 블록 단위로 복호화하는 제5단계로 이루어지는 것이 특징이다.According to the present invention for achieving the above object, the transmitting side to transmit the application data consisting of a plurality of messages and the receiving side to receive the application data between the encryption key value (K) and the initial vector value (IV) In a first step of sharing, the second step of generating a random initial vector value (IV i ) of the i-th message at the sender, the random encryption key value (K i ) of the i-th message at the sender In a third step of generating, the i-th message ( i ) is transmitted using an encryption function using the generated random initial vector value IV i and the generated random encryption key value K i as input parameters. msg i ) is encrypted, and the receiving side receives a cipher text of the i-th message and decrypts it in units of blocks.

보다 바람직하게 상기 제2단계는, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키거나, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것이 특징이다.More preferably, in the second step, after concatenating the shared initial vector value IV and the sequence number i of the i-th message, the concatenated value is compressed into a hash function to determine the i-th message. I is generated by generating a random initial vector value IV i or inputting the sequence number i of the i-th message into a key derivation function KDF using the shared initial vector value IV as a key. The random initial vector value IV i of the first message is generated.

보다 바람직하게 상기 제3단계는, 상기 공유하는 암호화 키 값(K)과 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키거나, 상기 공유하는 암호화 키 값(K)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 것이 특징이다.More preferably, in the third step, after concatenating the shared encryption key value K and the sequence number i of the i-th message, the concatenated value is compressed into a hash function to determine the i-th message. By generating a random encryption key value (K i ) or inputting the sequence number (i) of the i-th message into a key derivation function (KDF) using the shared encryption key value (K) as a key, i The random encryption key value K i of the first message is generated.

이하 본 발명에 따른 어플리케이션 데이터의 암호화 및 복호화 방법에 대한 바람직한 일 실시 예를 첨부된 도면을 참조하여 설명한다.Hereinafter, a preferred embodiment of a method of encrypting and decrypting application data according to the present invention will be described with reference to the accompanying drawings.

일단 본 발명은 복수 개의 메시지로 이루어진 하나의 어플리케이션 데이터를 송신할 때, 각 메시지(msg)를 블록 단위로 암호화하고 복호화하는 것을 기본으로 한다. 이 때 어플리케이션 데이터를 구성하는 메시지들의 순서를 정해주기 위한 시퀀스 번호(sequence number)가 각 메시지에 부여된다. Once the present invention transmits one application data consisting of a plurality of messages, each message (msg) is based on the encryption and decryption in block units. At this time, a sequence number for assigning the order of the messages constituting the application data is assigned to each message.

그리고 송신측과 수신측은 메시지를 송수신하기 이전에 암호화 키 값(K)과 초기벡터 값(IV)을 공유한다. 이러한 정보 공유는 보안통신의 프로토콜 구조에서 인증 및 키 교환을 수행하는 부분에 의해 안전하게 수행된다고 가정한다.The transmitting side and the receiving side share the encryption key value K and the initial vector value IV before transmitting and receiving the message. It is assumed that such information sharing is securely performed by the part performing authentication and key exchange in the protocol structure of secure communication.

그리고 본 발명은 기밀성 확보를 위한 대칭키 암호화 알고리즘들에 적용된다.In addition, the present invention is applied to symmetric key encryption algorithms for securing confidentiality.

특히 이하에서 설명될 본 발명은 다음의 특성-1을 만족한다.In particular, the present invention to be described below satisfies the following characteristic-1.

[특성-1] 누구나 암호문(cipheri)으로부터 각 메시지에 부여된 시퀀스 번호인 i 값을 얻어낼 수 있어야 한다.[Characteristic-1] Everyone should be able to derive the value of i, the sequence number assigned to each message, from cipher i .

상기한 특성-1은 i 값이 암호문(cipheri)에 평문 형태로 있어야 한다는 것을 의미한다.Property-1 described above means that the value of i must be in ciphertext cipher i .

그러나 본 발명은 블록 암호화에만 적용되는 것이 아니며, 초기벡터 값을 사용하여 암호화하는 모든 알고리즘에 적용된다. However, the present invention is not only applied to block encryption, but is applied to all algorithms encrypted using initial vector values.

도 4는 본 발명의 제1 실시 예에 따른 암호화 및 복호화 절차를 나타낸 도면으로, 공유된 암호화 키 값(K)은 고정시키고 그 암호화 키 값(K)과 함께 암호화에 사용되는 초기벡터 값(IVi)은 변경시켜 데이터 분실에 의해 가용성이 저하되는 문제와 네트워크 도청에 의해 안전성이 보장되지 못하는 문제를 해결해 주는 절차이다.4 is a diagram illustrating an encryption and decryption procedure according to a first embodiment of the present invention, in which an initial vector value IV used for encryption together with a fixed encryption key value K and its encryption key value K is fixed. i ) is a procedure that solves the problem that availability is degraded by data loss by changing and security that is not guaranteed by network eavesdropping.

도 4를 참조하면, i개의 메시지로 구성된 특정 어플리케이션 데이터를 송신하고자 하는 송신측은 그 송신 어플리케이션 데이터를 수신할 수신측과 암호화 키 값(K) 및 초기벡터 값(IV)을 서로 공유한다(S1).Referring to FIG. 4, a transmitter that wants to transmit specific application data consisting of i messages shares an encryption key value K and an initial vector value IV with a receiver that will receive the transmission application data (S1). .

이후에 송신측에서는 메시지들을 암호화하여 그에 따른 각 암호문을 송신하며, 수신측에서는 수신된 암호문으로부터 수신된 메시지들을 복원한다.Thereafter, the sender encrypts the messages and transmits each cipher text accordingly, and the receiver recovers the received messages from the received cipher text.

송신측에 의한 어플리케이션 데이터의 암호화 과정을 먼저 설명한다.The encryption process of the application data by the sender will first be described.

송신측은 초기벡터 유도함수(Initial Vector Derivation Function ; 이하, IVDF 라 약칭함)를 사용하여 i번째 메시지(msgi)의 랜덤한 초기벡터 값(IVi)을 생성시킨다(S2). 이를 나타낸 것이 수학식 1이다.The transmitter generates an initial initial vector value IV i of the i th message msg i using an initial vector derivation function (hereinafter, abbreviated as IVDF) (S2). This is represented by Equation 1.

IVi=IVDF(IV,i)IV i = IVDF (IV, i)

이 때 IVDF에는 수신측과 공유하는 초기벡터 값(IV)과 i번째 메시지(msgi)에 부여된 시퀀스 번호(i)가 사용된다. 시퀀스 번호(Sequence number) i는 어플리케이 션 데이터를 구성하는 복수 개의 메시지들 중에서 i번째 메시지(msgi)임을 나타내는 값이다. At this time, the initial vector value IV shared with the receiver and the sequence number i assigned to the i th message msg i are used for the IVDF. Sequence number i is a value indicating that it is the i th message msg i among a plurality of messages constituting the application data.

IVDF은 다음의 수학식 2와 같이 해쉬함수를 사용한다.IVDF uses a hash function as shown in Equation 2 below.

IVDF(IV,i)=hash(i∥IV) 또는 IVDF(IV,i)=hash(IV∥i)IVDF (IV, i) = hash (i∥IV) or IVDF (IV, i) = hash (IV∥i)

이 때 사용되는 해쉬함수는 SHA1(미국 디지털 서명 표준인 DSA를 위해 개발된 해쉬함수), MD5(Message Digest 5), HAS160(한국형 디지털 서명 표준인 KCDSA에 사용할 목적으로 개발된 해쉬함수) 등과 같이 암호화적 해쉬함수이다.The hash function used at this time is encrypted such as SHA1 (hash function developed for the US digital signature standard DSA), MD5 (Message Digest 5), HAS160 (hash function developed for the Korean digital signature standard KCDSA). The enemy hash function.

상기한 수학식 2에 보인 바와 같이, 해쉬함수를 사용하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 과정은 다음과 같다.As shown in Equation 2, a process of generating a random initial vector value IV i of the i-th message using a hash function is as follows.

먼저 수신측과 공유하는 초기벡터 값(IV)과 i번째 메시지(msgi)에 부여된 시퀀스 번호(i)를 연결(concatenation)시킨다. 이 때 초기벡터 값(IV)과 i번째 메시지(msgi)의 시퀀스 번호(i) 중에서 어느 것이 전단에 위치하더라도 상관없다. First, the initial vector value (IV) shared with the receiver is concatenated with the sequence number (i) assigned to the i-th message (msg i ). At this time, it may be any one of the initial vector value IV and the sequence number i of the i-th message msg i .

그리고 수신측과 공유하는 초기벡터 값(IV)과 상기 i번째 메시지의 시퀀스 번호(i)가 연결된 값을 해쉬함수로 암호화함으로써, i번째 메시지의 랜덤한 초기벡터 값(IVi)이 생성된다. 여기서 수신측과 공유하는 초기벡터 값(IV)과 상기 i번째 메시지의 시퀀스번호(i)가 연결된 값은 해쉬함수에 의해 압축되어 랜덤한 초기벡터 값(IVi)이 된다.In addition, a random initial vector value IV i of the i-th message is generated by encrypting a hash concatenated value of the initial vector value IV shared with the receiver and the sequence number i of the i-th message. The initial vector value IV shared with the receiver and the sequence number i of the i-th message are compressed by a hash function to become a random initial vector value IV i .

또는 IVDF는 다음의 수학식 3과 같이 키 유도함수(KDF : Key Derivation Function)를 사용할 수도 있다.Alternatively, the IVDF may use a key derivation function (KDF) as shown in Equation 3 below.

IVDF(IV,i)=KDFIV(i)IVDF (IV, i) = KDF IV (i)

이 때 사용되는 키 유도함수(KDF) 대신에 SHA1, MD5, HAS160 등과 같은 해쉬함수를 이용하여 MAC을 생성하는 HMAC(Hash-Message Authentication Code) 함수를 사용할 수도 있다.Instead of the key derivation function (KDF) used at this time, a hash-message authentication code (HMAC) function may be used to generate a MAC using hash functions such as SHA1, MD5, HAS160, and the like.

상기한 수학식 3에 보인 바와 같이, 키 유도함수(KDF)를 사용하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 과정은 다음과 같다.As shown in Equation 3, a process of generating a random initial vector value IV i of the i-th message using the key derivation function KDF is as follows.

먼저 수신측과 공유하는 초기벡터 값(IV)이 키 유도함수(KDF)의 키로 사용된다. 그리고 i번째 메시지에 부여된 시퀀스 번호(i)가 입력됨에 따라 그 입력된 i번째 메시지의 시퀀스 번호(i)를 처리 대상으로 인식하여 복수 개의 값들을 생성시킨다.First, the initial vector value (IV) shared with the receiver is used as a key of the key derivation function (KDF). As the sequence number i assigned to the i-th message is input, the sequence number i of the input i-th message is recognized as a processing target to generate a plurality of values.

이 때 생성된 복수 개의 값들 중에서 임의의 하나를 i번째 메시지의 랜덤한 초기벡터 값(IVi)으로 설정한다.At this time, any one of the generated values is set as a random initial vector value IV i of the i-th message.

그런데 해쉬함수는 종류에 따라 서로 다른 비트 길이의 값을 출력한다. 즉 SHA1나 HAS160을 이용할 경우에는 160비트 길이의 출력 값을 생성하며, MD5를 이용할 경우에는 128비트 길이의 출력 값을 생성한다. 그리고 본 발명에 따른 암호화는 고정된 길이의 초기벡터 값을 사용해야 한다. However, the hash function outputs values with different bit lengths depending on the type. In other words, when using SHA1 or HAS160, output value of 160 bits is generated, and when using MD5, output value of 128 bits is generated. And encryption according to the present invention should use a fixed length initial vector value.

따라서 본 발명의 암호화에서 요구하는 고정 길이의 출력 값을 생성하지 못하는 해쉬함수를 사용할 경우에는 그 해쉬함수로 암호화된 출력 값에서 적절한 비트 길이만큼만 취하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)으로 설정한다.Therefore, when using a hash function that does not generate a fixed length output value required by the encryption of the present invention, the random initial vector value (IV i ) of the i-th message is taken only by an appropriate bit length from the output value encrypted by the hash function. Set to.

일 예로, 만약 블록 암호화에서 요구하는 초기벡터 값의 비트 길이가 128비트이라면, 해쉬함수 SHA1의 출력 비트 길이가 160비트이므로 SHA1을 사용하여 암호화된 출력 값에서 전단의 128비트만을 취하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)으로 설정한다. As an example, if the bit length of the initial vector value required for block encryption is 128 bits, the output bit length of the hash function SHA1 is 160 bits. Set to a random initial vector value (IV i ).

물론 키 유도함수(KDF)나 HMAC 함수를 사용할 경우에도, 그 키 유도함수(KDF)나 HMAC 함수의 출력 값이 암호화에 요구되는 비트 길이보다 길다면, 적절한 비트 길이만큼만 취하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)으로 설정한다. Of course, even when using a key derivation function (KDF) or HMAC function, if the output value of the key derivation function (KDF) or HMAC function is longer than the bit length required for encryption, the initial randomization of the i-th message is performed by taking only the appropriate bit length. Set to the vector value (IV i ).

별도로 본 발명의 IVDF에는 다음의 수학식 4 내지 6과 같이 미리 공유된 초기벡터 값(IV)과 함께 전단에 랜덤함 특정 플래그(flag) 비트열을 스트링(string)시킨 i번째 메시지의 시퀀스 번호(i)가 사용된다. 즉 i번째 메시지의 시퀀스 번호(i)의 전단에 특정 플래그(flag) 비트열을 스트링(string)시킨 후에 플래그가 스트링된 비트열을 미리 공유된 초기벡터 값(IV)에 연결(concatenation)시킨 값을 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성하기 위한 입력으로 사용한다.Separately, the IVDF of the present invention includes the sequence number of the i-th message string string randomized at the front end with a predetermined initial vector value IV as shown in Equations 4 to 6 below. i) is used. That is, a value is obtained by stringing a specific flag bit string before the sequence number (i) of the i-th message and concatenating the bit string with the flag string to a pre-shared initial vector value (IV). Is used as input to generate a random initial vector value IV i of the i th message.

IVi=IVDF(IV,flag,i)IV i = IVDF (IV, flag, i)

IVDF(IV,flag,i)=hash(flag∥i∥IV)IVDF (IV, flag, i) = hash (flag∥i∥IV)

또는 IVDF(IV,flag,i)=hash(IV∥flag∥i)Or IVDF (IV, flag, i) = hash (IV∥flag∥i)

IVDF(IV,flag,i)=KDFIV(flag∥i)IVDF (IV, flag, i) = KDF IV (flag∥i)

랜덤한 초기벡터 값(IVi)의 생성 과정 이후에 송신측은 상기한 수학식 2 또는 수학식 3을 통해 생성된 랜덤한 초기벡터 값(IVi)을 이미 수신측과 공유한 암호화 키 값(K)과 함께 사용하여 i번째 메시지(msgi)를 암호화한다(S3). 즉 수학식 2 또는 수학식 3을 통해 생성된 랜덤한 초기벡터 값(IVi)과 이미 수신측과 공유한 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여 i번째 메시지(msgi)를 블록 단위로 암호화한다. A random initial vector value, the random initial vector value (IV i) the already encrypted key value shared with the reception side generated by the above formula (2) or equation (3) side of the transmission since the creation of a (IV i) (K ) To encrypt the i-th message (msg i ) (S3). That is, the i-th message (msg i) using an encryption function having as input parameters a random initial vector value IV i generated through Equation 2 or Equation 3 and an encryption key value K already shared with the receiver. ) Is encrypted block by block.

블록 단위의 암호화는 전술된 운영 모드들 중에서 하나를 사용한다. 즉 일 실시 예로써, i번째 메시지를 암호화함에 있어서 i번째 메시지의 첫 번째 블록을 암호화하는데는 미리 공유된 암호화 키 값(K)와 상기에서 랜덤하게 생성된 초기 벡터 값(IVi)을 입력 파라미터로 하는 암호화 함수를 사용한다. 다음에 i번째 메시지의 두 번째 블록을 암호화하는데는 i번째 메시지의 첫 번째 블록이 암호화된 값을 초기 벡터 값으로 사용하고 또한 미리 공유된 암호화 키 값(K)을 암호화 함수에 같 이 사용한다. 이어 (i+1)번째 메시지를 암호화함에 있어서 (i+1)번째 메시지의 첫 번째 블록을 암호화하는데는 미리 공유된 암호화 키 값(K)와 상기에서 랜덤하게 생성된 초기 벡터 값(IVi+1)을 입력 파라미터로 하는 암호화 함수를 사용한다.Block-by-block encryption uses one of the operating modes described above. That is, in one embodiment, in encrypting the i-th message, the first block of the i-th message is encrypted using a pre-shared encryption key value K and an initial vector value IV i randomly generated above. Use an encryption function. Next, to encrypt the second block of the i-th message, the first block of the i-th message uses the encrypted value as the initial vector value and also uses the pre-shared encryption key value (K) in the encryption function. Subsequently, in encrypting the (i + 1) th message, the first block of the (i + 1) th message includes a pre-shared encryption key value (K) and a randomly generated initial vector value (IV i +). Use an encryption function with 1 ) as the input parameter.

정리하면 도 5a에 도시된 것과 같이, 어플리케이션 데이터의 첫 번째 메시지(msg1)를 암호화할 때, 상기 과정을 통해 랜덤하게 생성된 첫 번째 메시지(msg1)의 초기 벡터 값(IV1)을 첫 번째 블록의 암호화에 사용하고, 다음 두 번째 블록의 암호화에는 첫 번째 블록의 암호화된 값을 초기 벡터 값으로 사용하고, 다음 세 번째 블록의 암호화에는 두 번째 블록의 암호화된 값을 초기 벡터 값으로 사용한다. In summary, when encrypting the first message (msg 1 ) of the application data, as shown in FIG. 5A, the initial vector value (IV 1 ) of the first message (msg 1 ) randomly generated by the above process is first. Use the encrypted value of the first block as the initial vector value for encryption of the first block, the encrypted value of the first block for encryption of the next second block, and the encrypted value of the second block as the initial vector value for encryption of the next third block. do.

다음에 어플리케이션 데이터의 두 번째 메시지(msg2)를 암호화할 때, 상기 과정을 통해 랜덤하게 생성된 두 번째 메시지(msg2)의 초기 벡터 값(IV2)을 첫 번째 블록의 암호화에 사용하고, 다음 두 번째 블록의 암호화에는 첫 번째 블록의 암호화된 값을 초기 벡터 값으로 사용하고, 다음 세 번째 블록의 암호화에는 두 번째 블록의 암호화된 값을 초기 벡터 값으로 사용한다.Next time, when encrypting the second message (msg 2 ) of the application data, the initial vector value (IV 2 ) of the second message (msg 2 ) randomly generated by the above process is used for encryption of the first block, The encryption value of the first block is used as the initial vector value for encryption of the next second block, and the encryption value of the second block is used as the initial vector value for encryption of the next third block.

이러한 방식으로 각 메시지의 첫 번째 블록을 암호화하는데는 각 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 서로 다른 초기 벡터 값을 암호화에 사용하고, 각 메시지의 나머지 블록들의 암호화에는 이전 블록의 암호화된 값을 초기 벡터 값으로 사용한다.In this way, the first block of each message is encrypted using different initial vector values randomly generated using the sequence number of each message, and the encrypted value of the previous block is used to encrypt the remaining blocks of each message. Is used as the initial vector value.

다른 실시 예로써 도 5b에 도시된 것과 같이, i번째 메시지의 모든 블록들을 암호화하는데는 미리 공유된 암호화 키 값(K)와 상기에서 랜덤하게 생성된 i번째 메시지의 초기 벡터 값(IVi)을 입력 파라미터로 하는 암호화 함수를 사용한다. In another embodiment, as shown in FIG. 5B, in order to encrypt all blocks of the i-th message, a pre-shared encryption key value K and an initial vector value IV i of the randomly generated i-th message are determined. Use an encryption function as an input parameter.

다음에 (i+1)번째 메시지의 모든 블록들을 암호화하는데는 미리 공유된 암호화 키 값(K)와 상기에서 랜덤하게 생성된 (i+1)번째 메시지의 초기 벡터 값(IVi+1)을 입력 파라미터로 하는 암호화 함수를 사용한다. Next, encrypt all the blocks of the (i + 1) th message by using the pre-shared encryption key value (K) and the initial vector value (IV i + 1 ) of the (i + 1) th message generated randomly. Use an encryption function as an input parameter.

이러한 방식으로 각 메시지를 암호화할 때는, 각 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 각 메시지별 서로 다른 초기 벡터 값을 각 메시지의 암호화에 사용한다.When encrypting each message in this manner, different initial vector values for each message randomly generated using the sequence number of each message are used to encrypt each message.

상기한 암호화를 통해 생성된 암호문(cipheri)은 다음의 수학식 7이며, 그 암호문에는 i번째 메시지의 시퀀스 번호(i)와 i번째 메시지(msgi)와 미리 공유된 암호화 키(K)와 상기에서 생성된 i번째 메시지의 랜덤한 초기벡터 값(IVi)의 암호화된 정보가 삽입되어 수신측에 전송된다(S4).The ciphertext (cipher i ) generated through the encryption is the following equation (7), and the ciphertext includes the sequence number (i) of the i-th message and the encryption key (K) shared in advance with the i-th message (msg i ) and The encrypted information of the random initial vector value IV i of the i-th message generated above is inserted and transmitted to the receiver (S4).

Figure 112003010374866-pat00001
Figure 112003010374866-pat00001

만약 암호문이 전송되는 도중에 불법 공격자에 의해 도청되었다 하더라도 그 불법 공격자는 송신측과 수신측이 공유한 초기벡터(IV) 값을 알 수 없기 때문에 해당 메시지를 복원할 수 없다. Even if the ciphertext is intercepted by an illegal attacker while the ciphertext is being transmitted, the illegal attacker cannot recover the message because the initial vector (IV) value shared by the sender and the receiver is not known.

다음은 수신측에 의한 메시지의 복호화 과정을 설명한다.The following describes the decoding process of the message by the receiving side.

수신측은 i번째 메시지(msgi)에 대한 암호문을 수신한다(S5). 그러면 수신측은 그 암호문으로부터 i번째 메시지의 시퀀스 번호(i)와 i번째 메시지(msgi)와 미리 공유된 암호화 키(K)와 상기에서 생성된 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 알게 된다.The receiving side receives the cipher text for the i-th message msg i (S5). Then, the receiver receives from the ciphertext the sequence number (i) of the i-th message, the i-th message (msg i ), a pre-shared encryption key (K), and a random initial vector value (IV i ) of the i-th message generated above. Get to know

그러면 수신측은 수신된 암호문으로부터 추출된 i번째 메시지의 시퀀스 번호(i)와 미리 공유된 초기벡터 값(IV)을 사용하여, 전술된 수학식 1 내지 수학식 6과 같은 방법으로 i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산한다(S6).Then, the receiving side uses the sequence number (i) of the i-th message extracted from the received cipher text and the initial vector value (IV) shared in advance, and the i-th message (msg i ) The initial vector value IV i used for the encryption of i ) is calculated (S6).

암호화에 사용된 초기벡터 값(IVi)을 수신측에서 계산하는 방식은 송신측이 어떠한 방식으로 암호화를 위한 초기벡터 값(IVi)을 생성했느냐에 따라 달라진다. 가장 바람직하게는 송신측과 수신측이 동일한 방식으로 초기벡터 값(IVi)을 생성한다. 그러나 송신측과 수신측이 동일한 방식을 사용하지 않더라도 서로 호환되는 방식으로 초기벡터 값(IVi)을 생성하면 된다. The method of calculating the initial vector value IV i used for encryption at the receiving side depends on how the transmitting side generates the initial vector value IV i for encryption. Most preferably, the transmitting side and the receiving side generate the initial vector value IV i . However, even if the transmitter and the receiver do not use the same method, the initial vector value IV i may be generated in a compatible manner.

수신측이 초기벡터 값(IVi)을 계산하는 과정은 해쉬함수를 사용하여 초기벡터 값(IVi)을 계산하는 경우와, 키 유도함수(KDF) 또는 HMAC 함수를 사용하여 초기벡터 값(IVi)을 계산하는 경우가 있다. 이들 두 가지 경우에 대한 상세한 설명은 암 호화 과정을 통해 이미 설명되었으므로 생략한다.The receiving end, the initial vector value (IV i) the step of calculation when calculating the initial vector value (IV i) by using a hash function and a key derivation function (KDF) or HMAC function using the initial vector value (IV i ) may be calculated. The details of these two cases have already been explained through the encryption process and will be omitted.

랜덤한 초기벡터 값(IVi)이 계산된 이후에 수신측은 계산된 랜덤한 초기벡터 값(IVi)을 미리 공유된 암호화 키 값(K)과 함께 사용하여 암호화 과정의 역순으로 i번째 메시지(msgi)를 복호화한다(S7). 즉 계산된 랜덤한 초기벡터 값(IVi)과 미리 공유된 암호화 키 값(K)을 입력 파라미터로 하는 복호화 함수를 사용하여 i번째 메시지(msgi)를 블록 단위로 복호화한다.After the random initial vector value IV i is calculated, the receiving side uses the calculated random initial vector value IV i together with the pre-shared encryption key value K to return the i-th message (in reverse order of encryption). msg i ) is decrypted (S7). That is, the i-th message msg i is decrypted in units of blocks by using a decryption function that uses the calculated random initial vector value IV i and the previously shared encryption key value K as input parameters.

전술된 바와 같이 하나의 메시지에 대한 암호화 및 복호화 과정을 반복함으로써 복수 개의 메시지로 구성된 하나의 어플리케이션 데이터가 복원된다(S8).As described above, one application data consisting of a plurality of messages is restored by repeating the encryption and decryption process for one message (S8).

그리고 도 4에서 설명된 암호화 및 복호화 함수는 SEED를 이용한 CBC 모드의 함수나 DES를 이용한 CBC 모드의 함수를 나타낸다.The encryption and decryption functions described in FIG. 4 represent functions of the CBC mode using SEED or the CBC mode using DES.

도 6은 본 발명의 제2 실시 예에 따른 암호화 및 복호화 절차를 나타낸 도면으로, 송신측과 수신측이 서로 공유하는 암호화 키 값(K)과 초기벡터 값(IV)으로부터 어플리케이션 데이터의 각 메시지(msg)별로 랜덤한 암호화 키 값(Ki) 및 초기벡터 값(IVi)을 생성하여 사용하는 경우를 나타낸 절차이다.6 is a diagram illustrating an encryption and decryption procedure according to a second embodiment of the present invention, wherein each message of application data is derived from an encryption key value K and an initial vector value IV shared between a transmitter and a receiver. msg) shows a case where a random encryption key value (K i ) and an initial vector value (IV i ) are generated and used.

도 6을 참조하면, i개의 메시지로 구성된 특정 어플리케이션 데이터를 송신하고자 하는 송신측은 그 송신된 어플리케이션 데이터를 수신할 수신측과 암호화 키 값(K) 및 초기벡터 값(IV)을 서로 공유한다(S10).Referring to FIG. 6, a transmitter to transmit specific application data consisting of i messages shares an encryption key value K and an initial vector value IV with a receiver to receive the transmitted application data (S10). ).

이후에 송신측에서는 메시지를 암호화하여 그에 따른 암호문을 송신하며, 수 신측에서는 수신된 암호문으로부터 수신 메시지를 복원한다.Thereafter, the sender encrypts the message and transmits the cipher text accordingly, and the receiver recovers the received message from the received cipher text.

송신측에 의한 어플리케이션 데이터의 암호화 과정은 도 4에서 설명된 암호화 과정을 기본적으로 포함하며, 미리 공유된 암호화 키 값(K)에 대해 해쉬함수를 사용하여 랜덤한 새로운 암호화 키 값(Ki)을 생성하는 과정이나, 미리 공유된 암호화 키 값(K)에 대해 키 유도함수(KDF) 또는 HMAC 함수를 사용하여 랜덤한 새로운 암호화 키 값(Ki)을 생성하는 과정이 추가된다.The encryption process of the application data by the sender basically includes the encryption process described in FIG. 4, and randomly encrypts a new encryption key value K i using a hash function for the pre-shared encryption key value K. A process of generating or generating a new random encryption key value K i using a key derivation function KDF or an HMAC function with respect to the previously shared encryption key value K is added.

그에 따른 송신측에 의한 어플리케이션 데이터의 암호화 과정을 먼저 설명한다.The encryption process of the application data by the sender accordingly will be described first.

송신측은 IVDF를 사용하여 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시킨다(S11). 이는 전술된 수학식 1과 같다. The transmitting side generates a random initial vector value IV i of the i-th message using the IVDF (S11). This is the same as Equation 1 described above.

IVDF은 전술된 수학식 2와 같이 해쉬함수를 사용하거나 전술된 수학식 3과 같이 키 유도함수(KDF)를 사용하거나 HMAC(Hash-Message Authentication Code) 함수를 사용한다.The IVDF uses a hash function as shown in Equation 2 above, uses a key derivation function (KDF) as shown in Equation 3 above, or uses a HMAC (Hash-Message Authentication Code) function.

또다른 예로써, 본 발명의 IVDF는 전술된 수학식 4 내지 6과 같이 미리 공유된 초기벡터 값(IV)과 함께 전단에 랜덤함 특정 플래그(flag) 비트열을 스트링(string)시킨 i번째 메시지의 시퀀스 번호(i)가 사용되어 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성한다.As another example, the IVDF of the present invention is an i-th message that strings a random random flag bit string at the front end together with a pre-shared initial vector value IV as shown in Equations 4 to 6 above. The sequence number i is used to generate a random initial vector value IV i of the i-th message.

이어서 송신측은 암호화 키 유도함수(Encryption Key Derivation Function ; 이하, EKDF 라 약칭함)를 사용하여 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시킨다(S12). 이를 나타낸 것이 수학식 8이다.Subsequently, the sender generates an encryption key value K i of the i-th message by using an encryption key derivation function (hereinafter, abbreviated as EKDF) (S12). This is shown in Equation 8.

Ki=EKDF(K,i)K i = EKDF (K, i)

이 때 EKDF에는 수신측과 공유하는 암호화 키 값(K)과 i번째 메시지(msgi)의 시퀀스 번호(i)가 사용된다. At this time, the EKDF uses the encryption key value K shared with the receiver and the sequence number i of the i-th message msg i .

EKDF은 다음의 수학식 9와 같이 해쉬함수를 사용한다.EKDF uses a hash function as shown in Equation 9 below.

EKDF(K,i)=hash(i∥K) 또는 EKDF(K,i)=hash(K∥i)EKDF (K, i) = hash (i∥K) or EKDF (K, i) = hash (K∥i)

이 때 사용되는 해쉬함수는 SHA1, MD5, HAS160 등과 같이 암호화적 해쉬함수이다.The hash function used at this time is a cryptographic hash function such as SHA1, MD5, HAS160.

상기한 수학식 9에 보인 바와 같이, 해쉬함수를 사용하여 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 과정은 다음과 같다.As shown in Equation 9, a process of generating a random encryption key value K i of the i-th message using a hash function is as follows.

먼저 수신측과 공유하는 암호화 키 값(K)과 i번째 메시지(msgi)의 시퀀스 번호(i)를 연결(concatenation)시킨다. 이 때 암호화 키 값(K)과 i번째 메시지(msgi)의 시퀀스 번호(i) 중에서 어느 것이 전단에 위치하더라도 상관없다. First, the encryption key value K shared with the receiver is concatenated with the sequence number i of the i-th message msg i . At this time, either of the encryption key value K and the sequence number i of the i-th message msg i may be located at the front end.

그리고 수신측과 공유하는 암호화 키 값(K)과 상기 i번째 메시지의 시퀀스 번호(i)가 연결된 값을 해쉬함수로 암호화함으로써, i번째 메시지의 랜덤한 암호화 키 값(Ki)이 생성된다. 여기서 수신측과 공유하는 암호화 키 값(K)과 상기 i번째 메시지의 시퀀스 번호(i)가 연결된 값은 해쉬함수에 의해 압축되어 랜덤한 암호화 키 값(Ki)이 된다.The encryption key value K shared with the receiver and the value of the sequence number i of the i-th message are encrypted using a hash function to generate a random encryption key value K i of the i-th message. Here, the value of the connection between the encryption key value K shared with the receiver and the sequence number i of the i-th message is compressed by a hash function to become a random encryption key value K i .

또는 EKDF는 다음의 수학식 10과 같이 키 유도함수(KDF)를 사용할 수도 있다.Alternatively, EKDF may use a key derivation function (KDF) as shown in Equation 10 below.

EKDF(K,i)=KDFK(i)EKDF (K, i) = KDF K (i)

이 때 사용되는 키 유도함수(KDF) 대신에 SHA1, MD5, HAS160 등과 같은 해쉬함수를 이용하여 MAC을 생성하는 HMAC 함수를 사용할 수도 있다.In place of the key derivation function (KDF) used here, an HMAC function that generates a MAC using a hash function such as SHA1, MD5, HAS160, or the like may be used.

상기한 수학식 10에 보인 바와 같이, 키 유도함수(KDF)를 사용하여 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 과정은 다음과 같다.As shown in Equation 10, a process of generating a random encryption key value K i of the i-th message using the key derivation function KDF is as follows.

먼저 수신측과 공유하는 암호화 키 값(K)이 키 유도함수(KDF)의 키로 사용된다. 그리고 i번째 메시지의 시퀀스 번호(i)가 입력됨에 따라 그 입력된 i번째 메시지의 시퀀스 번호(i)를 처리 대상으로 인식하여 복수 개의 값들을 생성시킨다.First, the encryption key value K shared with the receiving side is used as a key of the key derivation function KDF. As the sequence number (i) of the i-th message is input, the sequence number (i) of the input i-th message is recognized as a processing target to generate a plurality of values.

이 때 생성된 복수 개의 값들 중에서 임의의 하나를 i번째 메시지의 랜덤한 암호화 키 값(Ki)으로 설정한다.At this time, any one of the generated values is set as a random encryption key value K i of the i-th message.

그런데 해쉬함수는 종류에 따라 서로 다른 비트 길이의 값을 출력한다. 즉 SHA1나 HAS160을 이용할 경우에는 160비트 길이의 출력 값을 생성하며, MD5를 이용 할 경우에는 128비트 길이의 출력 값을 생성한다. However, the hash function outputs values with different bit lengths depending on the type. In other words, when using SHA1 or HAS160, output value of 160 bits is generated, and when using MD5, output value of 128 bits is generated.

따라서 본 발명의 블록 암호화에서 요구하는 고정 길이의 출력 값을 생성하지 못하는 해쉬함수를 사용할 경우에는 그 해쉬함수로 암호화된 출력 값에서 적절한 비트 길이만큼만 취하여 i번째 메시지의 랜덤한 암호화 키 값(Ki)으로 설정한다. 이는 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 설정할 때와 동일하다.Therefore, a random encryption key value for the i th message by taking as much as an appropriate bit length from the output value encrypted when using the hash function does not produce an output value of a fixed length, as a hash function, as required by the block encryption of the invention (K i Set to). This is the same as setting the random initial vector value IV i of the i th message.

랜덤한 초기벡터 값(IVi)과 랜덤한 암호화 키 값(Ki)의 생성 과정 이후에 송신측은 상기에서 생성된 랜덤한 초기벡터 값(IVi)을 상기 수학식 9 또는 10을 통해 생성된 랜덤한 암호화 키 값(Ki)과 함께 사용하여 i번째 메시지(msgi)를 암호화한다(S13). 즉 생성된 랜덤한 초기벡터 값(IVi)과 암호화 키 값(Ki)을 입력 파라미터로 하는 암호화 함수를 사용하여 i번째 메시지(msgi)를 블록 단위로 암호화한다.After the generation of the random initial vector value IV i and the random encryption key value K i , the transmitting side generates the random initial vector value IV i generated by the above equations 9 or 10. The i-th message msg i is encrypted using the random encryption key value K i (S13). That is, the i th message msg i is encrypted in units of blocks by using an encryption function having the generated random initial vector value IV i and the encryption key value K i as input parameters.

상기한 암호화를 통해 생성된 암호문(cipheri)은 다음의 수학식 11이며, 그 암호문에는 i번째 메시지의 시퀀스 번호(i)와 i번째 메시지(msgi)와 상기에서 생성된 i번째 메시지의 암호화 키(Ki)와 상기에서 생성된 i번째 메시지의 랜덤한 초기벡터 값(IVi)의 암호화된 정보가 삽입되어 수신측에 전송된다(S14).The cipher text (cipher i ) generated through the encryption is the following equation (11), and the cipher text includes the sequence number (i) of the i-th message and the i-th message (msg i ) and the encryption of the i-th message generated above. The encrypted information of the key K i and the random initial vector value IV i of the i-th message generated above is inserted and transmitted to the receiver (S14).

Figure 112003010374866-pat00002
Figure 112003010374866-pat00002

만약 암호문이 전송되는 도중에 불법 공격자에 의해 도청되었다 하더라도 그 불법 공격자는 송신측과 수신측이 공유한 초기벡터(IV) 값 및 암호화 키 값(K)을 알 수 없기 때문에 해당 메시지를 복원할 수 없다. 그리고 상기한 제2 실시 예에 따른 암호화는 전술된 제1 실시 예에 따른 암호화보다 안전성이 더 보장된다. Even if the ciphertext is intercepted by an illegal attacker while the ciphertext is being transmitted, the illegal attacker cannot recover the message because the initial vector (IV) value and the encryption key value (K) shared by the sender and the receiver are not known. . The encryption according to the second embodiment is more secure than the encryption according to the first embodiment described above.

다음은 수신측에 의한 수신된 메시지들의 복호화 과정을 설명한다.The following describes the decoding process of received messages by the receiving side.

수신측은 i번째 메시지(msgi)에 대한 암호문을 수신한다(S15). 그러면 수신측은 그 암호문으로부터 i번째 메시지의 시퀀스 번호(i)와 i번째 메시지(msgi)와 상기에서 생성된 i번째 메시지의 랜덤한 초기벡터 값(IVi) 및 랜덤한 암호화 키 값(Ki)을 알게 된다.The receiving side receives the cipher text for the i-th message (msg i ) (S15). Then, the receiver receives the sequence number i of the i-th message and the i-th message msg i from the ciphertext, the random initial vector value IV i of the i-th message generated above, and the random encryption key value K i. You get to know

그러면 수신측은 수신된 암호문으로부터 추출된 i번째 메시지의 번호(i)와 미리 공유된 초기벡터 값(IV)을 사용하여, 암호화 과정에서 랜덤한 초기벡터 값(IVi)을 생성하던 것과 동일한 방법으로, i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산한다(S16). 여기서 수신측은 송신측과 동일한 방식으로 초기벡터 값(IVi)을 생성하는 것이 가장 바람직하다. 그러나 송신측과 수신측이 동일한 방식을 사용하지 않더라도 서로 호환되는 방식으로 초기벡터 값(IVi)을 생성하면 된다. The receiver then uses the number i of the i-th message extracted from the received ciphertext and the initial vector value IV shared in advance, in the same way as to generate a random initial vector value IV i during the encryption process. In operation S16, an initial vector value IV i used for encrypting the i-th message msg i is calculated. Here, it is most preferable that the receiving side generates the initial vector value IV i in the same manner as the transmitting side. However, even if the transmitter and the receiver do not use the same method, the initial vector value IV i may be generated in a compatible manner.

수신측이 초기벡터 값(IVi)을 계산하는 과정은 해쉬함수를 사용하여 초기벡 터 값(IVi)을 계산하는 경우와, 키 유도함수(KDF) 또는 HMAC 함수를 사용하여 초기벡터 값(IVi)을 계산하는 경우가 있다. 이들 두 가지 경우에 대한 상세한 설명은 이미 전술되었으므로 생략한다.The receiver calculates the initial vector value (IV i ) using the hash function to calculate the initial vector value (IV i ), and uses the key derivation function (KDF) or the HMAC function to calculate the initial vector value (IV i ). IV i ) is sometimes calculated. The detailed description of these two cases has already been described above and will be omitted.

이어서 수신측은 수신된 암호문으로부터 추출된 i번째 메시지의 시퀀스 번호(i)와 미리 공유된 암호화 키 값(K)을 사용하여, 암호화 과정에서 랜덤한 암호화 키 값(Ki)을 생성하던 것과 동일한 방법으로, i번째 메시지(msgi)의 암호화에 사용된 암호화 키 값(Ki)을 계산한다(S17). 여기서 수신측은 송신측과 동일한 방식으로 암호화 키 값(Ki)을 생성하는 것이 가장 바람직하다. 그러나 송신측과 수신측이 동일한 방식을 사용하지 않더라도 서로 호환되는 방식으로 암호화 키 값(Ki)을 생성하면 된다. Subsequently, the receiving side uses the sequence number (i) of the i-th message extracted from the received ciphertext and the encryption key value (K) shared in advance to generate a random encryption key value (K i ) during the encryption process. In step S17, an encryption key value K i used for encrypting the i-th message msg i is calculated. Here, it is most preferable that the receiving side generates the encryption key value K i in the same manner as the transmitting side. But it is when the transmitting side and the receiving side generates the encryption key, even if you do not use the same method the value in such a way that they are compatible, (K i).

수신측이 암호화 키 값(Ki)을 계산하는 과정은 해쉬함수를 사용하여 암호화 키 값(Ki)을 계산하는 경우와, 키 유도함수(KDF) 또는 HMAC 함수를 사용하여 암호화 키 값(Ki)을 계산하는 경우가 있다. 이들 두 가지 경우에 대한 상세한 설명은 이미 전술되었으므로 생략한다.The process of calculating the encryption key value (K i ) by the receiving side calculates the encryption key value (K i ) using the hash function, and the encryption key value (K K) using the key derivation function (KDF) or the HMAC function. i ) may be calculated. The detailed description of these two cases has already been described above and will be omitted.

랜덤한 초기벡터 값(IVi)과 랜덤한 암호화 키 값(Ki)이 계산된 이후에 수신측은 계산된 랜덤한 초기벡터 값(IVi) 및 랜덤한 암호화 키 값(Ki)을 함께 사용하여 i 번째 메시지(msgi)를 복호화한다(S18). 즉 계산된 랜덤한 초기벡터 값(IVi) 및 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 하는 복호화 함수를 사용하여 i번째 메시지(msgi)를 블록 단위로 복호화한다.After the random initial vector value (IV i ) and the random encryption key value (K i ) are calculated, the receiver uses the calculated random initial vector value (IV i ) and the random encryption key value (K i ) together. The i-th message msg i is decrypted (S18). That is, the i-th message msg i is decoded in units of blocks by using a decryption function having the calculated random initial vector value IV i and the random encryption key value K i as input parameters.

전술된 바와 같이 하나의 메시지에 대한 암호화 및 복호화 과정은 어플리케이션 데이터를 구성하는 메시지(msg)들에 대해 반복되며, 복수 개의 메시지로 구성된 하나의 어플리케이션 데이터 복원된다(S19).As described above, the encryption and decryption process for one message is repeated for the messages msg constituting the application data and one application data composed of a plurality of messages is restored (S19).

그리고 도 6에서 설명된 암호화 및 복호화 함수는 SEED를 이용한 CBC 모드의 함수나 DES를 이용한 CBC 모드의 함수를 나타낸다.The encryption and decryption functions described in FIG. 6 represent a function of the CBC mode using SEED or a function of the CBC mode using DES.

즉 도 6에서 언급된 암호화 함수는 전술된 운영 모드들 중에서 하나를 사용한다. 일 실시 예로써, i번째 메시지를 암호화함에 있어서 i번째 메시지의 모든 블록의 암호화에는 상기에서 랜덤하게 생성된 암호화 키 값(Ki)이 동일하게 사용된다. 반면에 i번째 메시지의 첫 번째 블록을 암호화하는데는 상기에서 랜덤하게 생성된 암호화 키 값(Ki)과 또한 랜덤하게 생성된 초기 벡터 값(IVi)을 입력 파라미터로 하는 암호화 함수를 사용한다. 다음에 i번째 메시지의 두 번째 블록을 암호화하는데는 i번째 메시지의 첫 번째 블록이 암호화된 값을 초기 벡터 값으로 사용하고 또한 첫 번째 블록과 동일한 암호화 키 값(Ki)을 암호화 함수에 같이 사용한다. That is, the encryption function mentioned in FIG. 6 uses one of the above-described operating modes. According to an embodiment, in encrypting the i-th message, the encryption key value K i randomly generated above is identically used to encrypt all blocks of the i-th message. On the other hand, in encrypting the first block of the i-th message, an encryption function using the randomly generated encryption key value K i and the randomly generated initial vector value IV i as an input parameter is used. Next, encrypt the second block of the i-th message by using the encrypted value as the initial vector value in the first block of the i-th message, and also using the same encryption key value (K i ) as the first block in the encryption function. do.

정리하면 도 7a에 도시된 것과 같이, 어플리케이션 데이터의 첫 번째 메시지(msg1)를 암호화할 때, 상기 과정을 통해 첫 번째 메시지의 시퀀스 번호를 사 용하여 랜덤하게 생성된 암호화 키 값(K1)이 첫 번째 메시지(msg1)의 각 블록에 공통으로 사용된다. 동시에 상기 과정을 통해 첫 번째 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 초기 벡터 값을 첫 번째 블록의 암호화에 사용하고, 다음 두 번째 블록의 암호화에는 첫 번째 블록의 암호화된 값을 초기 벡터 값으로 사용하고, 다음 세 번째 블록의 암호화에는 두 번째 블록의 암호화된 값을 초기 벡터 값으로 사용한다. In summary, as shown in FIG. 7A, when encrypting the first message msg 1 of the application data, an encryption key value K 1 randomly generated using the sequence number of the first message through the above process is obtained. Commonly used for each block of the first message (msg 1 ). At the same time, the initial vector value randomly generated using the sequence number of the first message is used to encrypt the first block, and the encrypted value of the first block is used as the initial vector value for the encryption of the next second block. For the encryption of the next third block, the encrypted value of the second block is used as the initial vector value.

다음에 어플리케이션 데이터의 두 번째 메시지(msg2)를 암호화할 때, 상기 과정을 통해 두 번째 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 암호화 키 값(K2)이 두 번째 메시지(msg2)의 각 블록에 공통으로 사용된다. 동시에 상기 과정을 통해 두 번째 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 초기 벡터 값을 첫 번째 블록의 암호화에 사용하고, 다음 두 번째 블록의 암호화에는 첫 번째 블록의 암호화된 값을 초기 벡터 값으로 사용하고, 다음 세 번째 블록의 암호화에는 두 번째 블록의 암호화된 값을 초기 벡터 값으로 사용한다.Next time, when encrypting the second message (msg 2 ) of the application data, the encryption key value (K 2 ) randomly generated by using the sequence number of the second message through the above process is the second message (msg 2 ). Common to each block. At the same time, the initial vector value randomly generated using the sequence number of the second message is used to encrypt the first block, and the encrypted value of the first block is used as the initial vector value for encryption of the next second block. For the encryption of the next third block, the encrypted value of the second block is used as the initial vector value.

다른 실시 예로써 도 7b에 도시된 것과 같이, i번째 메시지의 모든 블록들을 암호화하는데는 상기에서 랜덤하게 생성된 암호화 키 값(Ki)과 상기에서 랜덤하게 생성된 i번째 메시지의 초기 벡터 값(IVi)을 입력 파라미터로 하는 암호화 함수를 사용한다. In another embodiment, as shown in FIG. 7B, the encryption key value K i randomly generated above and an initial vector value of the i th message randomly generated above may be used to encrypt all blocks of the i th message. IV i ) uses an encryption function with input parameters.

다음에 (i+1)번째 메시지의 모든 블록들을 암호화하는데는 상기에서 랜덤하 게 생성된 암호화 키 값(Ki)과 상기에서 랜덤하게 생성된 (i+1)번째 메시지의 초기 벡터 값(IVi+1)을 입력 파라미터로 하는 암호화 함수를 사용한다. Next, to encrypt all blocks of the (i + 1) th message, the encryption key value (K i ) generated randomly above and the initial vector value (IV) of the (i + 1) th message generated randomly above i + 1 ) uses an encryption function with input parameters.

이러한 방식으로 각 메시지를 암호화할 때는, 각 메시지의 시퀀스 번호를 사용하여 랜덤하게 생성된 각 메시지별 서로 다른 초기 벡터 값과 또한 랜덤하게 생성된 암호화 키 값을 각 메시지의 암호화에 사용한다.When encrypting each message in this manner, different initial vector values for each message randomly generated using the sequence number of each message and also randomly generated encryption key values are used for the encryption of each message.

이상에서 설명된 본 발명의 각 실시 예들은 운영 모드를 중심으로 설명되었다. 그러나 본 발명은 블록 암호화의 운영 모드와 무관하게 초기벡터 값을 사용하는 모든 암호화에 적용된다.Each embodiment of the present invention described above has been described based on the operation mode. However, the present invention is applicable to all encryptions using initial vector values regardless of the operation mode of block encryption.

이상에서 설명된 본 발명에 따르면, 보안통신(secure communication) 분야에서 어플리케이션 데이터를 구성하는 메시지를 블록단위로 암호화하고 복호화하는데 있어서 안전성 문제와 가용성 문제를 동시에 해결할 수 있다.According to the present invention described above, in the field of secure communication (secure communication) in the field of encrypting and decrypting the messages constituting the application data in units of blocks it is possible to simultaneously solve the security problem and availability problems.

특히 어플리케이션 데이터를 전송하는 과정에서 전송 환경의 악화 등으로 인해 일부 메시지가 분실되었을 때 기존 기술로써 해결하지 못했던 가용성 저하 문제를 해결해 준다. 즉 본 발명은 어플리케이션 데이터의 현재 메시지를 복호화함에 있어서 이전 메시지의 어떠한 정보도 이용하지 않기 때문에 현재 메시지를 전송 도중에 분실했다 하더라도 복호화가 가능하다는 것이다.In particular, it solves the problem of availability deterioration that could not be solved by the existing technology when some messages are lost due to the deterioration of the transmission environment during application data transmission. That is, the present invention does not use any information of the previous message in decoding the current message of the application data, so that even if the current message is lost in the middle of transmission, decryption is possible.

또한 본 발명은 불법 공격자에 의해 전송 메시지의 복원 정보가 도청되었다 하더라도 그 불법 공격자가 현재 메시지를 복원하기 위해서는 미리 공유하는 암복 호화 정보가 반드시 요구되기 때문에, 보안통신의 프로토콜 구조에서 인증 및 키 교환만 안전하게 수행된다면 보다 강화된 안전성을 보장해 준다.In the present invention, even if the restoration information of the transmission message is intercepted by the illegal attacker, in order to restore the current message, decryption information that is shared in advance is required. Therefore, only authentication and key exchange are performed in the protocol structure of secure communication. If done safely, it ensures enhanced safety.

이상 설명한 내용을 통해 당업자라면 본 발명의 기술사상을 일탈하지 아니하는 범위에서 다양한 변경 및 수정이 가능함을 알 수 있을 것이다. 따라서, 본 발명의 기술적 범위는 명세서의 상세한 설명에 기재된 내용으로 한정되는 것이 아니라 특허 청구의 범위에 의해 정해져야만 할 것이다.Those skilled in the art will appreciate that various changes and modifications can be made without departing from the technical spirit of the present invention. Therefore, the technical scope of the present invention should not be limited to the contents described in the detailed description of the specification but should be defined by the claims.

Claims (25)

복수 개의 메시지(msg)로 구성되는 어플리케이션 데이터를 송신하고자 하는 송신측과 그 어플리케이션 데이터를 수신할 수신측이 암호화 키 값(K)과 초기벡터 값(IV)을 서로 공유하는 제1단계;A first step in which a transmitting party to transmit application data consisting of a plurality of messages msg and a receiving side to receive the application data share an encryption key value K and an initial vector value IV; 상기 송신측에서, 상기 공유하는 초기벡터 값(IV)과 i번째 메시지(magi)의 시퀀스 번호(i)를 사용하여, 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 제2단계;Generating a random initial vector value (IV i ) of the i th message by using the shared initial vector value (IV) and the sequence number (i) of the i th message (mag i ) Step 2; 상기 송신측에서, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)를 암호화하는 제3단계;A third step of encrypting the i-th message msg i by using an encryption function having the generated random initial vector value IV i and the encryption key value K as input parameters at the transmitting side; ; 상기 수신측이 상기 i번째 메시지의 암호문을 수신하여 복호화하는 제4단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.And a fourth step in which the receiving side receives and decrypts the cipher text of the i-th message. 제 1 항에 있어서, 상기 제2단계는,The method of claim 1, wherein the second step, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지에 부여된 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것을 특징으로 하는 어플 리케이션 데이터의 암호화 및 복호화 방법.After concatenating the shared initial vector value IV and the sequence number i assigned to the i th message, the concatenated value is compressed into a hash function to generate a random initial vector value IV of the i th message. i ) generating a method for encrypting and decrypting application data. 제 2 항에 있어서, 상기 공유하는 초기벡터 값(IV)에 특정 플래그(flag) 비트열이 전단에 스트링(string)된 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.3. The concatenation method according to claim 2, wherein the concatenated sequence number i of the i-th message, in which a specific flag bit string is stringed in front of the shared initial vector value IV, is concatenated. Compressing the value into a hash function to generate a random initial vector value (IV i ) of the i-th message. 제 1 항에 있어서, 상기 제2단계는,The method of claim 1, wherein the second step, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지에 부여된 시퀀스 번호(i)를 연결(concatenation)시키는 (a)단계와,(A) concatenating the shared initial vector value IV and a sequence number i assigned to the i th message; 상기 연결된 값을 해쉬함수로 암호화하는 (b)단계와,(B) encrypting the linked value with a hash function; 상기 해쉬함수로 암호화된 값에서 상기 각 블록의 길이만큼을 취하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 (c)단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.And (c) generating a random initial vector value (IV i ) of the i-th message by taking the length of each block from the value encrypted with the hash function. . 제 4 항에 있어서, 상기 (a)단계는,The method of claim 4, wherein step (a) comprises: 전단에 특정 플래그(flag) 비트열을 스트링(string)시킨 상기 i번째 메시지의 시퀀스 번호(i)를 상기 공유하는 초기벡터 값(IV)에 연결(concatenation)시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.Encrypting the application data comprising concatenating a sequence number (i) of the i-th message, which strings a specific flag bit string at the front end, to the shared initial vector value (IV); Decryption method. 제 1 항에 있어서, 상기 제2단계는,The method of claim 1, wherein the second step, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지에 부여된 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.A random initial vector value (IV i ) of the i-th message is input by inputting a sequence number (i) assigned to the i-th message to a key derivation function (KDF) using the shared initial vector value (IV) as a key. Method for encrypting and decrypting application data, characterized in that for generating. 제 1 항에 있어서, 상기 제3단계는,The method of claim 1, wherein the third step, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)의 첫 번째 블록을 암호화하는 단계와,Encrypting a first block of the i th message (msg i ) using an encryption function having the generated random initial vector value IV i and the encryption key value K as input parameters; 상기 첫 번째 블록을 제외한 상기 i번째 메시지(msgi)의 나머지 블록들에 대해, 이전 블록의 암호화된 값을 현재 암호화될 블록의 초기벡터 값으로 사용하고, 상기 암호화 키 값(K)를 또한 상기 암호화 함수에 사용하여 암호화하는 단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.For the remaining blocks of the i th message msg i except the first block, the encrypted value of the previous block is used as the initial vector value of the block to be currently encrypted, and the encryption key value K is also used for the And encrypting using an encryption function. 제 1 항에 있어서, 상기 제3단계는,The method of claim 1, wherein the third step, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)의 각 블록들을 암호화하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.Encrypting each block of the i th message msg i using an encryption function having the generated random initial vector value IV i and the encryption key value K as an input parameter. Method for encrypting and decrypting application data characterized in that. 제 8 항에 있어서, 상기 i번째 메시지(msgi)의 각 블록들을 암호화하기 위한 암호화 함수에 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 암호화 키 값(K)을 입력 파라미터로 사용하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.The method of claim 8, wherein the generated random initial vector value IV i and the encryption key value K are used as an input parameter in an encryption function for encrypting each block of the i th message msg i . Method for encrypting and decrypting application data, characterized in that. 제 1 항에 있어서, The method of claim 1, 상기 송신측에서 (i+1)번째 메시지의 랜덤한 초기벡터 값(IVi+1)을 생성시키는 단계와,Generating a random initial vector value (IV i + 1 ) of the (i + 1) th message at the transmitting side; 상기 송신측이 상기 생성된 랜덤한 초기벡터 값(IVi+1)과 상기 암호화 키 값(K)을 입력 파라미터로 하는 암호화 함수를 사용하여 상기 (i+1)번째 메시지(msgi)의 각 블록들을 암호화하는 단계가 더 포함되는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.The transmitting end of each of the (i + 1) th messages (msg i ) using an encryption function having the generated random initial vector value IV i + 1 and the encryption key value K as input parameters. And encrypting the blocks further comprising the step of encrypting the application data. 제 1 항에 있어서, 상기 제3단계 이후에 상기 i번째 메시지에 부여된 시퀀스 번호와 상기 i번째 메시지와 상기 암호화 키(K)와 상기 생성된 i번째 메시지의 랜덤한 초기벡터 값(IVi)이 순차적으로 연결(concatenation)된 암호문을 수신측에 전송하는 단계가 더 포함되는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.The random initial vector value IV i of the sequence number assigned to the i-th message, the i-th message, the encryption key K, and the generated i-th message after the third step. And transmitting the sequentially concatenated cipher text to a receiving side. 제 1 항에 있어서, 상기 제4단계는,The method of claim 1, wherein the fourth step, 상기 수신된 암호문으로부터 추출된 상기 i번째 메시지에 부여된 시퀀스 번호(i)와 상기 공유하는 초기벡터 값(IV)을 사용하여, 상기 i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산하는 (A)단계와,The initial vector value used for encrypting the i-th message msg i using the sequence number i assigned to the i-th message extracted from the received ciphertext and the shared initial vector value IV. (A) calculating IV i ), 상기 계산된 초기벡터 값(IVi)과 상기 공유하는 암호화 키 값(K)을 입력 파라미터로 하는 복호화 함수를 사용하여 상기 i번째 메시지(msgi)를 블록 단위로 복원하는 (B)단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.(B) restoring the i th message msg i in units of blocks by using a decryption function having the calculated initial vector value IV i and the shared encryption key value K as input parameters. Method for encrypting and decrypting application data, characterized in that. 제 12 항에 있어서, 상기 (A)단계는,The method of claim 12, wherein step (A) comprises: 상기 수신 암호문으로부터 추출된 상기 i번째 메시지에 부여된 시퀀스 번호(i)와 상기 공유하는 초기벡터 값(IV)을 연결(concatenation)시킨 후에 그 연 결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 계산하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.After concatenating the sequence number (i) assigned to the i-th message extracted from the received cipher text and the shared initial vector value (IV), the concatenated value is compressed into a hash function to obtain the i-th message. A method of encrypting and decrypting application data, comprising calculating a random initial vector value IV i . 제 12 항에 있어서, 상기 (A)단계는,The method of claim 12, wherein step (A) comprises: 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 수신 암호문으로부터 추출된 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 계산하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.A random initial vector value of the i th message is input by inputting a sequence number i of the i th message extracted from the received cipher text into a key derivation function KDF using the shared initial vector value IV as a key. IV i ) method for encrypting and decrypting application data, characterized in that for calculating. 복수 개의 메시지(msg)로 구성된 어플리케이션 데이터를 송신하고자 하는 송신측과 그 어플리케이션 데이터를 수신할 수신측이 암호화 키 값(K)과 초기벡터 값(IV)을 서로 공유하는 제1단계;A first step of sharing a cryptographic key value (K) and an initial vector value (IV) between a sender to transmit application data consisting of a plurality of messages (msg) and a receiver to receive the application data; 상기 송신측에서 상기 공유하는 초기벡터 값(IV)과 i번째 메시지에 부여된 시퀀스 번호(i)를 사용하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 제2단계;Generating a random initial vector value (IV i ) of the i-th message by using the shared initial vector value (IV) and a sequence number (i) assigned to the i-th message at the transmitting side; 상기 송신측에서 상기 공유하는 암호화 키 값(K)과 상기 시퀀스 번호(i)를 사용하여 상기 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 제3단계;Generating a random encryption key value (K i ) of the i-th message by using the shared encryption key value (K) and the sequence number (i) at the transmitting side; 상기 송신측이 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 생성된 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 하는 암호화 함수를 사용하여 상기 i번째 메시지(msgi)를 블록 단위로 암호화하는 제4단계;The sender blocks the i-th message msg i in units of blocks by using an encryption function having the generated random initial vector value IV i and the generated random encryption key value K i as input parameters. Encrypting with a fourth step; 상기 수신측이 상기 i번째 메시지의 암호문을 수신하여 복호화하는 제5단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.And a fifth step of the receiving side receiving and decrypting the cipher text of the i-th message. 제 15 항에 있어서, 상기 제2단계는,The method of claim 15, wherein the second step, 상기 공유하는 초기벡터 값(IV)과 상기 i번째 메시지에 부여된 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.After concatenating the shared initial vector value IV and the sequence number i assigned to the i th message, the concatenated value is compressed into a hash function to generate a random initial vector value IV of the i th message. i ) generating a method for encrypting and decrypting application data. 제 15 항에 있어서, 상기 제2단계는,The method of claim 15, wherein the second step, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 초기벡터 값(IVi)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.Generate a random initial vector value (IV i ) of the i-th message by inputting the sequence number (i) of the i-th message into a key derivation function (KDF) using the shared initial vector value (IV) as a key. And encrypting and decrypting the application data. 제 15 항에 있어서, 상기 제3단계는,The method of claim 15, wherein the third step, 상기 공유하는 암호화 키 값(K)과 상기 i번째 메시지의 시퀀스 번호(i)를 연결(concatenation)시킨 후에 그 연결된 값을 해쉬함수로 압축하여 상기 i번째 메시 지의 랜덤한 암호화 키 값(Ki)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.After concatenating the shared encryption key value (K) and the sequence number (i) of the i-th message, the concatenated value is compressed into a hash function to generate a random encryption key value (K i ) of the i-th message. Method for encrypting and decrypting application data, characterized in that for generating. 제 15 항에 있어서, 상기 제3단계는,The method of claim 15, wherein the third step, 상기 공유하는 암호화 키 값(K)을 키로 사용하는 키 유도함수(KDF)에 상기 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지의 랜덤한 암호화 키 값(Ki)을 생성시키는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.A random encryption key value K i of the i th message is generated by inputting the sequence number i of the i th message into a key derivation function KDF using the shared encryption key value K as a key. And encrypting and decrypting the application data. 제 15 항에 있어서, 상기 제4단계는,The method of claim 15, wherein the fourth step, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 생성된 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)의 첫 번째 블록을 암호화하는 단계와,Encrypts the first block of the i th message msg i using an encryption function having the generated random initial vector value IV i and the generated random encryption key value K i as input parameters To do that, 상기 첫 번째 블록을 제외한 상기 i번째 메시지(msgi)의 나머지 블록들에 대해, 상기 생성된 랜덤한 암호화 키 값(Ki)를 상기 나머지 블록들에 대해 공통으로 사용하고, 이전 블록의 암호화된 값을 현재 암호화될 블록의 초기벡터 값으로 사용하여 암호화하는 단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.For the remaining blocks of the i th message msg i except the first block, the generated random encryption key value K i is commonly used for the remaining blocks, and the encrypted of the previous block. Encrypting using a value as an initial vector value of a block to be currently encrypted. 제 15 항에 있어서, 상기 제4단계는,The method of claim 15, wherein the fourth step, 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 생성된 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 하는 암호화 함수를 사용하여, 상기 i번째 메시지(msgi)의 각 블록들을 암호화하는 단계를 포함하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.Encrypting each block of the i th message msg i using an encryption function having the generated random initial vector value IV i and the generated random encryption key value K i as input parameters Method for encrypting and decrypting application data, characterized in that it comprises a step. 제 21 항에 있어서, 상기 i번째 메시지(msgi)의 각 블록들을 암호화하기 위한 암호화 함수에 상기 생성된 랜덤한 초기벡터 값(IVi)과 상기 생성된 랜덤한 암호화 키 값(Ki)을 입력 파라미터로 사용하는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.22. The method of claim 21, wherein the generated random initial vector value IV i and the generated random encryption key value K i are stored in an encryption function for encrypting each block of the i th message msg i . Method for encrypting and decrypting application data, characterized in that it is used as an input parameter. 제 15 항에 있어서, The method of claim 15, 상기 송신측에서 (i+1)번째 메시지의 랜덤한 초기벡터 값(IVi+1)을 생성시키는 단계와,Generating a random initial vector value (IV i + 1 ) of the (i + 1) th message at the transmitting side; 상기 송신측에서 상기 (i+1)번째 메시지의 랜덤한 암호화 키 값(Ki+1)을 생성시키는 단계와,Generating a random encryption key value K i + 1 of the (i + 1) th message by the transmitting side; 상기 송신측이 상기 생성된 랜덤한 초기벡터 값(IVi+1)과 상기 생성된 랜덤한 암호화 키 값(Ki+1)을 입력 파라미터로 하는 암호화 함수를 사용하여 상기 (i+1)번째 메시지(msgi)의 각 블록들을 암호화하는 단계가 더 포함되는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.The transmitting side uses the (i + 1) th th cipher using an encryption function having the generated random initial vector value (IV i + 1 ) and the generated random encryption key value (K i + 1 ) as input parameters. Encrypting each block of the message (msg i ). 제 15 항에 있어서, 상기 제5단계는,The method of claim 15, wherein the fifth step, 상기 수신 암호문으로부터 추출된 상기 i번째 메시지의 시퀀스 번호(i)와 상기 공유하는 초기벡터 값(IV)을 해슁(Hashing) 처리하여, 상기 i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산하는 (A)단계와,Hashing the sequence number (i) of the i-th message extracted from the received cipher text and the shared initial vector value (IV) to initialize the initial vector value used for encryption of the i-th message (msg i ). (A) calculating (IV i ), 상기 추출된 i번째 메시지의 시퀀스 번호(i)와 상기 공유하는 암호화 키 값(K)을 해슁(Hashing) 처리하여, 상기 i번째 메시지(msgi)의 암호화에 사용된 암호화 키 값(Ki)을 계산하는 (B)단계와,Hashing the extracted sequence number (i) of the extracted i-th message and the shared encryption key value (K), thereby encrypting the encryption key value (K i ) used for encrypting the i-th message (msg i ). (B) calculating the 상기 계산된 초기벡터 값(IVi)과 암호화 키 값(Ki)을 입력 파라미터로 하는 복호화 함수를 사용하여 상기 i번째 메시지(msgi)를 블록 단위로 복원하는 (C)단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.(C) restoring the i th message msg i in units of blocks by using a decryption function having the calculated initial vector value IV i and the encryption key value K i as input parameters. A method of encrypting and decrypting application data. 제 15 항에 있어서, 상기 제5단계는,The method of claim 15, wherein the fifth step, 상기 공유하는 초기벡터 값(IV)을 키로 사용하는 키 유도함수(KDF)에 상기 수신 암호문으로부터 추출된 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지(msgi)의 암호화에 사용된 초기벡터 값(IVi)을 계산하는 (a)단계와,In the encryption of an initial vector value (IV) key derivation function (KDF) the sequence number of the i-th message, (i) extract from the received cipher text to the use with a key to the shared input the i-th message (msg i) (A) calculating an initial vector value (IV i ) used, 상기 공유하는 암호화 키 값(K)을 키로 사용하는 키 유도함수(KDF)에 상기 추출된 i번째 메시지의 시퀀스 번호(i)를 입력으로 하여 상기 i번째 메시지(msgi)의 암호화에 사용된 암호화 키 값(Ki)을 계산하는 (b)단계와,Encryption used for encrypting the i-th message msg i by inputting a sequence number i of the extracted i-th message into a key derivation function KDF using the shared encryption key value K as a key. (B) calculating a key value (K i ), 상기 계산된 초기벡터 값(IVi)과 암호화 키 값(Ki)을 입력 파라미터로 하는 복호화 함수를 사용하여 상기 i번째 메시지(msgi)를 블록 단위로 복원하는 (c)단계로 이루어지는 것을 특징으로 하는 어플리케이션 데이터의 암호화 및 복호화 방법.(C) restoring the i th message msg i in units of blocks by using a decryption function having the calculated initial vector value IV i and the encryption key value K i as input parameters. A method of encrypting and decrypting application data.
KR1020030018444A 2003-03-25 2003-03-25 encryption/decryption method of application data KR100551992B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030018444A KR100551992B1 (en) 2003-03-25 2003-03-25 encryption/decryption method of application data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030018444A KR100551992B1 (en) 2003-03-25 2003-03-25 encryption/decryption method of application data

Publications (2)

Publication Number Publication Date
KR20040083794A KR20040083794A (en) 2004-10-06
KR100551992B1 true KR100551992B1 (en) 2006-02-20

Family

ID=37367463

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030018444A KR100551992B1 (en) 2003-03-25 2003-03-25 encryption/decryption method of application data

Country Status (1)

Country Link
KR (1) KR100551992B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009151793A3 (en) * 2008-06-11 2010-02-04 Microsoft Corporation Techniques for peforming symmetric cryptography
KR20180105545A (en) * 2017-03-15 2018-09-28 주식회사 카이 Method of encryption and decryption of contents based on block encryption and appratus thereof
KR20180129147A (en) * 2017-05-25 2018-12-05 김영후 Method and system for verifying electronic document security using 2D barcode block division
US20210266175A1 (en) * 2018-06-18 2021-08-26 Koninklijke Philips N.V. Device for data encryption and integrity

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100567595B1 (en) * 2004-12-08 2006-04-04 한국항공우주연구원 Master station and user station for transceiving encrypted data, and security transceiving system and method using the same
KR100768509B1 (en) * 2005-03-10 2007-10-18 한국전자통신연구원 encryption and decryption device in wireless portable internet system, and method thereof
KR100790511B1 (en) * 2006-11-03 2008-01-02 김경원 Encrypting and decrypting system, encrypting and decrypting method
KR100864092B1 (en) * 2006-11-23 2008-10-16 한국전자통신연구원 Packet encryption method using block chaining mode of block cipher

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009151793A3 (en) * 2008-06-11 2010-02-04 Microsoft Corporation Techniques for peforming symmetric cryptography
CN102067643A (en) * 2008-06-11 2011-05-18 微软公司 Techniques for peforming symmetric cryptography
KR20180105545A (en) * 2017-03-15 2018-09-28 주식회사 카이 Method of encryption and decryption of contents based on block encryption and appratus thereof
KR101991664B1 (en) * 2017-03-15 2019-06-21 주식회사 카이 Method of encryption and decryption of contents based on block encryption and appratus thereof
KR20180129147A (en) * 2017-05-25 2018-12-05 김영후 Method and system for verifying electronic document security using 2D barcode block division
KR101967855B1 (en) * 2017-05-25 2019-04-11 김영후 Method and system for verifying electronic document security using 2D barcode block division
US20210266175A1 (en) * 2018-06-18 2021-08-26 Koninklijke Philips N.V. Device for data encryption and integrity

Also Published As

Publication number Publication date
KR20040083794A (en) 2004-10-06

Similar Documents

Publication Publication Date Title
US8687810B2 (en) Chaotic cipher system and method for secure communication
US6950517B2 (en) Efficient encryption and authentication for data processing systems
US20060056623A1 (en) Block encryption method and schemes for data confidentiality and integrity protection
US20020048364A1 (en) Parallel block encryption method and modes for data confidentiality and integrity protection
US20110194686A1 (en) Method of encrypting and transmitting data and system for transmitting encrypted data
US7110539B1 (en) Method and apparatus for encrypting and decrypting data
US11831764B2 (en) End-to-end double-ratchet encryption with epoch key exchange
US7254233B2 (en) Fast encryption and authentication for data processing systems
JPH07107085A (en) Message confirmation method and communication system
KR20200067265A (en) Apparatus and Method for Patterned Cipher Block for Real-Time Data Communication
JPH09312643A (en) Key sharing method and ciphering communication method
JPWO2006019152A1 (en) Message authenticator generation device, message authenticator verification device, and message authenticator generation method
WO2008064153A2 (en) Processing method for message integrity with tolerance for non-sequential arrival of message data
KR100551992B1 (en) encryption/decryption method of application data
US20080165953A1 (en) Processing method for message integrity with tolerance for non-sequential arrival of message data
EP1456997B1 (en) System and method for symmetrical cryptography
KR100797106B1 (en) Method for encrypting and decrypting transmmited and received packet in wireless lan
KR100388059B1 (en) Data encryption system and its method using asymmetric key encryption algorithm
JP2005114870A (en) Cryptocommunication system
Rogobete et al. Hashing and Message Authentication Code Implementation. An Embedded Approach.
KR100571178B1 (en) How to encrypt and decrypt a message
Harba Secure Data Encryption by Combination AES, RSA and HMAC
Almuhammadi et al. Double-hashing operation mode for encryption
TWI248276B (en) System and method for secure encryption
CN113723581A (en) Method for synchronizing receiver initialization vector and sender initialization vector

Legal Events

Date Code Title Description
A201 Request for 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: 20130103

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20140121

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20150202

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20170202

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20180201

Year of fee payment: 13

FPAY Annual fee payment

Payment date: 20190201

Year of fee payment: 14