KR20200020515A - Controller area network system and message authentication method - Google Patents

Controller area network system and message authentication method Download PDF

Info

Publication number
KR20200020515A
KR20200020515A KR1020180096307A KR20180096307A KR20200020515A KR 20200020515 A KR20200020515 A KR 20200020515A KR 1020180096307 A KR1020180096307 A KR 1020180096307A KR 20180096307 A KR20180096307 A KR 20180096307A KR 20200020515 A KR20200020515 A KR 20200020515A
Authority
KR
South Korea
Prior art keywords
mac
random number
update
message
generated
Prior art date
Application number
KR1020180096307A
Other languages
Korean (ko)
Other versions
KR102148453B1 (en
Inventor
신성주
백영미
정상수
Original Assignee
재단법인대구경북과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 재단법인대구경북과학기술원 filed Critical 재단법인대구경북과학기술원
Priority to KR1020180096307A priority Critical patent/KR102148453B1/en
Publication of KR20200020515A publication Critical patent/KR20200020515A/en
Application granted granted Critical
Publication of KR102148453B1 publication Critical patent/KR102148453B1/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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • 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

Abstract

Disclosed are a CAN system and a message authentication method. The CAN system comprises a plurality of electronic control units (ECU) mutually transmitting and receiving messages and a gateway generating a session key generating random number to transmit the same to the ECUs. The ECUs generate a session key based on the received session key generating random number and a first ECU in the ECUs generates a first MAC based on the generated session key and a MAC generating random number and transmits a message containing the generated first MAC and the MAC generating random number to a second ECU in the ECUs. The second ECU generates a second MAC based on the generated session key and the received MAC generating random number and determines whether the received first MAC is the same as the generated second MAC to authenticate the received message. Accordingly, the present invention has a high security.

Description

CAN 시스템 및 메시지 인증 방법{CONTROLLER AREA NETWORK SYSTEM AND MESSAGE AUTHENTICATION METHOD}CONTROLLER AREA NETWORK SYSTEM AND MESSAGE AUTHENTICATION METHOD}

본 개시는 CAN 시스템 및 메시지 인증 방법에 관한 것으로, 더욱 상세하게는 ECU 간에 안전하게 메시지를 송수신하도록 메시지를 인증하는 CAN 시스템 및 메시지 인증 방법에 관한 것이다.The present disclosure relates to a CAN system and a message authentication method, and more particularly, to a CAN system and a message authentication method for authenticating a message to securely send and receive messages between ECUs.

현대의 차량에는 안전성과 효율성을 극대화하기 위해 기계부품과 유압시스템 외에 전장부품이 많이 포함되어 있다. 전장부품의 증가와 함께 전장부품을 제어하는 ECU(Electronic Control Unit)의 개수가 증가되고 있으며 ECU들을 연결하고 제어하기 위해 차량 내 통신을 이용한다. Modern vehicles contain many electrical components in addition to mechanical and hydraulic systems for maximum safety and efficiency. As the number of electronic components increases, the number of electronic control units (ECUs) that control electronic components is increasing, and in-vehicle communication is used to connect and control the ECUs.

차량의 3대 부문(파워트레인, 섀시, 바디)에서 주로 사용되는 네트워크는 CAN(Controller Area Network), LIN(Local Interconnect Network), FlexRay가 있으며, 제조비용의 최소화, 실시간 처리, 자동화, 분산처리를 요구하는 차량에서 CAN이 광범위하게 사용되는 네트워크이다.The networks commonly used in the three major sectors of the vehicle (Powertrain, Chassis, Body) are the Controller Area Network (CAN), the Local Interconnect Network (LIN), and the FlexRay, which minimizes manufacturing costs, real-time processing, automation, and distributed processing. CAN is a widely used network in demanding vehicles.

CAN은 다중통신망(Multi Master Network)이며 CSMA/CD&AMP(Carrier Sense Multiple Access/Collision Detection with Arbitration on Message Priority) 방식으로 메시지를 전송한다. CAN 노드(예, ECU)는 버스가 사용 중(idle, busy)인지 먼저 파악한 후 메시지를 전송한다. 여러 노드의 데이터들이 버스에 동시에 유입되어 전송 충돌이 발생할 경우, CAN은 식별자(Arbitration Field)(또는, 메시지 ID)값을 비교하여 전송 우선 순위를 결정하며, 우선 순위가 가장 높은 메시지를 가진 노드만이 CAN 버스 사용 권한을 획득한다. 이때, 메시지의 ID가 낮을수록 전송 우선 순위가 높다. 낮은 순위의 메시지를 가진 노드는 대기 상태로 전환되어 다음 버스 사이클에 재전송을 시도한다. 즉, 한 순간에 한 개의 노드만 CAN 버스에 접근 가능하며, 앞서 기술된 것처럼 식별자(Arbitration Field)를 기초로 우선 순위를 비교하여 가장 높은 우선 순위의 메시지만 계속 전송되고, 다른 노드들은 모두 대기(listening) 모드로 전이한다. CAN은 메시지 주소 방식을 사용하기 때문에 식별자(Arbitration Field)만으로 메시지를 구별할 수 있으며, 전송 노드의 식별 정보는 사용하지 않는다.CAN is a multi-master network and transmits messages in the CSMA / CD & AMP (Carrier Sense Multiple Access / Collision Detection with Arbitration on Message Priority). CAN nodes (e.g. ECUs) first determine if the bus is idle and busy before sending a message. If data from multiple nodes flows into the bus at the same time and a transmission conflict occurs, CAN compares the value of the Arbitration Field (or Message ID) to determine the transmission priority, and only the node with the highest priority message. Acquire permission to use this CAN bus. At this time, the lower the ID of the message, the higher the transmission priority. The node with the lower priority message goes to standby and tries to retransmit on the next bus cycle. That is, only one node can access the CAN bus at a time, compare the priorities based on the Arbitration Field as described above, and only the highest priority messages will continue to be sent. listening) mode. Because CAN uses the message addressing method, messages can be distinguished by only an identifier (Arbitration Field), and no identification information of the transmitting node is used.

과거의 폐쇄망 형태의 차량 내부 네트워크를 위해 설계된 CAN 프로토콜은 외부로부터의 해킹이나 악의적 제어조작에 대한 대응을 고려할 필요가 없었으므로 보안에 대한 대책이 마련되어 있지 않았다. 따라서, 개방형 네트워크로 변화하고 있는 현재 차량 내부 네트워크에서 외부 공격 위협성 증가에 따른 보안 기술은 미비한 상태이며 공격에 대한 취약점을 보완할 수 있는 방법은 표준 프로토콜에서 정의되어 있지 않다.The CAN protocol, designed for in-vehicle networks in the past, was not required to take into account external hacking or countermeasures against malicious control operations. Therefore, in the current vehicle internal network, which is changing to an open network, security technology due to the increased threat of external attack is inadequate, and a method for supplementing the vulnerability to the attack is not defined in the standard protocol.

CAN 프로토콜은 송신자 및 수신자 식별 정보가 없고 인증을 위한 필드가 별도로 존재하지 않으므로 메시지 위조 계열 공격에 매우 취약하다. 그리고, CAN 프로토콜은 보안성이 없는 브로트캐스트 통신 방식을 채택하였으므로 공격자가 네트워크 내 메시지에 대한 도청을 쉽게 할 수 있으며, 수신한 내용을 재송신하거나 변조하여 전송하는 replay와 masquerade 공격을 할 수 있다.The CAN protocol is very vulnerable to message forgery attack because there is no sender and receiver identification and no separate fields for authentication. In addition, the CAN protocol adopts an insecure broadcast communication method, so that an attacker can easily intercept a message in a network, and can replay and masquerade attacks by retransmitting or tampering with received content.

최근 CAN 프로토콜의 보안을 위해 암호화 기반의 인증 방법, 그룹 기반의 만장일치 인증 방법, MAC 기반의 인증 방법, 그룹 MAC 인증 방법 등이 제안되었다.Recently, encryption-based authentication method, group-based unanimity authentication method, MAC-based authentication method, group MAC authentication method, etc. have been proposed for security of CAN protocol.

암호화(개인키와 공개키를 이용) 기반의 인증 방법이 고려될 수 있으나 암호화 방식은 많은 연산량을 필요로 하고, 하드웨어와 CAN 프레임의 수정이 필요하므로 적용에 어려움이 있다. 그룹 기반의 만장일치 인증 방법은 그룹 내 멤버의 인증 확인을 위해 현재 CAN 프로토콜에 새로운 응용 계층을 구현해야 하는 문제점이 있다. MAC 기반의 인증 방법은 사용할 키를 미리 생성해두고 사용하므로 ECU 메모리 크기에 제한되고 인증 후에는 다시 키를 생성해야 하는 문제점이 있다. 그룹 MAC 인증 방법은 노드 수가 증가할 경우 그룹 MAC 인증의 장점을 얻기 어렵고 그룹의 수가 증가할 경우 키 관리가 어려워지는 문제점이 있다.Authentication method based on encryption (using private key and public key) may be considered, but it is difficult to apply because encryption method requires a large amount of computation and modification of hardware and CAN frame. The group-based unanimity authentication method has a problem in that a new application layer must be implemented in the current CAN protocol to verify authentication of members in a group. The MAC-based authentication method has a problem in that the key to be used is generated in advance, which is limited to the ECU memory size and needs to be generated again after authentication. The group MAC authentication method has a problem in that it is difficult to obtain the advantages of group MAC authentication when the number of nodes increases, and key management becomes difficult when the number of groups increases.

따라서, 현재 CAN 프로토콜의 변경없이 적용 가능하고 원활하게 동작할 수 있는 CAN 시스템의 메시지 인증 방법의 필요성이 존재한다.Accordingly, there is a need for a message authentication method of a CAN system that can be applied and operate smoothly without changing the current CAN protocol.

본 개시는 상술한 문제점을 해결하기 위한 것으로, 본 개시의 목적은 현재 CAN 프로토콜의 변경없이 적용할 수 있고 확장성이 크며, 공격자의 공격에 강인한 CAN 시스템 및 메시지 인증 방법을 제공하는 것이다.The present disclosure is to solve the above-mentioned problems, an object of the present disclosure is to provide a CAN system and a message authentication method that can be applied without modification of the current CAN protocol, is highly scalable, and robust to an attacker's attack.

이상과 같은 목적을 달성하기 위한 본 개시의 일 실시 예에 따르면, CAN(Controller Area Network) 시스템은 상호 간에 메시지를 송수신하는 복수의 ECU(Electronic Control Unit) 및 세션키 생성 난수를 생성하여 상기 복수의 ECU로 전송하는 게이트웨이를 포함하며, 상기 복수의 ECU는 상기 수신한 세션키 생성 난수에 기초하여 세션키를 생성하고, 상기 복수의 ECU 중 제1 ECU는 상기 생성된 세션키와 MAC 생성 난수에 기초하여 제1 MAC(Message Authentication Code)를 생성하고, 상기 생성된 제1 MAC와 상기 MAC 생성 난수를 포함하는 메시지를 상기 복수의 ECU 중 제2 ECU로 전송하며, 상기 제2 ECU는 상기 생성된 세션키와 상기 수신된 MAC 생성 난수에 기초하여 제2 MAC를 생성하고, 상기 수신된 제1 MAC와 상기 생성된 제2 MAC의 동일성 여부를 판단하여 상기 수신된 메시지를 인증한다.According to an embodiment of the present disclosure for achieving the above object, a controller area network (CAN) system generates a plurality of electronic control unit (ECU) and session key generation random number to send and receive messages to each other, the plurality of And a gateway for transmitting to an ECU, wherein the plurality of ECUs generate a session key based on the received session key generation random number, and a first ECU of the plurality of ECUs is based on the generated session key and MAC generation random number. Generate a first message authentication code (MAC), and transmit a message including the generated first MAC and the random number of the MAC to a second ECU of the plurality of ECUs, wherein the second ECU transmits the generated session; A second MAC is generated based on a key and the received MAC random number, and it is determined whether the received first MAC is identical to the generated second MAC to authenticate the received message.

그리고, 상기 제1 ECU는 상기 세션키와 상기 MAC 생성 난수에 기초하여 메시지 전송키를 생성하고, 상기 생성된 메시지 전송키, 상기 MAC 생성 난수 및 데이터에 기초하여 제1 MAC를 생성하며, 상기 생성된 제1 MAC, 상기 MAC 생성 난수 및 상기 데이터를 상기 메시지의 데이터 필드에 포함시켜 상기 제2 ECU로 전송할 수 있다.The first ECU generates a message transmission key based on the session key and the MAC random number, and generates a first MAC based on the generated message transmission key, the MAC random number and data. The first MAC, the MAC random number, and the data may be included in the data field of the message and transmitted to the second ECU.

또한, 상기 제2 ECU는 상기 세션키와 상기 수신된 메시지의 데이터 필드에 포함된 MAC 생성 난수에 기초하여 메시지 수신키를 생성하고, 상기 생성된 메시지 수신키, 상기 데이터 필드에 포함된 상기 MAC 생성 난수 및 상기 데이터에 기초하여 제2 MAC를 생성할 수 있다.The second ECU generates a message receiving key based on the MAC key random number included in the session key and the data field of the received message, and generates the MAC message included in the generated message receiving key and the data field. A second MAC may be generated based on the random number and the data.

그리고, 상기 게이트웨이는 상기 세션키 생성 난수를 기 설정된 시간마다 갱신할 수 있다.The gateway may update the session key generation random number at each preset time.

또한, 상기 게이트웨이는 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신할 수 있다.The gateway may also update the session key based on the updated session key generation random number and hash function.

또한, 상기 게이트웨이는 상기 세션키와 세션 갱신 MAC 생성 난수에 기초하여 갱신 전송키를 생성하고, 상기 생성된 갱신 전송키, 상기 세션 갱신 MAC 생성 난수 및 갱신 데이터에 기초하여 제1 갱신 MAC를 생성하며, 상기 생성된 제1 갱신 MAC, 상기 갱신된 세션키 생성 난수, 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터를 갱신 메시지의 데이터 필드에 포함시켜 상기 복수의 ECU로 전송할 수 있다.The gateway may generate an update transmission key based on the session key and the session update MAC generation random number, and generate a first update MAC based on the generated update transmission key, the session update MAC generation random number, and the update data. The generated first update MAC, the updated session key generation random number, the session update MAC generation random number, and the update data may be included in a data field of an update message and transmitted to the plurality of ECUs.

한편, 상기 복수의 ECU 각각은 상기 세션키와 상기 수신된 갱신 메시지의 데이터 필드에 포함된 세션 갱신 MAC 생성 난수에 기초하여 갱신 수신키를 생성하고, 상기 생성된 갱신 수신키, 상기 데이터 필드에 포함된 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터에 기초하여 제2 갱신 MAC를 생성하며, 상기 수신된 제1 갱신 MAC와 상기 생성된 제2 갱신 MAC의 동일성 여부를 판단하여 상기 수신된 갱신 메시지를 인증하고, 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신할 수 있다.Meanwhile, each of the plurality of ECUs generates an update receiving key based on the session update MAC generation random number included in the session key and the data field of the received update message, and includes the generated update receiving key in the data field. Generate a second update MAC based on the generated session update MAC generation random number and the update data, and determine whether the received first update MAC is identical to the generated second update MAC to authenticate the received update message. The session key may be updated based on the updated session key generation random number and a hash function.

이상과 같은 목적을 달성하기 위한 본 개시의 일 실시 예에 따르면, CAM 시스템의 메시지 인증 방법은 게이트웨이가 세션키 생성 난수를 생성하여 복수의 ECU로 전송하는 단계, 상기 복수의 ECU가 상기 수신한 세션키 생성 난수에 기초하여 세션키를 생성하는 단계, 상기 복수의 ECU 중 제1 ECU가 상기 생성된 세션키와 MAC 생성 난수에 기초하여 제1 MAC를 생성하는 단계, 상기 제1 ECU가 상기 생성된 제1 MAC와 상기 MAC 생성 난수를 포함하는 메시지를 상기 복수의 ECU 중 제2 ECU로 전송하는 단계, 상기 제2 ECU가 상기 생성된 세션키와 상기 수신된 MAC 생성 난수에 기초하여 제2 MAC를 생성하는 단계 및 상기 제2 ECU가 상기 수신된 제1 MAC와 상기 생성된 제2 MAC의 동일성 여부를 판단하여 상기 수신된 메시지를 인증하는 단계를 포함한다.According to an embodiment of the present disclosure for achieving the above object, in the message authentication method of the CAM system, the gateway generates a session key generation random number and transmits it to a plurality of ECU, the session received by the plurality of ECU Generating a session key based on a key generation random number; generating, by a first ECU of the plurality of ECUs, a first MAC based on the generated session key and a MAC generation random number; Transmitting a message including a first MAC and the MAC random number to a second ECU of the plurality of ECUs, wherein the second ECU generates a second MAC based on the generated session key and the received MAC generated random number; Generating the second ECU and determining whether the received first MAC is identical to the generated second MAC to authenticate the received message.

그리고, 상기 제1 MAC를 생성하는 단계는 상기 세션키와 상기 MAC 생성 난수에 기초하여 메시지 전송키를 생성하고, 상기 생성된 메시지 전송키, 상기 MAC 생성 난수 및 데이터에 기초하여 제1 MAC를 생성하고, 상기 제2 ECU로 전송하는 단계는 상기 생성된 제1 MAC, 상기 MAC 생성 난수 및 상기 데이터를 상기 메시지의 데이터 필드에 포함시켜 상기 제2 ECU로 전송할 수 있다.The generating of the first MAC may include generating a message transmission key based on the session key and the MAC random number, and generating a first MAC based on the generated message transmission key, the MAC random number and data. The transmitting to the second ECU may include the generated first MAC, the MAC random number, and the data in the data field of the message and transmit the same to the second ECU.

또한, 상기 제2 MAC를 생성하는 단계는 상기 세션키와 상기 수신된 메시지의 데이터 필드에 포함된 MAC 생성 난수에 기초하여 메시지 수신키를 생성하고, 상기 생성된 메시지 수신키, 상기 데이터 필드에 포함된 상기 MAC 생성 난수 및 상기 데이터에 기초하여 제2 MAC를 생성할 수 있다.The generating of the second MAC may include generating a message receiving key based on the MAC key random number included in the session key and the data field of the received message, and including the generated message receiving key in the data field. The second MAC may be generated based on the received MAC generation random number and the data.

한편, CAM 시스템의 메시지 인증 방법은 상기 세션키를 갱신하는 단계를 더 포함하고, 상기 세션키를 갱신하는 단계는 상기 게이트웨이가 상기 세션키 생성 난수를 기 설정된 시간마다 갱신할 수 있다.Meanwhile, the message authentication method of the CAM system may further include updating the session key, and in the updating of the session key, the gateway may update the session key generation random number at a predetermined time.

그리고, 상기 세션키를 갱신하는 단계는 상기 게이트웨이가 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신할 수 있다.In the updating of the session key, the gateway may update the session key based on the updated session key generation random number and a hash function.

또한, 상기 세션키를 갱신하는 단계는 상기 게이트웨이가 상기 세션키와 세션 갱신 MAC 생성 난수에 기초하여 갱신 전송키를 생성하고, 상기 생성된 갱신 전송키, 상기 세션 갱신 MAC 생성 난수 및 갱신 데이터에 기초하여 제1 갱신 MAC를 생성하며, 상기 생성된 제1 갱신 MAC, 상기 갱신된 세션키 생성 난수, 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터를 갱신 메시지의 데이터 필드에 포함시켜 상기 복수의 ECU로 전송할 수 있다.The updating of the session key may include: generating, by the gateway, an update transmission key based on the session key and the session update MAC generation random number, and based on the generated update transmission key, the session update MAC generation random number, and the update data. Generate a first update MAC, and include the generated first update MAC, the updated session key generation random number, the session update MAC generation random number, and the update data in a data field of an update message and transmit the same to the plurality of ECUs. Can be.

또한, 상기 세션키를 갱신하는 단계는 상기 복수의 ECU 각각이 상기 세션키와 상기 수신된 갱신 메시지의 데이터 필드에 포함된 세션 갱신 MAC 생성 난수에 기초하여 갱신 수신키를 생성하고, 상기 생성된 갱신 수신키, 상기 데이터 필드에 포함된 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터에 기초하여 제2 갱신 MAC를 생성하며, 상기 수신된 제1 갱신 MAC와 상기 생성된 제2 갱신 MAC의 동일성 여부를 판단하여 상기 수신된 갱신 메시지를 인증하고, 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신할 수 있다.The updating of the session key may include: generating, by each of the plurality of ECUs, an update receiving key based on the session update MAC generation random number included in the data field of the session key and the received update message; A second update MAC is generated based on a reception key, the session update MAC generation random number included in the data field, and the update data, and determines whether the received first update MAC is identical to the generated second update MAC. Authenticate the received update message, and update the session key based on the updated session key generation random number and a hash function.

이상 설명한 바와 같이, CAN 시스템 및 메시지 인증 방법은 메시지를 전송할 때마다 현재 키와 난수에 기초하여 MAC을 생성하므로 높은 보안성을 가질 수 있다.As described above, the CAN system and the message authentication method generate a MAC based on a current key and a random number each time a message is transmitted, thereby having high security.

그리고, CAN 시스템 및 메시지 인증 방법은 일정 기간마다 MAC 생성에 사용되는 키를 변경하기 때문에 공격자의 무작위 대입 공격에 대응할 수 있다.In addition, since the CAN system and the message authentication method change a key used for MAC generation at a predetermined time, the CAN system and the message authentication method can cope with an attack by the attacker.

또한, CAN 시스템 및 메시지 인증 방법은 기존의 CAN protocol을 수정하지 않고 적용할 수 있다.In addition, the CAN system and message authentication method can be applied without modifying the existing CAN protocol.

또한, CAN 시스템 및 메시지 인증 방법은 CAN 시스템이 변경되더라도 알고리즘의 수정없이 적용할 수 있다.In addition, the CAN system and message authentication method can be applied without modification of the algorithm even if the CAN system changes.

또한, CAN 시스템 및 메시지 인증 방법은 많은 자원이 필요하지 않고 빠른 시간 내에 메시지 인증이 가능하며 기존 장치와 호환될 수 있다.In addition, the CAN system and message authentication method do not require much resources, enable message authentication in a short time, and are compatible with existing devices.

도 1은 본 개시의 일 실시 예에 따른 CAN 시스템을 나타내는 도면이다.
도 2는 본 개시의 일 실시 예에 따른 해시 체인을 이용한 키 생성 방법과 해시 풀을 설명하는 도면이다.
도 3은 본 개시의 일 실시 예에 따른 ECU 간 메시지를 전송하고 인증하는 과정을 설명하는 타이밍도이다.
도 4는 본 개시의 일 실시 예에 따른 세션키를 갱신하는 과정을 설명하는 타이밍도이다.
도 5는 본 개시의 일 실시 예에 따른 CAM 시스템의 메시지 인증 방법의 흐름도이다.
1 is a diagram illustrating a CAN system according to an exemplary embodiment of the present disclosure.
2 is a diagram illustrating a key generation method and a hash pool using a hash chain according to an embodiment of the present disclosure.
3 is a timing diagram illustrating a process of transmitting and authenticating a message between ECUs according to an exemplary embodiment of the present disclosure.
4 is a timing diagram illustrating a process of updating a session key according to an embodiment of the present disclosure.
5 is a flowchart illustrating a message authentication method of a CAM system according to an embodiment of the present disclosure.

이하에서는 첨부된 도면을 참조하여 다양한 실시 예를 보다 상세하게 설명한다. 본 명세서에 기재된 실시 예는 다양하게 변형될 수 있다. 특정한 실시 예가 도면에서 묘사되고 상세한 설명에서 자세하게 설명될 수 있다. 그러나, 첨부된 도면에 개시된 특정한 실시 예는 다양한 실시 예를 쉽게 이해하도록 하기 위한 것일 뿐이다. 따라서, 첨부된 도면에 개시된 특정 실시 예에 의해 기술적 사상이 제한되는 것은 아니며, 발명의 사상 및 기술 범위에 포함되는 모든 균등물 또는 대체물을 포함하는 것으로 이해되어야 한다.Hereinafter, various embodiments will be described in more detail with reference to the accompanying drawings. Embodiments described herein may be variously modified. Specific embodiments may be depicted in the drawings and described in detail in the detailed description. However, the specific embodiments disclosed in the accompanying drawings are only for easily understanding the various embodiments. Therefore, the technical spirit is not limited by the specific embodiments disclosed in the accompanying drawings, and it should be understood to include all equivalents or substitutes included in the spirit and scope of the invention.

제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이러한 구성요소들은 상술한 용어에 의해 한정되지는 않는다. 상술한 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. Terms including ordinal numbers such as first and second may be used to describe various components, but these components are not limited by the terms described above. The terms described above are used only for the purpose of distinguishing one component from another.

본 명세서에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.As used herein, the terms "comprises" or "having" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof described on the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof. When a component is said to be "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that another component may be present in the middle. Should be. On the other hand, when a component is said to be "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between.

한편, 본 명세서에서 사용되는 구성요소에 대한 "모듈" 또는 "부"는 적어도 하나의 기능 또는 동작을 수행한다. 그리고, "모듈" 또는 "부"는 하드웨어, 소프트웨어 또는 하드웨어와 소프트웨어의 조합에 의해 기능 또는 동작을 수행할 수 있다. 또한, 특정 하드웨어에서 수행되어야 하거나 적어도 하나의 제어부에서 수행되는 "모듈" 또는 "부"를 제외한 복수의 "모듈들" 또는 복수의 "부들"은 적어도 하나의 모듈로 통합될 수도 있다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.On the other hand, "module" or "unit" for the components used in the present specification performs at least one function or operation. In addition, the "module" or "unit" may perform a function or an operation by hardware, software, or a combination of hardware and software. In addition, a plurality of "modules" or a plurality of "parts" other than a "module" or a "part" to be performed in specific hardware or performed by at least one control unit may be integrated into at least one module. Singular expressions include plural expressions unless the context clearly indicates otherwise.

그 밖에도, 본 발명을 설명함에 있어서, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우, 그에 대한 상세한 설명은 축약하거나 생략한다. 한편, 각 실시 예는 독립적으로 구현되거나 동작될 수도 있지만, 각 실시 예는 조합되어 구현되거나 동작될 수도 있다.In addition, in describing the present invention, when it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be abbreviated or omitted. Meanwhile, although each embodiment may be independently implemented or operated, each embodiment may be implemented or operated in combination.

도 1은 본 개시의 일 실시 예에 따른 CAN(Controller Area Network) 시스템을 나타내는 도면이다.1 is a diagram illustrating a controller area network (CAN) system according to an embodiment of the present disclosure.

도 1을 참조하면, CAN 시스템(100)은 게이트웨이(110) 및 하나 이상의 ECU(Electronic Control Unit)(120-1, 120-2, 120-3, 120-4, 120-5)를 포함한다. 각 ECU 하나 이상의 ECU(120-1, 120-2, 120-3, 120-4, 120-5)는 상호간에 메시지를 송수신한다. 예를 들어, 제1 ECU(120-1)는 브로드캐스팅 방식으로 메시지를 처리해야 할 ECU에 관한 정보 및 우선 순위에 관한 정보를 포함하는 메시지를 전송하면, 나머지 ECU(120-2, 120-3, 120-3, 120-4, 120-5)는 제1 ECU(120-1)로부터 전송된 메시지를 수신하고, 메시지에 포함된 정보에 기초하여 특정 ECU만 우선 순위에 따라 수신된 메시지를 처리한다. 또한, 제1 ECU(120-1)는 동일한 방식에 따라 다른 ECU로부터 수신된 메시지를 처리한다. 즉, 각 ECU(120-1, 120-2, 120-3, 120-4, 120-5)는 상황에 따라 송신자 및 수신자의 역할을 수행할 수 있다.Referring to FIG. 1, the CAN system 100 includes a gateway 110 and one or more electronic control units (ECUs) 120-1, 120-2, 120-3, 120-4, and 120-5. Each ECU One or more ECUs 120-1, 120-2, 120-3, 120-4, and 120-5 send and receive messages to each other. For example, when the first ECU 120-1 transmits a message including information about an ECU and information about priority of a ECU to process a message in a broadcasting manner, the remaining ECUs 120-2 and 120-3 are transmitted. , 120-3, 120-4, and 120-5 receive the message transmitted from the first ECU 120-1, and process the received message according to the priority of only a specific ECU based on the information included in the message. do. In addition, the first ECU 120-1 processes a message received from another ECU in the same manner. That is, each of the ECUs 120-1, 120-2, 120-3, 120-4, and 120-5 may serve as a sender and a receiver according to a situation.

게이트웨이(110)는 CAN 시스템(100)을 외부의 다른 시스템 또는 네트워크와 연결하고 세션을 관리하며 MAC(Message Authentication Code) 생성시 사용되는 키를 변경하기 위한 갱신 메시지를 각 ECU로 전달한다. 세션은 메시지 인증을 위한 MAC를 생성할 때 사용될 해시 풀(hash pool)의 세션키의 시작점을 변경한 시점부터 다음 변경 시점까지의 시간 간격을 의미한다. 각 세션마다 MAC 생성에 사용되는 세션키의 시작점은 다르다. 만일, CAN 시스템(100)이 세션을 적용되지 않고 해시 풀의 특정 시점에 사용할 키의 시작 순서를 고정한 후 체인 세션키를 지속적으로 사용하는 경우, CAN 시스템(100)은 고정된 길이의 MAC로 인해 전수공격(brute forcing attacks)에 취약할 수 밖에 없다. 따라서, 해시 충돌없는 키를 가지는 해시 풀 내에서 세션키의 시작점을 주기적으로 변경할 수 있도록 세션이 설정됨으로써 CAN 시스템(100)은 전수공격에도 강인할 수 있다.The gateway 110 connects the CAN system 100 to another external system or network, manages sessions, and transmits an update message to each ECU for changing a key used when generating a MAC (Message Authentication Code). A session is a time interval from when a start point of a session key of a hash pool used when generating a MAC for message authentication is changed to a next change time. Each session has a different starting point for the session key used to generate the MAC. If the CAN system 100 continuously uses the chain session key after fixing the start order of the key to be used at a specific point in the hash pool without applying the session, the CAN system 100 may be due to the fixed length of the MAC. We are vulnerable to brute forcing attacks. Therefore, the CAN system 100 can be robust against a full attack by establishing a session to periodically change the starting point of the session key in a hash pool having a hash collision-free key.

게이트웨이(110)는 갱신 메시지를 모든 ECU(120-1, 120-2, 120-3, 120-4, 120-5)로 전송한다. 게이트웨이(110)는 키를 직접적으로 메시지에 포함시켜 전송하는 것이 아니라 각 ECU(120-1, 120-2, 120-3, 120-4, 120-5)가 세션키를 선택할 수 있는 난수(세션키 생성 난수)를 포함시켜 메시지를 전송한다. 즉, 게이트웨이(110)는 메시지 인증을 위한 세션키 생성 난수(rg(j))를 생성하여 각 ECU(120-1, 120-2, 120-3, 120-4, 120-5)로 전송한다.The gateway 110 transmits the update message to all the ECUs 120-1, 120-2, 120-3, 120-4, and 120-5. The gateway 110 does not directly include the key in the message and transmit the message, but instead selects a session key for each ECU 120-1, 120-2, 120-3, 120-4, and 120-5. Send a message with a key generation random number). That is, the gateway 110 generates a session key generation random number r g (j) for message authentication and transmits it to each of the ECUs 120-1, 120-2, 120-3, 120-4, and 120-5. do.

그리고, 복수의 ECU(120-1, 120-2, 120-3, 120-4, 120-5) 각각은 게이트웨이(110)로부터 수신한 세션키 생성 난수(rg(j))에 기초하여 세션키(Kj)를 생성한다. 이후, 복수의 ECU(120-1, 120-2, 120-3, 120-4, 120-5) 중 송신자 ECU는 생성된 세션키(Kj)와 MAC 생성 난수(re(Mk))에 기초하여 MAC를 생성하고, 생성된 MAC와 MAC 생성 난수(re(Mk))를 포함하는 메시지를 수신자 ECU로 전송한다. 상술한 바와 같이, CAN 시스템(100)의 송신자 ECU는 브로드캐스팅 방식으로 모든 ECU로 메시지를 전송하지만 메시지를 수신한 복수의 ECU 중 전송된 메시지와 관련된 특정 ECU만이 수신된 메시지를 처리한다. 결론적으로, 송신자 ECU는 수신자 ECU로 메시지를 전송한다.Each of the plurality of ECUs 120-1, 120-2, 120-3, 120-4, and 120-5 is based on a session key generation random number r g (j) received from the gateway 110. Generate the key (K j ). Subsequently, the sender ECU among the plurality of ECUs 120-1, 120-2, 120-3, 120-4 and 120-5 generates a session key K j and a random number MAC generated random number r e (M k ). Generate a MAC based on the MAC, and transmit a message including the generated MAC and the MAC random number r e (M k ) to the receiver ECU. As described above, the sender ECU of the CAN system 100 transmits the message to all ECUs in a broadcast manner, but only a specific ECU related to the transmitted message among the plurality of ECUs receiving the message processes the received message. In conclusion, the sender ECU sends a message to the receiver ECU.

수신자 ECU는 생성된 세션키(Kj)와 수신된 MAC 생성 난수(re(Mk))에 기초하여 MAC를 생성한다. 그리고, 수신자 ECU는 수신된 MAC와 생성된 MAC의 동일성 여부를 판단하고, 동일한 경우 메시지를 인증한다.The receiver ECU generates a MAC based on the generated session key K j and the received MAC generated random number r e (M k ). The receiver ECU determines whether the received MAC is identical to the generated MAC, and if so, authenticates the message.

수신자 ECU가 메시지를 인증하는 구체적인 과정과 게이트웨이가 키를 갱신하는 과정은 후술한다.A detailed process of authenticating the message by the receiver ECU and a process of updating the key by the gateway will be described later.

도 2는 본 개시의 일 실시 예에 따른 해시 체인을 이용한 키 생성 방법과 해시 풀을 설명하는 도면이다.2 is a diagram illustrating a key generation method and a hash pool using a hash chain according to an embodiment of the present disclosure.

해시 풀은 MAC 생성시에 사용되는 세션키들의 집합을 의미한다. 해시 풀은 동일한 해시 체인(또는, 해시 함수)으로 생성되는 것으로 키를 메모리에 저장하는 것이 아니라 해시 함수를 n번 연속 수행하여 생성되는 키들의 집합을 의미한다. 즉, 제1 ECU와 해시 체인의 i번째 세션키와 제2 ECU의 해시 체인의 i번째 세션키는 동일하다. 따라서, 모든 ECU는 하나의 가상 해시 풀을 가지도 있는 것과 같다.The hash pool refers to a set of session keys used when generating a MAC. The hash pool is generated with the same hash chain (or hash function), and means a set of keys generated by performing the hash function n times in succession rather than storing the key in memory. That is, the i th session key of the first ECU and the hash chain and the i th session key of the hash chain of the second ECU are the same. Thus, every ECU is like having one virtual hash pool.

해시 풀의 해시 체인의 키 사용 방향은 단방향 해시 함수의 사용 방향과 다르다. 즉, 본 개시의 해시 체인의 키 사용 방향은 생성 방향과 동일하다. 인증에 주로 사용되는 단방향 해시 체인키로 구성된 해시 풀이 사용되는 경우, 충분한 시간이 지나면 해시 충돌에 의해 일정량의 해시 키가 반복되며, 제한된 메모리를 가진 ECU에 충돌없는 해시 키를 충분히 가지는 해시 풀을 물리적으로 저장하는 것은 한계가 있다.The direction of the key usage of the hash chain of the hash pool is different from that of the one-way hash function. That is, the key usage direction of the hash chain of the present disclosure is the same as the generation direction. If a hash pool consisting of a one-way hash chainkey that is used primarily for authentication is used, a certain amount of hash keys are repeated by hash collisions after sufficient time, and physically builds a hash pool with enough collision-free hash keys for ECUs with limited memory. There is a limit to storing.

본 개시의 CAN 시스템은 단방향 해시 체인을 적용하지 않고, 해시 충돌없는 키를 가지는 해시 풀 내에서 MAC 생성 키를 결정하기 위해 게이트웨이의 난수를 이용함으로써 키 시작점의 노출 문제를 해결할 수 있다.The CAN system of the present disclosure can solve the exposure problem of the key starting point by using a random number of the gateway to determine the MAC generation key in the hash pool having a hash collision-free key without applying a one-way hash chain.

게이트웨이는 세션키 생성 난수(rg(j))를 각 ECU로 전송하고, 각 ECU는 수신된 세션키 생성 난수(rg(j))를 기초로 생성한 동일한 세션키(Kj)를 사용한다. 생성한 세션키(Kj)는 현재 세션 j에서만 유효하며, 세션 변경시(세션 j에서 세션 j+1로 변경) 각 ECU는 게이트웨이로부터 새로 수신한 갱신된 세션키 생성 난수(rg(j+1))에 기초하여 해시 체인 함수를 수행할 수 있다. 게이트웨이는 기 설정된 시간마다 세션키 생성 난수를 갱신할 수 있다. 따라서, 각 ECU는 새로운 세션에서 MAC 생성을 위해 새로운 해시 풀의 세션키(

Figure pat00001
)를 선택할 수 있다.The gateway sends a session key generation random number r g (j) to each ECU, and each ECU uses the same session key K j generated based on the received session key generation random number r g (j). do. The generated session key (K j ) is valid only in the current session j. When the session is changed (from session j to session j + 1), each ECU receives the newly updated updated session key generation random number (r g (j +). You can perform a hash chain function based on 1)). The gateway may update the session key generation random number every predetermined time. Thus, each ECU has a new hash pool's session key (
Figure pat00001
) Can be selected.

아래에서는 송신자 ECU에서 수신자 ECU로 메시지를 보낼 때 메시지를 인증하는 과정에 대해 구체적으로 설명한다.The following describes the process of authenticating a message when sending a message from the sender ECU to the receiver ECU.

도 3은 본 개시의 일 실시 예에 따른 ECU 간 메시지를 전송하고 인증하는 과정을 설명하는 타이밍도이다.3 is a timing diagram illustrating a process of transmitting and authenticating a message between ECUs according to an exemplary embodiment of the present disclosure.

도 3을 참조하면, 제1 ECU(120-1)와 제2 ECU(120-2)가 도시되어 있다. 제1 ECU(120-1)는 송신자 ECU이고, 제2 ECU(120-2)는 수신자 ECU일 수 있다.Referring to FIG. 3, a first ECU 120-1 and a second ECU 120-2 are shown. The first ECU 120-1 may be a sender ECU and the second ECU 120-2 may be a receiver ECU.

제1 ECU(120-1)는 제1 메시지(M1)를 전송하기 위해 MAC 생성 난수(r1(M1))를 생성한다(S310). 제1 ECU(120-1)는 현재 세션키(Kj), MAC 생성 난수(r1(M1))에 기초하여 메시지 전송키(

Figure pat00002
)를 생성한다(S320). 메시지 전송키(
Figure pat00003
)는 현재 세션키(Kj)에서 MAC 생성 난수(r1(M1))의 크기 만큼 해시 함수를 사용하여 생성될 수 있다. 메시지 전송키(
Figure pat00004
)는 송신하려는 단일 메시지에서만 유효하다. 제1 ECU(120-1)는 제1 MAC를 생성한다(S330). 제1 MAC는 데이터, MAC 생성 난수(r1(M1)) 및 메시지 전송키(
Figure pat00005
)에 해시 함수를 사용하여 생성될 수 있다. 제1 ECU(120-1)는 메시지의 데이터 필드에 데이터, MAC 생성 난수(r1(M1)) 및 제1 MAC를 포함시켜 제1 메시지(M1)를 제2 ECU(120-2)로 전송한다(S340).The first ECU 120-1 generates a MAC generation random number r 1 (M 1 ) to transmit the first message M 1 (S310). The first ECU 120-1 may transmit a message transmission key based on the current session key K j and the MAC random number r 1 (M 1 ).
Figure pat00002
) Is generated (S320). Message transfer key (
Figure pat00003
) May be generated using a hash function as large as the MAC random number r 1 (M 1 ) in the current session key (K j ). Message transfer key (
Figure pat00004
) Is valid only for a single message to be sent. The first ECU 120-1 generates a first MAC (S330). The first MAC includes data, a MAC generated random number r 1 (M 1 ), and a message transmission key (
Figure pat00005
) Can be created using a hash function. The first ECU 120-1 includes the data, the MAC generation random number r 1 (M 1 ), and the first MAC in the data field of the message to include the first message M 1 in the second ECU 120-2. It transmits to (S340).

제2 ECU(120-2)는 제1 ECU(120-1)로부터 제1 메시지(M1)를 수신한다. 제2 ECU(120-2)는 제1 메시지(M1)에 포함된 MAC 생성 난수(r1(M1))에 기초하여 메시지 수신키(

Figure pat00006
)를 생성한다(S350). 메시지 수신키(
Figure pat00007
)는 현재 세션키(Kj)에서 수신된 MAC 생성 난수(r1(M1))의 크기 만큼 해시 함수를 사용하여 생성될 수 있다. 제2 ECU(120-2)는 제2 MAC를 생성한다(S360). 제2 MAC는 데이터, 수신된 MAC 생성 난수(r1(M1)) 및 생성된 메시지 수신키(
Figure pat00008
)에 해시 함수를 사용하여 생성될 수 있다. 제2 ECU(120-2)는 MAC를 인증한다(S370). 제2 ECU(120-2)는 수신된 제1 MAC와 생성된 제2 MAC를 비교하여 동일한지 여부를 판단한다. 제2 ECU(120-2)는 제1 MAC와 제2 MAC가 동일하면 수신된 제1 메시지를 처리하고, 동일하지 않으면 수신된 제1 메시지를 버린다. 상술한 과정을 통해 CAN 시스템은 송수신되는 메시지를 인증할 수 있다.The second ECU 120-2 receives the first message M 1 from the first ECU 120-1. The second ECU 120-2 may generate a message receiving key based on the MAC generated random number r 1 (M 1 ) included in the first message M 1 .
Figure pat00006
) Is generated (S350). Message Receive Key (
Figure pat00007
) May be generated using the hash function by the size of the MAC generated random number r 1 (M 1 ) received from the current session key (K j ). The second ECU 120-2 generates a second MAC (S360). The second MAC includes data, a received MAC generated random number r 1 (M 1 ), and a generated message receiving key (
Figure pat00008
) Can be created using a hash function. The second ECU 120-2 authenticates the MAC (S370). The second ECU 120-2 compares the received first MAC with the generated second MAC and determines whether they are the same. The second ECU 120-2 processes the received first message if the first MAC and the second MAC are the same, and discards the received first message if it is not the same. Through the above-described process, the CAN system can authenticate messages transmitted and received.

한편, CAN 시스템은 보안을 위해 기 설정된 시간마다 현재 세션키(Kj)를 갱신할 수 있다. 아래에서는 CAN 시스템이 세션키를 갱신하는 과정을 설명한다.Meanwhile, the CAN system may update the current session key K j every predetermined time for security. The following describes the process of updating the session key by the CAN system.

도 4는 본 개시의 일 실시 예에 따른 세션키를 갱신하는 과정을 설명하는 타이밍도이다.4 is a timing diagram illustrating a process of updating a session key according to an embodiment of the present disclosure.

도 4를 참조하면, 게이트웨이(110), 제1 ECU(120-1), 제2 ECU(120-2) 및 제3 ECU(120-3)가 도시되어 있다. 게이트웨이(110)는 일정 간격으로 세션을 변경하기 위해 갱신된 세션키 생성 난수(rg(j+1))를 생성할 수 있다(S405). 게이트웨이(110)는 세션 갱신 메시지(M2)를 전송하기 위해 세션 갱신 MAC 생성 난수(rg(M2))를 생성할 수 있다(S410). 게이트웨이(110)는 현재 세션키(Kj), 세션 갱신 MAC 생성 난수(rg(M2))에 기초하여 갱신 전송키(

Figure pat00009
)를 생성할 수 있다(S415). 갱신 전송키(
Figure pat00010
)는 현재 세션키(Kj)에서 세션 갱신 MAC 생성 난수(rg(M2))의 크기 만큼 해시 함수를 사용하여 생성될 수 있다. 게이트웨이(110)는 제1 갱신 MAC를 생성한다(S420). 제1 갱신 MAC은 갱신 데이터, 세션 갱신 MAC 생성 난수(rg(M2)) 및 갱신 전송키(
Figure pat00011
)에 해시 함수를 사용하여 생성될 수 있다. 게이트웨이(110)는 메시지의 데이터 필드에 갱신 데이터, 세션 갱신 MAC 생성 난수(rg(M2)), 갱신된 세션키 생성 난수(rg(j+1)) 및 제1 갱신 MAC를 포함시켜 세션 갱신 메시지(M2)를 제1 내지 제3 ECU(120-1, 120-2, 120-3)로 전송할 수 있다(S425). 즉, 게이트웨이(110)는 갱신된 세션키 생성 난수(rg(j+1))를 포함하는 세션 갱신 메시지(M2)를 모든 ECU에 브로드캐스트할 수 있다. 그리고, 게이트웨이(110)는 갱신된 세션키 생성 난수(rg(j+1))에 해시 함수를 사용하여 새로운 세션키(Kj+1)를 생성하고, 현재 세션키(Kj)를 새로운 세션키(Kj+1)로 변경할 수 있다(S430).Referring to FIG. 4, a gateway 110, a first ECU 120-1, a second ECU 120-2, and a third ECU 120-3 are illustrated. The gateway 110 may generate an updated session key generation random number r g (j + 1) to change the session at regular intervals (S405). The gateway 110 may generate a session update MAC generation random number r g (M 2 ) to transmit the session update message M 2 (S410). The gateway 110 uses the update transmission key (based on the current session key K j ) and the session update MAC generation random number r g (M 2 ).
Figure pat00009
) Can be generated (S415). Update transfer key (
Figure pat00010
) May be generated using the hash function by the size of the session update MAC generation random number r g (M 2 ) in the current session key (K j ). The gateway 110 generates a first update MAC (S420). The first update MAC includes update data, a session update MAC generation random number r g (M 2 ), and an update transmission key (
Figure pat00011
) Can be created using a hash function. The gateway 110 includes the update data, the session update MAC generation random number r g (M 2 ), the updated session key generation random number r g (j + 1), and the first update MAC in the data field of the message. The session update message M 2 may be transmitted to the first to third ECUs 120-1, 120-2, and 120-3 (S425). That is, the gateway 110 may broadcast a session update message M 2 including the updated session key generation random number r g (j + 1) to all ECUs. In addition, the gateway 110 generates a new session key K j + 1 using a hash function to the updated session key generation random number r g (j + 1), and converts the current session key K j to a new one. The session key K j + 1 may be changed (S430).

제1 내지 제3 ECU(120-1, 120-2, 120-3)는 게이트웨이(110)로부터 세션 갱신 메시지(M2)를 수신할 수 있다. 복수의 ECU(120-1, 120-2, 120-3) 각각은 동일한 방식으로 세션 갱신 메시지(M2)를 인증하고, 세션키를 변경할 수 있다. 아래에서는 대표적으로 제1 ECU(120-1)를 중심으로 설명한다.The first to third ECUs 120-1, 120-2, and 120-3 may receive the session update message M 2 from the gateway 110. Each of the plurality of ECUs 120-1, 120-2, and 120-3 may authenticate the session update message M 2 and change the session key in the same manner. Hereinafter, the first ECU 120-1 will be representatively described.

제1 ECU(120-1)는 세션 갱신 메시지(M2)에 포함된 세션 갱신 MAC 생성 난수(rg(M2))에 기초하여 갱신 수신키(

Figure pat00012
)를 생성할 수 있다(S435). 갱신 수신키(
Figure pat00013
)는 현재 세션키(Kj)에서 수신된 세션 갱신 MAC 생성 난수(rg(M2))의 크기 만큼 해시 함수를 사용하여 생성될 수 있다. 제1 ECU(120-1)는 제2 갱신 MAC를 생성할 수 있다(S440). 제2 갱신 MAC는 갱신 데이터, 수신된 세션 갱신 MAC 생성 난수(rg(M2)) 및 생성된 갱신 수신키(
Figure pat00014
)에 해시 함수를 사용하여 생성될 수 있다. 제1 ECU(120-1)는 MAC를 인증할 수 있다(S445). 제1 ECU(120-1)는 수신된 제1 갱신 MAC와 생성된 제2 갱신 MAC를 비교하여 동일한지 여부를 판단할 수 있다. 제1 ECU(120-1)는 제1 갱신 MAC와 제2 갱신 MAC가 동일하면 수신된 세션 갱신 메시지(M2)를 처리하고, 동일하지 않으면 수신된 세션 갱신 메시지(M2)를 버릴 수 있다. 세션 갱신 메시지(M2)가 인증되면 제1 ECU(120-1)는 세션변경 절차를 수행할 수 있다. 제1 ECU(120-1)는 수신한 세션키 생성 난수(rg(j+1))의 크기 만큼 해시 함수를 사용하여 새로운 세션키(Kj+1)를 생성하고, 현재 세션키(Kj)를 새로운 세션키(Kj+1)로 변경할 수 있다(S450).The first ECU 120-1 may generate an update receiving key based on the session update MAC generation random number r g (M 2 ) included in the session update message M 2 .
Figure pat00012
) May be generated (S435). Update Receive Key (
Figure pat00013
) May be generated using the hash function by the size of the session update MAC generation random number (r g (M 2 )) received from the current session key (K j ). The first ECU 120-1 may generate a second update MAC (S440). The second update MAC includes update data, received session update MAC generation random number r g (M 2 ), and generated update receiving key (
Figure pat00014
) Can be created using a hash function. The first ECU 120-1 may authenticate the MAC (S445). The first ECU 120-1 may compare the received first update MAC with the generated second update MAC and determine whether the same is the same. The first ECU 120-1 may process the received session update message M 2 if the first update MAC and the second update MAC are the same, and discard the received session update message M 2 if they are not the same. . When the session update message M 2 is authenticated, the first ECU 120-1 may perform a session change procedure. The first ECU 120-1 generates a new session key K j + 1 using a hash function by the size of the received session key generation random number r g (j + 1), and generates the current session key K. j ) may be changed to a new session key (K j + 1 ) (S450).

지금까지 CAN 시스템의 메시지 인증 방법의 실시 예를 설명하였다. 아래에서는 메시지 인증 방법의 흐름도를 설명한다.So far, an embodiment of a message authentication method of a CAN system has been described. Below is a flow chart of the message authentication method.

도 5는 본 개시의 일 실시 예에 따른 CAM 시스템의 메시지 인증 방법의 흐름도이다.5 is a flowchart illustrating a message authentication method of a CAM system according to an embodiment of the present disclosure.

게이트웨이는 세션키 생성 난수(rg(j))를 생성하여 복수의 ECU로 전송한다(S510). 복수의 ECU는 수신한 세션키 생성 난수(rg(j))에 기초하여 세션키(Kj)를 생성한다(S520). 생성된 세션키(Kj)는 현재 세션(세션 j)에서만 유효하다.The gateway generates a session key generation random number (r g (j)) and transmits it to the plurality of ECUs (S510). The plurality of ECUs generate a session key K j based on the received session key generation random number r g (j) (S520). The generated session key K j is valid only for the current session (session j).

복수의 ECU 중 제1 ECU(송신자 ECU)는 생성된 세션키(Kj)와 MAC 생성 난수(re(Mk))에 기초하여 제1 MAC를 생성한다(S530). 제1 ECU는 세션키(Kj)와 MAC 생성 난수(re(Mk))에 기초하여 메시지 전송키(

Figure pat00015
)를 생성하고, 메시지 전송키(
Figure pat00016
), MAC 생성 난수(re(Mk)) 및 데이터에 기초하여 제1 MAC를 생성한다.The first ECU (sender ECU) of the plurality of ECUs generates the first MAC based on the generated session key K j and the MAC random number r e (M k ) (S530). The first ECU transmits a message transmission key based on the session key K j and the MAC random number r e (M k ).
Figure pat00015
) And the message transfer key (
Figure pat00016
), A first MAC is generated based on the MAC generation random number r e (M k )) and data.

제1 ECU는 생성된 제1 MAC와 MAC 생성 난수(re(Mk))를 포함하는 메시지(Mk)를 복수의 ECU 중 제2 ECU(수신자 ECU)로 전송한다(S540). 제1 ECU는 제1 MAC, MAC 생성 난수(re(Mk)) 및 데이터를 메시지(Mk)의 데이터 필드에 포함시켜 제2 ECU로 전송한다.The first ECU transmits a message M k including the generated first MAC and the MAC random number r e (M k ) to a second ECU (receiver ECU) of the plurality of ECUs (S540). The first ECU transmits the first MAC, the MAC random number r e (M k ) and the data to the second ECU by including the data in the data field of the message M k .

제2 ECU는 생성된 세션키(Kj)와 수신된 MAC 생성 난수(re(Mk))에 기초하여 제2 MAC를 생성한다(S550). 제2 ECU는 세션키(Kj)와 수신된 메시지(Mk)의 데이터 필드에 포함된 MAC 생성 난수(re(Mk))에 기초하여 메시지 수신키(

Figure pat00017
)를 생성하고, 메시지 수신키(
Figure pat00018
), MAC 생성 난수(re(Mk)) 및 데이터에 기초하여 제2 MAC를 생성한다.The second ECU generates a second MAC based on the generated session key K j and the received MAC generated random number r e (M k ) (S550). The ECU 2 is received by the message based on the session key (K j) the message (M k) of the MAC generated random number (r e (M k)) included in the data field and the received key (
Figure pat00017
) And the message receiving key (
Figure pat00018
), A second MAC is generated based on the MAC generation random number r e (M k )) and data.

제2 ECU는 수신된 제1 MAC와 생성된 제2 MAC의 동일성 여부를 판단하여 수신된 메시지를 인증한다(S560). 제2 ECU(120-2)는 제1 MAC와 제2 MAC를 비교하여 동일한지 여부를 판단한다. 제2 ECU(120-2)는 제1 MAC와 제2 MAC가 동일하면 수신된 메시지를 처리하고, 동일하지 않으면 수신된 메시지를 버린다. 상술한 과정을 통해 CAN 시스템은 송수신되는 메시지를 인증할 수 있다.The second ECU determines whether the received first MAC is identical to the generated second MAC and authenticates the received message (S560). The second ECU 120-2 compares the first MAC with the second MAC and determines whether they are the same. The second ECU 120-2 processes the received message if the first MAC and the second MAC are the same, and discards the received message if it is not the same. Through the above-described process, the CAN system can authenticate messages transmitted and received.

상술한 다양한 실시 예에 따른 CAN 시스템의 메시지 인증 방법은 컴퓨터 프로그램 제품으로 제공될 수도 있다. 컴퓨터 프로그램 제품은 S/W 프로그램 자체 또는 S/W 프로그램이 저장된 비일시적 판독 가능 매체(non-transitory computer readable medium)를 포함할 수 있다.The message authentication method of the CAN system according to the above-described various embodiments may be provided as a computer program product. The computer program product may include the S / W program itself or a non-transitory computer readable medium in which the S / W program is stored.

비일시적 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 구체적으로는, 상술한 다양한 어플리케이션 또는 프로그램들은 CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등과 같은 비일시적 판독 가능 매체에 저장되어 제공될 수 있다. The non-transitory readable medium refers to a medium that stores data semi-permanently and can be read by a device, not a medium storing data for a short time such as a register, a cache, or a memory. Specifically, the various applications or programs described above may be stored and provided in a non-transitory readable medium such as a CD, a DVD, a hard disk, a Blu-ray disk, a USB, a memory card, a ROM, or the like.

또한, 이상에서는 본 발명의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In addition, although the preferred embodiment of the present invention has been shown and described above, the present invention is not limited to the above-described specific embodiment, the technical field to which the invention belongs without departing from the spirit of the invention claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be individually understood from the technical spirit or the prospect of the present invention.

100: CAN 시스템 110: 게이트웨이
120-1, 120-2, 120-3, 120-4, 120-5: ECU
100: CAN system 110: gateway
120-1, 120-2, 120-3, 120-4, 120-5: ECU

Claims (14)

상호 간에 메시지를 송수신하는 복수의 ECU(Electronic Control Unit); 및
세션키 생성 난수를 생성하여 상기 복수의 ECU로 전송하는 게이트웨이;를 포함하며,
상기 복수의 ECU는,
상기 수신한 세션키 생성 난수에 기초하여 세션키를 생성하고,
상기 복수의 ECU 중 제1 ECU는,
상기 생성된 세션키와 MAC 생성 난수에 기초하여 제1 MAC(Message Authentication Code)를 생성하고, 상기 생성된 제1 MAC와 상기 MAC 생성 난수를 포함하는 메시지를 상기 복수의 ECU 중 제2 ECU로 전송하며,
상기 제2 ECU는,
상기 생성된 세션키와 상기 수신된 MAC 생성 난수에 기초하여 제2 MAC를 생성하고, 상기 수신된 제1 MAC와 상기 생성된 제2 MAC의 동일성 여부를 판단하여 상기 수신된 메시지를 인증하는 CAN(Controller Area Network) 시스템.
A plurality of ECU (Electronic Control Unit) for transmitting and receiving messages between each other; And
A gateway for generating a session key generation random number and transmitting the random number to the plurality of ECUs;
The plurality of ECUs,
Generates a session key based on the received session key generation random number,
A first ECU of the plurality of ECUs,
Generate a first MAC (Message Authentication Code) based on the generated session key and the MAC random number, and transmits a message including the generated first MAC and the MAC random number to a second ECU of the plurality of ECUs ,
The second ECU,
CAN for generating a second MAC based on the generated session key and the received MAC generation random number, and determining whether the received first MAC is identical to the generated second MAC to authenticate the received message. Controller Area Network System.
제1항에 있어서,
상기 제1 ECU는,
상기 세션키와 상기 MAC 생성 난수에 기초하여 메시지 전송키를 생성하고, 상기 생성된 메시지 전송키, 상기 MAC 생성 난수 및 데이터에 기초하여 제1 MAC를 생성하며, 상기 생성된 제1 MAC, 상기 MAC 생성 난수 및 상기 데이터를 상기 메시지의 데이터 필드에 포함시켜 상기 제2 ECU로 전송하는 CAN 시스템.
The method of claim 1,
The first ECU,
Generate a message transfer key based on the session key and the random number generated by the MAC, generate a first MAC based on the generated message transfer key, the random number generated by the MAC, and the data; generate the first MAC, the MAC CAN system for including the generated random number and the data in the data field of the message to the second ECU.
제2항에 있어서,
상기 제2 ECU는,
상기 세션키와 상기 수신된 메시지의 데이터 필드에 포함된 MAC 생성 난수에 기초하여 메시지 수신키를 생성하고, 상기 생성된 메시지 수신키, 상기 데이터 필드에 포함된 상기 MAC 생성 난수 및 상기 데이터에 기초하여 제2 MAC를 생성하는 CAN 시스템.
The method of claim 2,
The second ECU,
Generate a message receiving key based on the session key and the MAC generated random number included in the data field of the received message, and based on the generated message receiving key, the MAC generated random number included in the data field and the data CAN system for generating a second MAC.
제1항에 있어서,
상기 게이트웨이는,
상기 세션키 생성 난수를 기 설정된 시간마다 갱신하는 CAN 시스템.
The method of claim 1,
The gateway is,
CAN system for updating the session key generation random number every predetermined time.
제4항에 있어서,
상기 게이트웨이는,
상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신하는 CAN 시스템.
The method of claim 4, wherein
The gateway is,
CAN system for updating the session key based on the updated session key generation random number and hash function.
제4항에 있어서,
상기 게이트웨이는,
상기 세션키와 세션 갱신 MAC 생성 난수에 기초하여 갱신 전송키를 생성하고, 상기 생성된 갱신 전송키, 상기 세션 갱신 MAC 생성 난수 및 갱신 데이터에 기초하여 제1 갱신 MAC를 생성하며, 상기 생성된 제1 갱신 MAC, 상기 갱신된 세션키 생성 난수, 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터를 갱신 메시지의 데이터 필드에 포함시켜 상기 복수의 ECU로 전송하는 CAN 시스템.
The method of claim 4, wherein
The gateway is,
Generate an update transmission key based on the session key and the random number of the session update MAC generation, generate a first update MAC based on the generated update transmission key, the session update MAC generation random number, and the update data, CAN system for transmitting the 1 update MAC, the updated session key generation random number, the session update MAC generation random number, and the update data in the data field of the update message to the plurality of ECUs.
제6항에 있어서,
상기 복수의 ECU 각각은,
상기 세션키와 상기 수신된 갱신 메시지의 데이터 필드에 포함된 세션 갱신 MAC 생성 난수에 기초하여 갱신 수신키를 생성하고, 상기 생성된 갱신 수신키, 상기 데이터 필드에 포함된 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터에 기초하여 제2 갱신 MAC를 생성하며, 상기 수신된 제1 갱신 MAC와 상기 생성된 제2 갱신 MAC의 동일성 여부를 판단하여 상기 수신된 갱신 메시지를 인증하고, 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신하는 CAN 시스템.
The method of claim 6,
Each of the plurality of ECUs,
Generate an update reception key based on the session update MAC generation random number included in the session key and the data field of the received update message, generate the update reception key, the session update MAC generation random number included in the data field, and Generates a second update MAC based on the update data, determines whether the received first update MAC is identical to the generated second update MAC, authenticates the received update message, and generates the updated session key. CAN system for updating the session key based on random numbers and hash functions.
게이트웨이가 세션키 생성 난수를 생성하여 복수의 ECU로 전송하는 단계;
상기 복수의 ECU가 상기 수신한 세션키 생성 난수에 기초하여 세션키를 생성하는 단계;
상기 복수의 ECU 중 제1 ECU가 상기 생성된 세션키와 MAC 생성 난수에 기초하여 제1 MAC를 생성하는 단계;
상기 제1 ECU가 상기 생성된 제1 MAC와 상기 MAC 생성 난수를 포함하는 메시지를 상기 복수의 ECU 중 제2 ECU로 전송하는 단계;
상기 제2 ECU가 상기 생성된 세션키와 상기 수신된 MAC 생성 난수에 기초하여 제2 MAC를 생성하는 단계; 및
상기 제2 ECU가 상기 수신된 제1 MAC와 상기 생성된 제2 MAC의 동일성 여부를 판단하여 상기 수신된 메시지를 인증하는 단계;를 포함하는 CAM 시스템의 메시지 인증 방법.
Generating, by the gateway, a session key generation random number and transmitting the random number to a plurality of ECUs;
Generating a session key by the plurality of ECUs based on the received session key generation random number;
Generating, by a first ECU of the plurality of ECUs, a first MAC based on the generated session key and a MAC random number;
Transmitting, by the first ECU, a message including the generated first MAC and the MAC random number to a second ECU of the plurality of ECUs;
Generating, by the second ECU, a second MAC based on the generated session key and the received MAC generated random number; And
And authenticating, by the second ECU, whether the received first MAC is identical to the generated second MAC, and authenticating the received message.
제8항에 있어서,
상기 제1 MAC를 생성하는 단계는,
상기 세션키와 상기 MAC 생성 난수에 기초하여 메시지 전송키를 생성하고, 상기 생성된 메시지 전송키, 상기 MAC 생성 난수 및 데이터에 기초하여 제1 MAC를 생성하고,
상기 제2 ECU로 전송하는 단계는,
상기 생성된 제1 MAC, 상기 MAC 생성 난수 및 상기 데이터를 상기 메시지의 데이터 필드에 포함시켜 상기 제2 ECU로 전송하는 CAM 시스템의 메시지 인증 방법.
The method of claim 8,
Generating the first MAC,
Generate a message transfer key based on the session key and the random number generated by the MAC, generate a first MAC based on the generated message transfer key, the random number generated by the MAC, and the data;
The transmitting to the second ECU,
Message generation method of the CAM system including the generated first MAC, the MAC random number and the data in the data field of the message to the second ECU.
제9항에 있어서,
상기 제2 MAC를 생성하는 단계는,
상기 세션키와 상기 수신된 메시지의 데이터 필드에 포함된 MAC 생성 난수에 기초하여 메시지 수신키를 생성하고, 상기 생성된 메시지 수신키, 상기 데이터 필드에 포함된 상기 MAC 생성 난수 및 상기 데이터에 기초하여 제2 MAC를 생성하는 CAM 시스템의 메시지 인증 방법.
The method of claim 9,
Generating the second MAC,
Generate a message receiving key based on the session key and the MAC generated random number included in the data field of the received message, and based on the generated message receiving key, the MAC generated random number included in the data field and the data Message authentication method of the CAM system for generating a second MAC.
제8항에 있어서,
상기 세션키를 갱신하는 단계;를 더 포함하고,
상기 세션키를 갱신하는 단계는,
상기 게이트웨이가 상기 세션키 생성 난수를 기 설정된 시간마다 갱신하는 CAM 시스템의 메시지 인증 방법.
The method of claim 8,
Updating the session key;
Updating the session key,
Message authentication method of the CAM system that the gateway updates the session key generation random number at a predetermined time.
제11항에 있어서,
상기 세션키를 갱신하는 단계는,
상기 게이트웨이가 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신하는 CAM 시스템의 메시지 인증 방법.
The method of claim 11,
Updating the session key,
And the gateway updates the session key based on the updated session key generation random number and hash function.
제11항에 있어서,
상기 세션키를 갱신하는 단계는,
상기 게이트웨이가 상기 세션키와 세션 갱신 MAC 생성 난수에 기초하여 갱신 전송키를 생성하고, 상기 생성된 갱신 전송키, 상기 세션 갱신 MAC 생성 난수 및 갱신 데이터에 기초하여 제1 갱신 MAC를 생성하며, 상기 생성된 제1 갱신 MAC, 상기 갱신된 세션키 생성 난수, 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터를 갱신 메시지의 데이터 필드에 포함시켜 상기 복수의 ECU로 전송하는 CAM 시스템의 메시지 인증 방법.
The method of claim 11,
Updating the session key,
The gateway generates an update transmission key based on the session key and the session update MAC generation random number, and generates a first update MAC based on the generated update transmission key, the session update MAC generation random number and update data, and And a generated first update MAC, the updated session key generation random number, the session update MAC generation random number, and the update data in a data field of an update message to the plurality of ECUs.
제13항에 있어서,
상기 세션키를 갱신하는 단계는,
상기 복수의 ECU 각각이 상기 세션키와 상기 수신된 갱신 메시지의 데이터 필드에 포함된 세션 갱신 MAC 생성 난수에 기초하여 갱신 수신키를 생성하고, 상기 생성된 갱신 수신키, 상기 데이터 필드에 포함된 상기 세션 갱신 MAC 생성 난수 및 상기 갱신 데이터에 기초하여 제2 갱신 MAC를 생성하며, 상기 수신된 제1 갱신 MAC와 상기 생성된 제2 갱신 MAC의 동일성 여부를 판단하여 상기 수신된 갱신 메시지를 인증하고, 상기 갱신된 세션키 생성 난수 및 해시 함수에 기초하여 상기 세션키를 갱신하는 CAM 시스템의 메시지 인증 방법.
The method of claim 13,
Updating the session key,
Each of the plurality of ECUs generates an update receiving key based on the session update MAC generation random number included in the session field and the data field of the received update message, and generates the generated update receiving key and the data field. Generate a second update MAC based on a session update MAC generation random number and the update data, determine whether the received first update MAC is identical to the generated second update MAC, and authenticate the received update message; Message authentication method of a CAM system for updating the session key based on the updated session key generation random number and a hash function.
KR1020180096307A 2018-08-17 2018-08-17 Controller area network system and message authentication method KR102148453B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180096307A KR102148453B1 (en) 2018-08-17 2018-08-17 Controller area network system and message authentication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180096307A KR102148453B1 (en) 2018-08-17 2018-08-17 Controller area network system and message authentication method

Publications (2)

Publication Number Publication Date
KR20200020515A true KR20200020515A (en) 2020-02-26
KR102148453B1 KR102148453B1 (en) 2020-08-27

Family

ID=69637973

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180096307A KR102148453B1 (en) 2018-08-17 2018-08-17 Controller area network system and message authentication method

Country Status (1)

Country Link
KR (1) KR102148453B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953384B (en) * 2020-07-17 2021-07-16 杭州铭盛威科技有限公司 Communication address sending method and device, electric energy meter and storage medium
CN114499831A (en) * 2020-11-13 2022-05-13 丰田自动车株式会社 Vehicle communication system, communication method, and recording medium having communication program recorded thereon

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101481403B1 (en) * 2013-08-26 2015-01-21 고려대학교 산학협력단 Data certification and acquisition method for vehicle
WO2016075865A1 (en) * 2014-11-12 2016-05-19 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Update management method, update management device, and control program
KR101740957B1 (en) * 2016-01-15 2017-05-30 고려대학교 산학협력단 Data certification and acquisition method for vehicle
JP2017174111A (en) * 2016-03-23 2017-09-28 株式会社東芝 On-vehicle gateway device, accumulation control method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101481403B1 (en) * 2013-08-26 2015-01-21 고려대학교 산학협력단 Data certification and acquisition method for vehicle
WO2016075865A1 (en) * 2014-11-12 2016-05-19 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Update management method, update management device, and control program
KR101740957B1 (en) * 2016-01-15 2017-05-30 고려대학교 산학협력단 Data certification and acquisition method for vehicle
JP2017174111A (en) * 2016-03-23 2017-09-28 株式会社東芝 On-vehicle gateway device, accumulation control method, and program

Non-Patent Citations (3)

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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953384B (en) * 2020-07-17 2021-07-16 杭州铭盛威科技有限公司 Communication address sending method and device, electric energy meter and storage medium
CN114499831A (en) * 2020-11-13 2022-05-13 丰田自动车株式会社 Vehicle communication system, communication method, and recording medium having communication program recorded thereon
KR20220065680A (en) * 2020-11-13 2022-05-20 도요타지도샤가부시키가이샤 Vehicle communication system, communication method, and storage medium storing communication program
EP4002753A1 (en) * 2020-11-13 2022-05-25 Toyota Jidosha Kabushiki Kaisha Vehicle communication system, communication method, and storage medium storing communication program
US11832098B2 (en) 2020-11-13 2023-11-28 Toyota Jidosha Kabushiki Kaisha Vehicle communication system, communication method, and storage medium storing communication program
CN114499831B (en) * 2020-11-13 2023-12-12 丰田自动车株式会社 Vehicle communication system, communication method, and recording medium having communication program recorded thereon

Also Published As

Publication number Publication date
KR102148453B1 (en) 2020-08-27

Similar Documents

Publication Publication Date Title
US10708248B2 (en) Vehicle and method for controlling same
US10243732B1 (en) Cryptographic key management for end-to-end communication security
Lin et al. Cyber-security for the controller area network (CAN) communication protocol
Schweppe et al. Car2x communication: securing the last meter-a cost-effective approach for ensuring trust in car2x applications using in-vehicle symmetric cryptography
CN106533655B (en) Method for safe communication of ECU (electronic control Unit) in vehicle interior network
Van Herrewege et al. CANAuth-a simple, backward compatible broadcast authentication protocol for CAN bus
Groza et al. LiBrA-CAN: A lightweight broadcast authentication protocol for controller area networks
KR101740957B1 (en) Data certification and acquisition method for vehicle
CN106899404A (en) Vehicle-mounted CAN FD bus communication systems and method based on wildcard
Boudguiga et al. A simple intrusion detection method for controller area network
Hafeez et al. Comparative study of can-bus and flexray protocols for in-vehicle communication
KR101882694B1 (en) Method and system for transceiving can message including mac
Kang et al. An attack-resilient source authentication protocol in controller area network
Püllen et al. Using implicit certification to efficiently establish authenticated group keys for in-vehicle networks
KR102364656B1 (en) Apparatus and method for generating and operating dynamic can id based on hmac
Halabi et al. A lightweight synchronous cryptographic hash chain solution to securing the vehicle CAN bus
CN107836095A (en) Method for producing secret or key in a network
KR102148453B1 (en) Controller area network system and message authentication method
CN116074000A (en) Conversation key distribution method and system based on CAN bus
US11388156B2 (en) Proof-of-work concept for a vehicle
Püllen et al. Securing FlexRay-based in-vehicle networks
Carsten et al. A system to recognize intruders in controller area network (can)
CN116456346A (en) RFID group tag authentication method for dynamic grouping
Murvay et al. Accommodating time-triggered authentication to FlexRay demands
US10841085B2 (en) Method for generating a secret or a key in a network

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right