KR102398764B1 - Method and apparatus of securing message in network for vehicle - Google Patents

Method and apparatus of securing message in network for vehicle Download PDF

Info

Publication number
KR102398764B1
KR102398764B1 KR1020200173760A KR20200173760A KR102398764B1 KR 102398764 B1 KR102398764 B1 KR 102398764B1 KR 1020200173760 A KR1020200173760 A KR 1020200173760A KR 20200173760 A KR20200173760 A KR 20200173760A KR 102398764 B1 KR102398764 B1 KR 102398764B1
Authority
KR
South Korea
Prior art keywords
authentication
message
vehicle control
received
occupancy
Prior art date
Application number
KR1020200173760A
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 KR1020200173760A priority Critical patent/KR102398764B1/en
Application granted granted Critical
Publication of KR102398764B1 publication Critical patent/KR102398764B1/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/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/3236Cryptographic 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/3242Cryptographic 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40104Security; Encryption; Content protection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40143Bus networks involving priority mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/84Vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

Disclosed are a vehicle control message authenticating method and a device thereof which receive a vehicle control message including priority order information from a first communication node and an occupancy rate from an MCU and selectively generate a message authentication code according to the priority order information and the received occupancy rate to transmit an authentication message to a second communication node.

Description

차량 제어 메시지 인증 방법 및 그 장치{Method and apparatus of securing message in network for vehicle}Vehicle control message authentication method and apparatus thereof

본 발명은 차량 제어 메시지 인증 방법 및 그 장치에 관한 것으로, ECU로부터 수신한 메시지를 MCU의 점유율에 따라 다른 방식으로 메시지 인증코드를 생성하고, 생성된 메시지 인증코드를 이용하여 메시지를 인증하고, 인증 메시지를 우선 순위에 따라 순서를 변경하여 송신하는 차량 제어 메시지 인증 방법 및 그 장치에 관한 것이다.The present invention relates to a vehicle control message authentication method and apparatus, and generates a message authentication code in a different way according to the occupancy of the MCU for a message received from an ECU, and uses the generated message authentication code to authenticate the message, and to authenticate the message. The present invention relates to a vehicle control message authentication method and apparatus for transmitting messages by changing the order according to priority.

IT 기술이 지속적으로 발전하면서 가전기기는 물론 차량 역시 다양한 IT 기기들이 탑재되고 있다. 차량에 IT 기기들이 탑재되기 시작하면서 차량 내의 전자제어장치인 ECU(Electronic Control Unit)도 다양한 기능을 지원하기에 이르렀고 탑재되는 수량 또한 증가하고 있으며, 필요에 따라 차량의 적재적소에 분산 배치되어 있다.As IT technology continues to develop, not only home appliances but also vehicles are equipped with various IT devices. As IT devices begin to be mounted on vehicles, the ECU (Electronic Control Unit), an electronic control device in the vehicle, also supports various functions, and the number of mounted devices is also increasing.

차량 내에 분산 배치된 ECU들은 상호 유기적으로 작용하여 동작해야 하기 때문에 이들은 기본적으로 통신을 통해 상호 상태를 인지해야 한다. 이를 위해서 차량 내 수십 개의 ECU들은 차량용 네트워크로 연결되어 있다. 공지된 바와 같이 차량용 네트워크는 CAN(Controller Area Network)이 사실상 표준 역할을 하면서 다양한 통신방식(LIN, MOST, Flexray, CAN-FD, Ethernet, bluetooth 등)으로 확대되고 있다.Since ECUs distributed in a vehicle must interact and operate in an organic way, they must basically recognize the mutual state through communication. For this purpose, dozens of ECUs in the vehicle are connected to the vehicle network. As is known, the vehicle network is being expanded to various communication methods (LIN, MOST, Flexray, CAN-FD, Ethernet, bluetooth, etc.) while CAN (Controller Area Network) plays a de facto standard role.

차량에 탑재되는 통신 노드들의 수가 증대되고 있다는 점, 자율주행 적용으로 기존에 비해 상대적으로 더 많은 통신 부하를 처리해야 한다는 점, 외부 네트워크와의 연동이 요구된다는 점, 각종 사이버 공격에 노출될 빈도가 높아져서 보안 범위와 기능이 확대되고 있는 점 등을 종합적으로 고려해 볼 때, 차량 내부의 통신 제어 장치 내의 MCU의 처리 능력의 부족으로 메시지 인증을 할 수 없는 경우가 발생하여, 차량 운행 제어의 위험도가 증가하고 있는 실정이다.The fact that the number of communication nodes mounted on the vehicle is increasing, that the application of autonomous driving requires handling a relatively larger communication load than before, that interworking with external networks is required, and that the frequency of exposure to various cyber attacks is increasing Considering the fact that the security scope and functions are expanding due to the high level of security, there are cases where message authentication cannot be performed due to the lack of processing power of the MCU in the communication control device inside the vehicle, which increases the risk of vehicle operation control. is currently doing.

본 발명이 해결하고자 하는 과제는 MCU의 점유율이 높은 경우에는 간단한 인증을 통하여 메시지 인증코드를 생성하고, MCU의 점유율이 매우 높은 경우에는 새로운 인증 없이 기존의 메시지 인증코드를 이용하여 메시지를 인증한 후, 메시지의 우선 순위에 따라 인증 메시지으 순서를 변경하여 송신함으로써, MCU의 부담을 줄여주이고, 더욱 보안성을 강화한 차량 제어 메시지 인증 방법 및 그 장치를 제공하는데 있다.The problem to be solved by the present invention is to generate a message authentication code through simple authentication when the occupancy of the MCU is high, and after authenticating the message using the existing message authentication code without new authentication when the occupancy of the MCU is very high. , to provide a vehicle control message authentication method and apparatus for reducing the burden on the MCU and enhancing security by changing the order of authentication messages and transmitting them according to the priority of the messages.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따라, 차량 제어 메시지 인증 방법은 제 1 통신노드로부터 우선 순위 정보를 포함하는 차량 제어용 메시지를 수신하는 단계; MCU(Micro Controller Unit)로부터 점유율을 수신하는 단계; 상기 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성하는 단계; 상기 수신된 점유율이 상기 제 1 점유율 내지 제 2 점유율인 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 중 어느 하나의 인증 단계만을 이용하여 메시지 인증코드를 생성하는 단계; 상기 수신된 점유율이 상기 제 2 점유율을 초과하는 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 없이 대기 상태를 유지하고, 상기 대기 상태가 소정의 시간을 초과하는 경우, 기존에 저장되어 있는 메시지 인증코드를 재사용하는 단계; 상기 수신된 차량 제어용 메시지 및 상기 생성된 또는 재사용되는 메시지 인증코드에 기초하여 인증 메시지를 생성하는 단계; 및 상기 생성된 인증 메시지가 복수인 경우, 상기 우선 순위 정보에 따라 상기 인증 메시지의 순서를 변경하여 순차적으로 인증 메시지를 제 2 통신 노드로 송신하는 단계를 포함한다.According to an embodiment of the present invention for solving the above technical problem, a vehicle control message authentication method includes: receiving a vehicle control message including priority information from a first communication node; Receiving the share from the MCU (Micro Controller Unit); generating a message authentication code using a first authentication step using a hash function and a second authentication step using a secret key when the received share is less than the first share; generating a message authentication code by using only one of the first authentication step and the second authentication step when the received occupancy is the first occupancy or the second occupancy; When the received occupancy rate exceeds the second occupancy rate, the standby state is maintained without the first authentication step and the second authentication stage, and when the standby state exceeds a predetermined time, the previously stored message reusing the authentication code; generating an authentication message based on the received vehicle control message and the generated or reused message authentication code; and when there are a plurality of the generated authentication messages, sequentially transmitting the authentication messages to the second communication node by changing the order of the authentication messages according to the priority information.

상기 기술적 과제를 해결하기 위한 본 발명의 다른 실시예에 따라, 차량 제어 메시지 인증 장치는 제 1 통신노드로부터 우선 순위 정보를 포함하는 차량 제어용 메시지 및 MCU(Micro Controller Unit)로부터 점유율을 수신하는 수신부; 상기 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성하고, 상기 수신된 점유율이 상기 제 1 점유율 내지 제 2 점유율인 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 중 어느 하나의 인증 단계만을 이용하여 메시지 인증코드를 생성하고, 상기 수신된 점유율이 상기 제 2 점유율을 초과하는 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 없이 대기 상태를 유지하고, 상기 대기 상태가 소정의 시간을 초과하는 경우, 기존에 저장되어 있는 메시지 인증코드를 재사용하고, 상기 수신된 차량 제어용 메시지 및 상기 생성된 또는 재사용되는 메시지 인증코드에 기초하여 인증 메시지를 생성하는 인증부; 및 상기 생성된 인증 메시지가 복수인 경우, 상기 우선 순위 정보에 따라 상기 인증 메시지의 순서를 변경하여 순차적으로 인증 메시지를 제 2 통신 노드로 송신하는 송신부를 포함한다.According to another embodiment of the present invention for solving the above technical problem, the vehicle control message authentication apparatus includes: a receiving unit for receiving a vehicle control message including priority information from a first communication node and a share from an MCU (Micro Controller Unit); When the received share is less than the first share, a message authentication code is generated using a first authentication step using a hash function and a second authentication step using a secret key, and the received share is the first share to the second In the case of occupancy, a message authentication code is generated using only one of the first authentication step and the second authentication step, and in the case of the received occupancy exceeding the second occupancy, the first authentication step and maintaining the standby state without the second authentication step, and when the standby state exceeds a predetermined time, reuses the message authentication code stored previously, and the received vehicle control message and the generated or reused message an authentication unit for generating an authentication message based on the message authentication code; and a transmitter configured to sequentially transmit the authentication message to the second communication node by changing the order of the authentication message according to the priority information when there are a plurality of generated authentication messages.

본 발명은 MCU의 점유율에 따라 간단한 인증으로 메시지 인증코드를 생성하거나, 새로운 인증 없이 기존의 메시지 인증코드를 이용하여 MCU의 부담을 줄이고, 또한, MCU의 점유율로 인하여 인증 없이 메시지가 전달되는 것을 방지하고, 인증 메시지 순서 변경으로 말미암아 MCU의 부담 없이 보안성을 강화할 수 있는 장점이 있다. The present invention generates a message authentication code with simple authentication according to the share of the MCU, or reduces the burden on the MCU by using an existing message authentication code without new authentication, and also prevents message delivery without authentication due to the share of the MCU In addition, there is an advantage that security can be strengthened without burden on the MCU by changing the order of authentication messages.

도 1은 본 발명의 일 실시예에 따른 차량 제어 메시지 인증 방법에 관한 흐름도를 나타내는 도면이다.
도 2는 본 발명의 일 실시예에 따른 차량 제어 메시지 인증 장치에 관한 블록다이어그램을 나타내는 도면이다.
1 is a diagram illustrating a flowchart of a vehicle control message authentication method according to an embodiment of the present invention.
2 is a diagram illustrating a block diagram of an apparatus for authenticating a vehicle control message according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예를 참조하면 명확해질 것이다. 그러나 본 발명은 여기서 설명되는 실시예들에 한정되지 않고 다른 형태로 구체화될 수도 있다. 오히려, 여기서 소개되는 실시예들은 개시된 내용이 철저하고 완전해질 수 있도록 그리고 당업자에게 본 발명의 사상이 충분히 전달될 수 있도록 하기 위해 제공되는 것이다.Advantages and features of the present invention, and methods for achieving them, will become apparent with reference to the embodiments described below in detail in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments described herein and may be embodied in other forms. Rather, the embodiments introduced herein are provided so that the disclosed subject matter may be thorough and complete, and that the spirit of the present invention may be sufficiently conveyed to those skilled in the art.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It is to be understood that it does not preclude the possibility of the presence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미가 있는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.A preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 차량 제어 메시지 인증 방법에 관한 흐름도를 나타내는 도면이다.1 is a diagram illustrating a flowchart of a vehicle control message authentication method according to an embodiment of the present invention.

도 1을 참조하면, 단계 110에서, 차량 제어 메시지 인증 방법을 수행하는 장치(이하, '차량 제어 메시지 인증 장치'라고 함)는 제 1 통신 노드로부터 차량 제어용 메시지를 수신한다.Referring to FIG. 1 , in step 110, an apparatus for performing a vehicle control message authentication method (hereinafter, referred to as a 'vehicle control message authentication apparatus') receives a vehicle control message from a first communication node.

통신 노드는 엔드 노드를 의미하며, 엔드 노드는 차량에 탑재되어 특수 목적 혹은 기능을 제공하기 위해 설치되는 장치들을 제어하는 ECU(Electronic Control Unit)로 이해하는 것이 바람직하다. ECU는 자동차의 엔진, 자동변속기, ABS 따위의 상태를 컴퓨터로 제어하는 전자제어 장치를 의미한다.A communication node means an end node, and it is desirable to understand the end node as an ECU (Electronic Control Unit) that is mounted on a vehicle and controls devices installed to provide a special purpose or function. ECU refers to an electronic control device that controls the state of a vehicle's engine, automatic transmission, and ABS with a computer.

차량 제어 메시지 인증 장치와 통신노드들은 구현 방식에 따라 CAN 프로토콜, MOST 프로토콜, 이더넷 프로토콜 등을 지원할 수 있으며, 여러 형태(star, ring, bus, mesh,..) 토폴로지 형태로 연결될 수 있다.The vehicle control message authentication device and communication nodes may support CAN protocol, MOST protocol, Ethernet protocol, etc. depending on the implementation method, and may be connected in various types (star, ring, bus, mesh,...) topology type.

통신 노드들은 고유의 IP 주소가 설정되어 있으며 상위 노드로부터 IP 주소를 포함한 메시지를 수신할 수 있고, 수신된 메시지에 포함된 IP 주소를 자신의 IP 주소로 설정할 수 있다. 이는 예시에 불과하며 통신 노드의 IP 주소는 다양한 방식을 통해 설정될 수 있다.Communication nodes have their own IP addresses set, and can receive messages including IP addresses from upper nodes, and can set IP addresses included in the received messages as their own IP addresses. This is only an example, and the IP address of the communication node may be set through various methods.

차량 제어 메시지 인증 장치는 차량용 네트워크를 구성하는 통신 노드들의 식별정보를 저장하며 접근한 통신 노드에 대한 인증을 수행하고 그 인증결과에 따라 접근을 허용하거나 차단하는 역할을 수행할 수도 있다. The vehicle control message authentication apparatus stores identification information of communication nodes constituting the vehicle network, performs authentication on the accessed communication node, and may serve to allow or block access according to the authentication result.

