KR20190133972A - TERMMINAL DEVICE, SERVER, SYSTEM AND METHOD FOR OPERATING MESSAGE ENCRYPTION KEY USING DEVICE AUTHENTICATION KEY IN IoT ENVIRONMENT - Google Patents
TERMMINAL DEVICE, SERVER, SYSTEM AND METHOD FOR OPERATING MESSAGE ENCRYPTION KEY USING DEVICE AUTHENTICATION KEY IN IoT ENVIRONMENT Download PDFInfo
- Publication number
- KR20190133972A KR20190133972A KR1020180059029A KR20180059029A KR20190133972A KR 20190133972 A KR20190133972 A KR 20190133972A KR 1020180059029 A KR1020180059029 A KR 1020180059029A KR 20180059029 A KR20180059029 A KR 20180059029A KR 20190133972 A KR20190133972 A KR 20190133972A
- Authority
- KR
- South Korea
- Prior art keywords
- key
- message
- authentication
- verification
- terminal device
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
- H04L9/0841—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/085—Secret sharing or secret splitting, e.g. threshold schemes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0894—Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3242—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
Abstract
Description
본 발명은 사물인터넷(Internet of Things, IoT) 기술에 관한 것으로, 보다 상세하게는 IoT 환경에서의 키 관리 및 보안 기술에 관한 것이다.The present invention relates to the Internet of Things (IoT) technology, and more particularly, to key management and security technology in the IoT environment.
IoT(사물인터넷, Internet of Things)는 자동차, 집, 웨어러블 장치 등과 함께 현대 생활의 모든 정보를 수집할 수 있게 하였다. 이 정보는 단순한 장치에서 수집된 수치 데이터뿐만 아니라 개인의 생활에 밀접하면서도 개인의 사생활까지 엿볼 수 있는 은밀한 데이터를 포함하고 기술이 발전함에 따라 폭발적으로 증가하는 추세다.The Internet of Things (IoT) has enabled us to collect all the information of modern life along with cars, homes and wearables. This information includes not only numerical data collected from simple devices, but also secret data that is closely related to the personal life and reveals the personal life.
그러나 데이터의 보호 및 보안에는 아직 많이 미흡하다. 특히 무선망을 이용하는 경우가 많으며, 인터넷에 연결되면서 사이버공격과 위협이 크게 늘어나고 있지만 보안을 제대로 강구하고 있지 못하고 있어 암호화 프로토콜을 활용해 송신되는 데이터 안전성을 강구할 수 있는 안전한 통신이 구현돼야 하며, 경량화된 플랫폼에 최적화된 암호화 및 인증 기술의 필요성이 강조된다.However, the protection and security of data is still far from sufficient. In particular, wireless networks are often used, and cyber attacks and threats are increasing as they are connected to the Internet. However, they are not properly secured. The need for encryption and authentication technologies optimized for lightweight platforms is emphasized.
IoT 플랫폼은 주로 무선으로 연결되는데, 이를 위해 LoRA, 지그비(ZigBee), 블루투스(Bluetooth), 와이파이(Wi-Fi), 6LoWPAN, Z-Wave 등의 프로토콜을 사용한다. 이들 프로토콜은 TDES(TripleDES), SHA-1과 같이 보안 강도가 낮은 암호부터 AES-256, SHA-2, RSA-2048 등 보안 강도가 높은 암호까지 다양하게 지원하나 여전히 IoT 환경에 적합한 경량화된 특성을 갖춘 암호 알고리즘을 지원하지 않고 있다.IoT platforms are primarily connected wirelessly, using protocols such as LoRA, ZigBee, Bluetooth, Wi-Fi, 6LoWPAN, and Z-Wave. These protocols range from low-security ciphers such as TDES (TripleDES) and SHA-1 to high-security ciphers such as AES-256, SHA-2, and RSA-2048, but still provide lightweight features for IoT environments. It does not support the encryption algorithm.
IoT 환경에서 자원이 제한적인 환경에서 IETF 표준화 그룹에서는 안전한 IoT 서비스를 위해 경량화된 DTLS(Datagram TLS) 프로토콜의 활용을 제안하고 있지만 초경량 기기에는 한계가 있다. RSA(Rivest Shamir Adleman)나 ECC(Elliptic Curve Cryptosystem)와 같은 암호화 모듈을 탑재 할 수 없는 경량 센서에는 적용이 어렵다.In an environment where resources are limited in the IoT environment, the IETF standardization group proposes to use a lightweight DTLS (Datagram TLS) protocol for secure IoT services, but there are limitations in ultra-lightweight devices. It is difficult to apply to lightweight sensors that cannot be equipped with encryption modules such as RSA (Rivest Shamir Adleman) or ECC (Elliptic Curve Cryptosystem).
초소형 IoT 기기는 기존 PC나 모바일 기기와는 달리 저전력으로 동작하기 때문에 컴퓨팅 성능이 낮고 프로세서의 경우 비교적 고성능 기기에 적합한 32비트 프로세서 외에도 경량 기기에는 8비트와 16비트 프로세서까지 다양하게 탑재되고 있다. 대칭키 암호화의 경우 8비트 프로세서 기준으로 128비트 AES 암·복호화가 무난하게 수행되는 것으로 알려져 있다.Unlike conventional PCs or mobile devices, ultra-small IoT devices operate at low power, so they have low computing power and processors are suitable for relatively high-performance devices. In the case of symmetric key encryption, 128-bit AES encryption / decryption is known to be performed on an 8-bit processor basis.
IoT기기, 센서들은 기존보다 훨씬 가벼운 펌웨어를 통해 구동되기 때문에 안드로이드OS 등에 적용되는 보안기능을 그대로 적용하기 어렵다는 한계가 발생한다. 기존 암호화 통신은 최소한의 컴퓨팅 성능을 가진 IoT기기, 센서에 적용하기에는 무리가 되고 소프트웨어적인 암호화 기술보다는 하드웨어적인 암호화 기술을 적용한다면, 별도 암호화 칩을 사용으로 비용이 상승한다는 문제가 있어 하드웨어적인 암호화 기술 적용은 한계가 있다.IoT devices and sensors are driven by much lighter firmware than the existing ones, so it is difficult to apply security functions applied to Android OS. Existing encryption communication is too difficult to apply to IoT devices and sensors with minimal computing power, and if hardware encryption technology is applied rather than software encryption technology, there is a problem that the cost increases by using separate encryption chip. Application is limited.
한편, 한국공개특허 제 10-2016-0099256 호“IoT 기반 스마트 워크 환경에서 디바이스 인증을 위한 인증 서버, 인증 방법 및 시스템”는 IoT 기반의 스마트 워크 환경에서 지능형 디바이스의 식별값과 임시 암호값을 인증하여 인가 티켓을 생성하고, 인가 티켓을 이용하여 디바이스 인증을 수행하는 인증 서버, 인증 방법 및 시스템에 관하여 개시하고 있다.Meanwhile, Korean Patent Publication No. 10-2016-0099256 “Authentication Server, Authentication Method and System for Device Authentication in IoT-based Smart Work Environment” authenticates the identification value and the temporary password value of an intelligent device in an IoT-based smart work environment. An authentication server, an authentication method, and a system for generating an authorization ticket and performing device authentication using the authorization ticket are disclosed.
본 발명은 기존 대칭키 암호화를 이용하여 안전한 키의 관리 및 분배를 목적으로 한다.The present invention aims to manage and distribute secure keys using existing symmetric key encryption.
또한, 본 발명은 기존 대칭키 암호화를 이용한 공개키 인증, 암호화 및 복호화를 목적으로 한다.In addition, the present invention aims at public key authentication, encryption, and decryption using existing symmetric key encryption.
또한, 본 발명은 암호화 기술 적용의 비용을 절감하는 것을 목적으로 한다.In addition, the present invention aims to reduce the cost of applying encryption technology.
상기한 목적을 달성하기 위한 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 방법은 메시지 암호키 운용을 위한 단말 기기, 서버 및 시스템을 이용한 방법에 있어서, 상기 단말 기기가, 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받고, 키 관리 서버가, 검증용 키 페어를 생성하는 단계; 상기 단말 기기가, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 요청 메시지를 암호화하는 단계 및 어플리케이션 서버가, 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 상기 요청 메시지를 복호화하는 단계를 포함한다.The method for operating a message encryption key according to an embodiment of the present invention for achieving the above object is a method using a terminal device, a server and a system for message encryption key operation, the terminal device, the authentication key pair Generating or receiving the authentication key pair generated using an information injection program of a network server, and generating, by the key management server, a key pair for verification; Encrypting, by the terminal device, a request message using the authentication private key of the authentication key pair and the verification public key of the verification key pair, and by an application server, the authentication public key of the authentication key pair And decrypting the request message using the verification private key of the verification key pair.
이 때, 상기 메시지 암호키 운용을 위한 방법은 상기 어플리케이션 서버가, 상기 인증용 공개키 및 상기 검증용 개인키를 이용하여 상기 요청 메시지에 대한 응답 메시지를 암호화하는 단계 및 상기 단말 기기가, 상기 인증용 개인키 및 상기 검증용 공개키를 이용하여 상기 응답 메시지를 복호화하는 단계를 더 포함할 수 있다.In this case, the method for operating the message encryption key includes the step of encrypting the response message to the request message by the application server using the authentication public key and the verification private key and the terminal device, the authentication And decrypting the response message using the private key and the verification public key.
이 때, 상기 생성하는 단계는 상기 단말 기기가, 상기 인증용 공개키 및 상기 단말 기기의 단말 식별 정보를 상기 키 관리 서버에 송신하고, 상기 키 관리 서버가, 사전 공유키를 생성하여, 상기 검증용 공개키 및 상기 사전 공유키를 상기 단말 기기에 송신할 수 있다.At this time, in the generating step, the terminal device transmits the authentication public key and terminal identification information of the terminal device to the key management server, and the key management server generates a pre-shared key to verify the verification. The public key and the pre-shared key can be transmitted to the terminal device.
이 때, 상기 생성하는 단계는 상기 단말 기기가, 상기 인증용 개인키, 상기 검증용 공개키, 상기 단말 식별 정보 및 상기 사전 공유키를 저장하고, 상기 키 관리 서버가, 상기 인증용 공개키, 상기 검증용 개인키, 상기 단말 식별 정보 및 상기 사전 공유키를 저장할 수 있다.In this case, the generating of the terminal device, the authentication private key, the verification public key, the terminal identification information and the pre-shared key, the key management server, the authentication public key, The verification private key, the terminal identification information, and the pre-shared key may be stored.
이 때, 상기 요청 메시지를 암호화하는 단계는 상기 단말 기기가, 디피-헬만 키 교환(Diffie-Hellman key exchange) 방식을 이용하여 상기 인증용 개인키 및 상기 검증용 공개키로부터 제1 비밀키를 생성하고, 상기 요청 메시지를 복호화하는 단계는 상기 어플리케이션 서버가, 디피-헬만 키 교환 방식을 이용하여 상기 인증용 공개키 및 상기 검증용 개인키로부터 제2 비밀키를 생성할 수 있다.In this case, in the encrypting of the request message, the terminal device generates a first secret key from the authentication private key and the verification public key using a Diffie-Hellman key exchange method. In the decrypting of the request message, the application server may generate a second secret key from the authentication public key and the verification private key by using a Diffie-Hellman key exchange scheme.
이 때, 상기 요청 메시지를 암호화하는 단계는 상기 단말 기기가, 키 유도 함수(Key derivation function)를 이용하여 상기 제1 비밀키 및 상기 사전 공유키로부터 제1 암호키 및 제1 MAC 키를 생성하고, 상기 요청 메시지를 복호화하는 단계는 상기 어플리케이션 서버가, 상기 키 유도 함수를 이용하여 상기 제2 비밀키 및 상기 사전 공유키로부터 제2 암호키 및 제2 MAC 키를 생성할 수 있다.In this case, the encrypting of the request message may include generating, by the terminal device, a first encryption key and a first MAC key from the first secret key and the pre-shared key using a key derivation function. The decoding of the request message may include generating, by the application server, a second encryption key and a second MAC key from the second secret key and the pre-shared key using the key derivation function.
이 때, 상기 요청 메시지를 암호화하는 단계는 상기 단말 기기가, 상기 제1 암호키를 이용하여 상기 요청 메시지를 암호화한 암호화 메시지를 생성하고, 상기 제1 MAC 키를 이용하여 상기 암호화 메시지, 상기 단말 식별 정보 및 상기 암호화 메시지의 메시지 헤더를 MAC(Message Authentication Code) 연산하여 제1 MAC 값을 산출할 수 있다.In this case, the encrypting of the request message may include generating, by the terminal device, an encrypted message that encrypts the request message using the first encryption key, and using the first MAC key, the encrypted message and the terminal. The first MAC value may be calculated by calculating a message authentication code (MAC) from the identification information and the message header of the encrypted message.
이 때, 상기 요청 메시지를 복호화하는 단계는 상기 어플리케이션 서버가, 상기 제2 MAC 키를 이용하여 상기 단말 기기로부터 수신한 상기 암호화 메시지, 상기 단말 식별 정보 및 상기 암호화 메시지의 메시지 헤더를 MAC 연산하여 제2 MAC 값을 산출할 수 있다.In this case, the decoding of the request message may be performed by the application server using a second MAC key to perform MAC operation on the encrypted message, the terminal identification information, and the message header of the encrypted message received from the terminal device. 2 MAC value can be calculated.
이 때, 상기 요청 메시지를 복호화하는 단계는 상기 어플리케이션 서버가, 상기 단말 기기로부터 수신한 상기 제1 MAC 값과 상기 제2 MAC 값을 비교하여 상기 암호화 메시지를 검증하고, 상기 제2 암호키를 이용하여 상기 암호화 메시지를 복호화할 수 있다.In this case, in the decrypting of the request message, the application server compares the first MAC value and the second MAC value received from the terminal device to verify the encrypted message and uses the second encryption key. To decrypt the encrypted message.
이 때, 상기 요청 메시지를 복호화하는 단계는 상기 제1 MAC 값과 상기 제2 MAC 값을 Xor 연산하여 상기 암호화 메시지의 패딩 존재 여부를 확인하고, 상기 패딩 존재 여부에 따라 상기 암호화 메시지를 복호화 후, 패딩 처리할 수 있다.At this time, the step of decrypting the request message Xor operation on the first MAC value and the second MAC value to determine whether the padding of the encrypted message, and after decrypting the encrypted message according to the presence of the padding, Can be padded.
또한, 상기한 목적을 달성하기 위한 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 방법은 메시지 암호키 운용을 위한 단말 기기, 서버 및 시스템을 이용한 방법에 있어서, 상기 단말 기기가, 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받고, 키 관리 서버가, 검증용 키 페어를 생성하는 단계; 상기 단말 기기가, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 수행 명령을 포함하는 요청 메시지를 생성하는 단계 및 어플리케이션 서버가, 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 수행 명령을 포함하는 요청 메시지를 검증하는 단계를 포함한다.In addition, a method for operating a message encryption key according to an embodiment of the present invention for achieving the above object is a method using a terminal device, a server and a system for operating a message encryption key, the terminal device, for authentication Generating a key pair or receiving the authentication key pair generated using an information injection program of a network server, and generating, by the key management server, a key pair for verification; Generating, by the terminal device, a request message including an execution command using an authentication private key of the authentication key pair and a verification public key of the verification key pair, and by the application server, the authentication key pair Verifying a request message including an execution command using the authentication public key and the verification private key of the verification key pair.
상기 메시지 암호키 운용을 위한 방법은 상기 어플리케이션 서버가, 상기 메시지의 검증이 성공인 경우, 수행 명령을 처리하고, 상기 수행 명령에 대한 응답 메시지를 생성하는 단계 및 상기 단말 기기가, 상기 응답 메시지를 검증하고, 상기 응답 메시지의 검증이 성공인 경우, 상기 응답 메시지를 복호화하여 상기 수행 명령을 처리하는 단계를 더 포함할 수 있다.In the method for operating the message encryption key, the application server, if the verification of the message is successful, processing an execution command, generating a response message to the execution command and the terminal device, Verifying and, if the verification of the response message is successful, decoding the response message and processing the execution command.
이 때, 상기 요청 메시지를 생성하는 단계는 상기 단말 기기가, 디피-헬만 키 교환(Diffie-Hellman key exchange) 방식을 이용하여 상기 인증용 개인키 및 상기 검증용 공개키로부터 제1 비밀키를 생성하고, 상기 요청 메시지를 검증하는 단계는 상기 어플리케이션 서버가, 디피-헬만 키 교환방식을 이용하여 상기 인증용 공개키 및 상기 검증용 개인키로부터 제2 비밀키를 생성할 수 있다.In this case, the generating of the request message may include generating, by the terminal device, a first secret key from the authentication private key and the verification public key using a Diffie-Hellman key exchange scheme. The verifying of the request message may include generating, by the application server, a second secret key from the authentication public key and the verification private key by using a Diffie-Hellman key exchange scheme.
이 때, 상기 요청 메시지를 생성하는 단계는 상기 단말 기기가, 키 유도 함수(Key derivation function)를 이용하여 상기 제1 비밀키 및 상기 키 관리 서버가 생성한 사전 공유키로부터 제1 암호키 및 제1 MAC 키를 생성하고, 상기 요청 메시지를 검증하는 단계는 상기 어플리케이션 서버가, 상기 키 유도 함수를 이용하여 상기 제2 비밀키 및 상기 사전 공유키로부터 제2 암호키 및 제2 MAC 키를 생성할 수 있다.The generating of the request message may include generating, by the terminal device, a first encryption key and a first encryption key from a pre-shared key generated by the first secret key and the key management server using a key derivation function. 1 generating a MAC key and verifying the request message may include generating, by the application server, a second encryption key and a second MAC key from the second secret key and the pre-shared key using the key derivation function. Can be.
이 때, 상기 요청 메시지를 생성하는 단계는 상기 요청 메시지의 메시지 헤더에 수행 명령의 요청을 설정할 수 있다.In this case, the generating of the request message may set a request for an execution command in a message header of the request message.
이 때, 상기 요청 메시지를 검증하는 단계는 상기 요청 메시지의 메시지 헤더에 포함된 수행 명령을 확인하여 상기 수행 명령의 요청을 처리할 수 있다.In this case, verifying the request message may process the request of the execution command by confirming the execution command included in the message header of the request message.
이 때, 상기 응답 메시지를 생성하는 단계는 상기 어플리케이션 서버가 상기 제2 암호키를 이용하여 상기 수행 명령을 요청한 결과를 암호화하여 상기 응답 메시지를 생성하고, 상기 수행 명령을 처리하는 단계는 상기 응답 메시지의 검증이 성공인 경우, 상기 단말 기기가, 상기 제1 암호키를 이용하여 상기 응답 메시지를 복호화하여 상기 수행 명령을 요청한 결과를 처리할 수 있다.In this case, the generating of the response message may include generating the response message by encrypting a result of requesting the execution command by the application server using the second encryption key, and processing the response command by processing the response command. If the verification is successful, the terminal device may process a result of requesting the execution command by decrypting the response message using the first encryption key.
이 때, 상기 수행 명령을 처리하는 단계는 상기 수행 명령이 키 발급 요청인 경우, 상기 응답 메시지를 복호화하여 획득한 발급 요청 암호키를 상기 키 유도 함수에 사용되도록 사전 공유키 식별자를 지정하여 사전 공유키로 저장할 수 있다.In this case, when the execution command is a key issuance request, the step of processing the execution command may be pre-shared by designating a pre-shared key identifier to use an issue request encryption key obtained by decrypting the response message for the key derivation function. Can be stored as a key.
또한, 상기한 목적을 달성하기 위한 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 시스템은 검증용 키 페어를 생성하는 키 관리 서버; 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받아, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 요청 메시지를 암호화하는 단말 기기 및 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 상기 요청 메시지를 복호화하는 어플리케이션 서버를 포함한다.In addition, a system for operating a message encryption key according to an embodiment of the present invention for achieving the above object is a key management server for generating a key pair for verification; Generate an authentication key pair or receive the authentication key pair generated using an information injection program of a network server, and use the authentication private key of the authentication key pair and the verification public key of the verification key pair. And a terminal device for encrypting the request message, and an application server for decrypting the request message using the authentication public key of the authentication key pair and the verification private key of the verification key pair.
또한, 상기한 목적을 달성하기 위한 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 어플리케이션 서버는 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받은 단말 기기로부터 상기 인증용 키 페어의 인증용 개인키 및 검증용 키 페어의 검증용 공개키를 이용하여 암호화된 요청 메시지를 수신하고, 검증용 키 페어를 생성하는 키 관리 서버로부터 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 수신하는 서버 통신부 및 상기 인증용 공개키 및 상기 검증용 개인키를 이용하여 상기 요청 메시지를 복호화하는 서버 암호화부를 포함한다.In addition, the application server for operating the message encryption key according to an embodiment of the present invention for achieving the above object is to generate a key pair for authentication or the authentication key pair generated using an information injection program of the network server The authentication device receives a request message encrypted using the authentication private key of the authentication key pair and the verification public key of the verification key pair from the received terminal device, and generates the verification key pair from the key management server. And a server communication unit for receiving the authentication public key of the key pair and the verification private key of the verification key pair, and a server encryption unit for decrypting the request message using the authentication public key and the verification private key.
본 발명은 기존 대칭키 암호화를 이용하여 안전한 키의 관리 및 분배를 제공할 수 있다.The present invention can provide management and distribution of secure keys using existing symmetric key encryption.
또한, 본 발명은 기존 대칭키 암호화를 이용한 공개키 인증, 암호화 및 복호화를 제공할 수 있다.In addition, the present invention can provide public key authentication, encryption and decryption using existing symmetric key encryption.
또한, 본 발명은 암호화 기술 적용의 비용을 절감할 수 있다.In addition, the present invention can reduce the cost of applying encryption technology.
도 1은 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 시스템을 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 단말 기기를 나타낸 블록도이다.
도 3은 본 발명의 일실시예에 따른 어플리케이션 서버를 나타낸 블록도이다.
도 4는 본 발명의 일실시예에 따른 키 관리 서버를 나타낸 블록도이다.
도 5는 본 발명의 일실시예에 따른 키 저장 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 6은 본 발명의 일실시예에 따른 요청 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 7은 본 발명의 일실시예에 따른 요청 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 8은 본 발명의 일실시예에 따른 응답 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 9는 본 발명의 일실시예에 따른 응답 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 10은 본 발명의 일실시예에 따른 암호화 메시지의 구성를 나타낸 도면이다.
도 11 내지 13은 본 발명의 일실시예에 따른 니블 넘버(Nibble Number)로 숫자들을 나타낸 도면이다.
도 14는 본 발명의 일실시예에 따른 암호 데이터의 패딩 여부에 따른 MAC Xor 연산 과정을 나타낸 동작흐름도이다.
도 15는 본 발명의 일실시예에 따른 MAC 검증 시 암호 데이터의 패딩 여부 확인 과정을 나타낸 동작흐름도이다.
도 16은 본 발명의 일실시예에 따른 메시지 헤더의 구조와 KDF 호출 시 인자 설정을 나타낸 도면이다.
도 17은 본 발명의 일실시예에 따른 키 발급 요청 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 18은 본 발명의 일실시예에 따른 키 발급 요청 메시지 검증 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 19는 본 발명의 일실시예에 따른 키 발급 응답 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 20은 본 발명의 일실시예에 따른 키 발급 응답 메시지 검증 및 암호키 저장 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.
도 21은 본 발명의 일실시예에 따른 PSK를 메시지 헤더에 설정하는 것을 나타낸 도면이다.
도 22는 본 발명의 일실시예에 따른 컴퓨터 시스템을 나타낸 도면이다.1 is a block diagram illustrating a system for operating a message encryption key according to an embodiment of the present invention.
2 is a block diagram illustrating a terminal device according to an embodiment of the present invention.
3 is a block diagram illustrating an application server according to an exemplary embodiment of the present invention.
4 is a block diagram illustrating a key management server according to an embodiment of the present invention.
5 is a sequence diagram illustrating a method for operating a message encryption key in a key storage process according to an embodiment of the present invention.
6 is a sequence diagram illustrating a method for operating a message encryption key in a request message encryption process according to an embodiment of the present invention.
7 is a sequence diagram illustrating a method for operating a message encryption key in a request message decryption process according to an embodiment of the present invention.
8 is a sequence diagram illustrating a method for operating a message encryption key in a response message encryption process according to an embodiment of the present invention.
9 is a sequence diagram illustrating a method for operating a message encryption key in a response message decryption process according to an embodiment of the present invention.
10 is a diagram showing the configuration of an encrypted message according to an embodiment of the present invention.
11 to 13 are diagrams illustrating numbers by a nibble number according to an embodiment of the present invention.
14 is a flowchart illustrating an operation of calculating MAC Xor according to whether padding of encryption data is performed according to an embodiment of the present invention.
15 is a flowchart illustrating a process of checking whether padding of cipher data is performed during MAC verification according to an embodiment of the present invention.
FIG. 16 is a diagram illustrating the structure of a message header and setting parameters when invoking a KDF according to an embodiment of the present invention.
17 is a sequence diagram illustrating a method for operating a message encryption key in a key issue request message generation process according to an embodiment of the present invention.
18 is a sequence diagram illustrating a method for operating a message encryption key in a key issuance request message verification process according to an embodiment of the present invention.
19 is a sequence diagram illustrating a method for operating a message encryption key in a key issuance response message generation process according to an embodiment of the present invention.
20 is a sequence diagram illustrating a method for operating a message encryption key in a key issuance response message verification and encryption key storage process according to an embodiment of the present invention.
21 is a diagram illustrating setting a PSK in a message header according to an embodiment of the present invention.
22 illustrates a computer system according to an embodiment of the present invention.
본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. Here, the repeated description, well-known functions and configurations that may unnecessarily obscure the subject matter of the present invention, and detailed description of the configuration will be omitted. Embodiments of the present invention are provided to more completely describe the present invention to those skilled in the art. Accordingly, the shape and size of elements in the drawings may be exaggerated for clarity.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, except to exclude other components unless specifically stated otherwise.
이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 시스템을 나타낸 블록도이다.1 is a block diagram illustrating a system for operating a message encryption key according to an embodiment of the present invention.
도 1을 참조하면, 본 발명의 일실시예에 따른 메시지 암호키 운용을 위한 시스템은 단말 기기(10), 네트워크 서버(20), 어플리케이션 서버(30) 및 키 관리 서버(100)를 포함할 수 있다.Referring to FIG. 1, a system for operating a message encryption key according to an embodiment of the present invention may include a
단말 기기(10)는 메시지를 암호화 및 복호화하기 위한 인증용 키 페어 및 단말 식별 정보를 생성할 수 있다.The
이 때, 단말 기기(10)는 네트워크 서버(20)가 정보 주입 프로그램을 이용하여 생성한 인증용 키 페어 및 단말 식별 정보를 제공받을 수도 있다.In this case, the
정보 주입 프로그램은 인증용 키 페어 및 단말 식별 정보 등을 생성하여 단말 기기(10)에 주입하는 프로그램에 상응할 수 있다.The information injection program may correspond to a program for generating an authentication key pair and terminal identification information and injecting the
네트워크 서버(20)는 단말 기기(10)가 낮은 성능인 경우, 단말 기기(10)가 인증용 키 페어를 생성하기는 어려울 수 있으므로, 정보 주입 프로그램을 이용하여 인증용 키 페어 및 단말 식별 정보를 생성하여 단말 기기(10)에 주입할 수 있다.When the
키 관리 서버(Key Management Server, KMS)(100)는 암호키의 라이프사이클을 관리하는 전용 시스템으로, 암호키의 생성, 저장, 백업, 복구, 분배 및 파기 등의 기능을 제공할 수 있다.The key management server (KMS) 100 is a dedicated system for managing the lifecycle of the encryption key, and may provide functions such as generation, storage, backup, recovery, distribution, and destruction of the encryption key.
키 관리 서버(100)는 메시지를 암호화 및 복호화하기 위한 검증용 키 페어 및 사전 공유키(Pre-Shared Key, PSK)를 생성할 수 있다.The
이 때, 키 관리 서버(100)는 어플리케이션 서버(30)를 등록할 수 있다.In this case, the
이 때, 단말 기기(10)는 키 관리 서버(100)로부터 검증용 키 페어의 검증용 공개키 및 사전 공유키를 제공 받을 수 있다.In this case, the
이 때, 단말 기기(100)는 키 관리 서버(100)에 인증용 키 페어의 인증용 공개키 및 단말 식별 정보를 제공할 수 있다.At this time, the
이 때, 단말 기기(10)는 인증용 키 페어의 인증용 개인키, 검증용 키 페어의 검증용 공개키, 단말 식별 정보 및 사전 공유키를 안전 영역에 저장할 수 있다.At this time, the
또한, 키 관리 서버(100)는 단말 기기(10)로부터 인증용 키 페어의 인증용 공개키 및 단말 식별 정보를 제공 받을 수 있다.In addition, the
이 때, 키 관리 서버(100)는 네트워크 서버(20)가 생성한 인증용 키 페어 및 단말 식별 정보를 제공받을 수도 있다.In this case, the
이 때, 키 관리 서버(100)는 단말 기기(10)에 검증용 키 페어의 검증용 공개키 및 사전 공유키를 제공할 수 있다.In this case, the
이 때, 키 관리 서버(100)는 인증용 키 페어의 인증용 공개키, 검증용 키 페어의 검증용 개인키, 단말 식별 정보 및 사전 공유키를 안전 영역에 저장할 수 있다.At this time, the
이 때, 키 관리 서버(100)는 안전 영역에 저장된 인증용 키 페어의 인증용 공개키, 검증용 키 페어의 검증용 개인키 및 사전 공유키를 어플리케이션 서버(30)에 제공할 수 있다.In this case, the
또한, 단말 기기(10)는 요청 메시지를 암호화하여 어플리케이션 서버(30)에 송신할 수 있다.In addition, the
이 때, 단말 기기(10)는 어플리케이션 서버(30)로부터 요청 메시지에 대한 응답 메시지를 수신하여 검증 및 복호화 할 수 있다.At this time, the
또한, 단말 기기(10)는 어플리케이션 서버(30)에 키 발급을 위한 키 발급 요청 메시지를 송신할 수 있다.In addition, the
이 때, 단말 기기(10)는 어플리케이션 서버(30)로부터 키 발급 요청 메시지에 대한 키 발급 응답 메시지를 수신하여 검증 및 복호화 할 수 있다.At this time, the
이 때, 단말 기기(10)는 키 발급 응답 메시지를 복호화하여 발급을 요청한 암호키를 획득할 수 있고, 암호키를 저장할 수 있다.At this time, the
네트워크 서버(20)는 단말 기기(10)와 어플리케이션 서버(30) 사이에서 단말 기기(10)의 관리 및 유·무선 통신을 위한 서비스를 지원할 수 있다.The
이 때, 네트워크 서버(20)는 단말 기기(10)와 어플리케이션 서버(30) 사이의 메시지 송수신을 중개할 수 있다.In this case, the
이 때, 네트워크 서버(20)는 어플리케이션 서버(30)를 등록할 수 있다.At this time, the
어플리케이션 서버(30)는 단말 기기(10)에서 생산된 데이터를 수집 및 요청 처리하고 사용자에게 서비스를 제공할 수 있다.The
어플리케이션 서버(30)는 단말 기기(10)로부터 수신한 요청 메시지를 검증 및 복호화할 수 있다.The
이 때, 어플리케이션 서버(30)는 단말 기기(10) 또는 네트워크 서버(20)로부터 단말 식별 정보를 제공받을 수 있다.In this case, the
이 때, 어플리케이션 서버(30)는 단말 식별 정보를 이용하여 키 관리 서버(100)로부터 메시지 암호화 및 복호화에 필요한 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.In this case, the
이 때, 어플리케이션 서버(30)는 요청 메시지에 대한 응답 메시지를 암호화하여 단말 기기(10)에 송신할 수 있다.At this time, the
또한, 어플리케이션 서버(30)는 단말 기기(10)로부터 수신한 키 발급 요청 메시지를 검증 및 복호화할 수 있다.In addition, the
이 때, 어플리케이션 서버(30)는 키 발급 요청에 대한 암호키 발급을 키 관리 서버(100)에 요청할 수 있다.In this case, the
이 때, 어플리케이션 서버(30)는 키 관리 서버(100)로부터) 발급 받은 암호키를 수신하여 암호화한 키 발급 응답 메시지를 단말 기기(10)에 송신할 수 있다.In this case, the
키 관리 서버(100)는 어플리케이션 서버(30)가 발급을 요청한 암호키를 생성하여 어플리케이션 서버(30)에 제공할 수 있다.The
도 2는 본 발명의 일실시예에 따른 단말 기기를 나타낸 블록도이다.2 is a block diagram illustrating a terminal device according to an embodiment of the present invention.
도 2를 참조하면, 본 발명의 일실시예에 따른 단말 기기(10)는 단말 통신부(11), 단말 키 관리부(12) 및 단말 키 저장부(13)를 포함할 수 있다.2, a
단말 통신부(11)는 메시지를 송수신 할 수 있다.The
단말 키 관리부(12)는 단말 기기(10)는 메시지를 암호화 및 복호화하기 위한 인증용 키 페어 및 단말 식별 정보를 생성할 수 있다.The terminal
이 때, 단말 통신부(11)는 네트워크 서버(20)가 생성한 인증용 키 페어 및 단말 식별 정보를 제공받을 수도 있다.In this case, the
이 때, 단말 통신부(11)는 키 관리 서버(100)로부터 검증용 키 페어의 검증용 공개키 및 사전 공유키를 제공 받을 수 있다.At this time, the
이 때, 단말 통신부(11)는 키 관리 서버(100)에 인증용 키 페어의 인증용 공개키 및 단말 식별 정보를 제공할 수 있다.At this time, the
또한, 단말 키 관리부(12)는 요청 메시지를 암호화하여 단말 통신부(11)를 통해 어플리케이션 서버(30)에 송신할 수 있다.In addition, the terminal
이 때, 단말 키 관리부(12)는 단말 통신부(11)를 통해 어플리케이션 서버(30)로부터 요청 메시지에 대한 응답 메시지를 수신하여 검증 및 복호화 할 수 있다.At this time, the terminal
이 때, 단말 키 관리부(11)는 키 발급을 위한 키 발급 요청 메시지를 생성하여 단말 통신부(11)를 통해 어플리케이션 서버(30)에 송신할 수 있다.In this case, the terminal
이 때, 단말 키 관리부(12)는 단말 통신부(11)를 통해 어플리케이션 서버(30)로부터 키 발급 요청 메시지에 대한 키 발급 응답 메시지를 수신하여 검증 및 복호화 할 수 있다.At this time, the terminal
이 때, 단말 키 관리부(12)는 키 발급 응답 메시지를 복호화하여 발급을 요청한 암호키를 획득할 수 있고, 암호키를 단말 키 저장부(13)의 안전 영역에 저장할 수 있다.At this time, the terminal
단말 키 저장부(13)는 안전 영역에 인증용 개인키, 검증용 공개키, 단말 식별 정보 및 사전 공유키를 저장할 수 있다.The terminal
도 3은 본 발명의 일실시예에 따른 어플리케이션 서버를 나타낸 블록도이다.3 is a block diagram illustrating an application server according to an exemplary embodiment of the present invention.
도 3을 참조하면, 본 발명의 일실시예에 따른 어플리케이션 서버(30)는 서버 통신부(31) 및 서버 암호화부(32)를 포함할 수 있다.Referring to FIG. 3, the
서버 통신부(31)는 메시지를 송수신 할 수 있다.The
이 때, 서버 통신부(31)는 단말 기기(10) 또는 네트워크 서버(20)로부터 단말 식별 정보를 제공 받을 수 있다.In this case, the
서버 암호화부(32)는 서버 통신부(31)를 통해 단말 기기(10)로부터 수신한 요청 메시지를 검증 및 복호화할 수 있다.The
이 때, 서버 암호화부(32)는 서버 통신부(31)를 통해 단말 식별 정보를 이용하여 키 관리 서버(100)로부터 메시지 암호화 및 복호화에 필요한 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.At this time, the
이 때, 서버 암호화부(32)는 요청 메시지에 대한 응답 메시지를 암호화하여 서버 통신부(31)를 통해 단말 기기(10)에 송신할 수 있다.At this time, the
또한, 서버 암호화부(32)는 서버 통신부(31)를 통해 단말 기기(10)로부터 수신한 키 발급 요청 메시지를 검증 및 복호화할 수 있다.In addition, the
이 때, 서버 암호화부(32)는 키 발급 요청에 대한 암호키 발급을 키 관리 서버(100)에 요청할 수 있다.At this time, the
이 때, 서버 암호화부(32)는 서버 통신부(31)를 통해 키 관리 서버(100)로부터 발급 받은 암호키를 수신하여 암호화한 키 발급 응답 메시지를 단말 기기(10)에 송신할 수 있다.At this time, the
도 4는 본 발명의 일실시예에 따른 키 관리 서버를 나타낸 블록도이다.4 is a block diagram illustrating a key management server according to an embodiment of the present invention.
도 4를 참조하면, 본 발명의 일실시예에 따른 키 관리 서버(100)는 통신부(110), 키 관리부(120) 및 키 저장부(130)를 포함할 수 있다.Referring to FIG. 4, the
통신부(110)는 단말 기기(10)에 검증용 키 페어의 검증용 공개키 및 사전 공유키를 제공할 수 있다.The
이 때, 통신부(100)는 단말 기기(10)로부터 인증용 키 페어의 인증용 공개키 및 단말 식별 정보를 제공 받을 수 있다.At this time, the
이 때, 통신부(100)는 네트워크 서버(20)가 생성한 인증용 키 페어 및 단말 식별 정보를 제공받을 수도 있다.At this time, the
키 관리부(120)는 메시지를 암호화 및 복호화하기 위한 검증용 키 페어 및 사전 공유키를 생성할 수 있다.The
이 때, 키 관리부(120)는 어플리케이션 서버(30)를 등록할 수 있다.In this case, the
이 때, 키 관리부(120)는 어플리케이션 서버(30)가 발급을 요청한 암호키를 생성하여 어플리케이션 서버(30)에 제공할 수 있다.In this case, the
키 저장부(130)는 인증용 키 페어의 인증용 공개키, 검증용 키 페어의 검증용 개인키, 단말 식별 정보 및 사전 공유키를 안전 영역에 저장할 수 있다.The
이 때, 키 관리부(120)는 안전 영역에 저장된 인증용 키 페어의 인증용 공개키, 검증용 키 페어의 검증용 개인키 및 사전 공유키를 어플리케이션 서버(30)에 제공할 수 있다.In this case, the
도 5는 본 발명의 일실시예에 따른 키 저장 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.5 is a sequence diagram illustrating a method for operating a message encryption key in a key storage process according to an embodiment of the present invention.
도 5를 참조하면, 본 발명의 일실시예에 따른 키 저장 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 어플리케이션 서버(30)가 네트워크 서버(20) 및 키 관리 서버(100)에 등록을 요청할 수 있다(S210).Referring to FIG. 5, in the method for operating a message encryption key in a key storage process according to an embodiment of the present invention, an
이 때, 단계(S210)는 네트워크 서버(20)와 키 관리 서버(100)가 어플리케이션 서버(30)를 등록할 수 있다.In this case, in step S210, the
단계(S220)는 네트워크 서버(20)가 정보 주입 프로그램을 이용하여 단말 기기(10)에 단말 식별 정보(Device Unique identifier)를 주입할 수 있다.In operation S220, the
이 때, 단계(S220)는 단말 기기(10)의 출하 전에 단말 식별 정보를 오프라인 상으로 주입할 수도 있다.In this case, step S220 may inject the terminal identification information offline before shipment of the
이 때, 단계(S220)는 단말 기기(10)가 단말 식별 정보를 생성할 수도 있다.In this case, in step S220, the
단계(S230)는 네트워크 서버(20)가 정보 주입 프로그램을 이용하여 인증용 키 페어(인증용 공개키 및 인증용 개인키)를 생성할 수 있다.In operation S230, the
이 때, 단계(S230)는 단말 기기(10)가 인증용 키 페어(인증용 공개키 및 인증용 개인키)를 생성할 수도 있다.At this time, in step S230, the
단계(S240)는 단말 기기(10) 또는 네트워크 서버(20)가 단말 식별 정보 및 인증용 공개키를 키 관리 서버(100)에 제공할 수 있다.In operation S240, the
이 때, 단계(S240)는 단말 식별 정보 및 인증용 공개키를 키 관리 서버(100)에 온라인 또는 오프라인 상으로 등록 및 관리할 수 있다.In this case, step S240 may register and manage the terminal identification information and the public key for authentication online or offline with the
단계(S250)는 네트워크 서버(20)가 인증용 키 페어를 생성한 경우, 인증용 개인키를 오프라인 상으로 안전하게 단말 기기(10)에 주입할 수 있다.In operation S250, when the
단계(S260)는 키 관리 서버(100)가 검증용 키 페어(검증용 공개키 및 검증용 개인키) 및 사전 공유키(Pre-Shared Key, PSK)를 생성할 수 있다.In operation S260, the
단계(S270)는 키 관리 서버(100)가 검증용 공개키 및 사전 공유키를 단말 기기(10)에 제공할 수 있다.In operation S270, the
이 때, 단계(S270)는 네트워크 서버(20)가 제공하는 정보 주입 프로그램 또는 키 관리 서버(100)가 제공하는 정보 주입 프로그램을 이용하여 온라인 또는 오프라인 상으로 검증용 공개키 및 사전 공유키를 안전하게 단말 기기에 주입할 수 있다.At this time, the step (S270) is to secure the public key and pre-shared key for verification online or offline using the information injection program provided by the
단계(S280)는 단말 기기(10)가 인증용 개인키, 검증용 공개키, 단말 식별 정보 및 사전 공유키를 단말 키 저장부(13)의 안전 영역에 주입 및 저장할 수 있다.In operation S280, the
단계(S290)는 키 관리 서버(100)가 인증용 공개키, 검증용 개인키, 단말 식별 정보 및 사전 공유키를 키 저장부(130)의 안전 영역에 주입 및 저장할 수 있다.In operation S290, the
키 구분Manager
Key separator
표 1은 관리 주체에 따른 키 분류를 나타낸 것을 알 수 있다.Table 1 shows the key classification according to the management authority.
도 6은 본 발명의 일실시예에 따른 요청 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.6 is a sequence diagram illustrating a method for operating a message encryption key in a request message encryption process according to an embodiment of the present invention.
도 6을 참조하면, 본 발명의 일실시예에 따른 요청 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 단말 기기(10)가 인증용 개인키 및 검증용 공개키를 이용하여 제1 비밀키(Secret key, Sk)를 생성할 수 있다(S310).Referring to FIG. 6, in the method for operating a message encryption key in a request message encryption process according to an embodiment of the present invention, the
단계(S310)는 단말 기기(10)가 디피-헬만 키 교환(Diffie-Hellman key exchange, DH) 방식을 이용하여 인증용 개인키 및 검증용 공개키로부터 제1 비밀키를 생성할 수 있다.In operation S310, the
공개키를 이용한 디피-헬만 키 교환을 통한 비밀키 암호화는 기존 대칭키 암호화를 활용하면서 공개키를 사용하는 인증 및 안전한 키의 분배가 가능하다.Secret key encryption using Diffie-Hellman key exchange using public key enables the distribution of authentication and secure key using public key while utilizing existing symmetric key encryption.
단계(S320)는 단말 기기(10)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제1 비밀키 및 사전 공유키로부터 제1 암호키(ENCRYPT KEY) 및 제1 MAC 키(MAC KEY)를 생성할 수 있다.In step S320, the
이 때, 단계(S320)는 단말 기기(10)가 키 유도 함수의 반복 사용 횟수(i)를 메시지 헤더(42)에 설정할 수 있다.In this case, in step S320, the
단계(S330)는 단말 기기(10)가 제1 암호키를 이용하여 암호 알고리즘(ENCRYPT ALGORITHM)을 통해 요청 메시지(51)를 암호화한 암호화 메시지(ENCRYPTED MESSAGE)(52)를 생성할 수 있다.In operation S330, the
단말 기기(10)가 송신하고자 하는 메시지는 단말 기기(10)에서 수집된 센서 데이터 또는 키 관리 요청 등 안전하게 전송되어야 할 메시지들이 대상이 될 수 있다. 메시지의 구조는 메시지 헤더(Message Header)(42)와 인증을 위한 MAC(메시지 인증 코드; Message Authentication Code) 정보(MAC 값) 그리고 전송할 데이터를 암호화한 메시지 바디(Message Body)로 구성될 수 있다.The message to be transmitted by the
암호 알고리즘은 단말 기기(10)에서 지원하고, 메시지(51)의 패킷 크기 및 암호 비도 등을 고려한 알맞은 알고리즘이 사용될 수 있다.The encryption algorithm is supported by the
이 때, 단계(S330)는 단말 기기(10)가 제1 암호키로 대칭키 암호 알고리즘을 이용하여 요청 메시지(51)를 암호화할 수 있다.In this case, in step S330, the
단계(S340)는 단말 기기(10)가 제1 MAC 키를 이용하여 암호화 메시지(52), 단말 식별 정보(41) 및 암호화 메시지(52)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제1 MAC 값을 산출할 수 있다.In step S340, the
MAC 알고리즘은 다양한 상황을 고려한 알고리즘이 사용될 수 있다.The MAC algorithm may be used in consideration of various situations.
단계(S350)는 단말 기기(10)가 어플리케이션 서버(30)에 메시지 헤더(42)와 함께 제1 MAC 값이 포함된 암호화 메시지(52)를 전송할 수 있다.In operation S350, the
도 7은 본 발명의 일실시예에 따른 요청 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.7 is a sequence diagram illustrating a method for operating a message encryption key in a request message decryption process according to an embodiment of the present invention.
도 7을 참조하면, 본 발명의 일실시예에 따른 요청 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 어플리케이션 서버(30)가 키 관리 서버(100)에 로그인 할 수 있다(S410).Referring to FIG. 7, in the method for operating a message encryption key in the request message decryption process according to an embodiment of the present invention, the
단계(S410)는 키 관리 서버(100)에 로그인 하기 이전에, 단말 기기(10) 또는 네트워크 서버(30)로부터 단말 식별 정보(41)를 제공 받을 수 있고, 단말 기기(10)로부터 암호화 메시지(52)를 수신할 수 있다.Step S410 may be provided with the
단계(S420)는 어플리케이션 서버(30)가 키 관리 서버(100)에 단말 식별 정보(41)에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.In operation S420, the
단계(S430)는 어플리케이션 서버(30)의 키 발급 요청에 따라, 단말 식별 정보에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 제공할 수 있다.Step S430 may provide an authentication public key, a verification private key, and a pre-shared key corresponding to the terminal identification information according to a key issuance request of the
단계(S440)는 어플리케이션 서버(30)가 인증용 공개키 및 검증용 개인키를 이용하여 제2 비밀키(Secret key, Sk)를 생성할 수 있다.In operation S440, the
이 때, 단계(S440)는 어플리케이션 서버(30)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 공개키 및 검증용 개인키로부터 제2 비밀키를 생성할 수 있다.At this time, in step S440, the
단계(S450)는 어플리케이션 서버(30)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제2 비밀키 및 사전 공유키로부터 제2 암호키(ENCRYPT KEY) 및 제2 MAC 키(MAC KEY)를 생성할 수 있다.In operation S450, the
이 때, 단계(S450)는 키 유도 함수 사용을 위해 메시지 헤더(42)에 설정된 키 유도 함수의 반복 사용 횟수(i)를 참조할 수 있다.In this case, step S450 may refer to the repeated use number i of the key derivation function set in the
단계(S460)는 어플리케이션 서버(30)가 제2 MAC 키를 이용하여 단말 기기(10)로부터 수신한 암호화 메시지(52), 단말 식별 정보(41) 및 상기 암호화 메시지(52)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제2 MAC 값을 산출할 수 있다.In step S460, the
단계(S470)는 어플리케이션 서버(30)가 단말 기기(10)로부터 수신한 제1 MAC 값과 제2 MAC 값을 비교하여 암호화 메시지(52)를 검증할 수 있다.In operation S470, the
이 때, 단계(S470)는 어플리케이션 서버(30)가 제1 MAC 값과 제2 MAC 값의 무결성 검증을 수행한 결과가 실패인 경우, 에러 메시지를 출력하고, 암호화 메시지(52)의 복호화를 수행하지 않을 수 있다.At this time, in step S470, if the result of the
단계(S480)는 어플리케이션 서버(30)가 제1 MAC 값과 제2 MAC 값의 무결성 검증을 수행한 결과가 성공인 경우, 암호화 메시지(52)의 검증이 성공인 것으로 판단할 수 있고, 제2 암호키를 이용하여 암호화 메시지(52)를 복호화할 수 있다.In operation S480, when the result of performing the integrity verification of the first MAC value and the second MAC value by the
이 때, 단계(S480)는 복호화한 단말 기기(10)의 요청 메시지(51)를 확인할 수 있다.At this time, in step S480, the
도 8은 본 발명의 일실시예에 따른 응답 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.8 is a sequence diagram illustrating a method for operating a message encryption key in a response message encryption process according to an embodiment of the present invention.
도 8을 참조하면, 본 발명의 일실시예에 따른 응답 메시지 암호화 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 어플리케이션 서버(30)가 키 관리 서버(100)에 로그인 할 수 있다(S510).Referring to FIG. 8, in the method for operating a message encryption key in a response message encryption process according to an embodiment of the present invention, the
단계(S510)는 키 관리 서버(100)에 로그인 하기 이전에, 단말 기기(10) 또는 네트워크 서버(30)로부터 단말 식별 정보(41)를 제공 받을 수 있다.In operation S510, before the terminal logs in to the
단계(S520)는 어플리케이션 서버(30)가 키 관리 서버(100)에 단말 식별 정보(41)에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.In operation S520, the
단계(S530)는 어플리케이션 서버(30)의 키 발급 요청에 따라, 단말 식별 정보에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 제공할 수 있다.In operation S530, an authentication public key, a verification private key, and a pre-shared key corresponding to the terminal identification information may be provided according to a key issuance request of the
단계(S540)는 어플리케이션 서버(30)가 인증용 공개키 및 검증용 개인키를 이용하여 제3 비밀키(Secret key, Sk)를 생성할 수 있다.In operation S540, the
이 때, 단계(S540)는 어플리케이션 서버(30)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 공개키 및 검증용 개인키로부터 제3 비밀키를 생성할 수 있다.At this time, in step S540, the
단계(S550)는 어플리케이션 서버(30)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제3 비밀키 및 사전 공유키로부터 제3 암호키(ENCRYPT KEY) 및 제3 MAC 키(MAC KEY)를 생성할 수 있다.In operation S550, the
이 때, 단계(S550)는 어플리케이션 서버(30)가 키 유도 함수의 반복 사용 횟수(i)를 메시지 헤더(42)에 설정할 수 있다.In this case, in step S550, the
단계(S560)는 어플리케이션 서버(30)가 제3 암호키를 이용하여 암호 알고리즘(ENCRYPT ALGORITHM)을 통해 응답 메시지(51)를 암호화한 암호화 메시지(ENCRYPTED MESSAGE)(52)를 생성할 수 있다.In operation S560, the
이 때, 단계(S560)는 어플리케이션 서버(30)가 제3 암호키로 대칭키 암호 알고리즘을 이용하여 응답 메시지(51)를 암호화할 수 있다.At this time, in step S560, the
단계(S570)는 어플리케이션 서버(30)가 제3 MAC 키를 이용하여 암호화 메시지(52), 단말 식별 정보(41) 및 암호화 메시지(52)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제3 MAC 값을 산출할 수 있다.In operation S570, the
단계(S580)는 어플리케이션 서버(30)가 단말 기기(10)에 메시지 헤더(42)와 함께 제3 MAC 값이 포함된 암호화 메시지(52)를 전송할 수 있다.In operation S580, the
도 9는 본 발명의 일실시예에 따른 응답 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.9 is a sequence diagram illustrating a method for operating a message encryption key in a response message decryption process according to an embodiment of the present invention.
도 9를 참조하면, 본 발명의 일실시예에 따른 응답 메시지 복호화 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 단말 기기(10)가 어플리케이션 서버(30)로부터 응답 메시지(51)를 암호화한 암호화 메시지(52)를 수신할 수 있다(S610).9, in the method for operating a message encryption key in a response message decryption process according to an embodiment of the present invention, first, the
단계(S610)는 단말 기기(10)가 인증용 개인키 및 검증용 공개키를 이용하여 제4 비밀키(Secret key, Sk)를 생성할 수 있다.In operation S610, the
이 때, 단계(S610)는 단말 기기(10)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 개인키 및 검증용 공개키로부터 제4 비밀키를 생성할 수 있다.In this case, in step S610, the
단계(S620)는 단말 기기(10)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제4 비밀키 및 사전 공유키로부터 제4 암호키(ENCRYPT KEY) 및 제4 MAC 키(MAC KEY)를 생성할 수 있다.In step S620, the
이 때, 단계(S620)는 키 유도 함수 사용을 위해 메시지 헤더(42)에 설정된 키 유도 함수의 반복 사용 횟수(i)를 참조할 수 있다.In this case, step S620 may refer to the repeated use number i of the key derivation function set in the
단계(S630)는 단말 기기(10)가 제4 MAC 키를 이용하여 어플리케이션 서버(30)로부터 수신한 암호화 메시지(52), 단말 식별 정보(41) 및 상기 암호화 메시지(52)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제4 MAC 값을 산출할 수 있다.In step S630, the
단계(S640)는 단말 기기(10)가 어플리케이션 서버(30)로부터 수신한 제3 MAC 값과 제4 MAC 값을 비교하여 암호화 메시지(52)를 검증할 수 있다.In operation S640, the
이 때, 단계(S640)는 단말 기기(10)가 제3 MAC 값과 제4 MAC 값의 무결성 검증을 수행한 결과가 실패인 경우, 에러 메시지를 출력하고, 암호화 메시지(52)의 복호화를 수행하지 않을 수 있다.At this time, in step S640, if the
단계(S650)는 단말 기기(10)가 제3 MAC 값과 제4 MAC 값의 무결성 검증을 수행한 결과가 성공인 경우, 암호화 메시지(52)의 검증이 성공인 것으로 판단할 수 있고, 제4 암호키를 이용하여 암호화 메시지(52)를 복호화할 수 있다.In operation S650, when the
이 때, 단계(S650)는 복호화한 어플리케이션 서버(30)의 응답 메시지(51)를 확인할 수 있다.In this case, step S650 may check the
도 10은 본 발명의 일실시예에 따른 암호화 메시지의 구성를 나타낸 도면이다. 도 11 내지 13은 본 발명의 일실시예에 따른 니블 넘버(Nibble Number)로 숫자들을 나타낸 도면이다.10 is a diagram showing the configuration of an encrypted message according to an embodiment of the present invention. 11 to 13 are diagrams illustrating numbers by a nibble number according to an embodiment of the present invention.
도 10을 참조하면, 본 발명의 일실시예에 따른 복호화된 암호화 메시지(ENCRYPTED MESSAGE)는 패딩이 존재할 경우, 패딩(PADDING)과 원본 데이터(PLAINTEXT)로 구성되는 것을 알 수 있다.Referring to FIG. 10, it can be seen that the decrypted encrypted message ENCRYPTED MESSAGE according to an embodiment of the present invention consists of padding and original data PLAINTEXT.
메시지의 블럭 암호화 시 암호 블럭 크기의 배수가 되어야 하는데, 배수가 되지 않는 경우, 배수에 맞게 데이터의 앞 또는 뒤에 패딩을 추가하여 블럭 크기의 배수로 맞게 처리하여 암호화할 수 있다.When encrypting a block of messages, it should be a multiple of the cipher block size. If the multiple is not multiplied, padding may be added before or after the data to fit the multiple, and processed by multiples of the block size.
이 때, 패딩은 랜덤 니블(RANDOM NIBBLE, 4bit), 패딩 길이 정보(LENGTH OF PADDING) 및 랜덤 패딩(RANDOM PADDING)를 포함할 수 있다.In this case, the padding may include random nibbles (RANDOM NIBBLE, 4bit), padding length information (LENGTH OF PADDING), and random padding (RANDOM PADDING).
패딩 길이 정보는 도 11 내지 도 13에 도시된 니블 넘버(NIBBLE NUMBER) 형태에 상응할 수 있다.The padding length information may correspond to the nibble number type shown in FIGS. 11 to 13.
니블 넘버는 숫자값을 4bit 단위로 표현한 것이며, 0 ~ 7까지의 숫자를 4bit에 표현할 수 있다. 니블 넘버의 첫번째 비트가 0이고, 8이상의 숫자는 첫번째 비트가 1이며, 두번째, 세번째, 네번째 비트는 숫자를 표현을 위한 Nibble(4bit)의 갯수를 의미할 수 있다.The nibble number represents a numeric value in 4 bit units, and a number from 0 to 7 can be expressed in 4 bits. The first bit of the nibble number is 0, the number greater than 8 is the first bit is 1, and the second, third, and fourth bits may represent the number of Nibble (4 bits) for representing the number.
니블 넘버는 최대 7개의 니블(Nibble)을 사용할 수 있고, 0부터 268,435,456까지 숫자를 표현할 수 있다. 니블 넘버는 작은 숫자(0~7)의 사용 빈도가 높을 경우 저장 공간을 줄일 수 있어 효율적이다.The nibble number can use up to 7 nibbles and can represent numbers from 0 to 268,435,456. The nibble number is efficient because it can reduce the storage space when a small number (0 ~ 7) is used frequently.
도 11을 참조하면, 숫자 6을 표현 하는 경우의 니블 넘버를 나타낸 것을 알 수 있고, 도 12를 참조하면, 숫자 30을 표현하는 경우의 니블 넘버를 나타낸 것을 알 수 있고, 도 13을 참조하면, 숫자 425를 표현하는 경우의 니블 넘버를 나타낸 것을 알 수 있다.Referring to FIG. 11, it can be seen that the nibble number is represented when the
다시 도 10을 참조하면, 패딩의 처리는 패딩의 첫 4bit가 랜덤한 패딩인 랜덤 니블(Random Nibble, 4bit)이며, 다음 4bit 또는 8bit는 페딩 길이 정보(Length of Padding)일 수 있다. 패딩의 길이는 암호 메시지에서 패딩의 길이를 상응할 수 있으므로, 복호화된 암호화 메시지에서 패딩 길이 정보의 다음 bit부터 끝까지의 데이터가 원본 메시지 데이터(PLAINTEXT)에 상응할 수 있다Referring back to FIG. 10, the padding process may be random nibble (4 bits) in which the first 4 bits of padding are random padding, and next 4 bits or 8 bits may be length of padding. Since the length of the padding may correspond to the length of the padding in the encrypted message, the data from the next bit to the end of the padding length information in the decrypted encrypted message may correspond to the original message data PLAINTEXT.
다만, 복호화되지 않은 암호화 메시지에서는 패딩 여부를 알 수 없다.However, whether or not the padding is unknown in the unencrypted encrypted message.
도 14는 본 발명의 일실시예에 따른 암호 데이터의 패딩 여부에 따른 MAC Xor 연산 과정을 나타낸 동작흐름도이다.14 is a flowchart illustrating an operation of calculating MAC Xor according to whether padding of encryption data is performed according to an embodiment of the present invention.
도 14를 참조하면, 본 발명의 일실시예에 따른 암호 데이터의 패딩 여부에 따른 MAC Xor 연산 과정은 먼저, 메시지 암호화 시, 메시지에 패딩이 존재하는 지 여부를 확인할 수 있다(S710).Referring to FIG. 14, in operation MAC Xor operation according to whether encryption data is padded according to an embodiment of the present invention, when encrypting a message, it may be determined whether padding exists in the message (S710).
이 때, 단계(S710)는 메시지에 패딩이 존재하는 경우, MAC = MAC Xor 1의 Xor 연산을 수행할 수 있고(S720), 메시지에 패딩이 존재하지 않는 경우, MAC= MAC Xor 0의 Xor 연산(S730)을 수행할 수 있다.In this case, step S710 may perform an Xor operation of MAC =
도 14에 도시된 MAC Xor 연산 과정은 도 6의 단계(S330), 단계(S340) 및 도 8의 단계(S560), 단계(S570)의 암호화 메시지 생성 과정에서 수행될 수 있다.The MAC Xor calculation process illustrated in FIG. 14 may be performed in the process of generating an encryption message of steps S330, S340, and S560 and S570 of FIG. 6.
도 15는 본 발명의 일실시예에 따른 MAC 검증 시 암호 데이터의 패딩 여부 확인 과정을 나타낸 동작흐름도이다.15 is a flowchart illustrating a process of checking whether padding of cipher data is performed during MAC verification according to an embodiment of the present invention.
도 15를 참조하면, 본 발명의 일실시예에 따른 MAC 검증 시 암호 데이터의 패딩 여부 확인 과정은 먼저 피검증 대상의 제1 MAC 값(MAC(1))과 수신한 메시지에 포함된 제2 MAC 값(MAC(2))의 Xor 연산을 수행할 수 있다(S810).Referring to FIG. 15, in a process of verifying MAC according to an embodiment of the present invention, a process of checking whether padding of encryption data is padded may be performed by first checking a first MAC value (MAC (1)) and a second MAC included in a received message An Xor operation of the value MAC (2) may be performed (S810).
단계(S820)는 단계(S810)에서 메시지의 Xor 연산 수행 결과가 0 또는 1이 아닌 경우, 에러 메시지로 판단하여 에러를 출력할 수 있고(S830), 메시지의 Xor 연산 수행 결과가 0 또는 1인 경우, 메시지의 패딩 여부를 확인할 수 있다(S840).In operation S820, when the result of performing the Xor operation of the message is not 0 or 1 in step S810, the result may be determined as an error message and output an error (S830). The result of performing the Xor operation of the message is 0 or 1. In this case, whether or not the message is padded may be checked (S840).
단계(S840)는 메시지의 Xor 연산 수행 결과가 1인 경우, 메시지에 패딩이 포함된 것으로 확인할 수 있고(S850), 메시지의 Xor 연산 수행 결과가 0인 경우, 메시지에 패딩이 포함되지 않은 것으로 확인할 수 있다(S860).In operation S840, when the result of performing the Xor operation of the message is 1, it may be confirmed that the message includes padding (S850). When the result of performing the Xor operation of the message is 0, the operation S0 may be determined that the message does not include padding. It may be (S860).
단계(S850)는 메시지에 패딩이 포함되어 있으므로, 메시지 복호화후 패딩에 관련한 처리를 요청할 수 있다.In operation S850, the padding is included in the message, and thus, a message related to the padding may be requested after the message is decrypted.
도 15에 도시된 패딩 여부 확인 과정은 도 7의 단계(S470) 및 도 9의 단계(S640)의 MAC 검증 과정에서 수행될 수 있다.The padding check process illustrated in FIG. 15 may be performed in the MAC verification process of step S470 of FIG. 7 and step S640 of FIG. 9.
본 발명의 일실시예에 따른 단말 기기(10) 및 어플리케이션 서버(30)는 디피-헬만 키 교환(DH) 방식을 이용하여 인증용 키 페어 및 검증용 키 페어로부터 비밀키(Sk)를 생성할 수 있고, 사전 공유키(PSK)와 함께 KDF로 암호키와 MAC 키를 생성할 수 있고, 암호키와 MAC 키를 이용하여 메시지를 암호화한 암호화 메시지를 생성할 수 있다. 이 때, 암호화 메시지의 크기는 암호화 알고리즘과 MAC 알고리즘에 따라 메시지의 크기가 결정될 수 있다.The
무선망 환경에서 메시지의 크기는 패킷 손실률과 비례적인 관계를 가지고 있어 메시지의 크기가 클수록 패킷의 손실률도 커질 수 있다.In a wireless network environment, the message size is proportional to the packet loss rate. As the message size increases, the packet loss rate increases.
암호화 알고리즘과 MAC 알고리즘에 따른 메시지 크기는 표 2 및 표 3과 같이 나타낼 수 있다.Message sizes according to encryption algorithms and MAC algorithms can be shown in Tables 2 and 3.
(byte)Size of block
(byte)
(byte)Original data size
(byte)
(byte)Message size
(byte)
SEED, LEAAES, ARIA,
SEED,
표 2 및, 표 3을 참조하면, 원본 데이터 크기가 8byte를 기준으로 메시지의 크기는 최소 24byte 인 것을 알 수 있고, 원본 데이터의 크기가 16byte 기준으로 메시지의 크기가 32byte에서 최대 48byte 인 것을 알 수 있다(단, 암호화 운영모드 NoPadding이며, 메시지 크기에서 헤더는 제외되었다.).Referring to Table 2 and Table 3, it can be seen that the size of the message is at least 24 bytes based on the original data size of 8 bytes, and that the size of the message is 32 bytes up to 48 bytes based on the size of the original data of 16 bytes. (However, the encryption mode of operation is NoPadding, except for the header in the message size.)
AES 암호화 알고리즘과 HMAC-SHA1을 사용할 경우 요청 데이터의 크기가 15byte이라면, 암호 블럭 크기가 16byte와 HMAC-SHA1의 크기 20byte로 암호화 요청 메시지의 크기는 총 36byte 인 것을 알 수 있다. 동일한 암호화 알고리즘으로 응답 데이터 크기가 32byte는 NoPadding 방식의 운영모드일 경우 암호화 응답 메시지는 총 52byte가 될 수 있다.In case of using the AES encryption algorithm and HMAC-SHA1, if the requested data size is 15 bytes, the encryption block size is 16 bytes and the size of the HMAC-SHA1 is 20 bytes, and the total size of the encryption request message is 36 bytes. If the response data size is 32 bytes using the same encryption algorithm and the NoPadding mode of operation, the encryption response message can be 52 bytes in total.
도 16은 본 발명의 일실시예에 따른 메시지 헤더의 구조와 KDF 호출 시 인자 설정을 나타낸 도면이다.FIG. 16 is a diagram illustrating the structure of a message header and setting parameters when invoking a KDF according to an embodiment of the present invention.
도 16을 참조하면, 본 발명의 일실시예에 따른 메시지 헤더(42)는 VERSION, OPCODE, PSK ID, NUMBER OF ITERATION, LENGTH OF MAC, LENGTH OF ENCRYPTED 를 포함할 수 있다.Referring to FIG. 16, the
메시지 헤더(42)의 구조는 표 4와 같이 나타낼 수 있다.The structure of the
본 발명의 일실시예에 따른 OPCODE는 표 5과 같이 나타낼 수 있다.OPCODE according to an embodiment of the present invention can be represented as shown in Table 5.
본 발명의 일실시예에 따른 PSK ID는 PSK가 복수개 일 경우 해당 기기의 PSK 식별 고유 값으로 KDF 호출 시 PSK가 선택적으로 사용될 수 있다. PSK 식별 고유 값은 키 관리 서버(100)가 발급할 수 있고, 키 발급 또는 갱신 시 PSK ID가 생성된다. PSK는 해당 기기에 대한 PSK 식별 고유 값으로 다른 기기의 PSK ID와 중복 될 수 있다.PSK ID according to an embodiment of the present invention, when there are a plurality of PSKs, PSK identification unique values of a corresponding device, PSK may be selectively used when calling KDF. The PSK identification unique value may be issued by the
단말 기기(10)는 키 관리 서버(100)에 의해서 최초 PSK가 1개가 주입될 수 있다. 이후, 단말 기기(10)는 키 관리 서버(100)에 직·간접적으로 키를 요청 할 수도 있다. 키의 요청은 생성(Create, Re-Key) 일 수도 있고 등록(Register)일 수도 있다. 이 때, 암호키는 PSK로 다수 개가 존재할 수도 있다. 또한, 키 관리 서버(100)는 PSK를 사전에 여러 개를 생성해서 무작위로 사용 할 수도 있다. One terminal PSK may be injected into the
본 발명의 일실시예에 따른 단말 기기(10) 및 어플리케이션 서버(30)는 메시지 암호화를 위한 KDF 호출 시 반복 횟수(Number of Iteration, i)의 인자를 메시지 헤더(42)에 설정할 수 있다.The
이 때, 반복 횟수(i)는 최소 1024회 이상이 권장될 수 있으며, 매회 호출 시 랜덤으로 생성한 32배수의 반복 횟수 값이 KDF 호출 시 인자로 설정될 수 있다.In this case, a minimum number of repetitions (i) may be recommended at least 1024 times, and a value of 32 times the number of repetitions generated randomly in each call may be set as a factor in the KDF call.
설정된 반복 횟수는 헤더에 32를 나눈값으로 설정될 수 있고, 헤더의 반복 횟수 값(Number of Iteration)에 32를 곱한 값을 KDF 호출 시 인자로 설정될 수도 있다.The set number of repetitions may be set to 32 divided by the header, and a value obtained by multiplying the number of iterations of the header by 32 may be set as a factor when invoking KDF.
본 발명의 일실시예에 따른 Length of MAC 은 MAC의 길이 값에 상응할 수 있다. Length of MAC 의 최소값은 0이며, 값 1은 MAC의 길이가 4byte를 의미하며, 니블 넘버(Nibble Number) 형태로 표현될 수 있다.Length of MAC according to an embodiment of the present invention may correspond to the length value of the MAC. The minimum value of Length of MAC is 0, and a value of 1 means that a length of MAC is 4 bytes and may be expressed in the form of a nibble number.
본 발명의 일실시예에 따른 Length of Encrypted 는 암호화 메시지의 길이 값에 상응할 수 있다. Length of Encrypted 의 최소값은 0이며, 값 1은 암호화 메시지의 길이가 8byte를 의미하며, 니블 넘버(Nibble Number) 형태로 표현될 수 있다.Length of Encrypted according to an embodiment of the present invention may correspond to a length value of an encrypted message. The minimum value of Length of Encrypted is 0, and a value of 1 means that an encrypted message has a length of 8 bytes and may be expressed in the form of a nibble number.
즉, 본 발명의 일실시예에 따른 단말 기기(10) 및 어플리케이션 서버(30)는 메시지 헤더의 VERSION 및 OPCODE의 수행 명령 설정에 따라, 메시지를 통해서 수행 명령을 요청, 검증 및 응답할 수 있다.That is, the
본 발명의 일실시예에 따라 도 17 내지 도 21에서는 단말 기기(10)가 어플리케이션 서버(30)에 키 발급을 요청, 검증, 응답하고 발급 요청한 암호키를 저장하는 수행 명령을 처리하는 과정을 상세히 설명한다.17 to 21 according to an embodiment of the present invention in detail the process of the
도 17은 본 발명의 일실시예에 따른 키 발급 요청 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.17 is a sequence diagram illustrating a method for operating a message encryption key in a key issue request message generation process according to an embodiment of the present invention.
도 17을 참조하면, 본 발명의 일실시예에 따른 키 발급 요청 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 단말 기기(10)가 인증용 개인키 및 검증용 공개키를 이용하여 제1 비밀키(Secret key, Sk)를 생성할 수 있다(S910).Referring to FIG. 17, a method for operating a message encryption key in a key issuance request message generation process according to an embodiment of the present invention may be performed by the
단계(S910)는 단말 기기(10)가 디피-헬만 키 교환(Diffie-Hellman key exchange, DH) 방식을 이용하여 인증용 개인키 및 검증용 공개키로부터 제1 비밀키를 생성할 수 있다.In operation S910, the
단계(S920)는 단말 기기(10)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제1 비밀키 및 사전 공유키로부터 제1 암호키(ENCRYPT KEY) 및 제1 MAC 키(MAC KEY)를 생성할 수 있다.In step S920, the
이 때, 단계(S920)는 단말 기기(10)가 키 유도 함수의 반복 사용 횟수(i)를 메시지 헤더(42)에 설정할 수 있다.At this time, in step S920, the
이 때, 단계(S920)는 메시지 헤더(42)에 VERSION 과 OPCODE를 설정하여 요청하고자 하는 수행 명령을 설정할 수 있다.At this time, step S920 may set the execution command to request by setting the VERSION and OPCODE in the
이 때, 단계(S920)는 키 발급 요청을 위해 메시지 헤더(42)의 VERSION은 0으로 설정할 수 있고, OPCODE는 2:CREATE 로 설정할 수 있다.At this time, in step S920, VERSION of the
단계(S930)는 암호화 메시지가 없어 별도의 암호 처리는 생략될 수 있다.In operation S930, there is no encryption message, so a separate encryption process may be omitted.
단계(S940)는 단말 기기(10)가 제1 MAC 키를 이용하여 단말 식별 정보(41) 및 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제1 MAC 값을 산출할 수 있다.In step S940, the
이 때, 단계(S940)는 도 14에서 설명한 MAC Xor 연산 과정을 수행할 수 도 있다.In this case, step S940 may perform the MAC Xor calculation process described with reference to FIG. 14.
단계(S950)는 단말 기기(10)가 어플리케이션 서버(30)에 메시지 헤더(42)와 함께 제1 MAC 값이 포함된 키 발급 요청 메시지(53)를 전송할 수 있다.In operation S950, the
도 18은 본 발명의 일실시예에 따른 키 발급 요청 메시지 검증 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.18 is a sequence diagram illustrating a method for operating a message encryption key in a key issuance request message verification process according to an embodiment of the present invention.
도 18을 참조하면, 본 발명의 일실시예에 따른 키 발급 요청 메시지 검증 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 어플리케이션 서버(30)가 키 관리 서버(100)에 로그인 할 수 있다(S1010).Referring to FIG. 18, in the method for operating a message encryption key in a key issue request message verification process according to an embodiment of the present invention, the
단계(S1010)는 키 관리 서버(100)에 로그인 하기 이전에, 단말 기기(10) 또는 네트워크 서버(30)로부터 단말 식별 정보(41)를 제공 받을 수 있고, 단말 기기(10)로부터 키 발급 요청 메시지(53)를 수신할 수 있다.Step S1010 may be provided with
단계(S1020)는 어플리케이션 서버(30)가 키 관리 서버(100)에 단말 식별 정보(41)에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.In operation S1020, the
단계(S1030)는 어플리케이션 서버(30)의 키 발급 요청에 따라, 단말 식별 정보에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 제공할 수 있다.In operation S1030, an authentication public key, a verification private key, and a pre-shared key corresponding to the terminal identification information may be provided according to a key issuance request of the
단계(S1040)는 어플리케이션 서버(30)가 인증용 공개키 및 검증용 개인키를 이용하여 제2 비밀키(Secret key, Sk)를 생성할 수 있다.In operation S1040, the
이 때, 단계(S1040)는 어플리케이션 서버(30)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 공개키 및 검증용 개인키로부터 제2 비밀키를 생성할 수 있다.At this time, in step S1040, the
단계(S1050)는 어플리케이션 서버(30)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제2 비밀키 및 사전 공유키로부터 제2 암호키(ENCRYPT KEY) 및 제2 MAC 키(MAC KEY)를 생성할 수 있다.In step S1050, the
이 때, 단계(S1050)는 키 유도 함수 사용을 위해 메시지 헤더(42)에 설정된 키 유도 함수의 반복 사용 횟수(i)를 참조할 수 있다.In this case, step S1050 may refer to the repeated use number i of the key derivation function set in the
이 때, 단계(S1050)는 메시지 헤더(42)에 설정된 VERSION 과 OPCODE를 확인할 수 있다.At this time, step S1050 can check the VERSION and OPCODE set in the
이 때, 단계(S1050)는 메시지 헤더(42)에 설정된 VERSION 과 OPCODE를 확인하여 단말 기기(10)가 요청한 수행 명령을 확인할 수 있다.In this case, in step S1050, the execution command requested by the
이 때, 단계(S1050)는 메시지 헤더(42)에 VERSION은 0, OPCODE는 2:CREATE 로 설정된 것을 확인하고, 메시지가 키 발급 요청 메시지인 것을 확인할 수 있다.In this case, step S1050 may confirm that VERSION is set to 0 and OPCODE is set to 2: CREATE in the
단계(S1060)는 어플리케이션 서버(30)가 제2 MAC 키를 이용하여 단말 기기(10)로부터 수신한 키 발급 요청 메시지(53), 단말 식별 정보(41) 및 상기 키 발급 요청 메시지(53)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제2 MAC 값을 산출할 수 있다.In step S1060, the
단계(S1070)는 어플리케이션 서버(30)가 단말 기기(10)로부터 수신한 제1 MAC 값과 제2 MAC 값을 비교하여 키 발급 요청 메시지(53)를 검증할 수 있다.In operation S1070, the
이 때, 단계(S1070)는 어플리케이션 서버(30)가 제1 MAC 값과 제2 MAC 값의 무결성 검증을 수행한 결과가 실패인 경우, 에러 메시지를 출력할 수 있다.In this case, step S1070 may output an error message when the
이 때, 단계(S1070)는 도 15에서 설명한 패딩 여부 확인 과정을 수행할 수도 있다.At this time, step S1070 may perform the padding check process described in FIG.
단계(S1080)는 어플리케이션 서버(30)가 제1 MAC 값과 제2 MAC 값의 무결성 검증을 수행한 결과가 성공인 경우, 키 발급 요청 메시지(53)의 검증이 성공인 것으로 판단할 수 있고, 키 발급 요청을 수행할 수 있다.In operation S1080, when the result of performing the integrity verification of the first MAC value and the second MAC value by the
도 19는 본 발명의 일실시예에 따른 키 발급 응답 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.19 is a sequence diagram illustrating a method for operating a message encryption key in a key issuing response message generation process according to an embodiment of the present invention.
도 19를 참조하면, 본 발명의 일실시예에 따른 키 발급 응답 메시지 생성 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 어플리케이션 서버(30)가 키 관리 서버(100)에 로그인 할 수 있다(S1110).Referring to FIG. 19, in the method for operating a message encryption key in the process of generating a key issuing response message according to an embodiment of the present invention, the
단계(S1110)는 키 관리 서버(100)에 로그인 하기 이전에, 단말 기기(10) 또는 네트워크 서버(30)로부터 단말 식별 정보(41)를 제공 받을 수 있다.In operation S1110, the
단계(S1120)는 어플리케이션 서버(30)가 키 관리 서버(100)에 발급 요청 암호키, 단말 식별 정보(41)에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 요청할 수 있다.In operation S1120, the
단계(S1130)는 어플리케이션 서버(30)의 키 발급 요청에 따라, 발급 요청 암호키를 생성할 수 있다.Step S1130 may generate an issue request encryption key according to a key issue request of the
단계(S1140)는 어플리케이션 서버(30)의 키 발급 요청에 따라, 발급 요청 암호키, 단말 식별 정보에 상응하는 인증용 공개키, 검증용 개인키 및 사전 공유키를 제공할 수 있다.In operation S1140, the
단계(S1150)는 어플리케이션 서버(30)가 인증용 공개키 및 검증용 개인키를 이용하여 제3 비밀키(Secret key, Sk)를 생성할 수 있다.In operation S1150, the
이 때, 단계(S1150)는 어플리케이션 서버(30)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 공개키 및 검증용 개인키로부터 제3 비밀키를 생성할 수 있다.In this case, in operation S1150, the
단계(S1160)는 어플리케이션 서버(30)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제3 비밀키 및 사전 공유키로부터 제3 암호키(ENCRYPT KEY) 및 제3 MAC 키(MAC KEY)를 생성할 수 있다.In operation S1160, the
이 때, 단계(S1160)는 어플리케이션 서버(30)가 키 유도 함수의 반복 사용 횟수(i)를 메시지 헤더(42)에 설정할 수 있다.At this time, in step S1160, the
이 때, 단계(S1160)는 메시지 헤더(42)에 VERSION 과 OPCODE를 설정하여 요청하고자 하는 수행 명령을 설정할 수 있다.At this time, step S1160 may set the execution command to request by setting the VERSION and OPCODE in the
이 때, 단계(S1160)는 키 발급 요청을 위해 메시지 헤더(42)의 VERSION은 0으로 설정할 수 있고, OPCODE는 2:CREATE 로 설정할 수 있다.At this time, in step S1160, the VERSION of the
단계(S1170)는 어플리케이션 서버(30)가 제3 MAC 키를 이용하여 발급 요청 암호키, 단말 식별 정보(41) 및 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제3 MAC 값을 산출할 수 있다.In step S1170, the
단계(S1180)는 어플리케이션 서버(30)가 제3 암호키를 이용하여 암호 알고리즘(ENCRYPT ALGORITHM)을 통해 발급 요청 암호키를 암호화한 키 발급 응답 메시지(52)를 생성할 수 있다.In operation S1180, the
이 때, 단계(S1180)는 어플리케이션 서버(30)가 제3 암호키로 대칭키 암호 알고리즘을 이용하여 발급 요청 암호키를 암호화할 수 있다.In this case, in step S1180, the
이 때, 단계(S1180)는 어플리케이션 서버(30)가 단말 기기(10)에 메시지 헤더(42), 제3 MAC 값 및 발급 요청 암호키가 포함된 키 발급 응답 메시지(52)를 전송할 수 있다.In this case, in operation S1180, the
도 20은 본 발명의 일실시예에 따른 키 발급 응답 메시지 검증 및 암호키 저장 과정에서의 메시지 암호키 운용을 위한 방법을 나타낸 시퀀스 다이어그램이다.20 is a sequence diagram illustrating a method for operating a message encryption key in a key issuance response message verification and encryption key storage process according to an embodiment of the present invention.
도 20을 참조하면, 본 발명의 일실시예에 따른 키 발급 응답 메시지 검증 및 암호키 저장 과정에서의 메시지 암호키 운용을 위한 방법은 먼저 단말 기기(10)가 어플리케이션 서버(30)로부터 발급 요청 암호키를 암호화한 키 발급 응답 메시지(52)를 수신할 수 있다(S1210).Referring to FIG. 20, a method for operating a message encryption key in a key issuance response message verification and encryption key storing process according to an embodiment of the present invention may first be a request for encryption from an
단계(1210)는 단말 기기(10)가 인증용 개인키 및 검증용 공개키를 이용하여 제4 비밀키(Secret key, Sk)를 생성할 수 있다.In operation 1210, the
이 때, 단계(S1210)는 단말 기기(10)가 디피-헬만 키 교환 방식(Diffie-Hellman key exchange, DH)을 이용하여 인증용 개인키 및 검증용 공개키로부터 제4 비밀키를 생성할 수 있다.In this case, in step S1210, the
단계(S1220)는 단말 기기(10)가 키 유도 함수(Key Derivation Function, KDF)를 이용하여 제4 비밀키 및 사전 공유키로부터 제4 암호키(ENCRYPT KEY) 및 제4 MAC 키(MAC KEY)를 생성할 수 있다.In step S1220, the
이 때, 단계(S1220)는 키 유도 함수 사용을 위해 메시지 헤더(42)에 설정된 키 유도 함수의 반복 사용 횟수(i)를 참조할 수 있다.In this case, step S1220 may refer to the repeated use number i of the key derivation function set in the
이 때, 단계(S1220)는 메시지 헤더(42)에 설정된 VERSION 과 OPCODE를 확인할 수 있다.At this time, step S1220 may check VERSION and OPCODE set in the
이 때, 단계(S1220)는 메시지 헤더(42)에 설정된 VERSION 과 OPCODE를 확인하여 단말 기기(10)가 요청한 수행 명령을 확인할 수 있다.At this time, step S1220 may check the VERSION and OPCODE set in the
이 때, 단계(S1220)는 메시지 헤더(42)에 VERSION은 0, OPCODE는 2:CREATE 로 설정된 것을 확인하고, 메시지가 키 발급 요청 메시지에 대한 키 발급 응답 메시지인 것을 확인할 수 있다.In this case, step S1220 may verify that VERSION is set to 0 and OPCODE is set to 2: CREATE in the
단계(S1230)는 단말 기기(10)가 제4 MAC 키를 이용하여 어플리케이션 서버(30)로부터 수신한 키 발급 응답 메시지(52), 단말 식별 정보(41) 및 상기 키 발급 응답 메시지(52)의 메시지 헤더(42)를 MAC 알고리즘(MAC ALGORITHM)을 통해 MAC(Message Authentication Code) 연산하여 제4 MAC 값을 산출할 수 있다.In step S1230, the
단계(S1240)는 단말 기기(10)가 어플리케이션 서버(30)로부터 수신한 제3 MAC 값과 제4 MAC 값을 비교하여 암호화 메시지(52)를 검증할 수 있다.In operation S1240, the
이 때, 단계(S1240)는 단말 기기(10)가 제3 MAC 값과 제4 MAC 값의 무결성 검증을 수행한 결과가 실패인 경우, 에러 메시지를 출력할 수 있다.In this case, step S1240 may output an error message if the
이 때, 단계(S1240)는 도 15에서 설명한 패딩 여부 확인 과정을 수행할 수도 있다.At this time, step S1240 may perform the padding check process described in FIG.
단계(S1250)는 단말 기기(10)가 제3 MAC 값과 제4 MAC 값의 무결성 검증을 수행한 결과가 성공인 경우, 키 발급 응답 메시지(52)의 검증이 성공인 것으로 판단할 수 있고, 제4 암호키를 이용하여 키 발급 응답 메시지(52)를 복호화할 수 있다.In operation S1250, when the
이 때, 단계(S1250)는 키 발급 응답 메시지(52)를 복호화하여 발급 요청 암호키(61)를 획득 할 수 있고, 발급 요청 암호키(61)를 단말 키 저장부(13)의 안전 영역의 사전 공유키 식별자를 지정하여 PSK POOL에 저장할 수 있다.At this time, step S1250 may decrypt the key
도 21은 본 발명의 일실시예에 따른 PSK를 메시지 헤더에 설정하는 것을 나타낸 도면이다.21 is a diagram illustrating setting a PSK in a message header according to an embodiment of the present invention.
도 21을 참조하면, 본 발명의 일실시예에 따른 단말 기기(10)는 단말 키 저장부(13)에 저장된 발급 요청 암호키(61)를 사전 공유키로 사용할 수 있다.Referring to FIG. 21, the
이 때, 단말 기기(10)는 발급 요청 암호키(61)를 KDF 수행을 위한 사전 공유키로 사용할 수 있다.In this case, the
이 때, 단말 기기(10)는 사용된 PSK의 개별 ID를 메시지 헤더(42)의 'PSK ID'로 설정할 수 있다.At this time, the
도 22은 본 발명의 일실시예에 따른 컴퓨터 시스템을 나타낸 도면이다.22 illustrates a computer system according to an embodiment of the present invention.
도 22을 참조하면, 본 발명의 일실시예에 따른 단말 기기(10), 네트워크 서버(20) 및 어플리케이션 서버(30)는 컴퓨터로 읽을 수 있는 기록매체와 같은 컴퓨터 시스템(1100)에서 구현될 수 있다. 도 22에 도시된 바와 같이, 컴퓨터 시스템(1100)은 버스(1120)를 통하여 서로 통신하는 하나 이상의 프로세서(1110), 메모리(1130), 사용자 인터페이스 입력 장치(1140), 사용자 인터페이스 출력 장치(1150) 및 스토리지(1160)를 포함할 수 있다. 또한, 컴퓨터 시스템(1100)은 네트워크(1180)에 연결되는 네트워크 인터페이스(1170)를 더 포함할 수 있다. 프로세서(1110)는 중앙 처리 장치 또는 메모리(1130)나 스토리지(1160)에 저장된 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(1130) 및 스토리지(1160)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예를 들어, 메모리는 ROM(1131)이나 RAM(1132)을 포함할 수 있다.Referring to FIG. 22, the
이상에서와 같이 본 발명에 따른 IoT 환경에서 기기 인증키를 활용한 메시지 암호키 운용을 위한 단말 기기, 서버, 시스템 및 방법은 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.As described above, a terminal device, a server, a system, and a method for operating a message encryption key using a device authentication key in an IoT environment according to the present invention may be limitedly applied to the configuration and method of the embodiments described above. Rather, the embodiments may be configured by selectively combining all or part of the embodiments so that various modifications can be made.
10: 단말 기기
11: 단말 통신부
12: 단말 키 관리부
13: 단말 키 저장부
20: 네트워크 서버
30: 어플리케이션 서버
31: 서버 통신부
32: 서버 암호화부
100: 키 관리 서버
110: 통신부
120: 키 관리부
130: 키 저장부
41: 단말 식별 정보
42: 메시지 헤더
51: 메시지
52: 암호화 메시지
53: MAC
1100: 컴퓨터 시스템
1110: 프로세서
1120: 버스
1130: 메모리
1131: 롬
1132: 램
1140: 사용자 인터페이스 입력 장치
1150: 사용자 인터페이스 출력 장치
1160: 스토리지
1170: 네트워크 인터페이스
1180: 네트워크10: terminal device 11: terminal communication unit
12: terminal key management unit 13: terminal key storage unit
20: network server 30: application server
31: server communication unit 32: server encryption unit
100: key management server 110: communication unit
120: key management unit 130: key storage unit
41: terminal identification information 42: message header
51: Message 52: Encrypted Message
53: MAC
1100: computer system 1110: processor
1120: bus 1130: memory
1131: Romans 1132: Ram
1140: user interface input device
1150: user interface output device
1160: storage 1170: network interface
1180: network
Claims (20)
상기 단말 기기가, 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받고, 키 관리 서버가, 검증용 키 페어를 생성하는 단계;
상기 단말 기기가, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 요청 메시지를 암호화하는 단계; 및
어플리케이션 서버가, 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 상기 요청 메시지를 복호화하는 단계;
를 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.In the method using a terminal device, a server and a system for operating a message encryption key,
Generating, by the terminal device, an authentication key pair or receiving the authentication key pair generated by using an information injection program of a network server, and generating, by the key management server, a key pair for verification;
Encrypting, by the terminal device, a request message using an authentication private key of the authentication key pair and a verification public key of the verification key pair; And
Decrypting, by an application server, the request message using the authentication public key of the authentication key pair and the verification private key of the verification key pair;
Method for operating a message encryption key comprising a.
상기 메시지 암호키 운용을 위한 방법은
상기 어플리케이션 서버가, 상기 인증용 공개키 및 상기 검증용 개인키를 이용하여 상기 요청 메시지에 대한 응답 메시지를 암호화하는 단계; 및
상기 단말 기기가, 상기 인증용 개인키 및 상기 검증용 공개키를 이용하여 상기 응답 메시지를 복호화하는 단계;
를 더 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 1,
Method for operating the message encryption key is
Encrypting, by the application server, a response message to the request message using the authentication public key and the verification private key; And
Decrypting, by the terminal device, the response message using the authentication private key and the verification public key;
Method for operating a message encryption key, characterized in that it further comprises.
상기 생성하는 단계는
상기 단말 기기가, 상기 인증용 공개키 및 상기 단말 기기의 단말 식별 정보를 상기 키 관리 서버에 송신하고,
상기 키 관리 서버가, 사전 공유키를 생성하여, 상기 검증용 공개키 및 상기 사전 공유키를 상기 단말 기기에 송신하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 2,
The generating step
The terminal device transmits the authentication public key and terminal identification information of the terminal device to the key management server,
And the key management server generates a pre-shared key and transmits the verification public key and the pre-shared key to the terminal device.
상기 생성하는 단계는
상기 단말 기기가, 상기 인증용 개인키, 상기 검증용 공개키, 상기 단말 식별 정보 및 상기 사전 공유키를 저장하고,
상기 키 관리 서버가, 상기 인증용 공개키, 상기 검증용 개인키, 상기 단말 식별 정보 및 상기 사전 공유키를 저장하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 3,
The generating step
The terminal device stores the authentication private key, the verification public key, the terminal identification information, and the pre-shared key,
And the key management server stores the authentication public key, the verification private key, the terminal identification information, and the pre-shared key.
상기 요청 메시지를 암호화하는 단계는
상기 단말 기기가, 디피-헬만 키 교환(Diffie-Hellman key exchange) 방식을 이용하여 상기 인증용 개인키 및 상기 검증용 공개키로부터 제1 비밀키를 생성하고,
상기 요청 메시지를 복호화하는 단계는
상기 어플리케이션 서버가, 디피-헬만 키 교환 방식을 이용하여 상기 인증용 공개키 및 상기 검증용 개인키로부터 제2 비밀키를 생성하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 4,
Encrypting the request message
The terminal device generates a first secret key from the authentication private key and the verification public key by using a Diffie-Hellman key exchange method,
Decrypting the request message
And the application server generates a second secret key from the authentication public key and the verification private key by using a diff-Hellman key exchange scheme.
상기 요청 메시지를 암호화하는 단계는
상기 단말 기기가, 키 유도 함수(Key derivation function)를 이용하여 상기 제1 비밀키 및 상기 사전 공유키로부터 제1 암호키 및 제1 MAC 키를 생성하고,
상기 요청 메시지를 복호화하는 단계는
상기 어플리케이션 서버가, 상기 키 유도 함수를 이용하여 상기 제2 비밀키 및 상기 사전 공유키로부터 제2 암호키 및 제2 MAC 키를 생성하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 5,
Encrypting the request message
The terminal device generates a first encryption key and a first MAC key from the first secret key and the pre-shared key by using a key derivation function,
Decrypting the request message
And the application server generates a second encryption key and a second MAC key from the second secret key and the pre-shared key using the key derivation function.
상기 요청 메시지를 암호화하는 단계는
상기 단말 기기가, 상기 제1 암호키를 이용하여 상기 요청 메시지를 암호화한 암호화 메시지를 생성하고, 상기 제1 MAC 키를 이용하여 상기 암호화 메시지, 상기 단말 식별 정보 및 상기 암호화 메시지의 메시지 헤더를 MAC(Message Authentication Code) 연산하여 제1 MAC 값을 산출하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 6,
Encrypting the request message
The terminal device generates an encrypted message encrypting the request message using the first encryption key, and uses the first MAC key to convert the encrypted message, the terminal identification information, and the message header of the encrypted message. And a first MAC value by calculating a Message Authentication Code.
상기 요청 메시지를 복호화하는 단계는
상기 어플리케이션 서버가, 상기 제2 MAC 키를 이용하여 상기 단말 기기로부터 수신한 상기 암호화 메시지, 상기 단말 식별 정보 및 상기 암호화 메시지의 메시지 헤더를 MAC 연산하여 제2 MAC 값을 산출하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 7,
Decrypting the request message
And wherein the application server calculates a second MAC value by MAC computing the message header of the encrypted message, the terminal identification information, and the encrypted message received from the terminal device using the second MAC key. Method for cryptographic key operation.
상기 요청 메시지를 복호화하는 단계는
상기 어플리케이션 서버가, 상기 단말 기기로부터 수신한 상기 제1 MAC 값과 상기 제2 MAC 값을 비교하여 상기 암호화 메시지를 검증하고, 상기 제2 암호키를 이용하여 상기 암호화 메시지를 복호화하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 8,
Decrypting the request message
The application server compares the first MAC value and the second MAC value received from the terminal device to verify the encrypted message, and decrypts the encrypted message using the second encryption key. Method for operating the message encryption key.
상기 요청 메시지를 복호화하는 단계는
상기 제1 MAC 값과 상기 제2 MAC 값을 Xor 연산하여 상기 암호화 메시지의 패딩 존재 여부를 확인하고, 상기 패딩 존재 여부에 따라 상기 암호화 메시지를 복호화 후, 패딩 처리하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 9,
Decrypting the request message
Xor operation on the first MAC value and the second MAC value to determine whether there is a padding of the encrypted message, decrypts the encrypted message according to the presence of the padding, and then performs padding processing. Way for you.
상기 단말 기기가, 인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받고, 키 관리 서버가, 검증용 키 페어를 생성하는 단계;
상기 단말 기기가, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 수행 명령을 포함하는 요청 메시지를 생성하는 단계; 및
어플리케이션 서버가, 상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 수행 명령을 포함하는 요청 메시지를 검증하는 단계;
를 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.In the method using a terminal device, a server and a system for operating a message encryption key,
Generating, by the terminal device, an authentication key pair or receiving the authentication key pair generated by using an information injection program of a network server, and generating, by the key management server, a key pair for verification;
Generating, by the terminal device, a request message including an execution command using an authentication private key of the authentication key pair and a verification public key of the verification key pair; And
Verifying, by an application server, a request message including an execution command using an authentication public key of the authentication key pair and a verification private key of the verification key pair;
Method for operating a message encryption key comprising a.
상기 메시지 암호키 운용을 위한 방법은
상기 어플리케이션 서버가, 상기 메시지의 검증이 성공인 경우, 수행 명령을 처리하고, 상기 수행 명령에 대한 응답 메시지를 생성하는 단계; 및
상기 단말 기기가, 상기 응답 메시지를 검증하고, 상기 응답 메시지의 검증이 성공인 경우, 상기 응답 메시지를 복호화하여 상기 수행 명령을 처리하는 단계;
를 더 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 11,
Method for operating the message encryption key is
Processing, by the application server, the execution command when the verification of the message is successful, and generating a response message to the execution command; And
Verifying, by the terminal device, the response message and processing the execution command by decoding the response message when the verification of the response message is successful;
Method for operating a message encryption key, characterized in that it further comprises.
상기 요청 메시지를 생성하는 단계는
상기 단말 기기가, 디피-헬만 키 교환(Diffie-Hellman key exchange) 방식을 이용하여 상기 인증용 개인키 및 상기 검증용 공개키로부터 제1 비밀키를 생성하고,
상기 요청 메시지를 검증하는 단계는
상기 어플리케이션 서버가, 디피-헬만 키 교환방식을 이용하여 상기 인증용 공개키 및 상기 검증용 개인키로부터 제2 비밀키를 생성하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 12,
Generating the request message
The terminal device generates a first secret key from the authentication private key and the verification public key by using a Diffie-Hellman key exchange method,
Verifying the request message
And the application server generates a second secret key from the authentication public key and the verification private key using a diff-Hellman key exchange scheme.
상기 요청 메시지를 생성하는 단계는
상기 단말 기기가, 키 유도 함수(Key derivation function)를 이용하여 상기 제1 비밀키 및 상기 키 관리 서버가 생성한 사전 공유키로부터 제1 암호키 및 제1 MAC 키를 생성하고,
상기 요청 메시지를 검증하는 단계는
상기 어플리케이션 서버가, 상기 키 유도 함수를 이용하여 상기 제2 비밀키 및 상기 사전 공유키로부터 제2 암호키 및 제2 MAC 키를 생성하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 13,
Generating the request message
The terminal device generates a first encryption key and a first MAC key from a first shared key generated by the first secret key and the key management server using a key derivation function;
Verifying the request message
And the application server generates a second encryption key and a second MAC key from the second secret key and the pre-shared key using the key derivation function.
상기 요청 메시지를 생성하는 단계는
상기 요청 메시지의 메시지 헤더에 수행 명령의 요청을 설정하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 14,
Generating the request message
And setting a request for an execution command in a message header of the request message.
상기 요청 메시지를 검증하는 단계는
상기 요청 메시지의 메시지 헤더에 포함된 수행 명령을 확인하여 상기 수행 명령의 요청을 처리하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 15,
Verifying the request message
And processing the request of the execution command by checking the execution command included in the message header of the request message.
상기 응답 메시지를 생성하는 단계는
상기 어플리케이션 서버가 상기 제2 암호키를 이용하여 상기 수행 명령을 요청한 결과를 암호화하여 상기 응답 메시지를 생성하고,
상기 수행 명령을 처리하는 단계는
상기 응답 메시지의 검증이 성공인 경우, 상기 단말 기기가, 상기 제1 암호키를 이용하여 상기 응답 메시지를 복호화하여 상기 수행 명령을 요청한 결과를 처리하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 16,
Generating the response message
The application server encrypts the result of requesting the execution command using the second encryption key to generate the response message.
Processing the execution command
And if the verification of the response message is successful, the terminal device processes a result of requesting the execution command by decrypting the response message using the first encryption key.
상기 수행 명령을 처리하는 단계는
상기 수행 명령이 키 발급 요청인 경우, 상기 응답 메시지를 복호화하여 획득한 발급 요청 암호키를 상기 키 유도 함수에 사용되도록 사전 공유키 식별자를 지정하여 사전 공유키로 저장하는 것을 특징으로 하는 메시지 암호키 운용을 위한 방법.The method according to claim 17,
Processing the execution command
If the execution command is a key issuance request, the message encryption key operation characterized in that the issuance request encryption key obtained by decrypting the response message is designated as a pre-shared key identifier for use in the key derivation function and stored as a pre-shared key. Way for you.
인증용 키 페어를 생성하거나 네트워크 서버의 정보 주입 프로그램을 이용하여 생성된 상기 인증용 키 페어를 전달 받아, 상기 인증용 키 페어의 인증용 개인키 및 상기 검증용 키 페어의 검증용 공개키를 이용하여 요청 메시지를 암호화하는 단말 기기; 및
상기 인증용 키 페어의 인증용 공개키 및 상기 검증용 키 페어의 검증용 개인키를 이용하여 상기 요청 메시지를 복호화하는 어플리케이션 서버;
를 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 시스템.A key management server generating a key pair for verification;
Generate an authentication key pair or receive the authentication key pair generated using an information injection program of a network server, and use the authentication private key of the authentication key pair and the verification public key of the verification key pair. A terminal device for encrypting the request message; And
An application server for decrypting the request message using an authentication public key of the authentication key pair and a verification private key of the verification key pair;
System for message encryption key operation comprising a.
상기 인증용 공개키 및 상기 검증용 개인키를 이용하여 상기 요청 메시지를복호화하는 서버 암호화부;
를 포함하는 것을 특징으로 하는 메시지 암호키 운용을 위한 어플리케이션 서버.
The authentication private key of the authentication key pair and the public key for verification of the verification key pair are generated from the terminal device that has received the authentication key pair generated by generating an authentication key pair or using an information injection program of a network server. A server communication unit configured to receive an encrypted request message using an encryption key, and to receive an authentication public key of the authentication key pair and a verification private key of the verification key pair from a key management server generating a verification key pair; And
A server encryption unit for decrypting the request message using the authentication public key and the verification private key;
Application server for operating a message encryption key comprising a.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170183220 | 2017-12-28 | ||
KR20170183220 | 2017-12-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20190133972A true KR20190133972A (en) | 2019-12-04 |
Family
ID=69004299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180059029A KR20190133972A (en) | 2017-12-28 | 2018-05-24 | TERMMINAL DEVICE, SERVER, SYSTEM AND METHOD FOR OPERATING MESSAGE ENCRYPTION KEY USING DEVICE AUTHENTICATION KEY IN IoT ENVIRONMENT |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20190133972A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112989370A (en) * | 2021-02-09 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Secret key filling method, system, device, equipment and storage medium |
CN113099443A (en) * | 2019-12-23 | 2021-07-09 | 阿里巴巴集团控股有限公司 | Equipment authentication method, device, equipment and system |
-
2018
- 2018-05-24 KR KR1020180059029A patent/KR20190133972A/en not_active Application Discontinuation
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113099443A (en) * | 2019-12-23 | 2021-07-09 | 阿里巴巴集团控股有限公司 | Equipment authentication method, device, equipment and system |
CN112989370A (en) * | 2021-02-09 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Secret key filling method, system, device, equipment and storage medium |
CN112989370B (en) * | 2021-02-09 | 2023-06-30 | 腾讯科技(深圳)有限公司 | Key filling method, system, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9197411B2 (en) | Protocol and method for client-server mutual authentication using event-based OTP | |
EP1387236B1 (en) | Key management system and method for secure data transmission | |
JP5815294B2 (en) | Secure field programmable gate array (FPGA) architecture | |
US8245039B2 (en) | Extensible authentication protocol authentication and key agreement (EAP-AKA) optimization | |
JP5307191B2 (en) | System and method for secure transaction of data between a wireless communication device and a server | |
US9491174B2 (en) | System and method for authenticating a user | |
US20170244687A1 (en) | Techniques for confidential delivery of random data over a network | |
JP6764753B2 (en) | Systems and methods for efficient and confidential symmetric encryption on channels with limited bandwidth | |
US10171235B2 (en) | User-initiated migration of encryption keys | |
US20190280858A1 (en) | Key exchange schemes with addressable elements | |
CN105721153B (en) | Key exchange system and method based on authentication information | |
CN111052672A (en) | Secure key transfer protocol without certificate or pre-shared symmetric key | |
CN108599926B (en) | HTTP-Digest improved AKA identity authentication system and method based on symmetric key pool | |
CN110087240B (en) | Wireless network security data transmission method and system based on WPA2-PSK mode | |
JP2012235214A (en) | Encryption communication device and encryption communication system | |
US10630466B1 (en) | Apparatus and method for exchanging cryptographic information with reduced overhead and latency | |
Noh et al. | Secure authentication and four-way handshake scheme for protected individual communication in public wi-fi networks | |
KR102219086B1 (en) | HMAC-based source authentication and secret key sharing method and system for Unnamed Aerial vehicle systems | |
KR20190133972A (en) | TERMMINAL DEVICE, SERVER, SYSTEM AND METHOD FOR OPERATING MESSAGE ENCRYPTION KEY USING DEVICE AUTHENTICATION KEY IN IoT ENVIRONMENT | |
US20240113885A1 (en) | Hub-based token generation and endpoint selection for secure channel establishment | |
CN116132043B (en) | Session key negotiation method, device and equipment | |
CN114208109A (en) | Method for establishing secure data communication for a processing device, trust module for generating a cryptographic key, and field device | |
US20220345298A1 (en) | Systems and methods for providing signatureless, confidential and authentication of data during handshake for classical and quantum computing environments | |
KR101451163B1 (en) | System and method for access authentication for wireless network | |
KR20210009565A (en) | Method, apparatus and system for performing authentication using face recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E601 | Decision to refuse application |