KR101705639B1 - Method for transmitting and receiving a message in a vehicle network system - Google Patents

Method for transmitting and receiving a message in a vehicle network system Download PDF

Info

Publication number
KR101705639B1
KR101705639B1 KR1020160138177A KR20160138177A KR101705639B1 KR 101705639 B1 KR101705639 B1 KR 101705639B1 KR 1020160138177 A KR1020160138177 A KR 1020160138177A KR 20160138177 A KR20160138177 A KR 20160138177A KR 101705639 B1 KR101705639 B1 KR 101705639B1
Authority
KR
South Korea
Prior art keywords
message
ecu
reception
transmitting
gateway ecu
Prior art date
Application number
KR1020160138177A
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 KR1020160138177A priority Critical patent/KR101705639B1/en
Application granted granted Critical
Publication of KR101705639B1 publication Critical patent/KR101705639B1/en

Links

Images

Classifications

    • 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/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Small-Scale Networks (AREA)

Abstract

Disclosed is a message transmission and reception method. The message transmission and reception method is a method for transmitting and receiving a message in a vehicle network system including a plurality of sub-networks, and comprises the steps of: generating, by a transmission (electronic control unit (ECU)) included in a first one of the plurality of sub-networks, a first message, and transmitting, by the transmission ECU, to a first message transmission gateway ECU included in the first sub-network; extracting, by the transmission gateway ECU, an ID and data from the first message, and generating, by the transmission gateway ECU, a cryptogram by encrypting the extracted ID, the extracted data and a counter value; generating, by the transmission gateway ECU, a second message including the cryptogram, and transmitting, by the transmission gateway ECU, the second message to a reception gateway ECU of a second sub-network in which a reception ECU is included; decoding, by the reception gateway ECU, the cryptogram included in the second message, and determining, by the reception gateway ECU, data integrity by using a result of the decoding; when data integrity is acknowledged, generating, by the reception gateway ECU, a third message including data generated as the result of the decoding; and transmitting, by the reception gateway ECU, the third message to the reception ECU.

Description

차량 네트워크 시스템에서의 메시지 송수신 방법{METHOD FOR TRANSMITTING AND RECEIVING A MESSAGE IN A VEHICLE NETWORK SYSTEM}[0001] METHOD FOR TRANSMITTING AND RECEIVING A MESSAGE IN A VEHICLE NETWORK SYSTEM [0002]

본 발명의 개념에 따른 실시 예는 차량 네트워크 시스템에서의 메시지 송수신 방법에 관한 것으로, 특히 데이터 캡슐화(data encapsulation)와 메시지 암호화를 통해 데이터의 기밀성과 무결성을 보장하여 외부의 재전송 공격(replay attack)으로부터 통신 메시지를 보호할 수 있는 메시지 송수신 방법에 관한 것이다.The present invention relates to a method of transmitting and receiving messages in a vehicle network system, and more particularly, to a method and apparatus for transmitting and receiving messages in a vehicle network system, And a method of transmitting and receiving a message capable of protecting a communication message.

차량 관련 기술이 발전함에 따라 다양한 종류의 ECU(electronic control unit)들이 차량 내에 탑재되고 있는 실정이고, 현재 200여개 이상의 ECU가 차량에 탑재되고 있다. 탑재된 ECU를 통해 운전자의 안전과 편의 증진에 이바지하고 있다. 이러한 ECU 간의 통신을 위한 차량 내부 네트워크 프로토콜의 대표적인 예로 CAN(Controller Area Network)과 CAN FD(CAN with Flexible Data rate)가 있다. 하지만 CAN과 CAN FD는 브로드캐스팅 방식의 버스 구조의 네트워크를 기본으로 설계되어 있어 외부의 도청에 의해 ECU간 통신 메시지의 수집이 가능하여 보안적으로 취약한 문제를 가지고 있다. 또한, 이와 같이 수집된 정보를 통해 이루어지는 재전송 공격에 매우 취약할 수 있다. 이에 본 명세서에서는 이와 같은 보안 문제점을 해결하기 위해 메시지 암호화와 데이터 캡슐화를 통한 암호화 통신으로 메시지의 유출에 의한 재전송 공격에 대한 문제를 해결하고자 한다.As the technology related to automobiles develops, various kinds of electronic control units (ECUs) are mounted in the vehicle. Currently, more than 200 ECUs are mounted on the vehicles. It contributes to the safety and convenience of the driver through the mounted ECU. Typical examples of in-vehicle network protocols for such ECU communication are CAN (Controller Area Network) and CAN FD (CAN with Flexible Data Rate). However, CAN and CAN FD are designed based on the network of the bus structure of the broadcasting system, so that it is possible to collect communication messages between ECUs by external eavesdropping, which poses a security problem. Also, it may be very vulnerable to a retransmission attack made through the information thus collected. In this specification, in order to solve such a security problem, the present invention attempts to solve a problem of a retransmission attack due to message leakage due to encrypted communication through message encryption and data encapsulation.

대한민국 공개특허 제10-2016-0060683호 (2016.05.30. 공개)Korean Patent Publication No. 10-2016-0060683 (published on May 30, 2016) 대한민국 공개특허 제10-2015-0024117호 (2015.03.06. 공개)Korean Patent Laid-Open No. 10-2015-0024117 (published on May 30, 2015)

본 발명이 이루고자 하는 기술적인 과제는 차량을 제어하기 위해 ECU가 전송하는 CAN 메시지의 ID와 데이터를 안전하게 보호하기 위해 이를 CAN FD 형식으로 캡슐화하고 암호화하여 전송함으로써 기밀성과 무결성을 보장하여 암호학적으로 안전한 메시지 송수신 방법을 제공하는 것이다.The technical problem to be solved by the present invention is to encapsulate and encrypt the CAN message ID and data transmitted by the ECU in the CAN FD format to secure the confidentiality and integrity, And a method for transmitting and receiving a message.

본 발명의 실시 예에 따른 메시지 송수신 방법은 복수의 서브 네트워크들을 포함하는 차량 네트워크 시스템 내에서의 메시지 송수신 방법으로서, 상기 복수의 서브 네트워크들 중 제1 서브 네트워크에 포함되는 송신 ECU(electronic control unit)가 제1 메시지를 생성하고, 상기 제1 메시지를 상기 제1 서브 네트워크에 포함되는 송신 게이트웨이 ECU로 송신하는 단계, 상기 송신 게이트웨이 ECU가 상기 제1 메시지로부터 아이디(ID)와 데이터(data)를 추출하고, 추출된 아이디(ID), 추출된 데이터(data) 및 카운터값을 암호화하여 암호문을 생성하는 단계, 상기 송신 게이트웨이 ECU가 상기 암호문을 포함하는 제2 메시지를 생성하고, 상기 제2 메시지를 수신 ECU가 포함된 제2 서브 네트워크의 수신 게이트웨이 ECU로 송신하는 단계, 상기 수신 게이트웨이 ECU가 상기 제2 메시지에 포함된 암호문을 복호화하고, 복호화 결과를 이용하여 데이터 무결성(data integrity)을 판단하는 단계, 데이터 무결성이 인정되는 경우, 상기 수신 게이트웨이 ECU가 복호화 결과로 생성된 데이터를 포함하는 제3 메시지를 생성하는 단계, 및 상기 수신 게이트웨이 ECU가 상기 제3 메시지를 상기 수신 ECU로 송신하는 단계를 포함한다.A method of transmitting and receiving a message in a vehicle network system including a plurality of subnetworks, the method comprising: transmitting an electronic control unit (ECU) included in a first subnetwork of the plurality of subnetworks; Generating a first message and transmitting the first message to a transmission gateway ECU included in the first subnetwork, the transmission gateway ECU extracting an ID and data from the first message, Generating a cipher text by encrypting the extracted ID, extracted data, and a counter value, the transmission gateway ECU generating a second message including the cipher text, receiving the second message To the reception gateway ECU of the second sub-network including the ECU, the reception gateway ECU transmits the second mesh Decrypting a ciphertext included in the decryption result and determining data integrity using the decryption result; and if the data integrity is recognized, the receiving gateway ECU generates a third message including data generated as a result of decryption And the reception gateway ECU transmitting the third message to the reception ECU.

본 발명의 실시 예에 따른 메시지 송수신 방법에 의할 경우, 데이터의 캡슐화와 메시지의 암호화를 통해 데이터의 기밀성과 무결성을 보장할 수 있는 효과가 있다.According to the message transmission / reception method according to the embodiment of the present invention, data confidentiality and integrity can be guaranteed through encapsulation of data and encryption of a message.

또한, 본 발명의 실시 예에 따른 메시지 송수신 방법에 의할 경우, 재전송 공격(replay attack)으로부터 안전한 차량 네트워크 시스템 내에서의 메시지 송수신 방법을 제공할 수 있는 효과가 있다.In addition, according to the message transmission / reception method according to the embodiment of the present invention, it is possible to provide a message transmission / reception method in a vehicle network system that is safe from a replay attack.

본 발명의 상세한 설명에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 상세한 설명이 제공된다.
도 1은 본 발명의 일 실시 예에 따른 차량 네트워크 시스템을 도시한다.
도 2는 도 1에 도시된 차량 네트워크 시스템에서 메시지를 송수신하는 방법을 설명하기 위한 흐름도이다.
도 3은 도 2에 도시된 송신 게이트웨이 ECU에 의해 생성되는 CAN FD 메시지의 포멧을 도시한다.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to more fully understand the drawings recited in the detailed description of the present invention, a detailed description of each drawing is provided.
1 shows a vehicle network system according to an embodiment of the present invention.
2 is a flowchart illustrating a method of transmitting and receiving a message in the vehicle network system shown in FIG.
FIG. 3 shows the format of the CAN FD message generated by the transmission gateway ECU shown in FIG.

본 명세서에 개시되어 있는 본 발명의 개념에 따른 실시 예들에 대해서 특정한 구조적 또는 기능적 설명은 단지 본 발명의 개념에 따른 실시 예들을 설명하기 위한 목적으로 예시된 것으로서, 본 발명의 개념에 따른 실시 예들은 다양한 형태들로 실시될 수 있으며 본 명세서에 설명된 실시 예들에 한정되지 않는다.It is to be understood that the specific structural or functional description of embodiments of the present invention disclosed herein is for illustrative purposes only and is not intended to limit the scope of the inventive concept But may be embodied in many different forms and is not limited to the embodiments set forth herein.

본 발명의 개념에 따른 실시 예들은 다양한 변경들을 가할 수 있고 여러 가지 형태들을 가질 수 있으므로 실시 예들을 도면에 예시하고 본 명세서에서 상세하게 설명하고자 한다. 그러나, 이는 본 발명의 개념에 따른 실시 예들을 특정한 개시 형태들에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물, 또는 대체물을 포함한다.The embodiments according to the concept of the present invention can make various changes and can take various forms, so that the embodiments are illustrated in the drawings and described in detail herein. It should be understood, however, that it is not intended to limit the embodiments according to the concepts of the present invention to the particular forms disclosed, but includes all modifications, equivalents, or alternatives falling within the spirit and scope of the invention.

제1 또는 제2 등의 용어는 다양한 구성 요소들을 설명하는데 사용될 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만, 예컨대 본 발명의 개념에 따른 권리 범위로부터 벗어나지 않은 채, 제1 구성 요소는 제2 구성 요소로 명명될 수 있고 유사하게 제2 구성 요소는 제1 구성 요소로도 명명될 수 있다.The terms first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms may be named for the purpose of distinguishing one element from another, for example, without departing from the scope of the right according to the concept of the present invention, the first element may be referred to as a second element, The component may also be referred to as a first component.

어떤 구성 요소가 다른 구성 요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성 요소가 다른 구성 요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는 중간에 다른 구성 요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성 요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Other expressions that describe the relationship between components, such as "between" and "between" or "neighboring to" and "directly adjacent to" should be interpreted as well.

본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로서, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 본 명세서에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprises" or "having" and the like are used to specify that there are features, numbers, steps, operations, elements, parts or combinations thereof described herein, But do not preclude the presence or addition of one or more other features, integers, 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 are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.

이하, 본 명세서에 첨부된 도면들을 참조하여 본 발명의 실시 예들을 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings attached hereto.

도 1은 본 발명의 일 실시 예에 따른 차량 네트워크 시스템을 도시한다.1 shows a vehicle network system according to an embodiment of the present invention.

도 1을 참조하면, 차량 네트워크 시스템(10)은 각각이 적어도 하나의 게이트웨이 ECU(electronic control unit)와 적어도 하나의 ECU를 포함하는 복수의 서브 네트워크를 포함한다. 도 1에는 3 개의 서브 네트워크만이 도시되어 있으나, 본 발명이 이에 제한되는 것은 아니며, 실시 예에 따라 차량 네트워크 시스템(10)에는 n(n은 2 이상의 자연수) 개의 서브 네트워크가 포함될 수 있다.Referring to FIG. 1, a vehicle network system 10 includes a plurality of subnetworks, each of which includes at least one gateway electronic control unit (ECU) and at least one ECU. Although only three subnetworks are shown in FIG. 1, the present invention is not limited thereto. The vehicle network system 10 may include n (n is a natural number of 2 or more) subnetworks according to an embodiment.

각각의 서브 네트워크는 적어도 하나의 게이트웨이 ECU와 복수의 ECU들을 포함할 수 있다. 즉, 제1 서브 네트워크(100)는 제1 게이트웨이 ECU(110)와 복수의 제1 ECU들(120)을 포함하고, 제2 서브 네트워크(200)는 제2 게이트웨이 ECU(210)와 복수의 제2 ECU들(220)을 포함하고, 제3 서브 네트워크(300)는 제3 게이트웨이 ECU(310)와 복수의 제2 ECU들(320)을 포함할 수 있다.Each subnetwork may include at least one gateway ECU and a plurality of ECUs. That is, the first sub-network 100 includes a first gateway ECU 110 and a plurality of first ECUs 120. The second sub-network 200 includes a second gateway ECU 210, 2 ECUs 220 and the third sub-network 300 may include a third gateway ECU 310 and a plurality of second ECUs 320.

각각의 서브 네트워크에 포함된 복수의 게이트웨이 ECU들은 암호문을 생성하거나 복호화하는 과정에서 활용되는 공유키를 사전에 공유할 수 있다. 또한, 각각의 ECU들은 동기화된 카운터값을 유지함으로써, 재전송 공격으로부터 안전한 메시지 송수신 방법을 제공할 수 있다.The plurality of gateway ECUs included in each subnetwork may share the shared key used in the process of generating or decrypting the ciphertext in advance. In addition, each of the ECUs can maintain a synchronized counter value, thereby providing a method of transmitting and receiving a message secure from a re-transmission attack.

실시 예에 따라, 차량 네트워크 시스템(10)은 OBD(On-Board Diagnostics) 단자(400)를 더 포함할 수 있다.According to an embodiment, the vehicle network system 10 may further include an On-Board Diagnostic (OBD) terminal 400.

도 2는 도 1에 도시된 차량 네트워크 시스템에서 메시지를 송수신하는 방법을 설명하기 위한 흐름도이다.2 is a flowchart illustrating a method of transmitting and receiving a message in the vehicle network system shown in FIG.

도 1과 도 2를 도시하면, 메시지는 차량 네트워크 시스템(10)에 포함된 어느 하나의 서브 네트워크에 포함된 복수의 ECU들 중 어느 하나의 ECU, 즉 송신 ECU로부터 차량 네트워크 시스템(10)에 포함된 다른 하나의 서브 네트워크에 포함된 복수의 ECU들 중 어느 하나의 ECU, 즉 수신 ECU로 송신된다. 또한, 메시지 송수신 과정 중 게이트웨이 ECU들 사이의 통신에는 CAN FD가 사용되고, 서브 네트워크에 포함되어 있는 ECU들 및 게이트웨이 ECU 사이의 통신에는 CAN이 사용될 수 있다.1 and 2, the message is included in the vehicle network system 10 from any one of a plurality of ECUs included in one of the subnetworks included in the vehicle network system 10, that is, the transmission ECU Is transmitted to any one of a plurality of ECUs included in another sub-network, that is, the receiving ECU. In addition, CAN FD is used for communication between gateway ECUs during transmission and reception of messages, and CAN is used for communication between ECUs and gateway ECUs included in the sub-network.

우선, 상기 송신 ECU가 메시지를 생성한다(S100). 상기 송신 ECU가 생성하는 메시지는 CAN 메시지일 수 있다. 생성된 메시지는 상기 송신 ECU에 의해 상기 어느 하나의 서브 네트워크에 포함된 송신 게이트웨이 ECU로 송신될 수 있다. 여기서, 상기 송신 ECU는 생성된 메시지를 브로드캐스트함으로써 생성된 메시지를 송신할 수 있다.First, the transmission ECU generates a message (S100). The message generated by the sending ECU may be a CAN message. The generated message can be transmitted by the transmission ECU to the transmission gateway ECU included in any one of the subnetworks. Here, the transmission ECU can transmit a message generated by broadcasting the generated message.

상기 송신 게이트웨이 ECU는 상기 송신 ECU로부터 수신된 메시지로부터 CAN ID와 데이터를 추출하고(S210), 수신 ECU가 포함되어 있는 서브 네트워크의 게이트웨이 ECU, 즉 수신 게이트웨이 ECU로 전송하기 위한 암호문을 생성할 수 있다(S220). 상기 CAN ID는 메시지를 송신하는 ECU의 ID를 의미하거나, 패킷 ID를 의미할 수 있다.The transmission gateway ECU may extract the CAN ID and data from the message received from the transmission ECU (S210) and generate a ciphertext for transmission to the gateway ECU of the subnetwork including the reception ECU, that is, the reception gateway ECU (S220). The CAN ID means an ID of an ECU that transmits a message, or it may mean a packet ID.

상기 송신 게이트웨이 ECU는 추출된 CAN ID(

Figure 112016102897996-pat00001
), 추출된 데이터(
Figure 112016102897996-pat00002
) 및 카운터값(
Figure 112016102897996-pat00003
)을 이용하여, 암호문을 생성할 수 있다. 구체적으로, 상기 송신 게이트웨이 ECU는 공유키를 이용하여
Figure 112016102897996-pat00004
를 암호화할 수 있다. 여기서,
Figure 112016102897996-pat00005
는 이어쓰기(concatenation) 연산을 의미할 수 있다. 또한, 사용되는 암호 알고리즘은 AES(Advanced Encryption Standard) 알고리즘일 수 있으나, 본 발명의 권리범위가 이에 한정되는 것은 아니다.The transmission gateway ECU transmits the extracted CAN ID (
Figure 112016102897996-pat00001
), Extracted data (
Figure 112016102897996-pat00002
) And counter value (
Figure 112016102897996-pat00003
) Can be used to generate a cipher text. Specifically, the transmission gateway ECU uses the shared key
Figure 112016102897996-pat00004
Can be encrypted. here,
Figure 112016102897996-pat00005
May refer to a concatenation operation. Also, the encryption algorithm used may be an AES (Advanced Encryption Standard) algorithm, but the scope of the present invention is not limited thereto.

이후, 상기 송신 게이트웨이 ECU는 CAN FD 메시지를 생성하고, 생성된 CAN FD 메시지를 수신 게이트웨이 ECU로 송신한다(S230). 이때, 상기 송신 게이트웨이 ECU는 상기 CAN FD 메시지를 브로드캐스트함으로써 상기 CAN FD 메시지를 송신할 수 있다. CAN FD 메시지의 포멧에 관하여는 도 3을 통하여 상세하게 살펴보기로 한다.Then, the transmission gateway ECU generates a CAN FD message and transmits the generated CAN FD message to the reception gateway ECU (S230). At this time, the transmission gateway ECU can transmit the CAN FD message by broadcasting the CAN FD message. The format of the CAN FD message will be described in detail with reference to FIG.

상기 송신 게이트웨이 ECU에 의해 CAN FD 메시지가 송신되면, 게이트웨이 ECU들 각각은 카운트값을 1씩 증가시킬 수 있다(S240, S310). 이를 통하여 재전송 공격으로부터 안전한 통신 기법을 제공할 수 있다.When a CAN FD message is transmitted by the transmission gateway ECU, each of the gateway ECUs can increase the count value by 1 (S240, S310). Thus, a secure communication technique can be provided from a re-transmission attack.

상기 송신 게이트웨이 ECU에 의해 CAN FD 메시지가 송신되면 게이트웨이 ECU들 각각은 CAN FD 메시지에 포함되어 있는 Sender ECU ID를 통해 메시지의 목적지를 알 수 있다. 상기 수신 게이트웨이 ECU는 CAN FD 메시지에 포함된 암호문을 복호화하고(S320), 복호화 결과를 이용하여 메시지의 무결성 또는 데이터 무결성(data integrity)을 판단할 수 있다(S330). 즉, 암호문에 포함된 카운터값과 상기 수신 게이트웨이 ECU가 유지하고 있는 카운터값을 비교하고, 비교 결과에 따라 메시지의 무결성 여부를 판단할 수 있다. 여기서, 상기 수신 게이트웨이 ECU가 메시지를 수신한 후에 카운터값을 증가시켰다며 비교 대상 카운터값들의 차이가 1이 되어야 무결성을 만족시키고, 상기 수신 게이트웨이 ECU가 무결성 판단 후에 카운터값을 증가시킨다면 비교 대상 카운터값들이 동일해야 무결성을 만족시킨다. 따라서, 상기 수신 게이트웨이에 의한 카운터값의 증가 시기는 실시 예에 따라 상이할 수 있다. 즉, 실시 예에 따라, 무결성 여부를 판단한 후에 카운터값을 증가시킬 수도 있다.When a CAN FD message is transmitted by the transmission gateway ECU, each of the gateway ECUs can know the destination of the message through the Sender ECU ID included in the CAN FD message. The receiving gateway ECU decrypts the cipher text included in the CAN FD message (S320), and determines the integrity or data integrity of the message using the decryption result (S330). That is, it is possible to compare the counter value included in the cipher text with the counter value held by the reception gateway ECU, and determine whether the message is integrity based on the comparison result. If the reception gateway ECU determines that the counter value has increased after receiving the message and that the difference between the counter values to be compared is 1, the integrity is satisfied. If the reception gateway ECU increases the counter value after determining the integrity, Should be the same to satisfy the integrity. Therefore, the increase timing of the counter value by the reception gateway may be different according to the embodiment. That is, according to the embodiment, it is possible to increase the counter value after determining the integrity.

상기 수신 게이트웨이 ECU는 복호화 결과를 이용하여 CAN 메시지를 생성하고, 생성된 CAN 메시지는 수신 ECU로 송신될 수 있다(S340).The receiving gateway ECU generates a CAN message using the decoded result, and the generated CAN message can be transmitted to the receiving ECU (S340).

이와 같이, 본 발명에 따른 메시지 송수신 방법은 데이터 캡슐화(data encapsulation)와 메시지 암호화를 통해 데이터의 기밀성, 무결성을 보장하여 외부의 재전송 공격(replay attack)으로부터 통신 메시지를 보호할 수 있다.As described above, the message transmission / reception method according to the present invention can protect a communication message from an external replay attack by ensuring confidentiality and integrity of data through data encapsulation and message encryption.

또한, 본 발명은 기능 안전적(functional safety) 측면의 안전성을 입증받은 CAN의 사용을 극대화하고, CAN보다 넓은 페이로드(payload)를 가진 CAN FD를 이용하여 다양한 암호 알고리즘의 적용이 가능하다. 이를 통해 차량 내부 네트워크 환경에서 메시지의 기밀성과 무결성을 보장하여 ECU 간의 통신의 신뢰성을 높일 수 있다.In addition, the present invention maximizes the use of CAN, which has proven to be safe in terms of functional safety, and enables various encryption algorithms to be applied using a CAN FD having a wider payload than CAN. This ensures the confidentiality and integrity of the message in the network environment of the vehicle, thereby enhancing the reliability of the communication between the ECUs.

도 3은 도 2에 도시된 송신 게이트웨이 ECU에 의해 생성되는 CAN FD 메시지의 포멧을 도시한다.FIG. 3 shows the format of the CAN FD message generated by the transmission gateway ECU shown in FIG.

도 1 내지 도 3을 참조하면, CAN FD의 데이터 프레임은 64바이트의 데이터 필드(data field)를 포함한다. 64바이트의 데이터 필드 중 카운터값(Counter)으로 3바이트가 할당되고, Sender ECU ID에 2바이트가 할당되고, 암호문(Encrypt Data)에 59바이트가 할당될 수 있다. 도 3에 도시된 카운터값, Sender ECU ID 및 암호문의 할당 순서와 할당 크기는 실시 예에 따라 상이할 수 있다.Referring to FIGS. 1 to 3, the data frame of the CAN FD includes a data field of 64 bytes. 3 bytes are allocated to the counter value (Counter) of the 64-byte data field, 2 bytes are assigned to the Sender ECU ID, and 59 bytes are assigned to the ciphertext (Encrypt Data). The counter value, Sender ECU ID, and ciphertext allocation order and allocation size shown in FIG. 3 may differ according to the embodiment.

본 발명은 도면에 도시된 실시 예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시 예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 등록청구범위의 기술적 사상에 의해 정해져야 할 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.

10 : 차량 네트워크 시스템
100 : 제1 서브 네트워크
110 : 제1 게이트웨이 ECU
120 : 제1 ECU들
200 : 제2 서브 네트워크
210 : 제2 게이트웨이 ECU
220 : 제2 ECU들
300 : 제3 서브 네트워크
310 : 제3 게이트웨이 ECU
320 : 제3 ECU들
400 : OBD 단자
10: Vehicle network system
100: first sub-network
110: first gateway ECU
120: first ECUs
200: second subnetwork
210: a second gateway ECU
220: second ECUs
300: Third subnetwork
310: Third gateway ECU
320: Third ECUs
400: OBD terminal

Claims (7)

복수의 서브 네트워크들을 포함하는 차량 네트워크 시스템 내에서의 메시지 송수신 방법에 있어서,
상기 복수의 서브 네트워크들 중 제1 서브 네트워크에 포함되는 송신 ECU(electronic control unit)가 제1 메시지를 생성하고, 상기 제1 메시지를 상기 제1 서브 네트워크에 포함되는 송신 게이트웨이 ECU로 송신하는 단계;
상기 송신 게이트웨이 ECU가 상기 제1 메시지로부터 아이디(ID)와 데이터(data)를 추출하고, 추출된 아이디(ID), 추출된 데이터(data) 및 카운터값을 암호화하여 암호문을 생성하는 단계;
상기 송신 게이트웨이 ECU가 상기 암호문을 포함하는 제2 메시지를 생성하고, 상기 제2 메시지를 수신 ECU가 포함된 제2 서브 네트워크의 수신 게이트웨이 ECU로 송신하는 단계;
상기 수신 게이트웨이 ECU가 상기 제2 메시지에 포함된 암호문을 복호화하고, 복호화 결과를 이용하여 데이터 무결성(data integrity)을 판단하는 단계;
데이터 무결성이 인정되는 경우, 상기 수신 게이트웨이 ECU가 복호화 결과로 생성된 데이터를 포함하는 제3 메시지를 생성하는 단계; 및
상기 수신 게이트웨이 ECU가 상기 제3 메시지를 상기 수신 ECU로 송신하는 단계를 포함하고,
상기 수신 게이트웨이 ECU는 복호화 결과로 생성된 카운터값과 상기 수신 게이트웨이 ECU가 유지하고 있는 카운터값을 비교하여 데이터 무결성을 판단하는,
메시지 송수신 방법.
A method of transmitting and receiving a message in a vehicle network system including a plurality of subnetworks,
Generating a first message by an electronic control unit (ECU) included in a first sub-network of the plurality of sub-networks, and transmitting the first message to a transmission gateway ECU included in the first sub-network;
Extracting an ID and data from the first message and encrypting the extracted ID, extracted data and a counter value to generate a cipher text;
The transmission gateway ECU generates a second message including the cipher text and transmits the second message to a reception gateway ECU of a second sub network including a reception ECU;
Decrypting the cipher text included in the second message by the reception gateway ECU and determining data integrity using the decryption result;
Generating a third message including data generated as a result of the decoding if the data integrity is recognized; And
And the reception gateway ECU transmitting the third message to the reception ECU,
Wherein the reception gateway ECU compares a counter value generated as a result of decoding with a counter value held by the reception gateway ECU to determine data integrity,
A method for transmitting and receiving a message.
제1항에 있어서,
상기 제1 메시지와 상기 제3 메시지는 CAN 메시지이고,
상기 제2 메시지는 CAN FD 메시지인,
메시지 송수신 방법.
The method according to claim 1,
Wherein the first message and the third message are CAN messages,
Wherein the second message is a CAN FD message,
A method for transmitting and receiving a message.
제1항에 있어서,
상기 송신 게이트웨이 ECU는 상기 송신 게이트웨이 ECU와 상기 수신 게이트웨이 ECU에 의해 공유된 공유키를 이용하여 상기 암호문을 생성하는,
메시지 송수신 방법.
The method according to claim 1,
Wherein the transmission gateway ECU generates the ciphertext using the shared key shared by the transmission gateway ECU and the reception gateway ECU,
A method for transmitting and receiving a message.
삭제delete 제1항에 있어서,
상기 제2 메시지를 상기 수신 ECU가 포함된 상기 제2 서브 네트워크의 상기 수신 게이트웨이 ECU로 송신하는 단계 이후에,
상기 송신 게이트웨이 ECU와 상기 수신 게이트웨이 ECU 각각이 카운터값을 증가시키는 단계를 더 포함하는,
메시지 송수신 방법.
The method according to claim 1,
After the step of transmitting the second message to the reception gateway ECU of the second sub-network including the reception ECU,
Wherein each of the transmission gateway ECU and the reception gateway ECU increments a counter value.
A method for transmitting and receiving a message.
복수의 서브 네트워크들을 포함하는 차량 네트워크 시스템 내에서의 메시지 송수신 방법에 있어서,
상기 복수의 서브 네트워크들 중 제1 서브 네트워크에 포함되는 송신 ECU(electronic control unit)가 제1 메시지를 생성하고, 상기 제1 메시지를 상기 제1 서브 네트워크에 포함되는 송신 게이트웨이 ECU로 송신하는 단계;
상기 송신 게이트웨이 ECU가 상기 제1 메시지로부터 아이디(ID)와 데이터(data)를 추출하고, 추출된 아이디(ID), 추출된 데이터(data) 및 카운터값을 암호화하여 암호문을 생성하는 단계;
상기 송신 게이트웨이 ECU가 상기 암호문을 포함하는 제2 메시지를 생성하고, 상기 제2 메시지를 수신 ECU가 포함된 제2 서브 네트워크의 수신 게이트웨이 ECU로 송신하는 단계;
상기 수신 게이트웨이 ECU가 상기 제2 메시지에 포함된 암호문을 복호화하고, 복호화 결과를 이용하여 데이터 무결성(data integrity)을 판단하는 단계;
데이터 무결성이 인정되는 경우, 상기 수신 게이트웨이 ECU가 복호화 결과로 생성된 데이터를 포함하는 제3 메시지를 생성하는 단계; 및
상기 수신 게이트웨이 ECU가 상기 제3 메시지를 상기 수신 ECU로 송신하는 단계를 포함하고,
상기 제1 메시지와 상기 제3 메시지는 CAN 메시지이고,
상기 제2 메시지는 CAN FD 메시지이고,
상기 제2 메시지의 데이터 필드(data field)에는 카운터값, 상기 송신 ECU의 아이디(Sender ECU ID) 및 상기 암호문이 포함되는,
메시지 송수신 방법.
A method of transmitting and receiving a message in a vehicle network system including a plurality of subnetworks,
Generating a first message by an electronic control unit (ECU) included in a first sub-network of the plurality of sub-networks, and transmitting the first message to a transmission gateway ECU included in the first sub-network;
Extracting an ID and data from the first message and encrypting the extracted ID, extracted data and a counter value to generate a cipher text;
The transmission gateway ECU generates a second message including the cipher text and transmits the second message to a reception gateway ECU of a second sub network including a reception ECU;
Decrypting the cipher text included in the second message by the reception gateway ECU and determining data integrity using the decryption result;
Generating a third message including data generated as a result of the decoding if the data integrity is recognized; And
And the reception gateway ECU transmitting the third message to the reception ECU,
Wherein the first message and the third message are CAN messages,
The second message is a CAN FD message,
The data field of the second message includes a counter value, an ID (Sender ECU ID) of the transmission ECU,
A method for transmitting and receiving a message.
제6항에 있어서,
상기 제2 메시지의 데이터 필드에서 상기 카운터값에는 3 바이트가 할당되고, 상기 송신 ECU의 아이디에는 2 바이트가 할당되고, 상기 암호문에는 59 바이트가 할당되는,
메시지 송수신 방법.
The method according to claim 6,
3 bytes are allocated to the counter value in the data field of the second message, 2 bytes are allocated to the ID of the transmission ECU, and 59 bytes are allocated to the ciphertext.
A method for transmitting and receiving a message.
KR1020160138177A 2016-10-24 2016-10-24 Method for transmitting and receiving a message in a vehicle network system KR101705639B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160138177A KR101705639B1 (en) 2016-10-24 2016-10-24 Method for transmitting and receiving a message in a vehicle network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160138177A KR101705639B1 (en) 2016-10-24 2016-10-24 Method for transmitting and receiving a message in a vehicle network system

Publications (1)

Publication Number Publication Date
KR101705639B1 true KR101705639B1 (en) 2017-02-13

Family

ID=58156208

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160138177A KR101705639B1 (en) 2016-10-24 2016-10-24 Method for transmitting and receiving a message in a vehicle network system

Country Status (1)

Country Link
KR (1) KR101705639B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422181A (en) * 2021-12-11 2022-04-29 浙江吉利控股集团有限公司 Vehicle data message safety communication method
US11481283B2 (en) 2020-01-28 2022-10-25 Hyundai Motor Company Systems and methods providing backup database for protecting messages on a CAN bus
KR102520252B1 (en) * 2022-11-30 2023-04-10 주식회사 시옷 Method for collecting large volume vehicle data and handling secure transmission

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150024117A (en) 2013-08-26 2015-03-06 고려대학교 산학협력단 Data certification and acquisition method for vehicle
KR20160060683A (en) 2013-09-24 2016-05-30 더 리젠츠 오브 더 유니버시티 오브 미시건 Real-time frame authentication using id anonymization in automotive networks
KR20160088483A (en) * 2015-01-15 2016-07-26 고려대학교 산학협력단 Method for generating a key generation key and method for authenticating data frame using the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150024117A (en) 2013-08-26 2015-03-06 고려대학교 산학협력단 Data certification and acquisition method for vehicle
KR20160060683A (en) 2013-09-24 2016-05-30 더 리젠츠 오브 더 유니버시티 오브 미시건 Real-time frame authentication using id anonymization in automotive networks
KR20160088483A (en) * 2015-01-15 2016-07-26 고려대학교 산학협력단 Method for generating a key generation key and method for authenticating data frame using the same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
‘Securing Vehicle’s Electronic Control Unit‘, The Twelfth International Conference on Networking and Services, ICNS 2016, pp. 29-34, 2016.06.26-30. *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11481283B2 (en) 2020-01-28 2022-10-25 Hyundai Motor Company Systems and methods providing backup database for protecting messages on a CAN bus
CN114422181A (en) * 2021-12-11 2022-04-29 浙江吉利控股集团有限公司 Vehicle data message safety communication method
KR102520252B1 (en) * 2022-11-30 2023-04-10 주식회사 시옷 Method for collecting large volume vehicle data and handling secure transmission

Similar Documents

Publication Publication Date Title
CN108696411B (en) Device for use in a CAN system
US10771966B2 (en) Encryption method, decryption method, and related apparatus
WO2017080182A1 (en) Data transmission and receiving method, transmitter, receiver, and can bus network
CN107113287B (en) Method of performing device-to-device communication between user equipments
JP7008725B2 (en) Methods and systems for improved authenticated encryption in counter-based cryptosystems
KR101740957B1 (en) Data certification and acquisition method for vehicle
CN110912690A (en) Data encryption and decryption method, vehicle and storage medium
KR101675332B1 (en) Data commincaiton method for vehicle, Electronic Control Unit and system thereof
KR20140023799A (en) Method for guarantying the confidentiality and integrity of a data in controller area networks
KR101705639B1 (en) Method for transmitting and receiving a message in a vehicle network system
Halabi et al. A lightweight synchronous cryptographic hash chain solution to securing the vehicle CAN bus
KR101481403B1 (en) Data certification and acquisition method for vehicle
US20220191040A1 (en) Devices and methods for the generating and authentication of at least one data packet to be transmitted in a bus system (bu), in particular of a motor vehicle
KR20110057348A (en) Can communication security apparatus and can communication security method
Ansari et al. IntelliCAN: Attack-resilient controller area network (CAN) for secure automobiles
Carsten et al. A system to recognize intruders in controller area network (can)
KR20170032210A (en) Data commincaiton method for vehicle, Electronic Control Unit and system thereof
Tashiro et al. A secure protocol consisting of two different security-level message authentications over CAN
CN115834210A (en) Quantum secure network data transmitting and receiving method and communication system
Došek et al. Secure high level communication protocol for CAN bus
KR20120118182A (en) Security communication method between devices
CN110366856B (en) Spectrum information inquiry system and safety-protected inquiry proxy device
CN112740726B (en) Data transmission method and device
KR100864092B1 (en) Packet encryption method using block chaining mode of block cipher
JP2017060083A (en) Communication device and encryption communication method

Legal Events

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

Payment date: 20200128

Year of fee payment: 4