본 발명의 일 실시예에서, 차량 제어용 메시지에는 우선 순위를 나타내는 정보가 메시지의 일부에 포함되어 있을 수 있다. 우선 순위는 메시지 처리에 있어서 다른 메시지보다 우선으로 처리되는 순위를 말하는 것이다. 우선 순위는 차량 운행 중 위험 정도에 따라 미리 결정되어 있다. 메시지는 CAN 메시지가 바람직하다. CAN(Controller Area Network)이란, 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격이다. CAN 통신에서 데이터 송수신은 메시지 프레임을 사용하여 이루어진다. 본 발명의 일 실시예에 있어서, 우선 순위는 CAN 메시지의 헤더 영역에 정의되어 저장되어 있다.In an embodiment of the present invention, information indicating priority may be included in a part of the message for vehicle control. Priority refers to the priority of processing a message over other messages in message processing. The priority is predetermined according to the degree of risk while driving the vehicle. The message is preferably a CAN message. CAN (Controller Area Network) is a standard communication standard designed for microcontrollers or devices to communicate with each other in a vehicle without a host computer. In CAN communication, data transmission and reception is performed using message frames. In one embodiment of the present invention, the priority is defined and stored in the header area of the CAN message.

단계 120에서, 차량 제어 메시지 인증 장치는 차량용 통신제어장치 내에 포함된 마이크로 컨트롤러인 MCU(Micro Controller Unit)로부터 점유율(또는 이용률)을 수신한다. MCU는 차량용 통신제어장치를 제어하기 위한 전용 프로세서로 컴퓨터의 중앙연산처리장치(CPU)에 해당되는 것으로 볼 수 있다.In step 120, the vehicle control message authentication device receives a share (or utilization rate) from a microcontroller (MCU) that is a microcontroller included in the vehicle communication control device. The MCU is a dedicated processor for controlling the communication control device for a vehicle, and it can be seen as corresponding to the central processing unit (CPU) of a computer.

단계 130에서, 차량 제어 메시지 인증 장치는 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성한다.In step 130, when the received occupancy is less than the first occupancy, the vehicle control message authentication device generates a message authentication code using a first authentication step using a hash function and a second authentication step using a secret key.

메시지 인증코드를 생성하는 방법은 두 인증 단계의 암호화 과정으로 수행된다. 제 1 인증 단계는 차량 제어 메시지 인증 장치가 무결성 암호화 방법으로 소정의 해쉬 알고리즘을 통하여 수신된 메시지를 해쉬 값으로 생성한다. 해쉬 함수는 문자열을 고정 길이의 이진 문자열로 매핑하여 주는 함수이다. 여기에서 무결성이란 입력 데이터의 고유한 값을 그대로 유지하고 있음을 증명할 수 있는 자료를 남겨두는 것이다.The method of generating the message authentication code is performed as an encryption process of two authentication steps. In the first authentication step, the vehicle control message authentication apparatus generates a received message as a hash value through a predetermined hash algorithm as an integrity encryption method. The hash function is a function that maps a string to a binary string of fixed length. Integrity here means leaving data that can prove that the unique value of the input data is maintained as it is.

제 2 인증 단계는 차량 제어 메시지 인증 장치가 소정의 인증 알고리즘을 이용하여 공유 비밀키를 추가하여 수신된 메시지를 암호화한다. 공유 비밀키는 송신측 및 수신측이 모두 가지고 있어야 한다.In the second authentication step, the vehicle control message authentication device encrypts the received message by adding the shared secret key using a predetermined authentication algorithm. The shared secret key must be possessed by both the sender and receiver.

차량 제어 메시지 인증 장치는 제 1 인증 단계 및 제 2 인증 단계를 거쳐 메시지 인증코드를 생성한다. The vehicle control message authentication device generates a message authentication code through a first authentication step and a second authentication step.

본 발명의 일 실시예에 있어서, 수신된 MCU 점유율이 제 1 점유율 미만인 경우에는 차량 제어 메시지 인증 장치는 두 인증 단계 모두의 인증 단계를 통하여 메시지 인증코드를 생성한다. 바람직하게는 제 1 점유율은 70%이다.In one embodiment of the present invention, when the received MCU occupancy is less than the first occupancy, the vehicle control message authentication device generates a message authentication code through the authentication steps of both authentication steps. Preferably, the first occupancy is 70%.

단계 140에서, 수신된 MCU 점유율이 제 1 점유율 이상 제 2 점유율 미만인 경우에는 차량용 통신제어장치의 보안 장치는 두 인증 단계 중 하나의 인증 단계만을 수행하여 메시지 인증코드를 생성한다. 그 후, 차량용 통신제어장치의 보안 장치는 생성된 메시지 인증코드에 기초하여 이더넷 메시지를 생성한다. 바람직하게는 제 2 점유율은 90%이다.In step 140, when the received MCU occupancy is greater than or equal to the first occupancy and less than the second occupancy, the security device of the vehicle communication control device performs only one of the two authentication steps to generate a message authentication code. Thereafter, the security device of the vehicle communication control device generates an Ethernet message based on the generated message authentication code. Preferably the second occupancy is 90%.

단계 150에서, 수신된 MCU 점유율이 제 2 점유율 이상인 경우에는 차량 제어 메시지 인증 장치는 메시지 인증코드를 생성하지 않고 대기한다. In step 150, if the received MCU occupancy is equal to or greater than the second occupancy, the vehicle control message authentication device waits without generating a message authentication code.

다만, 계속 대기 상태를 유지하는 경우에는 인증 없이 메시지를 전달하게되는 문제가 발생하기 때문에, MCU에 부담을 주지 않는 정도에서의 인증을 통하여 메시지를 전달할 수 있다.However, if the standby state is continuously maintained, a problem of transmitting the message without authentication occurs, so that the message can be transmitted through authentication at a level that does not burden the MCU.

단계 160에서, 대기 상태가 소정의 시간을 경과한 이후에는, 차량 제어 메시지 인증 장치는 이전에 생성된 메시지 인증코드를 재사용한다. 이전에 생성된 메시지 인증코드는 차량 제어 메시지 인증 장치에 저장되어 있다. 만약 대기 상태가 소정의 시간을 경과하지 않는 상태에서 MCU의 점유율이 변화하는 경우, MCU의 점유율에 따라, 단계 130 또는 단계 140이 실행된다.In step 160, after the waiting state elapses a predetermined time, the vehicle control message authentication apparatus reuses the previously generated message authentication code. The previously generated message authentication code is stored in the vehicle control message authentication device. If the occupancy of the MCU changes while the standby state does not elapse for a predetermined time, step 130 or step 140 is executed according to the occupancy of the MCU.

단계 170에서, 차량 제어 메시지 인증 장치는 수신된 차량용 제어 메시지 및 생성, 수신 또는 재사용된 메시지 인증코드를 이용하여 인증 메시지를 생성한다.In step 170, the vehicle control message authentication apparatus generates an authentication message using the received vehicle control message and the generated, received or reused message authentication code.

메시지 인증코드를 재사용하는 실시예에 있어서, 대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 차량 제어 메시지 인증 장치는 이전에 생성된 메시지 인증코드를 부가하여 M1는 M1(m1, m2)의 인증 메시지로, M2는 M2(m3, m4)의 인증 메시지로, M3는 M3(m5, m6)의 인증 메시지로, M4는 M4(m7, m8)의 인증 메시지로 생성한다.In the embodiment of reusing the message authentication code, it is assumed that the message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication code is (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the vehicle control message authentication device By adding the message authentication code, M 1 is an authentication message of M 1 (m 1 , m 2 ), M 2 is an authentication message of M 2 (m 3 , m 4 ), and M 3 is M 3 (m 5 , m) As the authentication message of 6 ), M 4 is generated as the authentication message of M 4 (m 7 , m 8 ).

본 발명의 다른 실시예에 따라, 대기 상태가 소정의 시간이 경과한 이후에는, 차량 제어 메시지 인증 장치는 대기 상태 기간 동안 수신된 적어도 하나의 메시지를 이전에 생성된 메시지 인증코드를 재조합하여 사용한다. 그 후, 차량 제어 메시지 인증 장치는 재조합된 메시지 인증코드에 기초하여 인증 메시지를 생성한다. According to another embodiment of the present invention, after a predetermined time has elapsed in the standby state, the vehicle control message authentication apparatus uses at least one message received during the standby state period by recombining the previously generated message authentication code. . Then, the vehicle control message authentication device generates an authentication message based on the recombined message authentication code.

대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 차량 제어 메시지 인증 장치는 이전에 생성된 메시지 인증코드를 재조합 후, 재조합된 메시지 인증코드를 부가하여 M1는 M1(m1, m4)의 인증 메시지로, M2는 M2(m3, m6)의 인증 메시지로, M3는 M3(m5, m8)의 인증 메시지로, M4는 M4(m7, m2)의 인증 메시지로 생성한다.The message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication codes are (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m ). 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the vehicle control message authentication device recombines the previously generated message authentication code and then authenticates the recombined message By adding the code, M 1 is the authentication message of M 1 (m 1 , m 4 ), M 2 is the authentication message of M 2 (m 3 , m 6 ), and M 3 is M 3 (m 5 , m 8 ) As an authentication message of M 4 , M 4 is generated as an authentication message of M 4 (m 7 , m 2 ).

본 발명의 또 다른 실시예에 따라, 대기 상태가 소정의 시간이 경과한 이후에는, 차량 제어 메시지 인증 장치는 대기 상태 기간 동안 수신된 적어도 하나의 차량용 제어 메시지를 이전에 생성된 메시지 인증코드의 길이를 변경한다. 그 후, 차량 제어 메시지 인증 장치는 길이가 변경된 메시지 인증코드에 기초하여 인증 메시지를 생성한다. According to another embodiment of the present invention, after a predetermined time has elapsed in the standby state, the vehicle control message authentication apparatus compares at least one vehicle control message received during the standby state period to the length of the previously generated message authentication code. change the Thereafter, the vehicle control message authentication apparatus generates an authentication message based on the message authentication code whose length is changed.

대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 차량 제어 메시지 인증 장치는 이전에 생성된 메시지 인증코드를 부가하여 M1는 M1(m1, m2, m3)의 인증 메시지로, M2는 M2(m4)의 인증 메시지로, M3는 M3(m5, m6, m7)의 인증 메시지로, M4는 M4(m7)의 인증 메시지로 생성한다.The message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication codes are (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m ). 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the vehicle control message authentication device adds the previously generated message authentication code to M 1 The authentication message of (m 1 , m 2 , m 3 ), M 2 the authentication message of M 2 (m 4 ), M 3 the authentication message of M 3 (m 5 , m 6 , m 7 ), M 4 is generated as an authentication message of M 4 (m 7 ).

이 경우들은, 수신측에서 이전에 수신했던 인증코드이기에 인증 값이 동일 값인지 비교 연산으로 복호화가 가능하다. 이렇게 함으로써, 차량 제어 메시지 인증 장치는 메시지 인증코드를 새로 생성하지 아니하고, 기존의 메시지 인증코드를 재활용함으로써, MCU의 부하를 줄이는 효과를 가지게 된다.In these cases, since the authentication code was previously received by the receiving side, it is possible to decrypt the authentication value by comparison operation to determine whether the authentication value is the same. In this way, the vehicle control message authentication device does not generate a new message authentication code, but recycles the existing message authentication code, thereby reducing the load on the MCU.

본 발명에 있어서, 수신된 차량 제어용 메시지는 CAN 메시지가 바람직하다. CAN(Controller Area Network)이란, 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격이다. CAN 통신에서 데이터 송수신은 메시지 프레임을 사용하여 이루어진다. 그 후, 차량 제어 메시지 인증 장치는 생성, 수신 또는 재사용된 메시지 인증코드와 CAN 메시지의 일부 프레임에 기초하여 인증된 이더넷 메시지를 생성한다.In the present invention, the received vehicle control message is preferably a CAN message. CAN (Controller Area Network) is a standard communication standard designed for microcontrollers or devices to communicate with each other in a vehicle without a host computer. In CAN communication, data transmission and reception is performed using message frames. Then, the vehicle control message authentication device generates an authenticated Ethernet message based on the generated, received or reused message authentication code and some frames of the CAN message.

단계 180에서, 차량 제어 메시지 인증 장치는 생성된 인증 메시지를 제 2 통신 노드로 송신한다.In step 180, the vehicle control message authentication device transmits the generated authentication message to the second communication node.

일반적으로, 차량 제어 메시지 인증 장치는 주기적으로 인증 메시지를 제 2 통신 노드로 송신한다.In general, the vehicle control message authentication device periodically transmits an authentication message to the second communication node.

본 발명의 일 실시예에 있어서, 차량 제어 메시지 인증 장치는 인증 메시지가 복수인 경우, 인증 메시지를 주기를 변경하여 전송할 수 있다. 예를 들어, M1(m1, m2), M2(m3, m4), M3(m5, m6), M4(m7, m8)의 인증 메시지를 2초 주기로 전송하는데, 1초, 2초, 3초 간격으로 주기를 변경하여 인증 메시지를 제 2 통신노드에 전송할 수도 있다. 또는 전송 주기를 랜덤으로 하여 인증 메시지를 전송할 수도 있다.In an embodiment of the present invention, when there are a plurality of authentication messages, the vehicle control message authentication apparatus may transmit the authentication message by changing the cycle. For example, authentication messages of M 1 (m 1 , m 2 ), M 2 (m 3 , m 4 ), M 3 (m 5 , m 6 ), M 4 (m 7 , m 8 ) are sent every 2 seconds. In order to transmit, the authentication message may be transmitted to the second communication node by changing the cycle at intervals of 1 second, 2 seconds, and 3 seconds. Alternatively, the authentication message may be transmitted with a random transmission period.

본 발명의 다른 실시예에 있어서, 차량 제어 메시지 인증 장치는 인증 메시지가 복수인 경우, 인증 메시지의 순서를 변경하여 전송할 수 있다. 예를 들어, M1(m1, m2), M2(m3, m4), M3(m5, m6), M4(m7, m8)의 인증 메시지를 M2(m3, m4), M1(m1, m2), M4(m7, m8), M3(m5, m6)로 순서를 변경하여 인증 메시지를 제 2 통신노드에 전송할 수도 있다. 또는 순서를 랜덤으로 하여 인증 메시지를 전송할 수도 있다.In another embodiment of the present invention, when there are a plurality of authentication messages, the vehicle control message authentication apparatus may change the order of authentication messages and transmit the authentication messages. For example, the authentication message of M 1 (m 1 , m 2 ), M 2 (m 3 , m 4 ), M 3 (m 5 , m 6 ), M 4 (m 7 , m 8 ) is sent to M 2 ( To send the authentication message to the second communication node by changing the order to m 3 , m 4 ), M 1 (m 1 , m 2 ), M 4 (m 7 , m 8 ), M 3 (m 5 , m 6 ) may be Alternatively, the authentication message may be transmitted in a random order.

본 발명의 일 실시예에 있어서, 차량 제어용 메시지가 우선 순위 정보를 포함하고 있는 경우, 차량 제어 메시지 인증 장치는 우선 순위 정보에 따라 인증 메시지의 순서를 변경하여 순차적으로 전송할 수 있다. In an embodiment of the present invention, when the vehicle control message includes priority information, the vehicle control message authentication apparatus may sequentially transmit the authentication message by changing the order of the authentication messages according to the priority information.

도 2는 본 발명의 일 실시예에 따른 차량 제어 메시지 인증 장치에 관한 블록다이어그램을 나타내는 도면이다.2 is a diagram illustrating a block diagram of an apparatus for authenticating a vehicle control message according to an embodiment of the present invention.

도 2를 참조하면, 차량용 통신제어장치(200)는 차량 제어 메시지 인증 장치(210) 및 MCU(220)를 포함하고, 차량 제어 메시지 인증 장치(210)는 수신부(211), 인증부(212), 송신부(213) 및 저장부(214)를 포함한다.Referring to FIG. 2 , the vehicle communication control device 200 includes a vehicle control message authentication device 210 and an MCU 220 , and the vehicle control message authentication device 210 includes a receiving unit 211 and an authenticating unit 212 . , a transmitter 213 and a storage 214 .

수신부(211)는 제 1 ECU(300)로부터 차량 제어용 메시지를 수신한다.The receiver 211 receives a vehicle control message from the first ECU 300 .

통신 노드는 엔드 노드를 의미하며, 엔드 노드는 차량에 탑재되어 특수 목적 혹은 기능을 제공하기 위해 설치되는 장치들을 제어하는 ECU(Electronic Control Unit)로 이해하는 것이 바람직하다. ECU는 자동차의 엔진, 자동변속기, ABS 따위의 상태를 컴퓨터로 제어하는 전자제어 장치를 의미한다.A communication node means an end node, and it is desirable to understand the end node as an ECU (Electronic Control Unit) that is mounted on a vehicle and controls devices installed to provide a special purpose or function. ECU refers to an electronic control device that controls the state of a vehicle's engine, automatic transmission, and ABS with a computer.

차량 제어 메시지 인증 장치(210)와 ECU(300, 400)들은 구현 방식에 따라 CAN 프로토콜, MOST 프로토콜, 이더넷 프로토콜 등을 지원할 수 있으며, 여러 형태(star, ring, bus, mesh,..) 토폴로지 형태로 연결될 수 있다.The vehicle control message authentication device 210 and ECUs 300 and 400 may support CAN protocol, MOST protocol, Ethernet protocol, etc. according to the implementation method, and various types (star, ring, bus, mesh,..) topology type can be connected to

ECU(300, 400)들은 고유의 IP 주소가 설정되어 있으며 상위 노드로부터 IP 주소를 포함한 메시지를 수신할 수 있고, 수신된 메시지에 포함된 IP 주소를 자신의 IP 주소로 설정할 수 있다. 이는 예시에 불과하며 ECU(300, 400)들의 IP 주소는 다양한 방식을 통해 설정될 수 있다.ECUs 300 and 400 have their own IP addresses set, and can receive messages including IP addresses from upper nodes, and set IP addresses included in the received messages as their own IP addresses. This is only an example, and the IP addresses of the ECUs 300 and 400 may be set through various methods.

차량 제어 메시지 인증 장치(210)는 차량용 네트워크를 구성하는 통신 노드들의 식별정보를 저장하며 접근한 통신 노드에 대한 인증을 수행하고 그 인증결과에 따라 접근을 허용하거나 차단하는 역할을 수행할 수도 있다. The vehicle control message authentication device 210 stores identification information of communication nodes constituting the vehicle network, performs authentication on the accessed communication node, and allows or blocks access according to the authentication result.

본 발명의 일 실시예에서, 차량 제어용 메시지에는 우선 순위를 나타내는 정보가 메시지의 일부에 포함되어 있을 수 있다. 우선 순위는 메시지 처리에 있어서 다른 메시지보다 우선으로 처리되는 순위를 말하는 것이다. 우선 순위는 차량 운행 중 위험 정도에 따라 미리 결정되어 있다. 메시지는 CAN 메시지가 바람직하다. CAN(Controller Area Network)이란, 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격이다. CAN 통신에서 데이터 송수신은 메시지 프레임을 사용하여 이루어진다. 본 발명의 일 실시예에 있어서, 우선 순위는 CAN 메시지의 헤더 영역에 정의되어 저장되어 있다.In an embodiment of the present invention, information indicating priority may be included in a part of the message for vehicle control. Priority refers to the priority of processing a message over other messages in message processing. The priority is predetermined according to the degree of risk while driving the vehicle. The message is preferably a CAN message. CAN (Controller Area Network) is a standard communication standard designed for microcontrollers or devices to communicate with each other in a vehicle without a host computer. In CAN communication, data transmission and reception is performed using message frames. In one embodiment of the present invention, the priority is defined and stored in the header area of the CAN message.

수신부(211)는 차량용 통신제어장치 내에 포함된 마이크로 컨트롤러인 MCU(220)로부터 점유율(또는 이용률)을 수신한다. MCU(220)는 차량용 통신제어장치를 제어하기 위한 전용 프로세서로 컴퓨터의 중앙연산처리장치(CPU)에 해당되는 것으로 볼 수 있다.The receiver 211 receives the share (or utilization rate) from the MCU 220 , which is a microcontroller included in the vehicle communication control device. The MCU 220 is a dedicated processor for controlling a communication control device for a vehicle and may be viewed as corresponding to a central processing unit (CPU) of a computer.

인증부(212)는 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성한다.If the received share is less than the first share, the authentication unit 212 generates a message authentication code using a first authentication step using a hash function and a second authentication step using a secret key.

메시지 인증코드를 생성하는 방법은 두 인증 단계의 암호화 과정으로 수행된다. 제 1 인증 단계는 인증부(212)가 무결성 암호화 방법으로 소정의 해쉬 알고리즘을 통하여 수신된 메시지를 해쉬 값으로 생성한다. 해쉬 함수는 문자열을 고정 길이의 이진 문자열로 매핑하여 주는 함수이다. 여기에서 무결성이란 입력 데이터의 고유한 값을 그대로 유지하고 있음을 증명할 수 있는 자료를 남겨두는 것이다.The method of generating the message authentication code is performed as an encryption process of two authentication steps. In the first authentication step, the authenticator 212 generates a received message as a hash value through a predetermined hash algorithm as an integrity encryption method. The hash function is a function that maps a string to a binary string of fixed length. Integrity here means leaving data that can prove that the unique value of the input data is maintained as it is.

제 2 인증 단계는 인증부(212)가 소정의 인증 알고리즘을 이용하여 공유 비밀키를 추가하여 수신된 메시지를 암호화한다. 공유 비밀키는 송신측 및 수신측이 모두 가지고 있어야 한다.In the second authentication step, the authentication unit 212 encrypts the received message by adding a shared secret key using a predetermined authentication algorithm. The shared secret key must be possessed by both the sender and receiver.

인증부(212)는 제 1 인증 단계 및 제 2 인증 단계를 거쳐 메시지 인증코드를 생성한다. The authentication unit 212 generates a message authentication code through a first authentication step and a second authentication step.

본 발명의 일 실시예에 있어서, 수신된 MCU(220) 점유율이 제 1 점유율 미만인 경우에는 인증부(212)는 두 인증 단계 모두의 인증 단계를 통하여 메시지 인증코드를 생성한다. 바람직하게는 제 1 점유율은 70%이다.In an embodiment of the present invention, when the received MCU 220 occupancy is less than the first occupancy, the authentication unit 212 generates a message authentication code through the authentication steps of both authentication steps. Preferably, the first occupancy is 70%.

수신된 MCU(220) 점유율이 제 1 점유율 이상 제 2 점유율 미만인 경우에는 인증부(212)는 제 1 인증 단계 및 제 2 인증 단계 중 어느 하나만의 단계를 수행하여 메시지 인증코드를 생성한다. 바람직하게는 제 2 점유율은 90%이다.When the received MCU 220 occupancy is greater than or equal to the first occupancy and less than the second occupancy, the authentication unit 212 generates a message authentication code by performing either one of the first authentication step and the second authentication step. Preferably the second occupancy is 90%.

수신된 MCU(220) 점유율이 제 2 점유율 이상인 경우에는 인증부(212)는 메시지 인증코드를 생성하지 않고 대기한다. If the received MCU 220 occupancy is greater than or equal to the second occupancy, the authentication unit 212 waits without generating a message authentication code.

다만, 계속 대기 상태를 유지하는 경우에는 인증 없이 메시지를 전달하게 되는 문제가 발생하기 때문에, MCU(220)에 부담을 주지 않는 정도에서의 인증을 통하여 메시지를 전달할 수 있다.However, when the standby state is continuously maintained, a problem of transmitting the message without authentication occurs, so that the message can be transmitted through authentication at a level that does not burden the MCU 220 .

대기 상태가 소정의 시간을 경과한 이후에는, 인증부(212)는 이전에 생성된 메시지 인증코드를 재사용한다. 이전에 생성된 메시지 인증코드는 저장부(214)에 저장되어 있다. 만약 대기 상태가 소정의 시간을 경과하지 않는 경우, MCU(220)의 점유율에 따라, 메시지 인증코드를 생성하거나 외부 인증서버(500)로부터 수신한다.After the waiting state elapses a predetermined time, the authentication unit 212 reuses the previously generated message authentication code. The previously generated message authentication code is stored in the storage unit 214 . If the standby state does not elapse for a predetermined time, a message authentication code is generated or received from the external authentication server 500 according to the occupancy of the MCU 220 .

그 후, 인증부(212)는 수신된 차량용 제어 메시지 및 생성, 수신 또는 재사용된 메시지 인증코드를 이용하여 인증 메시지를 생성한다.Thereafter, the authentication unit 212 generates an authentication message using the received vehicle control message and the generated, received or reused message authentication code.

메시지 인증코드를 재사용하는 실시예에 있어서, 대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 인증부(212)는 이전에 생성된 메시지 인증코드를 부가하여 M1는 M1(m1, m2)의 인증 메시지로, M2는 M2(m3, m4)의 인증 메시지로, M3는 M3(m5, m6)의 인증 메시지로, M4는 M4(m7, m8)의 인증 메시지로 생성한다.In the embodiment of reusing the message authentication code, it is assumed that the message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication code is (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the authenticator 212 is By adding the message authentication code, M 1 is an authentication message of M 1 (m 1 , m 2 ), M 2 is an authentication message of M 2 (m 3 , m 4 ), and M 3 is M 3 (m 5 , m) As the authentication message of 6 ), M 4 is generated as the authentication message of M 4 (m 7 , m 8 ).

본 발명의 다른 실시예에 따라, 대기 상태가 소정의 시간이 경과한 이후에는, 인증부(212)는 대기 상태 기간 동안 수신된 적어도 하나의 메시지를 이전에 생성된 메시지 인증코드를 재조합하여 사용한다. 그 후, 인증부(212)는 재조합된 메시지 인증코드에 기초하여 인증 메시지를 생성한다. According to another embodiment of the present invention, after a predetermined time elapses in the standby state, the authentication unit 212 uses at least one message received during the standby state period by recombining the previously generated message authentication code. . Thereafter, the authentication unit 212 generates an authentication message based on the recombined message authentication code.

대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 인증부(212)는 이전에 생성된 메시지 인증코드를 재조합 후, 재조합된 메시지 인증코드를 부가하여 M1는 M1(m1, m4)의 인증 메시지로, M2는 M2(m3, m6)의 인증 메시지로, M3는 M3(m5, m8)의 인증 메시지로, M4는 M4(m7, m2)의 인증 메시지로 생성한다.The message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication codes are (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m ). 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the authentication unit 212 recombines the previously generated message authentication code and then authenticates the recombined message By adding the code, M 1 is the authentication message of M 1 (m 1 , m 4 ), M 2 is the authentication message of M 2 (m 3 , m 6 ), and M 3 is M 3 (m 5 , m 8 ) As an authentication message of M 4 , M 4 is generated as an authentication message of M 4 (m 7 , m 2 ).

본 발명의 또 다른 실시예에 따라, 대기 상태가 소정의 시간이 경과한 이후에는, 인증부(212)는 대기 상태 기간 동안 수신된 적어도 하나의 메시지를 이전에 생성된 메시지 인증코드의 길이를 변경한다. 그 후, 인증부(212)는 길이가 변경된 메시지 인증코드에 기초하여 인증 메시지를 생성한다. According to another embodiment of the present invention, after a predetermined time has elapsed in the standby state, the authentication unit 212 changes the length of the previously generated message authentication code for at least one message received during the standby state period. do. Thereafter, the authentication unit 212 generates an authentication message based on the message authentication code of which the length is changed.

대기 상태 동안 수신된 메시지가 M1, M2, M3, M4라고 하고, 이전에 생성된 메시지 인증코드가 (m1, m2), (m3, m4), (m5, m6), (m7, m8)라고 한다면(메시지 인증코드는 2 바이트이고, m은 1바이트라고 가정), 인증부(212)는 이전에 생성된 메시지 인증코드를 부가하여 M1는 M1(m1, m2, m3)의 인증 메시지로, M2는 M2(m4)의 인증 메시지로, M3는 M3(m5, m6, m7)의 인증 메시지로, M4는 M4(m7)의 인증 메시지로 생성한다.The message received during the standby state is M 1 , M 2 , M 3 , M 4 , and the previously generated message authentication codes are (m 1 , m 2 ), (m 3 , m 4 ), (m 5 , m ). 6 ), (m 7 , m 8 ) (assuming that the message authentication code is 2 bytes and m is 1 byte), the authentication unit 212 adds the previously generated message authentication code and M 1 is M 1 The authentication message of (m 1 , m 2 , m 3 ), M 2 the authentication message of M 2 (m 4 ), M 3 the authentication message of M 3 (m 5 , m 6 , m 7 ), M 4 is generated as an authentication message of M 4 (m 7 ).

이 경우들은, 수신측에서 이전에 수신했던 인증코드이기에 인증 값이 동일 값인지 비교 연산으로 복호화가 가능하다. 이렇게 함으로써, 차량 제어 메시지 인증 장치(210)는 메시지 인증코드를 새로 생성하지 아니하고, 기존의 메시지 인증코드를 재활용함으로써, MCU의 부하를 줄이는 효과를 가지게 된다.In these cases, since the authentication code was previously received by the receiving side, it is possible to decrypt the authentication value by comparison operation to determine whether the authentication value is the same. By doing this, the vehicle control message authentication device 210 does not generate a new message authentication code, but recycles the existing message authentication code, thereby reducing the load on the MCU.

본 발명에 있어서, 수신된 메시지는 CAN 메시지가 바람직하다. CAN(Controller Area Network)이란, 차량 내에서 호스트 컴퓨터 없이 마이크로 컨트롤러나 장치들이 서로 통신하기 위해 설계된 표준 통신 규격이다. CAN 통신에서 데이터 송수신은 메시지 프레임을 사용하여 이루어진다. 그 후, 차량 제어 메시지 인증 장치는 생성, 수신 또는 재사용된 메시지 인증코드와 CAN 메시지의 일부 프레임에 기초하여 인증된 이더넷 메시지를 생성한다.In the present invention, the received message is preferably a CAN message. CAN (Controller Area Network) is a standard communication standard designed for microcontrollers or devices to communicate with each other in a vehicle without a host computer. In CAN communication, data transmission and reception is performed using message frames. Then, the vehicle control message authentication device generates an authenticated Ethernet message based on the generated, received or reused message authentication code and some frames of the CAN message.

송신부(213)는 생성된 인증 메시지를 제 2 통신 노드로 송신한다.The transmitter 213 transmits the generated authentication message to the second communication node.

일반적으로, 송신부(213)는 주기적으로 인증 메시지를 제 2 통신 노드로 송신한다.In general, the transmitter 213 periodically transmits an authentication message to the second communication node.

본 발명의 일 실시예에 있어서, 송신부(213)는 인증 메시지를 주기를 변경하여 전송할 수 있다. 예를 들어, M1(m1, m2), M2(m3, m4), M3(m5, m6), M4(m7, m8)의 인증 메시지를 2초 주기로 전송하는데, 송신부(213)는 1초, 2초, 3초 간격으로 주기를 변경하여 인증 메시지를 제 2 통신노드에 전송할 수도 있다. 또는 전송 주기를 랜덤으로 하여 인증 메시지를 전송할 수도 있다.In an embodiment of the present invention, the transmitter 213 may transmit the authentication message by changing the cycle. For example, authentication messages of M 1 (m 1 , m 2 ), M 2 (m 3 , m 4 ), M 3 (m 5 , m 6 ), M 4 (m 7 , m 8 ) are sent every 2 seconds. In this case, the transmitter 213 may transmit the authentication message to the second communication node by changing the cycle at intervals of 1 second, 2 seconds, and 3 seconds. Alternatively, the authentication message may be transmitted with a random transmission period.

본 발명의 다른 실시예에 있어서, 송신부(213)는 인증 메시지의 순서를 변경하여 전송할 수 있다. 예를 들어, 송신부(213)는 M1(m1, m2), M2(m3, m4), M3(m5, m6), M4(m7, m8)의 인증 메시지를 M2(m3, m4), M1(m1, m2), M4(m7, m8), M3(m5, m6)로 순서를 변경하여 인증 메시지를 제 2 통신노드에 전송할 수도 있다. 또는 순서를 랜덤으로 하여 인증 메시지를 전송할 수도 있다.In another embodiment of the present invention, the transmitter 213 may transmit the authentication message by changing the order. For example, the transmitter 213 authenticates M 1 (m 1 , m 2 ), M 2 (m 3 , m 4 ), M 3 (m 5 , m 6 ), M 4 (m 7 , m 8 ). Reorder the messages to M 2 (m 3 , m 4 ), M 1 (m 1 , m 2 ), M 4 (m 7 , m 8 ), M 3 (m 5 , m 6 ) to remove the authentication message. It can also be transmitted to 2 communication nodes. Alternatively, the authentication message may be transmitted in a random order.

본 발명의 일 실시예에 있어서, 차량 제어용 메시지가 우선 순위 정보를 포함하고 있는 경우, 송신부(213)는 우선 순위 정보에 따라 인증 메시지의 순서를 변경하여 순차적으로 전송할 수 있다. In an embodiment of the present invention, when the vehicle control message includes priority information, the transmitter 213 may sequentially transmit the authentication message by changing the order of the authentication messages according to the priority information.

상기 실시예들에 따른 방법은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 또한, 상술한 본 발명의 실시예들에서 사용될 수 있는 데이터 구조, 프로그램 명령, 혹은 데이터 파일은 컴퓨터로 읽을 수 있는 기록매체에 다양한 수단을 통하여 기록될 수 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 저장 장치를 포함할 수 있다. 컴퓨터로 읽을 수 있는 기록매체의 예로는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함될 수 있다. 프로그램 명령의 예로는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함할 수 있다.The method according to the above embodiments can be written as a program that can be executed on a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. In addition, the data structure, program command, or data file that can be used in the above-described embodiments of the present invention may be recorded in a computer-readable recording medium through various means. The computer-readable recording medium may include any type of storage device in which data readable by a computer system is stored. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and floppy disks. hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of the program instruction may include not only machine code such as generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far, the present invention has been looked at with respect to preferred embodiments thereof. Those of ordinary skill in the art to which the present invention pertains will understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention. Therefore, the disclosed embodiments are to be considered in an illustrative rather than a restrictive sense. The scope of the present invention is indicated in the claims rather than the foregoing description, and all differences within the scope equivalent thereto should be construed as being included in the present invention.

제 1 ECU: 300 제 2 ECU: 400
차량용 통신제어장치: 200 차량 제어 메시지 인증 장치: 210
MCU: 220 수신부:211
인증부:212 송신부: 213
저장부: 214
1st ECU: 300 2nd ECU: 400
Vehicle communication control device: 200 Vehicle control message authentication device: 210
MCU: 220 Receiver: 211
Authenticator: 212 Sender: 213
Storage: 214

Claims (2)

제 1 통신노드로부터 차량 운행 중 위험 정도에 따라 우선적으로 처리되는 미리 결정된 차량용 제어 메시지의 순위를 나타내는 우선 순위 정보를 포함하는 차량 제어용 메시지를 수신하는 단계;
MCU(Micro Controller Unit)로부터 상기 MCU의 이용율을 나타내는 점유율을 수신하는 단계;
상기 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성하는 단계;
상기 수신된 점유율이 상기 제 1 점유율 내지 제 2 점유율인 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 중 어느 하나의 인증 단계만을 이용하여 메시지 인증코드를 생성하는 단계;
상기 수신된 점유율이 상기 제 2 점유율을 초과하는 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 없이 대기 상태를 유지하고, 상기 대기 상태가 소정의 시간을 초과하는 경우, 기존에 저장되어 있는 메시지 인증코드를 재사용하는 단계;
상기 수신된 차량 제어용 메시지 및 상기 생성된 또는 재사용되는 메시지 인증코드에 기초하여 인증 메시지를 생성하는 단계; 및
상기 생성된 인증 메시지가 복수인 경우, 상기 우선 순위 정보에 따라 상기 생성된 인증 메시지의 순서를 변경하여 상기 인증 메시지를 순차적으로 제 2 통신 노드로 송신하는 단계를 포함하는 것을 특징으로 하는 차량 제어 메시지 인증 방법.
Receiving a vehicle control message including priority information indicating a priority of a predetermined vehicle control message that is preferentially processed according to the degree of risk during vehicle driving from the first communication node;
receiving a share indicating a utilization rate of the MCU from a micro controller unit (MCU);
generating a message authentication code using a first authentication step using a hash function and a second authentication step using a secret key when the received share is less than the first share;
generating a message authentication code by using only one of the first authentication step and the second authentication step when the received occupancy is the first occupancy or the second occupancy;
When the received occupancy rate exceeds the second occupancy rate, the standby state is maintained without the first authentication step and the second authentication stage, and when the standby state exceeds a predetermined time, the previously stored message reusing the authentication code;
generating an authentication message based on the received vehicle control message and the generated or reused message authentication code; and
If there are a plurality of the generated authentication messages, changing the order of the generated authentication messages according to the priority information and sequentially transmitting the authentication messages to a second communication node. authentication method.
제 1 통신노드로부터 차량 운행 중 위험 정도에 따라 우선적으로 처리되는 미리 결정된 차량용 제어 메시지의 순위를 나타내는 우선 순위 정보를 포함하는 차량 제어용 메시지 및 MCU(Micro Controller Unit)로부터 상기 MCU의 이용율을 나타내는 점유율을 수신하는 수신부;
상기 수신된 점유율이 제 1 점유율 미만인 경우에는 해쉬 함수를 이용하는 제 1 인증 단계 및 비밀키를 이용한 제 2 인증 단계를 이용하여 메시지 인증코드를 생성하고, 상기 수신된 점유율이 상기 제 1 점유율 내지 제 2 점유율인 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 중 어느 하나의 인증 단계만을 이용하여 메시지 인증코드를 생성하고, 상기 수신된 점유율이 상기 제 2 점유율을 초과하는 경우에는 상기 제 1 인증 단계 및 상기 제 2 인증 단계 없이 대기 상태를 유지하고, 상기 대기 상태가 소정의 시간을 초과하는 경우, 기존에 저장되어 있는 메시지 인증코드를 재사용하고, 상기 수신된 차량 제어용 메시지 및 상기 생성된 또는 재사용되는 메시지 인증코드에 기초하여 인증 메시지를 생성하는 인증부; 및
상기 생성된 인증 메시지가 복수인 경우, 상기 우선 순위 정보에 따라 상기 생성된 인증 메시지의 순서를 변경하여 상기 인증메시지를 순차적으로 제 2 통신 노드로 송신하는 송신부를 포함하는 것을 특징으로 하는 차량 제어 메시지 인증 장치.
A vehicle control message including priority information indicating the priority of a predetermined vehicle control message that is preferentially processed according to the degree of risk during vehicle operation from the first communication node, and a share indicating the utilization rate of the MCU from the microcontroller unit (MCU) a receiving unit for receiving;
If the received share is less than the first share, a message authentication code is generated using a first authentication step using a hash function and a second authentication step using a secret key, and the received share is the first share to the second In the case of occupancy, a message authentication code is generated using only one authentication step of the first authentication step and the second authentication step, and in the case of the received occupancy exceeding the second occupancy, the first authentication step and maintaining the standby state without the second authentication step, and when the standby state exceeds a predetermined time, reuses the message authentication code stored previously, and the received vehicle control message and the generated or reused message an authentication unit for generating an authentication message based on the message authentication code; and
and a transmitter configured to sequentially transmit the authentication messages to a second communication node by changing the order of the generated authentication messages according to the priority information when there are a plurality of the generated authentication messages. authentication device.
KR1020200173760A 2020-12-11 2020-12-11 Method and apparatus of securing message in network for vehicle KR102398764B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200173760A KR102398764B1 (en) 2020-12-11 2020-12-11 Method and apparatus of securing message in network for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200173760A KR102398764B1 (en) 2020-12-11 2020-12-11 Method and apparatus of securing message in network for vehicle

Publications (1)

Publication Number Publication Date
KR102398764B1 true KR102398764B1 (en) 2022-05-17

Family

ID=81803716

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200173760A KR102398764B1 (en) 2020-12-11 2020-12-11 Method and apparatus of securing message in network for vehicle

Country Status (1)

Country Link
KR (1) KR102398764B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180001909A (en) * 2016-06-28 2018-01-05 손수민 User terminal, parking reservation system and method thereof
KR20180072339A (en) * 2016-12-21 2018-06-29 주식회사 휴맥스오토모티브 Methods of transmitting message between a plurality of Electronic Control Units at in-vehicle network
KR20180109618A (en) * 2017-03-28 2018-10-08 삼성전자주식회사 Method for adaptive authentication and electronic device supporting the same
JP2018160888A (en) * 2017-03-21 2018-10-11 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Update processing method, on-vehicle network system, and electronic control unit
KR101949305B1 (en) * 2018-04-27 2019-02-19 최현수 VMS controller with integrated VCU and MCU of VMS system and method for inspecting error using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180001909A (en) * 2016-06-28 2018-01-05 손수민 User terminal, parking reservation system and method thereof
KR20180072339A (en) * 2016-12-21 2018-06-29 주식회사 휴맥스오토모티브 Methods of transmitting message between a plurality of Electronic Control Units at in-vehicle network
JP2018160888A (en) * 2017-03-21 2018-10-11 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Update processing method, on-vehicle network system, and electronic control unit
KR20180109618A (en) * 2017-03-28 2018-10-08 삼성전자주식회사 Method for adaptive authentication and electronic device supporting the same
KR101949305B1 (en) * 2018-04-27 2019-02-19 최현수 VMS controller with integrated VCU and MCU of VMS system and method for inspecting error using the same

Similar Documents

Publication Publication Date Title
EP3154219B1 (en) Communication network system, transmission node, reception node, message checking method, and computer program
Schweppe et al. Car2x communication: securing the last meter-a cost-effective approach for ensuring trust in car2x applications using in-vehicle symmetric cryptography
US20170118020A1 (en) Data communication method, system and gateway for in-vehicle network including a plurality of subnets
CN108023730B (en) Communication system and communication method
US11245535B2 (en) Hash-chain based sender identification scheme
US10812261B2 (en) Vehicle system and key distribution method
US20110173447A1 (en) Master unit and slave unit
KR102450811B1 (en) System for key control for in-vehicle network
CN102638468A (en) Method, sending end, receiving end and system for protecting information transmission safety
KR102202902B1 (en) Method and apparatus of securing message in communication controller for a vehicle
US9049012B2 (en) Secured cryptographic communication system
CN111541776A (en) Safe communication device and system based on Internet of things equipment
CN103780389A (en) Port based authentication method and network device
CN116074000A (en) Conversation key distribution method and system based on CAN bus
JP2017191965A (en) Communication device and packet transmission/reception program
JP2018121220A (en) In-vehicle network system
KR102194469B1 (en) Method and apparatus of securing message in communication controller for a vehicle
KR102398764B1 (en) Method and apparatus of securing message in network for vehicle
KR102398763B1 (en) Method and apparatus of securing message in network for vehicle
KR102398761B1 (en) Method and apparatus of securing message in network for vehicle
CN113472734A (en) Identity authentication method and device
KR102148453B1 (en) Controller area network system and message authentication method
KR102398762B1 (en) Method and apparatus of securing message in network for vehicle according to condition of vehicle
KR20210126319A (en) Apparatus and method for managing key
CN112738751B (en) Wireless sensor access authentication method, device and system

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant