KR102020898B1 - Session key establishment method based on trusted execution environment - Google Patents

Session key establishment method based on trusted execution environment Download PDF

Info

Publication number
KR102020898B1
KR102020898B1 KR1020180132352A KR20180132352A KR102020898B1 KR 102020898 B1 KR102020898 B1 KR 102020898B1 KR 1020180132352 A KR1020180132352 A KR 1020180132352A KR 20180132352 A KR20180132352 A KR 20180132352A KR 102020898 B1 KR102020898 B1 KR 102020898B1
Authority
KR
South Korea
Prior art keywords
session key
timestamp
key
control device
telematics control
Prior art date
Application number
KR1020180132352A
Other languages
Korean (ko)
Inventor
이종혁
이성범
Original Assignee
상명대학교 천안산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 상명대학교 천안산학협력단 filed Critical 상명대학교 천안산학협력단
Priority to KR1020180132352A priority Critical patent/KR102020898B1/en
Application granted granted Critical
Publication of KR102020898B1 publication Critical patent/KR102020898B1/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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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/006Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving public key infrastructure [PKI] trust models
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/32Cryptographic 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/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • 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/32Cryptographic 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/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to a method for establishing an encryption session key between a first device and a second device of an infotainment system including a trusted execution environment. The method comprises: a step in which a first device and a second device transmit a cryptogram encrypted with a private key of a public key infrastructure and a plain text, respectively, and a device that receives the cryptogram performs mutual authentication by decrypting the cryptogram with the other party′s public key and comparing the decrypted cryptogram with the plain text; a step in which the second device generates a first session key to be used for encryption communication between security areas of a trusted execution environment and a second session key to be used for encryption communication between general areas of the trusted execution environment based on information transmitted from the first device and information about the second device, and divides a security area of the first device; and a step in which the first device and the second device that establish the session key for the encryption communication between security areas of the first and second devices transmit the second session key to a general area of each device so as to establish a session key for encryption communication between the general areas. According to the present invention, a session key is established using a public key-based key exchange algorithm, and thus, communication between devices can be performed in a safe manner.

Description

신뢰 실행 환경 기반 세션키 수립 방법{SESSION KEY ESTABLISHMENT METHOD BASED ON TRUSTED EXECUTION ENVIRONMENT}SESSION KEY ESTABLISHMENT METHOD BASED ON TRUSTED EXECUTION ENVIRONMENT}

암호화 통신을 위한 세션키 수립 방법에 관한 것으로, 보다 상세하게는 신뢰 실행 환경(Trusted Execution Environment) 기반의 인포테인먼트 장치 사이에 암호화 세션키를 수립하는 방법에 대한 발명이 개시된다.The present invention relates to a method for establishing a session key for encrypted communication, and more particularly, to a method for establishing an encrypted session key between an infotainment device based on a trusted execution environment.

최근 차량과 IT 기술 간 융합이 가속화 되면서 스마트 카와 관련된 기술이 발전하고 있다. 스마트 카 기술 중 하나인 인포테인먼트(Infotainment) 기술들이 활발히 연구되고 있으며, 인포테인먼트 시스템을 탑재한 차량의 수도 점차적으로 증가하고 있다. Recently, as the convergence between vehicle and IT technology is accelerated, the technology related to smart car is developing. Infotainment, one of the smart car technologies, is being actively researched, and the number of vehicles equipped with the infotainment system is gradually increasing.

인포테인먼트는 정보(Information)와 오락(Entertainment)의 합성어로 차량 내에서 차량의 정보(예, 타이어 공기압, 엔진 온도 등)와 오락(예, 영화, 음악)을 한번에 즐길 수 있는 시스템이다. 차량 인포테인먼트 기술은 GENIVI에서 표준화를 진행 하였다. Infotainment is a compound word of information and entertainment. It is a system that can enjoy information (for example, tire pressure, engine temperature, etc.) and entertainment (for example, movies and music) of a vehicle at a time. Vehicle infotainment technology was standardized by GENIVI.

인포테인먼트 시스템에서 주요한 요소는 HMI(Human Machine Interface)와 TCU(Telematics Control Unit)가 있다. TCU는 차량의 내부와 외부의 통신을 중재하는 장비이고, HMI는 사용자들이 차량 인포테인먼트를 활용할 수 있도록 하는 장비이다. 인포테인먼트 시스템에 새로운 장치가 연결되기 위해서는 TCU를 통해 연결이 가능하다. 연결된 장치들은 인포테인먼트 시스템에서 할당한 서비스만 이용할 수 있게 된다. 장치가 할당된 서비스 이외의 서비스를 이용하게 되면 차량의 정보를 악용하여 차량의 사고를 유발할 수 있게 된다. The main elements of an infotainment system are the Human Machine Interface (HMI) and Telematics Control Unit (TCU). The TCU is a device that mediates the communication between the inside and the outside of the vehicle. The HMI is a device that allows users to utilize the vehicle infotainment. To connect new devices to the infotainment system, they can be connected via the TCU. The connected devices will only be able to use the services assigned by the infotainment system. If the device uses a service other than the assigned service, the information of the vehicle may be abused to cause an accident of the vehicle.

이러한 인포테인먼트 기술은 추가적인 장치를 차량에 연결하여 서비스를 확장하여 사용할 수 있다. 시스템에 연결된 다수의 장치들은 각 장치별 할당된 서비스들을 제공받게 된다. 그러나 인포테인먼트 시스템의 취약점들이 계속해서 알려지고 있으며, 최근에는 공격자가 인포테인먼트 시스템을 장악하여 핸들 조작이 가능함을 시연하기도 하였다. 이 시연은 차량 내부 통신과정에서의 안전하지 않은 세션을 통해 차량 핸들을 조작하는 것이 가능함을 보여주었다. 차량 내에서 인포테인먼트 시스템의 역할이 커지고 있고 이에 따른 보안성도 커져야 필요성이 대두되고 있다.This infotainment technology can be used to extend additional services by connecting additional devices to the vehicle. Multiple devices connected to the system are provided with services allocated to each device. However, vulnerabilities in infotainment systems continue to be known, and recently, attackers have demonstrated that they can manipulate handles by taking control of the infotainment system. This demonstration showed that it is possible to handle the vehicle steering wheel through an insecure session during in-vehicle communication. The role of infotainment systems in the vehicle is growing, and the security needs to be increased accordingly.

본 발명의 목적은 차량에 설치된 인포테인먼트 시스템의 신뢰 실행 환경 기반을 포함하는 장치 간에 안전하게 통신할 수 있는 방법을 제공함에 있다.SUMMARY OF THE INVENTION An object of the present invention is to provide a method for securely communicating between devices including a reliable execution environment base of an infotainment system installed in a vehicle.

과제를 해결하기 위한 일 양상에 따른 신뢰 실행 환경을 포함하는 인포테인먼트 시스템의 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of establishing an encrypted session key between a first device and a second device of an infotainment system including a trusted execution environment, wherein the first device requests authentication, and the second device includes a first request. Authenticating the device, requesting the session key by the first device, decrypting the cipher text by the second device, generating the first session key by the second device, and generating the second device by the second device. Generating a session key; distributing the session key by the second device; acquiring the session key by the first device; and passing the session key to the general area by the first device and the second device; Include.

제1 장치가 인증을 요청하는 단계는 제1 장치가 장치 인증에 필요한 정보를 가진 평문을 제1 개인키로 암호화하여 생성한 제1 암호문을 평문과 함께 제2 장치로 전송하여 인증을 요청하는 단계이다.The first device requesting authentication is a step in which the first device transmits a first cipher text generated by encrypting a plain text having information necessary for device authentication with a first private key to the second device along with the plain text to request authentication. .

제2 장치가 제1 장치를 인증하는 단계는 제2 장치가 제1 암호문을 제1 공개키로 복호화하여 획득한 평문과 제1 암호문과 함께 수신된 평문을 비교하여 해당 인증 요청을 제1 장치가 전송했음을 인증하는 단계이다.In the second device authenticating the first device, the first device compares the plain text obtained by decrypting the first cipher text with the first public key and the plain text received together with the first cipher text, and transmits the corresponding authentication request to the first device. This step is to authenticate.

제1 장치가 세션키를 요청하는 단계는 제1 장치가 세션키 생성에 사용될 제1 장치 관련 정보를 가진 평문을 제2 공개키로 암호화하여 생성한 제3 암호문을 평문과 함께 제2 장치로 전송하여 세션키를 요청하는 단계이다.The requesting of the session key by the first device may include transmitting a third ciphertext, which is generated by encrypting the plain text having the first device-related information to be used for generating the session key with the second public key, together with the plain text to the second device. This step is to request a session key.

제2 장치가 암호문을 복호화하는 단계는 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 세션키 생성에 사용될 제1 장치 관련 정보를 획득하는 단계이다.The decrypting the cipher text by the second device is a step in which the second device decrypts the third cipher text with the second private key to obtain first device related information to be used for generating the session key.

제2 장치가 제1 세션키를 생성하는 단계는 제2 장치가 복호화하여 획득한 제1 장치 관련 정보와 제2 장치 관련 정보를 조합하여 생성한 평문을 암호화 해시하여 제1 세션키를 생성하는 단계이다.The generating of the first session key by the second device includes generating a first session key by encrypting and hashing the plain text generated by combining the first device-related information and the second device-related information obtained by decrypting the second device. to be.

제2 장치가 제2 세션키를 생성하는 단계는 제2 장치가 복호화하여 획득한 제1 장치 관련 정보와 제2 장치 관련 정보를 조합하여 생성한 평문을 암호화 해시하여 제2 세션키를 생성하는 단계이다.The generating of the second session key by the second device includes generating a second session key by encrypting and hashing the plain text generated by combining the first device-related information and the second device-related information obtained by decrypting the second device. to be.

제2 장치가 세션키를 분배하는 단계는 제2 장치가 제1 세션키와 제2 세션키를 제1 공개키로 암호화한 제4 암호문을 제1 장치로 전송하여 세션키를 분배하는 단계이다.The distributing of the session key by the second device may include distributing the session key by transmitting a fourth cipher text obtained by encrypting the first session key and the second session key with the first public key to the first device.

제1 장치가 세션키를 획득하는 단계는 제1 장치가 제4 암호문을 제1 개인키로 복호화하여 제1 세션키 및 제2 세션키를 획득하는 단계이다.The acquiring of the session key by the first device may include acquiring the first session key and the second session key by decrypting the fourth cipher text with the first private key.

제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계는 제1 장치 및 제2 장치가 제2 세션키를 자신의 신뢰 실행 환경의 일반 영역(Non-Secure World)에 전달하는 단계이다.The first device and the second device passing the session key to the general area is the first device and the second device passing the second session key to the non-secure world of its trusted execution environment. .

발명의 추가적 양상에 따르면 신뢰 실행 환경을 포함하는 인포테인먼트 시스템의 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치 또는 제2 장치는 상대방 장치의 인증서를 인증기관의 공개키로 검증하는 단계를 더 포함할 수 있고, 장치 간에 교환되는 메시지에 타임스탬프를 삽입하여 메시지 전송 지연 시간을 계산하여 메시지 유효성을 검증하는 단계를 더 포함할 수도 있다.According to a further aspect of the present invention, a method for establishing an encryption session key between a first device and a second device of an infotainment system including a trusted execution environment includes verifying a certificate of a counterpart device with a public key of a certificate authority. The method may further include a step of inserting a time stamp into a message exchanged between devices, calculating a message transmission delay time, and further including validating the message.

본 발명에 의하면 차량에 설치된 인포테인먼트 시스템의 장치가 신뢰 실행 환경을 기반으로 하여 Secure Storage, RoT, Secure Boot 등을 활용하여 펌웨어를 관리하고, 공개키 기반의 키 교환 알고리즘을 사용하여 세션키를 수립하므로 장치 간에 안전하게 통신할 수 있는 효과를 달성할 수 있다.According to the present invention, a device of an infotainment system installed in a vehicle manages firmware using Secure Storage, RoT, Secure Boot, etc. based on a trusted execution environment, and establishes a session key using a public key based key exchange algorithm. The effect of secure communication between devices can be achieved.

도 1은 일 양상에 따른 장치에 포함된 신뢰 실행 환경의 기본 구조를 도시한 것이다.
도 2는 일 실시 예에 따른 제1 장치와 제2 장치의 세션키 수립 절차를 도시한 것이다.
도 3은 또 다른 실시 예에 따른 제1 장치와 제2 장치의 세션키 수립 절차를 도시한 것이다.
도 4는 또 다른 실시 예에 따라 제1 장치와 제2 장치 사이의 세션키 수립을 위한 정보 전달 과정을 도시한 것이다.
1 illustrates the basic structure of a trusted execution environment included in an apparatus according to one aspect.
2 illustrates a session key establishment procedure of a first device and a second device according to an embodiment.
3 is a flowchart illustrating a session key establishment procedure of a first device and a second device according to another embodiment.
4 is a flowchart illustrating an information transfer process for establishing a session key between a first device and a second device according to another embodiment.

전술한, 그리고 추가적인 양상들은 첨부된 도면을 참조하여 설명하는 실시 예들을 통해 구체화된다. 각 실시 예들의 구성 요소들은 다른 언급이나 상호간에 모순이 없는 한 실시 예 내에서 다양한 조합이 가능한 것으로 이해된다. 블록도의 각 블록은 어느 경우에 있어서 물리적인 부품을 표현할 수 있으나 또 다른 경우에 있어서 하나의 물리적인 부품의 기능의 일부 혹은 복수의 물리적인 부품에 걸친 기능의 논리적인 표현일 수 있다. 때로는 블록 혹은 그 일부의 실체는 프로그램 명령어들의 집합(set)일 수 있다. 이러한 블록들은 전부 혹은 일부가 하드웨어, 소프트웨어 혹은 이들의 결합에 의해 구현될 수 있다.The foregoing and further aspects are embodied through the embodiments described with reference to the accompanying drawings. It is to be understood that the components of the embodiments may be variously combined within the embodiments as long as there is no contradiction between each other and each other. Each block in the block diagram may in some cases represent a physical part, but in another case may be a logical representation of a part of the function of one physical part or a function across a plurality of physical parts. Sometimes an instance of a block or part of it may be a set of program instructions. These blocks may be implemented in whole or in part by hardware, software or a combination thereof.

일 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함한다.According to an embodiment, there is provided a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment, by the first device requesting authentication, by the second device authenticating the first device; Requesting, by the first device, a session key; decrypting, by the second device, an encryption text; generating, by the second device, a first session key; and generating, by the second device, a second session key; , The second device distributing the session key, the first device obtaining the session key, and the first device and the second device passing the session key to the general area.

일 실시 예에 따르면 제1 장치 및 제2 장치는 차량의 인포테인먼트 시스템의 장치이다. 제1 장치는 차량에 설치되는 장치로 엔터테인먼트를 위한 A/V 장치, DMB 장치 등이거나 정보를 위한 카메라 등의 장치일 수 있으며, 제2 장치는 텔레메틱스 제어 유닛(TCU) 일 수 있다.According to one embodiment, the first device and the second device are devices of an infotainment system of a vehicle. The first device may be a device installed in a vehicle, and may be an A / V device for entertainment, a DMB device, or a device for information. The second device may be a telematics control unit (TCU).

제1 장치 및 제2 장치에 포함된 신뢰 실행 환경은 민감한 데이터를 보호하기 위해 실행 환경을 분리하는 기술로 일반적인 어플리케이션이 실행되는 일반 영역(Non-Secure World)와 신뢰할 수 있는 어플리케이션이 실행되는 보안 영역(Secure World)로 분리되어 구성된다.The trusted execution environment included in the first device and the second device is a technology that separates the execution environment to protect sensitive data. A non-secure world in which a general application runs and a security area in which a trusted application runs It is divided into (Secure World).

도 1은 일 양상에 따른 장치에 포함된 신뢰 실행 환경의 기본 구조를 도시한 것으로, 도 1에 도시된 구조에서 민감한 데이터는 보안 영역(Secure World)에 저장하고, 일반 영역(Non-Secure World)에서 실행되는 어플리케이션 등은 모니터 모드(Monitor Mode)를 통해서만 민감한 데이터를 이용할 수 있다. 이러한 신뢰 실행 환경의 대표적인 구현(Implementation)으로 ARM 사의 TrustZone과 인텔(Intel)사의 SGX가 있다. 제1 장치와 제2 장치에 포함되는 신뢰 실행 환경의 구현으로 ARM 사의 TrustZone과 인텔(Intel)사의 SGX가 사용될 수 있으나 이에 한정되지 않는다. 제1 장치와 제2 장치에 포함되는 신뢰 실행 환경의 구현으로 ARM 사의 TrustZone이 사용될 경우, 일반 영역(Non-Secure World)과 보안 영역(Secure World) 간의 통신은 NS(Non Secure) bit를 이용하여 NSC(Non-Secure Call)을 통해 이루어진다. 신뢰 실행 환경은 일반 영역(Non-Secure World)과 보안 영역(Secure World)을 완전하게 분리하여 안전하게 운용이 가능한 구조를 가지고 있다. 보안 영역에서 실행되는 어플리케이션은 일반 영역에 존재하는 네트워크 인터페이스를 통하여 외부 인터넷과 통신할 수 있다. 이때 생길 수 있는 보안 문제는 Transport Layer Security(TLS)를 통해 보호된다.1 illustrates a basic structure of a trusted execution environment included in a device according to an aspect. In the structure shown in FIG. 1, sensitive data is stored in a secure world, and a non-secure world. Applications running in can only use sensitive data through Monitor Mode. Typical implementations of this trusted execution environment include ARM's TrustZone and Intel's SGX. ARM's TrustZone and Intel's SGX may be used as the implementation of the trusted execution environment included in the first device and the second device, but is not limited thereto. When ARM's TrustZone is used as an implementation of the trusted execution environment included in the first device and the second device, communication between the non-secure world and the secure world uses a non secure (NS) bit. It is made through Non-Secure Call (NSC). The trusted execution environment has a structure that can be safely operated by completely separating the non-secure world and the secure world. An application running in the security zone may communicate with the external Internet through a network interface existing in the general zone. Possible security problems are protected by Transport Layer Security (TLS).

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제1 장치가 인증을 요청하는 단계는 제1 장치가 제1 아이디 및 제1 타임스탬프를 제1 개인키로 암호화한 제1 암호문과, 제1 아이디와, 제1 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 인증을 요청하는 단계이다. In the method for establishing an encrypted session key between the first device and the second device, the requesting authentication of the first device comprises: a first cipher text in which the first device encrypts the first ID and the first timestamp with the first private key; Requesting authentication by transmitting a message including the first ID and the first timestamp to the second device.

제1 아이디는 제1 장치를 고유하게 식별할 수 있는 아이디이고, 제1 타임스탬프는 제1 장치가 제1 개인키로 제1 암호문을 생성하기 전에 제1 장치의 시간을 의미하는 타임스탬프이다. 제1 장치는 제1 아이디 및 제1 타임스탬프를 제1 개인키로 암호화하여 제1 암호문을 생성한다. 제1 암호문은 제1 장치의 공개키 기반 구조(Public Key Infrastructure, PKI)의 공개키/개인키 쌍의 개인키로 암호화하였으므로 제1 장치의 서명과 동일한 역할을 수행할 수 있다. 제1 장치의 공개키를 가진 다른 장치가 제1 암호문을 복호화하여 제1 암호문과 함께 전송된 평문과 비교하여 일치하면 다른 장치는 해당 암호문을 전송한 주체가 제1 장치임을 인증할 수 있다. 제1 암호문 생성시 제1 아이디만 사용하면 세션을 수립할 때마다 동일한 제1 암호문이 생성되므로 제1 장치는 항상 변하는 값인 시간 즉, 암호화 수행 직전의 타임스탬프를 추가로 사용한다. 매 연결 시마다 동일한 암호문을 생성하지 않도록 난수를 사용할 수도 있으나, 후술할 메시지 전송 지연을 계산하여 메시지의 유효성 검증에도 활용할 수 있도록 타임스탬프를 활용한다.The first ID is an ID that can uniquely identify the first device, and the first timestamp is a timestamp indicating the time of the first device before the first device generates the first cipher text with the first private key. The first device generates a first cipher text by encrypting the first ID and the first time stamp with the first private key. Since the first cipher text is encrypted with the private key of the public key / private key pair of the public key infrastructure (PKI) of the first device, the first cipher text may play the same role as the signature of the first device. If another device having the public key of the first device decrypts the first cipher text and compares it with the plain text transmitted together with the first cipher text, the other device may authenticate that the subject transmitting the cipher text is the first device. If only the first ID is used when generating the first ciphertext, the same first ciphertext is generated every time a session is established, and thus the first device additionally uses a time that is a variable value, that is, a timestamp immediately before performing encryption. A random number may be used to not generate the same ciphertext for each connection, but a timestamp is used to calculate a message transmission delay, which will be described later, to be used for validating the message.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 제1 장치를 인증하는 단계는 제2 장치가 제1 암호문을 제1 공개키로 복호화하여 획득한 제1 아이디 및 제1 타임스탬프를 수신한 제1 아이디 및 제1 타임스탬프와 비교하여 제1 장치를 인증하는 단계이다. 제2 장치는 제1 장치의 공개키 기반 구조의 공개키인 제1 공개키로 제1 암호문을 복호화한다. 제1 암호문은 제1 장치의 서명과 동일한 역할을 하므로, 제2 장치가 제1 암호문을 복호화하여 획득한 평문, 즉 제1 아이디 및 제1 타임스탬프를 제1 암호문과 함께 전달된 제1 아이디 및 제1 타임스탬프와 비교하여 일치하면 제2 장치는 해당 인증 요청을 제1 장치가 전송했음을 인증할 수 있다.In the method for establishing an encrypted session key between a first device and a second device, the step of authenticating the first device by the second device includes: a first ID and a second message obtained by decrypting the first cipher text with the first public key; The first device is authenticated by comparing the first ID and the first timestamp with which the first timestamp is received. The second device decrypts the first cipher text with the first public key, which is the public key of the public key infrastructure of the first device. Since the first cipher text plays the same role as the signature of the first device, the first cipher text obtained by decrypting the first cipher text, that is, the first ID and the first time stamp together with the first cipher text, If it matches with the first timestamp, the second device may authenticate that the first device has sent the corresponding authentication request.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제1 장치가 세션키를 요청하는 단계는 제1 장치가 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 제2 공개키로 암호화한 제3 암호문과 제3 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 세션키를 요청하는 단계이다. 제1 장치는 제2 장치가 세션키를 생성할 때 사용할 제1 장치와 관련되거나 제1 장치가 생성한 정보를 암호화하여 전달한다. 즉, 제1 장치는 제1 장치와 관련된 정보인 제1 아이디와, 제1 장치의 보안 영역의 난수 생성 기능에서 생성한 제1 난수와 제2 난수를 암호화하여 제2 장치로 전달한다. 제1 장치가 제3 암호문을 생성할 때 사용하는 제2 공개키는 제2 장치의 공개키 기반 구조의 공개키로 해당 공개키의 쌍인 제2 개인키를 보유한 제2 장치만 제3 암호문을 복호화할 수 있다.In the method for establishing an encrypted session key between the first device and the second device, the requesting of the session key by the first device includes: the first device having a first ID, a first random number, a second random number, and a third time; Requesting a session key by transmitting a message including a third ciphertext and a third timestamp encrypted with a second public key to a second device. The first device encrypts and transmits information associated with or generated by the first device to be used when the second device generates the session key. That is, the first device encrypts the first ID, which is information related to the first device, and the first random number and the second random number generated by the random number generation function of the secure area of the first device, and transmits the encrypted information to the second device. The second public key used when the first device generates the third ciphertext is a public key of the public key infrastructure of the second device, and only a second device having a second private key paired with the corresponding public key can decrypt the third ciphertext. Can be.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 암호문을 복호화하는 단계는 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 획득하는 단계이다. 획득한 제1 아이디와, 제1 난수와, 제2 난수는 세션키 생성에 사용된다.In the encryption session key establishment method between the first device and the second device, the second device decrypts the cipher text, the second device decrypts the third cipher text with the second private key and the first ID, the first random number and Obtaining a second random number and a third timestamp. The obtained first ID, the first random number, and the second random number are used for generating a session key.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 제1 세션키를 생성하는 단계는 제2 장치가 제1 아이디와, 제2 아이디와, 제1 난수와, 제3 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제1 세션키를 생성하는 단계이다. 제2 장치는 보안 영역의 난수 생성 기능을 통해 제3 난수와, 제4 난수를 생성한다. 제2 장치는 제1 장치로부터 수신한 제1 아이디 및 제1 난수와, 제2 아이디 및 제3 난수와, 제3 타임스탬프를 조합하여 세션키를 생성할 평문을 작성한다. 이때 평문은 제1 아이디와, 제2 아이디와, 제1 난수와, 제3 난수와, 제3 타임스탬프를 연결하여 작성된다. 이때 평문을 구성하는 요소들의 순서는 세션키를 생성하는 규칙에 따라 달라질 수 있다. 제2 장치는 해당 평문을 암호화 해시 함수를 통해 암호화 해시하여 제1 세션키를 생성한다. 제1 세션키는 제1 장치의 보안 영역(Secure World)와 제2 장치의 보안 영역(Secure World) 사이의 통신에 사용될 세션키이다.In the method for establishing an encrypted session key between a first device and a second device, the step of generating, by the second device, the first session key comprises: a first device, a second ID, a first random number, a first device; And generating a first session key by encrypting and hashing the plain text connecting the third random number and the third timestamp. The second device generates a third random number and a fourth random number through the random number generation function of the security domain. The second device creates a plain text to generate a session key by combining the first ID and the first random number received from the first device, the second ID and the third random number, and the third timestamp. At this time, the plain text is created by connecting the first ID, the second ID, the first random number, the third random number, and the third timestamp. In this case, the order of the elements constituting the plain text may vary depending on a rule for generating a session key. The second device generates a first session key by encrypting the plain text through an encrypted hash function. The first session key is a session key to be used for communication between the secure world of the first device and the secure world of the second device.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 제2 세션키를 생성하는 단계는 제2 장치가 제1 아이디와, 제2 아이디와, 제2 난수와, 제4 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제2 세션키를 생성하는 단계이다. 제2 장치는 제1 장치로부터 수신한 제1 아이디 및 제2 난수와, 제2 아이디 및 제4 난수와, 제3 타임스탬프를 조합하여 세션키를 생성할 평문을 작성한다. 이때 평문은 제1 아이디와, 제2 아이디와, 제2 난수와, 제4 난수와, 제3 타임스탬프를 연결하여 작성된다. 이때 평문을 구성하는 요소들의 순서는 세션키를 생성하는 규칙에 따라 달라질 수 있다. 제2 장치는 해당 평문을 암호화 해시 함수를 통해 암호화 해시하여 제2 세션키를 생성한다. 제2 세션키는 제1 장치의 일반 영역(Non-Secure World)와 제2 장치의 일반 영역(Non-Secure World) 사이의 통신에 사용될 세션키이다.The method for establishing an encrypted session key between a first device and a second device, wherein the second device generates a second session key, wherein the second device comprises a first ID, a second ID, a second random number, 4 is a step of generating a second session key by encrypting and hashing the plain text concatenating the random number and the third timestamp. The second device creates a plain text to generate a session key by combining the first ID and the second random number received from the first device, the second ID and the fourth random number, and the third timestamp. At this time, the plain text is created by connecting the first ID, the second ID, the second random number, the fourth random number, and the third timestamp. In this case, the order of the elements constituting the plain text may vary depending on a rule for generating a session key. The second device generates a second session key by encrypting the plain text through an encrypted hash function. The second session key is a session key to be used for communication between the non-secure world of the first device and the non-secure world of the second device.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 세션키를 분배하는 단계는 제2 장치가 제1 세션키와 제2 세션키를 제1 공개키로 암호화한 제4 암호문과 제4 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 세션키를 분배하는 단계이다. 제2 장치는 생성한 제1 세션키 및 제2 세션키를 제1 장치만 복호화할 수 있도록 제1 장치의 제1 공개키로 암호화하여 제1 장치로 전송한다.A method for establishing an encrypted session key between a first device and a second device, wherein the distributing the session key by the second device comprises: a fourth device encrypting the first session key and the second session key with the first public key; Distributing the session key by transmitting a message including the cipher text and the fourth time stamp to the first device. The second device encrypts the generated first session key and the second session key with the first public key of the first device so that only the first device can decrypt them, and transmits them to the first device.

제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제1 장치가 세션키를 획득하는 단계는 제1 장치가 제4 암호문을 제1 개인키로 복호화하여 제1 세션키 및 제2 세션키를 획득하는 단계이다.In the method for establishing an encrypted session key between the first device and the second device, the first device obtaining the session key may be performed by the first device by decrypting the fourth cipher text with the first private key. Acquiring a key.

제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계는 제1 장치 및 제2 장치가 제1 장치 및 제2 장치의 일반 영역(Non-Secure World) 사이의 암호화 통신에 사용될 제2 세션키를 자신의 신뢰 실행 환경의 일반 영역(Non-Secure World)에 전달하는 단계이다.The forwarding of the session key to the general area by the first device and the second device includes: a second device to be used for encrypted communication between the first device and the non-secure world of the second device; Passing the session key to the non-secure world of its trusted execution environment.

제1 장치 및 제2 장치는 암호화, 복호화, 난수 생성 및 암호화 해시를 신뢰 실행 환경의 보안 영역(Secure World)에서 수행한다. The first and second devices perform encryption, decryption, random number generation, and cryptographic hash in a secure world of the trusted execution environment.

또 다른 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함하고, 제2 장치가 세션키 요청을 검증하는 단계를 더 포함할 수 있다.According to another embodiment, a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment may include: requesting authentication by a first device; and authenticating the first device by a second device; Requesting the session key from the first device, decrypting the cipher text by the second device, generating the first session key by the second device, and generating the second session key by the second device And distributing the session key by the second device, acquiring the session key by the first device, and passing the session key to the general area by the first device and the second device; May further include verifying the session key request.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서 추가되는 단계인 제2 장치가 세션키 요청을 검증하는 단계는 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 획득한 제1 아이디 및 제3 타임스탬프를 제1 장치의 인증 요청시 수신하여 저장한 제1 아이디와 수신한 제3 타임스탬프와 일치하는지 비교하는 단계이다. 제2 장치의 제2 공개키는 공개되어 있으므로 다른 장치들도 암호문을 생성하여 전송할 수 있다. 따라서, 제1 장치가 세션키 요청을 했음을 확인할 수 있도록 제3 암호문 생성시 제3 타임스탬프를 추가하고, 제3 암호문의 전송과 함께 제3 타임스탬프도 함께 전송하여 제2 장치가 제3 암호문을 복호화시 획득한 제3 타임스탬프와 비교할 수 있게 한다.In the method of establishing an encrypted session key between the first device and the second device according to the present embodiment, verifying the session key request by the second device may include decrypting the third cipher text with the second private key. Comparing the acquired first ID and the third timestamp with the received first ID and the received third timestamp when the authentication request of the first device is made. Since the second public key of the second device is public, other devices can also generate and transmit cipher text. Therefore, the third device adds a third timestamp when generating the third ciphertext, and transmits the third timestamp together with the transmission of the third ciphertext to confirm that the first device has requested the session key. Compare with the third timestamp obtained at the time of decoding.

또 다른 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 세션키 요청을 검증하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함하고, 제2 장치가 인증 응답하는 단계와, 제1 장치가 제2 장치를 인증하는 단계를 더 포함할 수 있다.According to another embodiment, a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment may include: requesting authentication by a first device; and authenticating the first device by a second device; Requesting the session key from the first device, decrypting the cipher text by the second device, verifying the session key request by the second device, generating the first session key by the second device; Generating a second session key by the second device, distributing the session key by the second device, obtaining a session key by the first device, and generating a session key by the first device and the second device. The method may further include transmitting to the general area, and the second device authenticates and the first device authenticates the second device.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서 추가되는 단계인 제2 장치가 인증 응답하는 단계는 제2 장치가 제2 아이디와, 제2 타임스탬프를 제2 개인키로 암호화한 제2 암호문과, 제2 아이디와, 제2 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 인증 응답하는 단계이다. 제1 장치는 제2 장치의 공개키 기반 구조의 공개키인 제2 공개키로 제2 암호문을 복호화한다. 제2 암호문은 제2 장치의 서명과 동일한 역할을 하므로, 제1 장치가 제2 암호문을 복호화하여 획득한 평문, 즉 제2 아이디 및 제2 타임스탬프를 제2 암호문과 함께 전달된 제2 아이디 및 제2 타임스탬프와 비교하여 일치하면 제1 장치는 해당 인증 응답을 제2 장치가 전송했음을 인증할 수 있다.In the method of authenticating the encrypted session key between the first device and the second device according to the present embodiment, the step of authenticating and responding to the second device may include: a second device having a second ID and a second timestamp; And transmitting a message including the second cipher text encrypted with the private key, the second ID, and the second time stamp to the first device for authentication. The first device decrypts the second cipher text with the second public key, which is the public key of the public key infrastructure of the second device. Since the second ciphertext plays the same role as the signature of the second device, the plaintext obtained by decrypting the second ciphertext, that is, the second ID and the second timestamp together with the second ciphertext, If it matches with the second timestamp, the first device may authenticate that the second device has sent the corresponding authentication response.

도 2는 일 실시 예에 따른 제1 장치와 제2 장치의 세션키 수립 절차를 도시한 것이다. 도 2를 참조하여 제1 장치와 제2 장치 사이의 암호화 세션키 수립 절차를 설명하면, 제1 장치가 제1 아이디 및 제1 타임스탬프를 제1 개인키로 암호화한 제1 암호문과, 제1 아이디와, 제1 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 인증을 요청하고(S1000), 제2 장치가 제1 암호문을 제1 공개키로 복호화하여 획득한 제1 아이디 및 제1 타임스탬프를 수신한 제1 아이디 및 제1 타임스탬프와 비교하여 제1 장치를 인증하고(S1020), 제2 장치가 제2 아이디와, 제2 타임스탬프를 제2 개인키로 암호화한 제2 암호문과, 제2 아이디와, 제2 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 인증 응답하고(S1040), 제1 장치가 제2 암호문을 제2 공개키로 복호화하여 획득한 제2 아이디 및 제2 타임스탬프를 수신한 제2 아이디 및 제2 타임스탬프와 비교하여 제2 장치를 인증하고(S1060), 제1 장치가 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 제2 공개키로 암호화한 제3 암호문과 제3 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 세션키를 요청하고(S1080), 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 획득하고(S1100), 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 획득한 제1 아이디 및 제3 타임스탬프를 제1 아이디와 수신한 제3 타임스탬프와 일치하는지 비교하고(S1120), 제2 장치가 제1 아이디와, 제2 아이디와, 제1 난수와, 제3 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제1 세션키를 생성하고(S1140), 제2 장치가 제1 아이디와, 제2 아이디와, 제2 난수와, 제4 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제2 세션키를 생성하고(S1160), 제2 장치가 제1 세션키와 제2 세션키를 제1 공개키로 암호화한 제4 암호문과 제4 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 세션키를 분배하고(S1180), 제1 장치가 제4 암호문을 제1 개인키로 복호화하여 제1 세션키 및 제2 세션키를 획득하고(S1200), 제1 장치 및 제2 장치가 제2 세션키를 자신의 신뢰 실행 환경의 일반 영역에 전달하여(S1220) 제1 장치 및 제2 장치의 일반 영역(Non-Secure World) 사이의 암호 통신과, 제1 장치 및 제2 장치의 보안 영역(Secure World) 사이의 암호 통신에 대한 세션키를 수립한다.2 illustrates a session key establishment procedure of a first device and a second device according to an embodiment. The encryption session key establishment procedure between the first device and the second device will be described with reference to FIG. 2, wherein the first device encrypts the first ID and the first timestamp with the first private key, and the first ID. And requesting authentication by transmitting a message including the first timestamp to the second device (S1000), and decrypting the first ID and the first timestamp obtained by the second device by decrypting the first ciphertext with the first public key. The second device authenticates the first device in comparison with the received first ID and the first timestamp (S1020), and the second device encrypts the second ID, the second timestamp with the second private key, and the second device. Sending a message including an ID and a second timestamp to the first device for authentication response (S1040), and decrypting the second ID and the second timestamp obtained by the first device by decrypting the second cipher text with the second public key. A second device compared to the received second ID and second timestamp Authenticate (S1060), the first device generates a message comprising a third ciphertext and a third timestamp that encrypts the first ID, the first random number, the second random number, and the third timestamp with the second public key; Request a session key by transmitting to the second device (S1080), the second device decrypts the third cipher text with the second private key to obtain a first ID, a first random number, a second random number, and a third timestamp; In operation S1100, the second device compares the first ID and the third timestamp obtained by decrypting the third cipher text with the second private key to match the first ID and the received third timestamp, in operation S1120. The device generates a first session key by encrypting and hashing the plain text connecting the first ID, the second ID, the first random number, the third random number, and the third timestamp (S1140). The second session by encrypting and hashing the plain text concatenating the ID, the second ID, the second random number, the fourth random number, and the third timestamp. In operation S1160, the second device transmits a message including a fourth ciphertext and a fourth timestamp in which the first session key and the second session key are encrypted with the first public key, to the first device. (S1180), the first device decrypts the fourth cipher text with the first private key to obtain a first session key and a second session key (S1200), and the first device and the second device use the second session key themselves. The communication between the secure area of the first device and the second device and the secure world of the first device and the second device. Session key for cryptographic communication

또 다른 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제2 장치가 인증 응답하는 단계와, 제1 장치가 제2 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 세션키 요청을 검증하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함하고, 제2 장치가 제1 장치의 인증서를 검증하는 단계를 더 포함할 수 있다.According to another embodiment, a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment may include: requesting authentication by a first device; and authenticating the first device by a second device; The second device authenticates, the first device authenticates the second device, the first device requests a session key, the second device decrypts the cipher text, and the second device Verifying the session key request by the second device, generating a first session key by the second device, generating a second session key by the second device, distributing the session key by the second device; The first device obtaining a session key; the first device and the second device passing the session key to the general area; and the second device further comprising verifying a certificate of the first device. Can be.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제1 장치가 인증을 요청하는 단계에서 제1 장치가 제2 장치로 전송하는 인증 요청은 제1 인증서를 더 포함할 수 있다. 이때의 제1 인증서는 제1 장치가 인증기관(Certification Authority, CA)으로부터 발급받은 인증서로 제1 장치는 암호화 세션키 수립 수행전에 해당 인증서를 미리 발급받아 저장하고 있다.In the method for establishing an encrypted session key between the first device and the second device according to this embodiment, the authentication request transmitted from the first device to the second device in the step of requesting authentication by the first device further includes the first certificate. It may include. In this case, the first certificate is a certificate issued by the first device from a certification authority (CA), and the first device receives and stores the certificate in advance before performing the encryption session key establishment.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서 추가되는 단계인 제2 장치가 제1 장치의 인증서를 검증하는 단계는 인증 요청을 수신한 제2 장치가 제1 인증서를 인증기관의 공개키로 검증하는 단계이다.In the method of establishing an encrypted session key between the first device and the second device according to the present embodiment, verifying a certificate of the first device by the second device may be performed by the second device receiving the authentication request. This step verifies the certificate with the public key of the certificate authority.

또 다른 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치의 인증서를 검증하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제2 장치가 인증 응답하는 단계와, 제1 장치가 제2 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 세션키 요청을 검증하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함하고, 제1 장치가 제2 장치의 인증서를 검증하는 단계를 더 포함할 수 있다.According to another embodiment of the present invention, a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment includes: requesting authentication by the first device; and verifying a certificate of the first device by the second device. The second device authenticates the first device, the second device authenticates, the first device authenticates the second device, and the first device requests the session key; The second device decrypts the cipher text, the second device verifies the session key request, the second device generates the first session key, and the second device generates the second session key. And distributing the session key by the second device, acquiring the session key by the first device, and passing the session key to the general area by the first device and the second device; The device may further comprise verifying a certificate of the second device.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서, 제2 장치가 인증을 응답하는 단계에서 제2 장치가 제1 장치로 전송하는 인증 응답은 제2 인증서를 더 포함할 수 있다. 이때의 제2 인증서는 제2 장치가 인증기관으로부터 발급받은 인증서로 제2 장치는 암호화 세션키 수립 수행전에 해당 인증서를 미리 발급받아 저장하고 있다.In the method for establishing an encrypted session key between the first device and the second device according to the present embodiment, the authentication response sent by the second device to the first device in response to the authentication of the second device further includes a second certificate. It may include. At this time, the second certificate is a certificate issued by the second device from the certification authority, and the second device receives and stores the certificate in advance before performing the encryption session key establishment.

이 실시 예에 따른 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법에 있어서 추가되는 단계인 제1 장치가 제2 장치의 인증서를 검증하는 단계는 인증 응답을 수신한 제1 장치가 제2 인증서를 인증기관의 공개키로 검증하는 단계이다.In the method of establishing an encrypted session key between the first device and the second device according to the present embodiment, verifying a certificate of the second device by the first device includes: a second device receiving the authentication response; This step verifies the certificate with the public key of the certificate authority.

도 3은 또 다른 실시 예에 따른 제1 장치와 제2 장치의 세션키 수립 절차를 도시한 것이다. 도 3을 참조하여 제1 장치와 제2 장치 사이의 암호화 세션키 수립 절차를 설명하면, 제1 장치가 제1 아이디 및 제1 타임스탬프를 제1 개인키로 암호화한 제1 암호문과, 제1 아이디와, 제1 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 인증을 요청하고(S2000), 제2 장치가 제1 인증서를 인증기관의 공개키로 검증하고(S2020), 제2 장치가 제1 암호문을 제1 공개키로 복호화하여 획득한 제1 아이디 및 제1 타임스탬프를 수신한 제1 아이디 및 제1 타임스탬프와 비교하여 제1 장치를 인증하고(S2040), 제2 장치가 제2 아이디와, 제2 타임스탬프를 제2 개인키로 암호화한 제2 암호문과, 제2 아이디와, 제2 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 인증 응답하고(S2060), 제1 장치가 제2 인증서를 인증기관의 공개키로 검증하고(S2080), 제1 장치가 제2 암호문을 제2 공개키로 복호화하여 획득한 제2 아이디 및 제2 타임스탬프를 수신한 제2 아이디 및 제2 타임스탬프와 비교하여 제2 장치를 인증하고(S2100), 제1 장치가 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 제2 공개키로 암호화한 제3 암호문과 제3 타임스탬프를 포함하는 메시지를 제2 장치로 전송하여 세션키를 요청하고(S2120), 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 획득하고(S2140), 제2 장치가 제3 암호문을 제2 개인키로 복호화하여 획득한 제1 아이디 및 제3 타임스탬프를 제1 아이디와 수신한 제3 타임스탬프와 일치하는지 비교하고(S2160), 제2 장치가 제1 아이디와, 제2 아이디와, 제1 난수와, 제3 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제1 세션키를 생성하고(S2180), 제2 장치가 제1 아이디와, 제2 아이디와, 제2 난수와, 제4 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여 제2 세션키를 생성하고(S2200), 제2 장치가 제1 세션키와 제2 세션키를 제1 공개키로 암호화한 제4 암호문과 제4 타임스탬프를 포함하는 메시지를 제1 장치로 전송하여 세션키를 분배하고(S2220), 제1 장치가 제4 암호문을 제1 개인키로 복호화하여 제1 세션키 및 제2 세션키를 획득하고(S2240), 제1 장치 및 제2 장치가 제2 세션키를 자신의 신뢰 실행 환경의 일반 영역에 전달하여(S2260) 제1 장치 및 제2 장치의 일반 영역(Non-Secure World) 사이의 암호 통신과, 제1 장치 및 제2 장치의 보안 영역(Secure World) 사이의 암호 통신에 대한 세션키를 수립한다.3 is a flowchart illustrating a session key establishment procedure of a first device and a second device according to another embodiment. The encryption session key establishment procedure between the first device and the second device will be described with reference to FIG. 3, wherein the first device encrypts the first ID and the first timestamp with the first private key, and the first ID. And request authentication by transmitting a message including the first timestamp to the second device (S2000), the second device verifies the first certificate with the public key of the certification authority (S2020), and the second device sends the first device. The first device is authenticated by comparing the first ID and the first timestamp received by decrypting the ciphertext with the first public key (S2040), and the second device authenticates with the second ID. A second ciphertext encrypted with the second private key, a second ID, a second ID, and a message including the second timestamp are transmitted to the first device for authentication response (S2060), and the first device sends a second message. The certificate is verified with the public key of the certification authority (S2080), and the first device uses the second cipher text. The second device authenticates the second device by comparing the second ID and the second timestamp obtained by decrypting the second public key with the second ID and the second timestamp (S2100). Requesting a session key by transmitting a message including a first random number, a second random number, and a third ciphertext and a third timestamp encrypted with the second public key to the second device (S2120), the second The device decrypts the third cipher text with a second private key to obtain a first ID, a first random number, a second random number, and a third time stamp (S2140), and the second device uses the third cipher text as the second private key. The first ID and the third timestamp obtained by decoding are compared with the first ID and the received third timestamp (S2160), and the second apparatus compares the first ID, the second ID, and the first random number. The first session key is generated by encrypting and hashing the plain text connecting the third random number and the third timestamp (S2180). In operation S2200, the second device encrypts and hashes the plain text obtained by connecting the first ID, the second ID, the second random number, the fourth random number, and the third timestamp (S2200). The second device distributes the session key by transmitting a message including the fourth cipher text and the fourth time stamp, which encrypts the first session key and the second session key with the first public key, to the first device (S2220). Decrypts the fourth cipher text with the first private key to obtain a first session key and a second session key (S2240), and the first device and the second device transmit the second session key to a general area of its trusted execution environment; (S2260) establishes a session key for cryptographic communication between the first device and the non-Secure World of the second device, and cryptographic communication between the first device and the second device Secure World. do.

또 다른 실시 예에 따른 신뢰 실행 환경을 포함하는 제1 장치와 제2 장치 사이의 암호화 세션키 수립 방법은 제1 장치가 인증을 요청하는 단계와, 제2 장치가 제1 장치의 인증서를 검증하는 단계와, 제2 장치가 제1 장치를 인증하는 단계와, 제2 장치가 인증 응답하는 단계와, 제1 장치가 제2 장치의 인증서를 검증하는 단계와, 제1 장치가 제2 장치를 인증하는 단계와, 제1 장치가 세션키를 요청하는 단계와, 제2 장치가 암호문을 복호화하는 단계와, 제2 장치가 세션키 요청을 검증하는 단계와, 제2 장치가 제1 세션키를 생성하는 단계와, 제2 장치가 제2 세션키를 생성하는 단계와, 제2 장치가 세션키를 분배하는 단계와, 제1 장치가 세션키를 획득하는 단계와, 제1 장치 및 제2 장치가 세션키를 일반 영역에 전달하는 단계를 포함한다.According to another embodiment of the present invention, a method of establishing an encrypted session key between a first device and a second device including a trusted execution environment includes: requesting authentication by the first device; and verifying a certificate of the first device by the second device. The second device authenticates the first device, the second device authenticates and responds, the first device verifies the second device's certificate, and the first device authenticates the second device The first device requests the session key, the second device decrypts the cipher text, the second device verifies the session key request, and the second device generates the first session key. The second device generates a second session key, the second device distributes the session key, the first device obtains the session key, the first device and the second device Passing the session key to the general area.

이 실시 예에 따른 블록체인에 장치의 암호화 정보를 등록하는 방법에 있어서 제1 장치 및 제2 장치는 상대방 장치로부터 메시지 수신 시 메시지를 수신한 시간과 메시지에 포함된 타임스탬프와의 시간 차이를 미리 설정된 임계 지연 시간과 비교하여 시간 차이가 임계 지연 시간보다 큰 경우 절차를 종료할 수 있다.In the method for registering encryption information of a device on a blockchain according to an embodiment, the first device and the second device may predetermine a time difference between a time when a message is received from a counterpart device and a timestamp included in the message. The procedure may be terminated when the time difference is greater than the threshold delay time compared to the set threshold delay time.

제1 장치와 제2 장치는 인증 요청 메시지와, 인증 응답 메시지와, 세션키 생성 요청 메시지와, 세션키 분배 메시지를 교환하는 데 각 메시지 수신시 메시지 지연 시간을 구해 미리 설정된 임계 지연 시간과 비교하여 절차 종료 여부를 결정할 수 있다.The first device and the second device obtain a message delay time at the time of receiving each message for exchanging an authentication request message, an authentication response message, a session key generation request message, and a session key distribution message, and compare them with a preset threshold delay time. You can decide whether to end the procedure.

제2 장치는 제1 장치가 인증을 요청하는 메시지를 수신한 시간을 구하고, 해당 시간과 메시지에 포함된 제1 타임스탬프와의 시간 차이를 계산하고, 이 계산된 시간 차이가 미리 설정된 임계 지연 시간보다 큰 경우 외부 장비의 공격으로 판단하고 세션키 수립 절차를 종료할 수 있다.The second device obtains a time when the first device receives the message requesting authentication, calculates a time difference between the time and the first time stamp included in the message, and the calculated time difference is a preset threshold delay time. If larger, it can be determined that an external device is attacked and the session key establishment procedure can be terminated.

또한, 제1 장치는 제1 장치가 전송한 인증 응답 메시지를 수신한 시간을 구하고, 해당 시간과 메시지에 포함된 제2 타임스탬프와의 시간 차이를 계산하고, 이 계산된 시간 차이가 미리 설정된 임계 지연 시간보다 큰 경우 외부 장비의 공격으로 판단하고 세션키 수립 절차를 종료할 수 있다.In addition, the first device obtains a time when the authentication response message sent by the first device is received, calculates a time difference between the time and the second time stamp included in the message, and the calculated time difference is a preset threshold. If it is larger than the delay time, it can be judged as an external device attack and terminate the session key establishment procedure.

또한, 제2 장치는 제1 장치가 전송한 세션키 요청 메시지를 수신한 시간을 구하고, 해당 시간과 메시지에 포함된 제3 타임스탬프와의 시간 차이를 계산하고, 이 계산된 시간 차이가 미리 설정된 임계 지연 시간보다 큰 경우 외부 장비의 공격으로 판단하고 세션키 수립 절차를 종료할 수 있다.In addition, the second device obtains a time when the session key request message received by the first device is received, calculates a time difference between the time and the third time stamp included in the message, and the calculated time difference is set in advance. If it is larger than the threshold delay time, it can be determined that an external device is attacked and end the session key establishment procedure.

또한, 제1 장치는 제2 장치가 전송한 세션키 분배 메시지 메시지를 수신한 시간을 구하고, 해당 시간과 메시지에 포함된 제4 타임스탬프와의 시간 차이를 계산하고, 이 계산된 시간 차이가 미리 설정된 임계 지연 시간보다 큰 경우 외부 장비의 공격으로 판단하고 세션키 수립 절차를 종료할 수 있다.Further, the first device obtains a time when the session key distribution message message received by the second device is received, calculates a time difference between the time and the fourth time stamp included in the message, and the calculated time difference is previously calculated. If it is larger than the set threshold delay time, it can be determined as an attack of the external device and the session key establishment procedure can be terminated.

도 4는 또 다른 실시 예에 따라 제1 장치와 제2 장치 사이의 세션키 수립을 위한 정보 전달 과정을 도시한 것이다. 도 4를 참조하여 제1 장치와 제2 장치 사이의 암호화 세션키 수립 절차를 설명하면, 제1 장치가 제1 장치의 현재 시간에 대한 제1 타임스탬프(t1)를 구하고, 제1 아이디(IDD)와 제1 타임스탬프(t1)를 제1 장치의 개인키인 제1 개인키(PrKD)로 암호화하여 제1 암호문(

Figure 112018108043559-pat00001
)을 생성한다(S3000). 제1 장치는 제1 아이디(IDD)와, 제1 인증서(CertD)와, 제1 타임스탬프(t1)와, 제1 암호문(CIDD)을 포함하는 인증 요청 메시지를 제2 장치로 전송한다(S3020).4 is a flowchart illustrating an information transfer process for establishing a session key between a first device and a second device according to another embodiment. Referring to FIG. 4, a procedure for establishing an encryption session key between a first device and a second device will be described. A first device obtains a first timestamp t 1 for a current time of the first device, and obtains a first ID ( ID D ) and the first timestamp t 1 are encrypted with the first private key PrK D , which is the private key of the first device, to encrypt the first ciphertext (
Figure 112018108043559-pat00001
) Is generated (S3000). The first device sends an authentication request message including a first ID (ID D ), a first certificate (Cert D ), a first timestamp (t 1 ), and a first cipher text (CID D ) to the second device. It transmits (S3020).

제2 장치는 인증 요청 메시지를 수신하면 메시지를 수신한 시간에 대한 타임스탬프(t*)를 구하고, 메시지를 수신한 시간에 대한 타임스탬프(t*)와 메시지에 포함된 제1 타임스탬프(t1)의 시간 차이가 미리 설정된 임계 지연시간(

Figure 112018108043559-pat00002
)보다 큰 지 비교한다(S3040). 비교결과 해당 시간차이가 미리 설정된 임계 지연시간(
Figure 112018108043559-pat00003
)보다 큰 경우 절차를 종료한다. 제2 장치는 제1 인증서(CertD)를 인증기관의 공개키로 검증하고(S3060), 제1 암호문(CIDD)을 제1 장치의 공개키인 제1 공개키(PuKD)로 복호화(
Figure 112018108043559-pat00004
)한다(S3080). 이때 복호화하여 획득한 제1 아이디(
Figure 112018108043559-pat00005
) 및 제1 타임스탬프(
Figure 112018108043559-pat00006
)를 수신한 제1 아이디(IDD) 및 제1 타임스탬프(t1)와 비교한다(S3100). 비교결과 일치하지 않으면 절차를 종료한다. 제2 장치는 제2 장치의 현재 시간에 대한 제2 타임스탬프(t*)를 구하고, 제2 아이디(IDT)와 제2 타임스탬프(t2)를 제2 장치의 개인키인 제2 개인키(PrKT)로 암호화하여 제2 암호문(
Figure 112018108043559-pat00007
)을 생성한다(S3120). 제2 장치는 제2 아이디(IDT)와, 제2 인증서(CertT)와, 제2 타임스탬프(t2)와, 제2 암호문(CIDT)을 포함하는 인증 응답 메시지를 제1 장치로 전송한다(S3140).The second device, upon receiving the authentication request message to obtain a time stamp (t *) for a time received the message, the first time stamp contained in the time stamp (t *) and the message for the received time messages (t The time difference of 1 )
Figure 112018108043559-pat00002
Is greater than) (S3040). The result of the comparison is that the threshold delay time
Figure 112018108043559-pat00003
If greater than), the procedure ends. The second device verifies the first certificate Cert D with the public key of the certification authority (S3060), and decrypts the first ciphertext CID D with the first public key PuK D that is the public key of the first device (S3060).
Figure 112018108043559-pat00004
(S3080). At this time, the first ID obtained by decrypting
Figure 112018108043559-pat00005
) And first timestamp (
Figure 112018108043559-pat00006
) Is compared with the received first ID (ID D ) and the first time stamp (t 1 ) (S3100). If the comparison does not match, the procedure is terminated. The second device obtaining a second time stamp (t *) for the current time of the second device, the second identity (ID T) and the second individual private key of the second device a second time stamp (t 2) Encrypts with a key (PrK T )
Figure 112018108043559-pat00007
) Is generated (S3120). The second device sends an authentication response message including a second ID (ID T ), a second certificate (Cert T ), a second timestamp (t 2 ), and a second cipher text (CID T ) to the first device. It transmits (S3140).

제1 장치는 인증 응답 메시지를 수신하면 메시지를 수신한 시간에 대한 타임스탬프(t*)를 구하고, 메시지를 수신한 시간에 대한 타임스탬프(t*)와 메시지에 포함된 제2 타임스탬프(t2)의 시간 차이가 미리 설정된 임계 지연시간(

Figure 112018108043559-pat00008
)보다 큰 지 비교한다(S3160). 비교결과 해당 시간차이가 미리 설정된 임계 지연시간(
Figure 112018108043559-pat00009
)보다 큰 경우 절차를 종료한다. 제1 장치는 제2 인증서(CertT)를 인증기관의 공개키로 검증하고(S3180), 제2 암호문(CIDT)을 제2 장치의 공개키인 제2 공개키(PuKT)로 복호화(
Figure 112018108043559-pat00010
)한다(S3200). 이때 복호화하여 획득한 제2 아이디(
Figure 112018108043559-pat00011
) 및 제2 타임스탬프(
Figure 112018108043559-pat00012
)를 수신한 제2 아이디(IDT) 및 제2 타임스탬프(t2)와 비교한다(S3220). 비교결과 일치하지 않으면 절차를 종료한다. 제1 장치는 보안 영역의 난수 생성 기능을 이용하여 제1 난수(
Figure 112018108043559-pat00013
)와, 제2 난수(
Figure 112018108043559-pat00014
)를 생성한다(S3240). 제1 장치는 제1 장치의 현재 시간에 대한 제3 타임스탬프(t3)를 구하고, 제1 아이디(IDD)와, 제1 난수(
Figure 112018108043559-pat00015
)와, 제2 난수(
Figure 112018108043559-pat00016
)와, 제3 타임스탬프(t3)를 제2 장치의 공개키인 제2 공개키(PuKT)로 암호화(
Figure 112018108043559-pat00017
)하여 제3 암호문(J)을 생성한다(S3260). 제1 장치는 제3 암호문(J)과, 제3 타임스탬프를 포함하는 세션키 요청 메시지를 제2 장치에 전송한다(S3280).The first device authentication when receiving the response message to obtain a time stamp (t *) for receiving the time the message, the second time stamp contained in the time stamp (t *) and the message for the message in the received time (t 2 ) the time difference between
Figure 112018108043559-pat00008
Greater than) is compared (S3160). The result of the comparison is that the threshold delay time
Figure 112018108043559-pat00009
If greater than), the procedure ends. The first device verifies the second certificate Cert T with the public key of the certificate authority (S3180), and decrypts the second cipher text CID T with the second public key PuK T , which is the public key of the second device (
Figure 112018108043559-pat00010
(S3200). At this time, the second ID obtained by decrypting
Figure 112018108043559-pat00011
) And second timestamp (
Figure 112018108043559-pat00012
) Is compared with the received second ID (ID T ) and the second time stamp (t 2 ) (S3220). If the comparison does not match, the procedure is terminated. The first device uses the random number generation function of the secure area to generate the first random number (
Figure 112018108043559-pat00013
) And the second random number (
Figure 112018108043559-pat00014
) Is generated (S3240). The first device obtains a third timestamp t 3 for the current time of the first device, obtains a first ID ID D and a first random number (
Figure 112018108043559-pat00015
) And the second random number (
Figure 112018108043559-pat00016
) And the third timestamp t 3 with the second public key PuK T , which is the public key of the second device (
Figure 112018108043559-pat00017
) To generate a third cipher text J (S3260). The first device transmits a session key request message including the third cipher text J and the third time stamp to the second device (S3280).

제2 장치는 세션키 요청 메시지를 수신하면 메시지를 수신한 시간에 대한 타임스탬프(t*)를 구하고, 메시지를 수신한 시간에 대한 타임스탬프(t*)와 메시지에 포함된 제3 타임스탬프(t3)의 시간 차이가 미리 설정된 임계 지연시간(

Figure 112018108043559-pat00018
)보다 큰 지 비교한다(S3300). 비교결과 해당 시간차이가 미리 설정된 임계 지연시간(
Figure 112018108043559-pat00019
)보다 큰 경우 절차를 종료한다. 제2 장치는 제3 암호문(J)을 제2 장치의 개인키인 제2 개인키(PrKT)로 복호화(
Figure 112018108043559-pat00020
)한다(S3320). 이때 복호화하여 획득한 제1 아이디(
Figure 112018108043559-pat00021
) 및 제3 타임스탬프(
Figure 112018108043559-pat00022
)를 인증 요청 메시지 수신시 저장한 제1 아이디(IDD) 및 세션키 요청 메시지에 포함된 제3 타임스탬프(t3)와 비교한다(S3340). 비교결과 일치하지 않으면 절차를 종료한다. 제2 장치는 보안 영역의 난수 생성 기능을 이용하여 제3 난수(
Figure 112018108043559-pat00023
)와, 제4 난수(
Figure 112018108043559-pat00024
)를 생성한다(S3360). 제2 장치는 제1 장치의 보안 영역(Secure World)과 제2 장치의 보안 영역(Secure World) 사이의 암호화 통신에 사용되는 제1 세션키(
Figure 112018108043559-pat00025
)를 제1 아이디(IDD)와, 제2 아이디(IDT)와, 제3 난수(
Figure 112018108043559-pat00026
)와, 제1 난수(
Figure 112018108043559-pat00027
)와, 제3 타임스탬프(t3)를 연결한 평문을 암호화 해시하여 생성(
Figure 112018108043559-pat00028
)한다(S3380). 제2 장치는 제1 장치의 일반 영역(Non-Secure World)과 제2 장치의 일반 영역(Non-Secure World) 사이의 암호화 통신에 사용되는 제2 세션키(
Figure 112018108043559-pat00029
)를 제1 아이디(IDD)와, 제2 아이디(IDT)와, 제4 난수(
Figure 112018108043559-pat00030
)와, 제2 난수(
Figure 112018108043559-pat00031
)와, 제3 타임스탬프(t3)를 연결한 평문을 암호화 해시하여 생성(
Figure 112018108043559-pat00032
)한다(S3400). 제2 장치는 현재 시간에 대한 제4 타임스탬프(t4)를 구하고, 제1 세션키(
Figure 112018108043559-pat00033
)와 제2 세션키(
Figure 112018108043559-pat00034
)와 제4 타임스탬프(t4)를 제1 장치의 공개키인 제1 공개키(PuKD)로 암호화(
Figure 112018108043559-pat00035
)하여 제4 암호문(L)을 생성한다(S3420). 제2 장치는 제4 암호문(L)과 제4 타임스탬프(t4)를 포함하는 세션키 분배 메시지를 제1 장치로 전송한다(S3440).The second device is the third time stamp contained in the time stamp (t *) the time stamp (t *) and the message to the to obtain, receive a message, time for one time received a message upon receiving the session key request message ( The time difference of t 3 is equal to the preset threshold delay time (
Figure 112018108043559-pat00018
Is greater than) (S3300). The result of the comparison is that the threshold delay time
Figure 112018108043559-pat00019
If greater than), the procedure ends. The second device decrypts the third cipher text J into a second private key PrK T which is a private key of the second device.
Figure 112018108043559-pat00020
(S3320). At this time, the first ID obtained by decrypting
Figure 112018108043559-pat00021
) And a third timestamp (
Figure 112018108043559-pat00022
) Is compared with the first ID (ID D ) stored when the authentication request message is received and the third time stamp (t 3 ) included in the session key request message (S3340). If the comparison does not match, the procedure is terminated. The second device uses the random number generation function of the security domain to generate a third random number (
Figure 112018108043559-pat00023
) And the fourth random number (
Figure 112018108043559-pat00024
) Is generated (S3360). The second device may be a first session key used for encrypted communication between the secure world of the first device and the secure world of the second device.
Figure 112018108043559-pat00025
), The first ID (ID D ), the second ID (ID T ), and the third random number (
Figure 112018108043559-pat00026
) And the first random number (
Figure 112018108043559-pat00027
) And a cryptographic hash of the plain text concatenating the third timestamp (t 3 )
Figure 112018108043559-pat00028
(S3380). The second device may be a second session key used for encrypted communication between the Non-Secure World of the first device and the Non-Secure World of the second device.
Figure 112018108043559-pat00029
), The first ID (ID D ), the second ID (ID T ), and the fourth random number (
Figure 112018108043559-pat00030
) And the second random number (
Figure 112018108043559-pat00031
) And a cryptographic hash of the plain text concatenating the third timestamp (t 3 )
Figure 112018108043559-pat00032
(S3400). The second device obtains a fourth timestamp t 4 for the current time, and the first session key (
Figure 112018108043559-pat00033
) And the second session key (
Figure 112018108043559-pat00034
) And the fourth timestamp t 4 with the first public key PuK D , which is the public key of the first device,
Figure 112018108043559-pat00035
) To generate a fourth cipher text (L) (S3420). The second device transmits a session key distribution message including the fourth cipher text L and the fourth time stamp t 4 to the first device (S3440).

제1 장치는 세션키 분배 메시지를 수신하면 메시지를 수신한 시간에 대한 타임스탬프(t*)를 구하고, 메시지를 수신한 시간에 대한 타임스탬프(t*)와 메시지에 포함된 제4 타임스탬프(t4)의 시간 차이가 미리 설정된 임계 지연시간(

Figure 112018108043559-pat00036
)보다 큰 지 비교한다(S3460). 비교결과 해당 시간차이가 미리 설정된 임계 지연시간(
Figure 112018108043559-pat00037
)보다 큰 경우 절차를 종료한다. 제1 장치는 제4 암호문(L)을 제1 장치의 개인키인 제1 개인키(PrKD)로 복호화(
Figure 112018108043559-pat00038
)하여 제1 세션키(
Figure 112018108043559-pat00039
)와 제2 세션키(
Figure 112018108043559-pat00040
)를 획득한다(S3480). 제1 장치 및 제2 장치는 제2 세션키(
Figure 112018108043559-pat00041
)를 각각의 일반 영역(Non-Secure World)로 전송한다(S3500, S3520).The first device of the fourth time stamp contained in the time stamp (t *) the time stamp (t *) and the message to the to obtain, receive a message, time for one time received a message upon receiving a session key distribution message ( The time difference of t 4 is a preset threshold delay time (
Figure 112018108043559-pat00036
Is greater than) (S3460). The result of the comparison is that the threshold delay time
Figure 112018108043559-pat00037
If greater than), the procedure ends. The first device decrypts the fourth cipher text L with the first private key PrK D , which is the private key of the first device.
Figure 112018108043559-pat00038
) And the first session key (
Figure 112018108043559-pat00039
) And the second session key (
Figure 112018108043559-pat00040
) Is obtained (S3480). The first device and the second device have a second session key (
Figure 112018108043559-pat00041
) Is transmitted to each of the non-secure worlds (S3500 and S3520).

이상에서 본 발명을 첨부된 도면을 참조하는 실시 예들을 통해 설명하였지만 이에 한정되는 것은 아니며, 이들로부터 당업자라면 자명하게 도출할 수 있는 다양한 변형 예들을 포괄하도록 해석되어야 한다. 특허청구범위는 이러한 변형 예들을 포괄하도록 의도되었다.Although the present invention has been described above with reference to the accompanying drawings, the present invention is not limited thereto, and it should be interpreted to cover various modifications that will be apparent to those skilled in the art. The claims are intended to cover these modifications.

Claims (6)

각각이 일반적인 어플리케이션이 실행되는 일반 영역과 신뢰할 수 있는 어플리케이션이 실행되는 보안 영역으로 분리된 신뢰 실행 환경을 포함하는 인포테인먼트 장치와 텔레메틱스 제어 장치를 포함하는 인포테인먼트 시스템으로, 상기 일반 영역에 네트워크 인터페이스가 존재하고, 보안 영역에서 실행되는 어플리케이션은 일반 영역에 존재하는 상기 네트워크 인터페이스를 통하여 트랜스포트 계층 보안(Transport Layer Security : TLS)을 통해 외부 인터넷과 통신하며, 일반영역에서 실행되는 어플리케이션은 모니터 모드(monitor mode)를 통해 보안 영역의 데이터를 이용할 수 있는 인포테인먼트 장치와 텔레메틱스 제어 장치 사이의 암호화 세션키 수립 방법에 있어서,
인포테인먼트 장치가 제1 아이디 및 제1 타임스탬프를 제1 개인키로 암호화한 제1 암호문과, 제1 아이디와, 제1 타임스탬프를 포함하는 메시지를 텔레메틱스 제어 장치로 전송하여 인증을 요청하는 단계;
텔레메틱스 제어 장치가 제1 암호문을 제1 공개키로 복호화하여 획득한 제1 아이디 및 제1 타임스탬프를 수신한 제1 아이디 및 제1 타임스탬프와 비교하여 인포테인먼트 장치를 인증하는 단계;
인포테인먼트 장치가 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 제2 공개키로 암호화한 제3 암호문과 제3 타임스탬프를 포함하는 메시지를 텔레메틱스 제어 장치로 전송하여 세션키를 요청하는 단계;
텔레메틱스 제어 장치가 세션키 요청 메시지를 수신하면 메시지를 수신한 시간에 대한 타임스탬프를 구하고, 메시지를 수신한 시간에 대한 타임스탬프와 메시지에 포함된 제3 타임스탬프의 시간 차이가 미리 설정된 임계 지연시간보다 큰 지 비교하여 시간 차이가 임계 지연 시간보다 큰 경우 절차를 종료하는 단계;
텔레메틱스 제어 장치가 제3 암호문을 제2 개인키로 복호화하여 제1 아이디와, 제1 난수와, 제2 난수와, 제3 타임스탬프를 획득하는 단계;
텔레메틱스 제어 장치가 제3 암호문을 제2 개인키로 복호화하여 획득한 제1 아이디 및 제3 타임스탬프를 제1 아이디와 수신한 제3 타임스탬프와 일치하는지 비교하는 단계;
일치하는 경우, 텔레메틱스 제어 장치가 제1 아이디와, 제2 아이디와, 제1 난수와, 제3 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여, 인포테인먼트 장치와 텔레메틱스 제어 장치의 각각의 보안 영역(Secure World) 사이의 통신에 사용하는 제1 세션키를 생성하는 단계;
텔레메틱스 제어 장치가 제1 아이디와, 제2 아이디와, 제2 난수와, 제4 난수와, 제3 타임스탬프를 연결한 평문을 암호화 해시하여, 인포테인먼트 장치와 텔레메틱스 제어 장치의 각각의 일반 영역(Non-Secure World) 사이의 통신에 사용하는 제2 세션키를 생성하는 단계;
텔레메틱스 제어 장치가 제1 세션키와 제2 세션키를 제1 공개키로 암호화한 제4 암호문과 제4 타임스탬프를 포함하는 메시지를 인포테인먼트 장치로 전송하여 세션키를 분배하는 단계;
인포테인먼트 장치가 제4 암호문을 제1 개인키로 복호화하여 제1 세션키 및 제2 세션키를 획득하는 단계; 및
인포테인먼트 장치 및 텔레메틱스 제어 장치가 제2 세션키를 자신의 신뢰 실행 환경의 일반 영역(Non-Secure World)에 전달하는 단계;
를 포함하되,
인포테인먼트 장치 및 텔레메틱스 제어 장치는 암호화, 복호화, 난수 생성 및 암호화 해시를 신뢰 실행 환경의 보안 영역(Secure World)에서 수행하는 신뢰 실행 환경 기반 암호화 세션키 수립 방법.
An infotainment system comprising an infotainment device and a telematics control device, each having a trusted execution environment separated into a general area in which a general application runs and a security area in which a trusted application runs, wherein a network interface exists in the general area. The application running in the security area communicates with the external Internet through Transport Layer Security (TLS) via the network interface existing in the general area, and the application running in the general area is in monitor mode. In the encryption session key establishment method between the infotainment device and the telematics control device that can use the data in the security area through:
Requesting, by the infotainment device, a message including a first cipher text that encrypts the first ID and the first time stamp with the first private key, a first ID, and a first time stamp to the telematics control device for authentication;
Authenticating, by the telematics control device, the infotainment device by comparing the first ID and the first time stamp received with the first ID and the first time stamp obtained by decrypting the first cipher text with the first public key;
The infotainment device transmits a message including the first ID, the first random number, the second random number, and the third ciphertext and the third timestamp by encrypting the third timestamp with the second public key to the telematics control device. Requesting;
When the telematics control device receives the session key request message, the telematics control device obtains a timestamp for the time at which the message is received, and a threshold delay time in which a time difference between the time when the message is received and a time difference between the third timestamp included in the message is preset. Terminating the procedure if the time difference is greater than the threshold delay time compared to greater than;
Decrypting, by the telematics control device, the third cipher text with the second private key to obtain a first ID, a first random number, a second random number, and a third timestamp;
Comparing, by the telematics control apparatus, the first ID and the third timestamp obtained by decrypting the third cipher text with the second private key to match the first ID and the received third timestamp;
If there is a match, the telematics control device encrypts and hashes the plain text concatenating the first ID, the second ID, the first random number, the third random number, and the third timestamp, so that each of the infotainment device and the telematics control device Generating a first session key for use in communication between Secure Worlds;
The telematics control device encrypts and hashes the plain text obtained by connecting the first ID, the second ID, the second random number, the fourth random number, and the third timestamp, and thus, each general area of the infotainment device and the telematics control device (Non). Generating a second session key for use in communication between Secure Worlds;
Distributing, by the telematics control device, a session key by transmitting a message including a fourth cipher text and a fourth time stamp that encrypts the first session key and the second session key to the first public key to the infotainment device;
Obtaining, by the infotainment device, the first ciphertext with the first private key to obtain a first session key and a second session key; And
The infotainment device and the telematics control device transferring the second session key to a non-secure world of its trusted execution environment;
Including,
An infotainment device and a telematics control device establish a cryptographic session key based on a trusted execution environment that performs encryption, decryption, random number generation, and cryptographic hashes in the secure world of the trusted execution environment.
삭제delete 제 1 항에 있어서, 상기 방법은 인포테인먼트 장치 인증 후,
텔레메틱스 제어 장치가 제2 아이디와, 제2 타임스탬프를 제2 개인키로 암호화한 제2 암호문과, 제2 아이디와, 제2 타임스탬프를 포함하는 메시지를 인포테인먼트 장치로 전송하여 인증 응답하는 단계; 및
인포테인먼트 장치가 제2 암호문을 제2 공개키로 복호화하여 획득한 제2 아이디 및 제2 타임스탬프를 수신한 제2 아이디 및 제2 타임스탬프와 비교하여 텔레메틱스 제어 장치를 인증하는 단계;
를 더 포함하는 신뢰 실행 환경 기반 암호화 세션키 수립 방법.
The method of claim 1, wherein the method is performed after infotainment device authentication:
Transmitting, by the telematics control device, a message including a second ID, a second ciphertext that encrypts the second timestamp with a second private key, a second ID, and a second timestamp to the infotainment device for authentication response; And
Authenticating, by the infotainment device, the telematics control device by comparing the second ciphertext with the second ID and the second timestamp received by decrypting the second cipher text with the second public key;
Trusted execution environment-based encryption session key establishment method further comprising.
제 3 항에 있어서,
인포테인먼트 장치가 텔레메틱스 제어 장치로 전송하는 인증 요청은 제1 인증서를 더 포함하고,
상기 방법은
인증 요청을 수신한 텔레메틱스 제어 장치가 제1 인증서를 인증기관의 공개키로 검증하는 단계;
를 더 포함하는 신뢰 실행 환경 기반 암호화 세션키 수립 방법.
The method of claim 3, wherein
The authentication request sent by the infotainment device to the telematics control device further includes a first certificate,
The method is
Verifying, by the telematics control device receiving the authentication request, the first certificate with the public key of the certificate authority;
Trusted execution environment-based encryption session key establishment method further comprising.
제 4 항에 있어서,
텔레메틱스 제어 장치가 인포테인먼트 장치로 전송하는 인증 응답은 제2 인증서를 더 포함하며,
상기 방법은
인증 응답을 수신한 인포테인먼트 장치가 제2 인증서를 인증기관의 공개키로 검증하는 단계;
를 더 포함하는 신뢰 실행 환경 기반 암호화 세션키 수립 방법.
The method of claim 4, wherein
The authentication response sent by the telematics control device to the infotainment device further includes a second certificate,
The method is
Verifying, by the infotainment device receiving the authentication response, the second certificate with the public key of the certificate authority;
Trusted execution environment-based encryption session key establishment method further comprising.
삭제delete
KR1020180132352A 2018-10-31 2018-10-31 Session key establishment method based on trusted execution environment KR102020898B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180132352A KR102020898B1 (en) 2018-10-31 2018-10-31 Session key establishment method based on trusted execution environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180132352A KR102020898B1 (en) 2018-10-31 2018-10-31 Session key establishment method based on trusted execution environment

Publications (1)

Publication Number Publication Date
KR102020898B1 true KR102020898B1 (en) 2019-09-11

Family

ID=67949043

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180132352A KR102020898B1 (en) 2018-10-31 2018-10-31 Session key establishment method based on trusted execution environment

Country Status (1)

Country Link
KR (1) KR102020898B1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343273A (en) * 2020-02-27 2020-06-26 电子科技大学 Attribute-based strategy hiding outsourcing signcryption method in Internet of vehicles environment
CN113343278A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Login request verification method and device for preventing CSRF attack
CN114866267A (en) * 2021-02-03 2022-08-05 支付宝(杭州)信息技术有限公司 Method and device for realizing safe multicast in block chain network
CN115333761A (en) * 2022-03-29 2022-11-11 中国船舶重工集团公司第七一一研究所 Equipment communication method and device applied to ship and server
CN116244750A (en) * 2023-03-20 2023-06-09 云海链控股股份有限公司 Secret-related information maintenance method, device, equipment and storage medium
WO2023226778A1 (en) * 2022-05-26 2023-11-30 深圳Tcl新技术有限公司 Identity authentication method and apparatus, and electronic device and computer-readable storage medium
CN117235693A (en) * 2023-11-14 2023-12-15 杭州安恒信息技术股份有限公司 Trusted authentication and secure channel establishment method of trusted execution environment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101173825B1 (en) * 2011-12-29 2012-08-16 경일대학교산학협력단 Key agreement method of vsat satellite communications system base on elliptic curve cryptosystem
KR20140059485A (en) * 2012-11-08 2014-05-16 숭실대학교산학협력단 Device authentication apparatus and method using physical unclonable function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101173825B1 (en) * 2011-12-29 2012-08-16 경일대학교산학협력단 Key agreement method of vsat satellite communications system base on elliptic curve cryptosystem
KR20140059485A (en) * 2012-11-08 2014-05-16 숭실대학교산학협력단 Device authentication apparatus and method using physical unclonable function

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A. Menezes 외 2명, Handbook of Applied Cryptograhy, Chapter.10, CRC Press (1996.)* *
A. Menezes 외 2명, Handbook of Applied Cryptograhy, Chapter.12, CRC Press (1996.)* *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343273A (en) * 2020-02-27 2020-06-26 电子科技大学 Attribute-based strategy hiding outsourcing signcryption method in Internet of vehicles environment
CN114866267A (en) * 2021-02-03 2022-08-05 支付宝(杭州)信息技术有限公司 Method and device for realizing safe multicast in block chain network
CN114866267B (en) * 2021-02-03 2023-12-05 支付宝(杭州)信息技术有限公司 Method and device for realizing secure multicast in block chain network
CN113343278A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Login request verification method and device for preventing CSRF attack
CN113343278B (en) * 2021-07-05 2022-07-26 湖南快乐阳光互动娱乐传媒有限公司 Login request verification method and device for preventing CSRF attack
CN115333761A (en) * 2022-03-29 2022-11-11 中国船舶重工集团公司第七一一研究所 Equipment communication method and device applied to ship and server
CN115333761B (en) * 2022-03-29 2023-09-26 中国船舶集团有限公司第七一一研究所 Equipment communication method and device applied to ship and server
WO2023226778A1 (en) * 2022-05-26 2023-11-30 深圳Tcl新技术有限公司 Identity authentication method and apparatus, and electronic device and computer-readable storage medium
CN116244750A (en) * 2023-03-20 2023-06-09 云海链控股股份有限公司 Secret-related information maintenance method, device, equipment and storage medium
CN117235693A (en) * 2023-11-14 2023-12-15 杭州安恒信息技术股份有限公司 Trusted authentication and secure channel establishment method of trusted execution environment
CN117235693B (en) * 2023-11-14 2024-02-02 杭州安恒信息技术股份有限公司 Trusted authentication and secure channel establishment method of trusted execution environment

Similar Documents

Publication Publication Date Title
KR102020898B1 (en) Session key establishment method based on trusted execution environment
US10218502B2 (en) Confidential communication management
US8130961B2 (en) Method and system for client-server mutual authentication using event-based OTP
KR102015201B1 (en) Efficient start-up for secured connections and related services
US11533297B2 (en) Secure communication channel with token renewal mechanism
CN110771089A (en) Secure communications providing forward privacy
JP6471112B2 (en) COMMUNICATION SYSTEM, TERMINAL DEVICE, COMMUNICATION METHOD, AND PROGRAM
CA2551113A1 (en) Authentication system for networked computer applications
CA2371137A1 (en) Secure distribution and protection of encryption key information
JP2005102163A (en) Equipment authentication system, server, method and program, terminal and storage medium
KR20080004165A (en) Method for device authentication using broadcast encryption
CN110662091B (en) Third-party live video access method, storage medium, electronic device and system
WO2020206014A1 (en) Digital rights management authorization token pairing
CN111163470B (en) Core network element communication method and device, computer storage medium and electronic equipment
WO2022135391A1 (en) Identity authentication method and apparatus, and storage medium, program and program product
CN115499250A (en) Data encryption method and device
JP2016522637A (en) Secured data channel authentication that implies a shared secret
KR102198178B1 (en) Session key establishment method using blockchain
KR101992325B1 (en) Session key establishment method based on elliptic curve cryptography using trusted execution environment
JP2015186101A (en) Key exchange device and key exchange method
KR20200060930A (en) Cryptographic communication method between telematics devices
CN113886781B (en) Multi-authentication encryption method, system, electronic device and medium based on block chain
CN115580403B (en) PKI-based computing node access control method
CN114095930B (en) Satellite network user violation processing method combined with access authentication and related equipment
KR20230152584A (en) Secure recovery of private keys

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant