JP7842853B2 - Communication systems, transmitters, and receivers - Google Patents

Communication systems, transmitters, and receivers

Info

Publication number
JP7842853B2
JP7842853B2 JP2024510588A JP2024510588A JP7842853B2 JP 7842853 B2 JP7842853 B2 JP 7842853B2 JP 2024510588 A JP2024510588 A JP 2024510588A JP 2024510588 A JP2024510588 A JP 2024510588A JP 7842853 B2 JP7842853 B2 JP 7842853B2
Authority
JP
Japan
Prior art keywords
key
authentication
receiver
new
notification
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2024510588A
Other languages
Japanese (ja)
Other versions
JPWO2023187896A1 (en
Inventor
玲於奈 望月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Astemo Ltd
Original Assignee
Astemo Ltd
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 Astemo Ltd filed Critical Astemo Ltd
Publication of JPWO2023187896A1 publication Critical patent/JPWO2023187896A1/ja
Application granted granted Critical
Publication of JP7842853B2 publication Critical patent/JP7842853B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • H04L9/16Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms the keys or algorithms being changed during operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Lock And Its Accessories (AREA)

Description

本発明は、セキュリティ通信を行う通信システムに関する。This invention relates to a communication system for performing secure communication.

コンピュータのセキュリティ通信の一つになりすまし防止の仕組みがある。例えば、通信機間で共通する鍵を用いてハッシュ値を計算し、受信機の計算結果と比較して受信したハッシュ値と計算したハッシュ値が一致するかを判定する。One of the security features of computer communications is a mechanism to prevent impersonation. For example, a hash value is calculated using a common key between the communicating devices, and the receiver's calculation result is compared with the received hash value to determine if the received hash value matches the calculated hash value.

自動車の車載用ソフトウェアに活用されるAUTOSAR仕様によれば、CANメッセージフレームに共通鍵で算出されるMAC(Message Authentication Code)を付与して、なりすまし防止ができる。また、フレッシュネス値を追加して、再送信攻撃を防止できる。According to the AUTOSAR specification, which is used in automotive in-vehicle software, impersonation can be prevented by adding a MAC (Message Authentication Code) calculated using a common key to the CAN message frame. Additionally, a freshness value can be added to prevent retransmission attacks.

共通鍵を用いたセキュリティ通信では、鍵変更時に各通信機における鍵変更のタイミングが同時ではない場合、セキュリティ通信の認証失敗によって、通信不可能な状態が生じる。また、認証失敗時の通知が発生し、通信負荷が増加する可能性がある。In secure communication using a shared key, if the key change is not timely across all communication devices, authentication failure will occur, resulting in a communication failure. Furthermore, a notification of authentication failure may be generated, potentially increasing the communication load.

鍵変更に関する背景技術は以下のものが存在する。第一に鍵変更を各通信機器で逐次実行する方法があり、第二に鍵変更時は鍵変更モードなどに移行してネットワーク上の通信機の鍵をすべて変更完了させてから、通常モードに復帰する方法がある。The following are some of the underlying technologies related to key changes. Firstly, there is a method of sequentially performing key changes on each communication device. Secondly, when changing keys, the system switches to a key change mode, completes the key change for all communication devices on the network, and then returns to normal mode.

第一の場合では、鍵変更が完了するタイミングの差によって、ネットワーク上の機器間で鍵が異なる期間が生じ、当該期間でセキュリティ通信が不可能な期間が生じ、セキュリティ通信の失敗が発生する。In the first case, the difference in the timing of the key change completion results in a period during which devices on the network have different keys, making secure communication impossible and causing a security communication failure.

第二の場合では、鍵変更モードでは、通常モードで利用する少なくともセキュリティ通信機能が制限されるため、鍵変更処理は特定の状況に制約される。In the second case, since the key change mode restricts at least the security communication functions available in normal mode, the key change process is limited to specific circumstances.

通信中に鍵を変更する技術として、以下の背景技術がある。特許文献1(特開2012-227672号公報)には、共通鍵を管理する鍵管理サーバ、路側機、車載機で構成する車車/路車間通信システムにおいて、鍵管理サーバがエリアの管理をおこない、あるエリアに存在する路側機および車載機は同じ共通鍵を共有し、共有した共通鍵を使ってメッセージの機密性または完全性、もしくはその両方を保証することを特徴とする車車/路車間通信システムが記載されている。The following background technologies exist for techniques that change keys during communication. Patent Document 1 (Japanese Patent Application Publication No. 2012-227672) describes a vehicle-to-vehicle/vehicle-to-infrastructure communication system consisting of a key management server that manages a common key, a roadside unit, and an in-vehicle unit, characterized in that the key management server manages areas, and roadside units and in-vehicle units located in a given area share the same common key, and the shared common key is used to guarantee the confidentiality or integrity of messages, or both.

特開2012-227672号公報Japanese Patent Publication No. 2012-227672

前述した背景技術では、本願が想定するような、任意のタイミングで使用する鍵を変更する場合や、予め決まっていない任意の鍵に変更する場合、未知の新しい鍵の変更タイミングの特定が困難である。また、通信機器間で鍵変更タイミングを合わせるため、時刻同期が必要である。In the aforementioned background technology, when changing the key used at an arbitrary time, as envisioned by this application, or when changing to an arbitrary key that has not been predetermined, it is difficult to determine the timing of the change to an unknown new key. Furthermore, time synchronization is necessary to synchronize the key change timing between communication devices.

本発明は、鍵変更に伴うセキュリティ通信の失敗の軽減を目的とする。The present invention aims to mitigate security communication failures associated with key changes.

本願において開示される発明の代表的な一例を示せば以下の通りである。すなわち、送信機と受信機の間で鍵を用いてセキュリティ通信を行う通信システムであって、前記鍵を前記セキュリティ通信中に変更可能であって、前記送信機は、変更後の新鍵が使用可能になると、鍵変更タイミングに関する通知を送信し、前記新鍵が使用可能になった後の第1の所定の期間において変更前の旧鍵でデータを送信し、前記受信機は、前記新鍵が使用可能になった後の前記鍵変更タイミングまでの期間において前記旧鍵で受信時の認証処理を行い、前記送信機から前記鍵変更タイミングに関する通知を受信した場合、前記鍵変更タイミングより前に送信されたデータは前記旧鍵で認証処理を行い、鍵変更タイミングより後に送信されたデータは前記新鍵で認証処理を行い、鍵管理装置から前記新鍵を受信後前記新鍵でデータの受信経験がない場合、又は前記鍵変更タイミング以前前記旧鍵を用いた認証に失敗した場合、前記新鍵で認証処理を行うことを特徴とする。 A typical example of the invention disclosed in this application is as follows: a communication system that performs secure communication between a transmitter and a receiver using a key, wherein the key can be changed during the secure communication, the transmitter sends a notification regarding the key change timing when the new key becomes available, transmits data using the old key before the change during a first predetermined period after the new key becomes available, the receiver performs authentication processing using the old key during the period from when the new key becomes available until the key change timing, the receiver authenticates data transmitted before the key change timing using the old key when it receives a notification regarding the key change timing from the transmitter, authenticates data transmitted after the key change timing using the new key, and performs authentication processing using the new key if there is no experience of receiving data with the new key after receiving the new key from a key management device , or if authentication using the old key fails before the key change timing.

本発明の代表的な実施の形態によれば、鍵変更に伴うセキュリティ通信の失敗を軽減できる。前述した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。According to a typical embodiment of the present invention, failures in security communication associated with key changes can be reduced. Other issues, configurations, and effects not mentioned above will be clarified by the following description of the embodiments.

本発明の実施例の送信機の処理の例のフローチャートである。This is a flowchart illustrating an example of the processing of a transmitter according to an embodiment of the present invention. 本発明の実施例の受信機の処理の例のフローチャートである。This is a flowchart illustrating an example of receiver processing in an embodiment of the present invention. 第1の方法における受信機の処理の例のフローチャートである。This is a flowchart illustrating an example of receiver processing in the first method. 第1の方法における受信機の処理の例のフローチャートである。This is a flowchart illustrating an example of receiver processing in the first method. 第2の方法における受信機の処理の例のフローチャートである。This is a flowchart illustrating an example of receiver processing in the second method. 第2の方法における受信機の処理の例のフローチャートである。This is a flowchart illustrating an example of receiver processing in the second method. 本実施例の動作例のタイミングチャートである。This is a timing chart of an example of operation in this embodiment. 第2の方法の動作例のタイミングチャートである。This is a timing chart for an example of the operation of the second method. 受信処理順序が入れ替わる場合の説明図である。This is an explanatory diagram showing what happens when the order of receiving and processing data is changed. 本実施例の鍵変更のタイミングを示す図である。This figure shows the timing of the key change in this embodiment. 本実施例の鍵変更のタイミングを示す図である。This figure shows the timing of the key change in this embodiment. 本発明の実施例の送信機と受信機の構成を示す図である。This diagram shows the configuration of a transmitter and receiver according to an embodiment of the present invention.

本発明の実施例は、鍵変更の指令がなされたとき、鍵の受け取り完了後に、送信機は古い鍵での送信を所定の期間1だけ継続し、受信機は古い鍵での受信メッセージの認証を所定の期間2だけ行う。In an embodiment of the present invention, when a command to change the key is given, after the key has been received, the transmitter continues to transmit using the old key for a predetermined period 1, and the receiver authenticates the received message using the old key for a predetermined period 2.

ここで、鍵受け取り完了のタイミングとは、使用する鍵を切り替え可能な状態としてもよい。また、予め次に使用する共通鍵が決まっている場合は、次の共通鍵を使用する指令などを受け取ったタイミングを鍵受け取り完了のタイミングとしてもよい。また、鍵受け取り完了のタイミングは、日時などで予め指定されてもよい。Here, the timing of key acquisition completion may be defined as the point at which the system can switch to the key being used. Alternatively, if the next shared key to be used is predetermined, the timing of key acquisition completion may be defined as the time when a command to use the next shared key is received. Furthermore, the timing of key acquisition completion may be predetermined by date and time.

旧鍵は、送信機、受信機ともに所定の期間1や所定の期間2の終了後に削除したり、ロックしてもよい。旧鍵は、鍵の不一致期間と送信、受信処理順序が入れ替わった場合に使用するので、入れ替わりによる旧鍵で認証されるフレームを受信できなくなった場合に削除したりロックしてもよい。送信機の場合では、使用する鍵を新鍵に切り替えたタイミング以降では、旧鍵を使った送信処理を行わないので直ちに削除してもよい。例示した以外のタイミングでもよく、削除タイミングは様々なタイミングでよい。The old key may be deleted or locked after the end of a predetermined period 1 or period 2 for both the transmitter and receiver. Since the old key is used when the key mismatch period and the transmission/reception processing order are reversed, it may be deleted or locked if frames authenticated with the old key can no longer be received due to the reversal. In the case of the transmitter, since transmission processing using the old key is no longer performed after the switch to the new key, it may be deleted immediately. The timing of deletion may vary and may be other than those exemplified.

所定の期間1と所定の期間2を決定し設定する方法の例について説明する。An example of a method for determining and setting predetermined periods 1 and 2 will be explained.

第1の方法として、フレッシュネス値で鍵の変更タイミングを特定する方法について説明する。As the first method, we will explain how to identify the timing of key changes using the freshness value.

図1は、送信機の処理の例のフローチャートであり、図2、図3A及び図3Bは、受信機の処理の例のフローチャートである。図2は、使用する鍵の変更タイミングが決定するまでの処理を記載し、図3A及び図3Bは、鍵変更処理が開始してから、鍵の切り替えが完了するまでの受信処理を記載する。図1と図2は、それぞれ鍵変更指令を受信したときに開始されてもよい。図3A及び図3Bは、受信機が鍵変更指令を受信してから旧鍵を用いた送信がされなくなるまでの間のセキュリティ通信の受信処理でもよい。Figure 1 is a flowchart of an example of the transmitter's processing, and Figures 2, 3A, and 3B are flowcharts of an example of the receiver's processing. Figure 2 describes the processing up to the determination of the timing of the key change to be used, and Figures 3A and 3B describe the reception processing from the start of the key change process until the key switching is completed. Figures 1 and 2 may start when the key change command is received, respectively. Figures 3A and 3B may also represent the reception processing of security communications from the time the receiver receives the key change command until transmission using the old key ceases.

第1の方法では、期間の一例はフレッシュネス値とするが、通信機器間でタイミングを計れる値であればよく、時間や通信回数などを使用できる。In the first method, one example of a period is the freshness value, but any value that allows timing between communication devices is acceptable, such as time or number of communications.

図1に示すように、送信機は、鍵変更タイミングで鍵管理装置から新鍵を受け取って、新鍵が使用可能となるまで待機し(S101)、所定の時間が経過してタイムアウトするまで(S107)、鍵準備完了通知1を受信したかを判定する(S102)。鍵準備完了通知1を受信せずに所定の時間が経過してタイムアウトした場合(S107でYES)、タイムアウト時の処理を実行する(S108)。タイムアウト時の処理は任意のものでよく、その一例は、鍵の変更処理をキャンセルしたり、エラー通知をするものとしてもよい。また、タイムアウトを設けずに処理を継続してもよい。一方、鍵準備完了通知1を受信した場合(S102)、鍵変更タイミングを決定し(S103)、鍵変更タイミング通知2を送信する(S104)。鍵変更タイミングは、受信側の準備時間後の将来のタイミングであり、例えば、現在時刻(現在のフレッシュネス値)に所定値を加算して計算できる。フレッシュネス値でなく時間や通信シーケンスを計測できる値を使用してもよい。データの到着順乱れを考慮するとシーケンシャルに付与されるフレッシュネス値を採用するとよい。鍵変更タイミング通知2には、鍵変更するときのフレッシュネス値を含める。この値までが所定の期間1(図6の時間1a)であり、将来のタイミングとすることが望ましいが、受信機が鍵変更タイミング通知2を十分に受信できる期間となるように設定するとよく、例えば、通信の設計に基づいた値を設定しても、通信負荷や頻度や相手数など通信状況に基づいて設定してもよいし、これらに基づいて動的に設定してもよい。As shown in Figure 1, the transmitter receives the new key from the key management device at the key change timing, waits until the new key becomes usable (S101), and determines whether it has received the key preparation completion notification 1 until a predetermined time has elapsed and a timeout occurs (S107) (S102). If the predetermined time has elapsed and a timeout occurs without receiving the key preparation completion notification 1 (YES in S107), the timeout processing is executed (S108). The timeout processing can be arbitrary; for example, it may involve canceling the key change processing or sending an error notification. Alternatively, processing may continue without a timeout. On the other hand, if the key preparation completion notification 1 is received (S102), the key change timing is determined (S103), and the key change timing notification 2 is sent (S104). The key change timing is a future timing after the receiving side's preparation time, and can be calculated, for example, by adding a predetermined value to the current time (current freshness value). A value that can measure time or communication sequence may be used instead of the freshness value. Considering the disruption of the data arrival order, it is advisable to use a freshness value that is assigned sequentially. The key change timing notification 2 includes a freshness value for when the key is changed. This value represents a predetermined period 1 (time 1a in Figure 6), which is preferably a future timing. However, it is best to set it so that the receiver has sufficient time to receive the key change timing notification 2. For example, the value can be set based on the communication design, based on communication conditions such as communication load, frequency, and number of parties, or it can be set dynamically based on these factors.

その後、送信機は、鍵変更タイミング3に到達したかを判定する(S105)。鍵変更タイミングに到達していなければ、鍵変更タイミング通知を所定のタイミングで繰り返し送信し(S109)、鍵変更タイミングに到達したかの判定を続ける。一方、鍵変更タイミングに到達していれば、送信時に使用する鍵を切り替える(S106)。ステップS109における定期送信は、鍵変更到達タイミングまでに所定の回数が送信されるように、その送信間隔が設定されてもよい。Subsequently, the transmitter determines whether the key change timing 3 has been reached (S105). If the key change timing has not been reached, it repeatedly sends a key change timing notification at predetermined intervals (S109) and continues to determine whether the key change timing has been reached. On the other hand, if the key change timing has been reached, it switches the key to be used for transmission (S106). The periodic transmission in step S109 may be set at an interval such that a predetermined number of transmissions are made before the key change timing is reached.

図2に示すように、受信機は、新鍵が使用可能となるまで待機し(S201)、鍵受け取りを完了した場合、鍵準備完了通知1を送信する(S202)。そして、鍵変更タイミング通知2を受信したかを判定する(S203)。鍵変更タイミング通知2を受信しない場合、ステップS202に戻り、鍵変更タイミング通知2を受信するまで、鍵準備完了通知1を送信してもよい。鍵変更タイミング通知2を複数回送信してもよい。一方、鍵変更タイミング通知2を受信した場合、受信した鍵変更タイミング通知に従って、鍵変更タイミング3を決定する(S204)。ステップS202の送信前に、所定時間の待機を追加してもよい。受信機が新鍵を受け取るまでに必要な最大の時間を待機することで、鍵準備完了通知1が受信されない場合を減らすことができる。所定の時間までに、ステップS203において、鍵変更タイミング通知2を受信できなかった場合、タイムアウト時の処理を実行してもよい。一例は、鍵変更処理のキャンセルやエラーの通知である。As shown in Figure 2, the receiver waits until the new key becomes available (S201), and when the key reception is complete, it sends a key readiness notification 1 (S202). Then, it determines whether it has received a key change timing notification 2 (S203). If it has not received a key change timing notification 2, it returns to step S202 and may send the key readiness notification 1 until it receives a key change timing notification 2. It may also send the key change timing notification 2 multiple times. On the other hand, if it has received a key change timing notification 2, it determines the key change timing 3 according to the received key change timing notification (S204). A predetermined waiting time may be added before sending step S202. By waiting for the maximum time required for the receiver to receive the new key, the number of cases in which the key readiness notification 1 is not received can be reduced. If the key change timing notification 2 is not received in step S203 by the predetermined time, the timeout processing may be executed. One example is the cancellation of the key change process or notification of an error.

送信機は、受信機が複数存在する場合、全ての受信機から鍵準備完了通知1を受け取ってから、鍵変更タイミング通知2を送信するとよい。少なくとも一部の受信機から鍵準備完了通知1を受け取れない場合に、タイムアウトを設定して以降の処理を続行させてもよい。この場合、鍵準備完了通知1を受信できなかった受信機を無視して、新しい鍵を用いた送受信処理を続けてもよいし、ネットワーク全体の通信を制限してもよい。このような場合に実行される所定の処理をステップS108で実行してもよい。タイムアウトが発生した場合にタイムアウト時の任意の処理を実行してもよい。例えば、エラーの通知や、鍵変更処理のキャンセルをしてもよい。If there are multiple receivers, the transmitter should send the key change timing notification 2 only after receiving the key readiness notification 1 from all receivers. If the transmitter fails to receive the key readiness notification 1 from at least some receivers, a timeout may be set to continue the subsequent processing. In this case, the transmitter may ignore the receivers that did not receive the key readiness notification 1 and continue the transmission/reception process using the new key, or it may restrict communication across the entire network. A predetermined process to be executed in such a case may be performed in step S108. If a timeout occurs, any processing that occurs at the timeout may be performed. For example, an error notification or cancellation of the key change process may be performed.

図3A及び図3Bに示すように、受信機は、鍵変更指令の受信後、受信データから受信フレッシュネス値を抽出する(S301)。なお、毎回フレッシュネス値を抽出せずに、前回受信したフレッシュネス値から推測してもよい。鍵変更タイミング通知2を受信しているかを判定する(S302)。そして、鍵変更タイミング通知2を受信した場合、受信フレッシュネス値が鍵変更タイミング以降であるかを判定する(S303)。そして、鍵変更タイミング以降の受信フレッシュネス値のタイミングでは新鍵で受信し(S304)、鍵変更タイミング以前の受信フレッシュネス値のタイミングでは旧鍵で受信する(S305)。このタイミングまでが所定の期間2(図6の2a)となる。タイミングを時間や通信回数などで定める場合も同様に、鍵変更タイミング以前か以降かによって使用する鍵を分けるとよい。As shown in Figures 3A and 3B, after receiving the key change command, the receiver extracts the received freshness value from the received data (S301). Alternatively, the freshness value may be estimated from the previously received freshness value instead of being extracted each time. The receiver then determines whether the key change timing notification 2 has been received (S302). If the key change timing notification 2 has been received, it determines whether the received freshness value is after the key change timing (S303). Then, if the received freshness value is after the key change timing, the receiver uses the new key (S304), and if the received freshness value is before the key change timing, the receiver uses the old key (S305). This period is the predetermined period 2 (2a in Figure 6). Similarly, when defining the timing by time or number of communications, it is advisable to use different keys depending on whether it is before or after the key change timing.

その後、受信機は、認証が成功したかを判定する(S306)。例えば、認証は、送信されたデータとフレッシュネス値のハッシュ値が一致するかを判定するとよい。また、受信済みフレッシュネス値を再度の受信すると認証失敗と判定するとよい。認証に成功した場合、認証成功時処理を実行し(S307)、認証に失敗した場合、認証失敗時処理を実行する(S308)。受信機が鍵変更タイミング通知2を受信している場合は、認証失敗の要因は新鍵と旧鍵との切り替え処理における使用鍵の間違いであることは、理論上は無いと考えることもできる。従って、鍵の切り替え処理における認証失敗時の処理や成功時の処理(S308、S307)を行わず、もともとの認証結果に応じた処理を行ってもよいし、ステップS307、S308はもともとの認証結果に応じた処理としてもよい。Subsequently, the receiver determines whether authentication was successful (S306). For example, authentication may be determined by checking whether the transmitted data and the hash value of the freshness value match. Alternatively, if a previously received freshness value is received again, authentication may be determined to have failed. If authentication is successful, the success processing is executed (S307), and if authentication fails, the failure processing is executed (S308). If the receiver has received the key change timing notification 2, it can be considered that, theoretically, the cause of authentication failure is not an error in the key used during the switching process between the new and old keys. Therefore, the processing for authentication failure and success (S308, S307) during the key switching process may be omitted, and processing may be performed according to the original authentication result, or steps S307 and S308 may be processing according to the original authentication result.

ステップS302で鍵変更タイミング通知2を受け取れなかった場合、新鍵で受信経験あり、かつ受信フレッシュネス値が鍵変更タイミング以降(所定の期間2(図6の2b))であるかを判定する(S316)。新鍵で受信経験ない、又は受信フレッシュネス値が鍵変更タイミング以降でない場合(S316でNO)、新鍵か旧鍵か不明なので、旧鍵と新鍵の両方での認証を試行する。すなわち、旧鍵で認証し(S309)、認証が成功したかを判定する(S310)。旧鍵での認証に成功した場合、認証成功時処理を実行する(S314)。旧鍵での認証に失敗した場合、新鍵で認証し(S311)、認証が成功したかを判定する(S312)。新鍵での認証に成功した場合、以後は新鍵で認証をすればよいので受信フレッシュネス値で鍵変更タイミングを変更し、そのタイミングを所定の期間2(図6の2b)の終了タイミングとする(S313)。新鍵での認証に失敗した場合、認証失敗時処理を実行する(S315)。If the key change timing notification 2 is not received in step S302, it is determined whether the new key has been received before and whether the received freshness value is after the key change timing (a predetermined period 2 (2b in Figure 6)) (S316). If the new key has not been received before, or if the received freshness value is not after the key change timing (NO in S316), it is unclear whether it is the new key or the old key, so authentication is attempted with both the old and new keys. That is, authentication is performed with the old key (S309), and it is determined whether the authentication was successful (S310). If authentication with the old key is successful, the authentication success processing is executed (S314). If authentication with the old key fails, authentication is performed with the new key (S311), and it is determined whether the authentication was successful (S312). If authentication with the new key is successful, from now on authentication should be done with the new key, so the key change timing is changed based on the received freshness value, and that timing is set as the end of the predetermined period 2 (2b in Figure 6) (S313). If authentication with the new key fails, the authentication failure process is executed (S315).

一方、新鍵で受信経験あり、かつ受信フレッシュネス値が鍵変更タイミング以降である場合(S316でYES)、新鍵で認証し(S317)、認証が成功したかを判定する(S318)。新鍵での認証に成功した場合、認証成功時処理を実行する(S319)。新鍵での認証に失敗した場合、認証失敗時処理を実行する(S320)。すなわち、新鍵で認証した以降のフレッシュネス値のタイミングにおいては新鍵で認証する。On the other hand, if the new key has been used for reception before and the reception freshness value is after the key change timing (YES in S316), authentication is performed with the new key (S317), and it is determined whether the authentication was successful (S318). If authentication with the new key is successful, the authentication success processing is executed (S319). If authentication with the new key fails, the authentication failure processing is executed (S320). In other words, authentication is performed with the new key at any freshness value timing after the last authentication with the new key.

ステップS313において、複数の受信について新鍵での認証に成功した場合、フレッシュネス値が小さいものを採用し、当該小さいフレッシュネス値で鍵変更タイミングを変更する。旧鍵で認証成功したフレッシュネス値の最大値を記録し、当該最大値以下の受信では、新鍵による認証を試みなくてもよい。鍵変更タイミング通知2を受け取れなかった場合をエラーとしてもよく、その場合は旧鍵での認証失敗後の新鍵での再認証処理を実行しなくてもよい。旧鍵によるセキュリティ通信を受信しなくなったとき、旧鍵による受信を停止して、新鍵による通常のセキュリティ通信処理を実行してもよい。In step S313, if authentication with the new key is successful for multiple receptions, the one with the smallest freshness value is adopted, and the key change timing is changed based on that smallest freshness value. The maximum freshness value for which authentication with the old key was successful is recorded, and for receptions below this maximum value, it is not necessary to attempt authentication with the new key. If the key change timing notification 2 is not received, it may be treated as an error, in which case the re-authentication process with the new key after authentication failure with the old key is not performed. When security communication using the old key is no longer received, reception using the old key may be stopped, and normal security communication processing using the new key may be performed.

旧鍵か新鍵かが明らかでないフレッシュネス値、即ち、新鍵で受信したフレッシュネス値の最大値と新鍵で受信したフレッシュネス値の最小値の間の値について、最初に新鍵と旧鍵どちらの鍵で試行するかを、そのフレッシュネス値に応じて決めてもよい。例えば、旧鍵の最大値に近い値である場合は旧鍵でまず試行し、新鍵の最小値に近い値の場合は新鍵で試行するようにしてもよい。For freshness values where it is unclear whether the key used is the old or new key—that is, values between the maximum and minimum freshness values received with the new key—the decision of which key to use first may be made based on the freshness value. For example, if the value is close to the maximum value of the old key, the old key may be used first; if it is close to the minimum value of the new key, the new key may be used first.

なお、S302で鍵変更タイミング通知2を受け取れなかった場合のステップS311、S312、S313の処理は、鍵変更タイミング通知2の受信に失敗した場合の対策となるオプションの処理であり、S302で鍵変更タイミング通知2を受け取れなかった場合に新鍵での認証試行を行わず認証エラー(例えばS315)としてもよい。Furthermore, the processing in steps S311, S312, and S313, which occur when the key change timing notification 2 is not received in S302, is an optional process that serves as a countermeasure when the reception of the key change timing notification 2 fails. In S302, if the key change timing notification 2 is not received, an authentication error (for example, S315) may be generated without attempting authentication with the new key.

鍵変更タイミング2を受信するまでの間(S302がNOの間)は、旧鍵を用いた通常の認証処理が行われるものとしてもよい。Until the key change timing 2 is received (while S302 is NO), the normal authentication process using the old key may be performed.

前述の構成にすることで、使用する鍵の変更タイミングをフレッシュネス値で明確に決定できるので、新鍵と旧鍵との鍵の不一致を要因とした認証失敗が生じない。その為、本当の認証失敗の発生タイミングを直ちに把握できる。また、フレッシュネス値でタイミングを特定する場合、フレッシュネス値に応じて使用する鍵を変えるので、送信処理順序や受信処理順序の入れ替わりの影響を受けない。By using the aforementioned configuration, the timing of key changes can be clearly determined by the freshness value, preventing authentication failures caused by key mismatches between the new and old keys. Therefore, the timing of actual authentication failures can be immediately identified. Furthermore, when timing is determined by the freshness value, the key used is changed according to the freshness value, thus unaffected by changes in the order of transmission and reception processing.

図7に示すように、フレッシュネス値が1~4までを旧鍵、5以降を新鍵で送信する場合を例にして、受信処理順序の入れ替わり時の処理例を説明する。As shown in Figure 7, we will explain an example of how to handle a change in the order of receiving data, using the case where freshness values 1 to 4 are sent with the old key and values 5 and above are sent with the new key.

フレッシュネス値を用いず、受信処理順序通りに処理する場合、3を受信した後、6を受信し、旧鍵で失敗した後新鍵でリトライして認証できる。受信処理順序の入れ替わりがない場合は、以降の受信処理は新鍵を用いれば認証可能である。しかし、図7に示す例のように受信処理順序が入れ替わる場合、フレッシュネス値が5において新鍵を用いたデータ受信した後、フレッシュネス値が4において旧鍵を用いたデータを受信する場合がある。新鍵で認証に失敗した場合、旧鍵でリトライすることによって認証できる。フレッシュネス値を用いない場合は、フレッシュネス値がメッセージに含まれなくてもよい。If processing is done in the order of reception without using freshness values, after receiving 3, then receiving 6, authentication can be achieved by retrying with the new key after the old key fails. If the order of reception processing does not change, subsequent reception processing can be authenticated using the new key. However, as shown in the example in Figure 7, if the order of reception processing changes, it is possible to receive data using the new key when the freshness value is 5, and then receive data using the old key when the freshness value is 4. If authentication fails with the new key, authentication can be achieved by retrying with the old key. If freshness values are not used, the freshness value does not need to be included in the message.

フレッシュネス値を用いる場合、送信機はフレッシュネス値を順に増加するカウンタとしてセキュリティフレームを送信し、受信機は送受信メッセージに含まれるフレッシュネ値で使用する鍵を判定する。すなわち、旧鍵から新鍵へ変えるフレッシュネス値を設定し、当該フレッシュネス値より大きいか小さいかで新旧鍵を使い分ける。鍵変更タイミング通知2で新鍵を用いるフレッシュネス値を鍵変更タイミング3として通知する。図7に示す例では5が通知される。受信機は、フレッシュネス値が5未満の場合は旧鍵で認証処理を実行し、フレッシュネス値が5以上の場合は新鍵で認証処理を実行する。When using a freshness value, the transmitter sends security frames as a counter that sequentially increases the freshness value, and the receiver determines which key to use based on the freshness value included in the transmitted and received messages. In other words, a freshness value is set for changing from the old key to the new key, and the old and new keys are used depending on whether the freshness value is greater than or less than that value. In the key change timing notification 2, the freshness value for which the new key will be used is notified as the key change timing 3. In the example shown in Figure 7, 5 is notified. If the freshness value is less than 5, the receiver performs the authentication process with the old key, and if the freshness value is 5 or greater, it performs the authentication process with the new key.

このため、図7に示すように、受信側でフレッシュネス値4~6の範囲で受信順序が入れ替わっても、セキュリティフレームを受信するための鍵を一意に特定でき、再認証が不要となる。また、セキュリティ通信に使用されるフレッシュネス値を用いるので、メッセージ構成の変更が不要である。Therefore, as shown in Figure 7, even if the receiving order changes within the range of freshness values 4 to 6 on the receiving side, the key for receiving security frames can be uniquely identified, eliminating the need for re-authentication. Furthermore, since the freshness value used for security communication is employed, no changes to the message structure are required.

ここで、鍵変更タイミング通知2と鍵準備完了通知1は、既存の通信に用いる信号で代用してもよい。例えば、同期用の信号で代用できる。具体的には、定期的にMAC値を付与して送信されるフレッシュネス値の同期用の信号に、新鍵でのMAC値を付与して送信する。受信機は同期用の信号の認証を旧鍵で失敗し新鍵で成功したとき、それが鍵変更タイミング通知2と判断することができる。このとき、旧鍵で計算したMACを付与したものを並行して送信してもよいし、新鍵で計算したもののみを送信してもよい。Here, the key change timing notification 2 and the key readiness notification 1 may be replaced with signals used in existing communications. For example, they can be replaced with synchronization signals. Specifically, the MAC value of the new key is added to the synchronization signal of the freshness value, which is sent periodically with a MAC value added to it. When the receiver fails to authenticate the synchronization signal with the old key but succeeds with the new key, it can determine that this is the key change timing notification 2. At this time, it may send a signal with the MAC value calculated using the old key in parallel, or it may send only a signal with the MAC value calculated using the new key.

第2の方法として、MAC認証の成否で使用する鍵の切り替えを行う方法について説明する。As a second method, we will explain how to switch the key used to determine the success or failure of MAC authentication.

第2の方法における送信機の処理のフローチャートの例は、図1のステップS102において常にYESとなり、ステップS104において所定の時間だけ待機した後に鍵変更タイミング通知2を送信する場合と同じである。An example of the transmitter processing flowchart in the second method is the same as in Figure 1, where step S102 is always YES, and step S104 waits for a predetermined time before sending the key change timing notification 2.

図4A及び図4Bは、第2の方法における受信機の処理の例のフローチャートである。Figures 4A and 4B are flowcharts illustrating an example of receiver processing in the second method.

ここでは、所定の期間1(図6の1b)は、受信機の新しい鍵の利用準備が完了できる十分な時間とするとよい。例えば、所定の期間1は、通信系の設計に基づいて設計者やユーザが任意に設定してもよく、バス負荷などに基づいて送信機や受信機などの通信機器が算出してもよく、送信回数などの通信機の処理に基づく条件で設定してもよい。Here, the predetermined period 1 (1b in Figure 6) should be sufficient time for the receiver to complete preparation for using the new key. For example, the predetermined period 1 may be arbitrarily set by the designer or user based on the design of the communication system, calculated by communication equipment such as the transmitter and receiver based on the bus load, or set based on conditions based on the processing of the communication equipment, such as the number of transmissions.

受信機は、鍵変更指令受信以降、鍵の準備完了時に所定の期間2(図6の2b)を開始し、新鍵で認証成功経験があるかを判定する(S401)。新鍵で認証成功経験があれば、新鍵で認証し(S409)、認証が成功したかを判定する(S410)。新鍵での認証に成功した場合、認証成功時処理を実行する(S414)。新鍵での認証に失敗した場合、旧鍵で認証し(S411)、認証が成功したかを判定する(S412)。旧鍵での認証に成功した場合、認証成功時処理を実行する(S414)。旧鍵での認証に失敗した場合、認証失敗時処理を実行する(S415)。The receiver, after receiving the key change command, starts a predetermined period 2 (2b in Figure 6) when the key is ready, and determines whether it has previously successfully authenticated with the new key (S401). If it has previously successfully authenticated with the new key, it authenticates with the new key (S409) and determines whether the authentication was successful (S410). If authentication with the new key is successful, it executes the authentication success processing (S414). If authentication with the new key fails, it authenticates with the old key (S411) and determines whether the authentication was successful (S412). If authentication with the old key is successful, it executes the authentication success processing (S414). If authentication with the old key fails, it executes the authentication failure processing (S415).

新鍵で認証成功経験がなければ、旧鍵で認証し(S402)、認証が成功したかを判定する(S403)。旧鍵での認証に成功した場合、認証成功時処理を実行する(S408)。旧鍵での認証に失敗した場合、新鍵で認証し(S404)、認証が成功したかを判定する(S405)。新鍵での認証に成功した場合、そのタイミングを所定の期間2(図6の2b)の完了タイミングとして、認証成功時処理を実行する(S408)。新鍵での認証に失敗した場合、認証失敗時処理を実行する(S407)。If there is no prior successful authentication with the new key, authentication is performed using the old key (S402), and it is determined whether the authentication was successful (S403). If authentication with the old key is successful, the authentication success processing is executed (S408). If authentication with the old key fails, authentication is performed using the new key (S404), and it is determined whether the authentication was successful (S405). If authentication with the new key is successful, the timing of this success is set as the completion timing of the predetermined period 2 (2b in Figure 6), and the authentication success processing is executed (S408). If authentication with the new key fails, the authentication failure processing is executed (S407).

受信機は、タイミングの判断にフレッシュネス値を用いて、第1の方法のように処理してもよいし、新鍵での認証成功タイミング以降の時間的タイミングであるかによって切り替えてもよい。フレッシュネス値をタイミングとして利用する場合、切り替えタイミングより遅いタイミングのフレッシュネス値の認証を旧鍵で失敗した場合は、新鍵で認証を行うとよい。複数の受信について新鍵での認証に成功した場合、フレッシュネス値が小さいものを採用し、当該小さいフレッシュネス値で鍵変更タイミングを変更する。旧鍵で認証成功したフレッシュネス値の最大値を記録し、当該最大値以下の受信では、新鍵による認証を試みなくてもよい。また、新鍵で認証を試みてから旧鍵で認証を試みてもよい。The receiver may use the freshness value to determine the timing and process it as in the first method, or it may switch depending on whether the timing is after the successful authentication timing with the new key. When using the freshness value as the timing, if authentication with the old key fails for a freshness value at a timing later than the switching timing, it is advisable to perform authentication with the new key. If authentication with the new key is successful for multiple receptions, the one with the smallest freshness value is adopted, and the key change timing is changed based on that smallest freshness value. The maximum freshness value at which authentication with the old key was successful is recorded, and for receptions below that maximum value, it is not necessary to attempt authentication with the new key. Alternatively, authentication may be attempted with the new key first, and then with the old key.

所定の期間2(図6の2b)の間に新鍵での認証に成功した場合、所定の期間2(図6の2b)を延長してもよい。このようにすることで、送信処理と受信処理の順序の入れ替わりによる認証失敗を抑制できる。例えば、新鍵で認証成功した後も、しばらくの間旧鍵での受信を許容する(S411)。継続する期間は、時間的に延長してもよいし、例えば「n回受信するまで」のように受信回数で条件を設定してもよい。また、新鍵での認証に成功した場合、所定の期間2を短くしてもよい。新鍵での受信後に旧鍵での受信ができる期間を減らすことができる為、セキュリティが向上する。If authentication with the new key is successful during the predetermined period 2 (Figure 6, 2b), the predetermined period 2 (Figure 6, 2b) may be extended. This helps to suppress authentication failures caused by a reversal of the order of transmission and reception processes. For example, even after successful authentication with the new key, reception with the old key may be permitted for a while (S411). The duration may be extended in terms of time, or the condition may be set based on the number of receptions, such as "until n receptions." Also, if authentication with the new key is successful, the predetermined period 2 may be shortened. This improves security because it reduces the period during which reception with the old key is possible after reception with the new key.

新鍵での認証成功後は、送信処理と受信処理の順序の入れ替わらない限り新鍵で認証される通信フレームを受信するので、新鍵で認証を試みてから旧鍵での認証を試みることで(S409、S410、S411、S412)、セキュリティ計算の回数を削減できる。また、新鍵での認証に成功するまでは、旧鍵での認証を先に試みることで(S402、S403、S404、S405)、セキュリティ計算の回数を削減できる。但し、通信確立の観点からは認証を試みる鍵の順番はいずれでもよい。After successful authentication with the new key, unless the order of transmission and reception is reversed, the system will receive communication frames authenticated with the new key. Therefore, attempting authentication with the new key before attempting authentication with the old key (S409, S410, S411, S412) can reduce the number of security calculations. Alternatively, attempting authentication with the old key first (S402, S403, S404, S405) until successful authentication with the new key can also reduce the number of security calculations. However, from the perspective of establishing communication, the order in which keys are attempted for authentication does not matter.

所定の期間2(図6の2b)が終了した後は、図4のフローチャートに代えて、新鍵を用いた通常の受信処理を行ってもよい。つまり、旧鍵を用いた通信を許容しない状態に移行してもよい。After the predetermined period 2 (2b in Figure 6) has ended, instead of following the flowchart in Figure 4, the normal receiving process using the new key may be performed. In other words, the system may transition to a state where communication using the old key is not permitted.

ステップS401で所定の期間内に新鍵での認証がされなかった場合、任意のエラー処理を実行してもよい。If authentication with the new key is not performed within the specified period in step S401, any error handling may be performed.

第2の方法では、第1の方法と比較して、処理の制御用に新たな信号を追加する必要がない。そのため、メッセージの種類の追加をすることなく、既存の通信機に第2の方法を適用できる。The second method, compared to the first method, does not require the addition of new signals for processing control. Therefore, the second method can be applied to existing communication devices without adding any new message types.

第2の方法では、第1の方法と比較して、旧鍵で認証失敗した場合に新鍵での認証も行うので、計算負荷が増加する。しかし、新鍵、旧鍵での再認証処理は実際の切り替えタイミングでのみ発生すること、受信順序の入れ替わり時のみ新鍵での複数回の再認証が必要なことから、負荷の増加を抑制できる。In the second method, compared to the first method, authentication with the new key is also performed if authentication with the old key fails, thus increasing the computational load. However, since the re-authentication process with the new and old keys only occurs at the actual switching timing, and multiple re-authentication with the new key is only required when the order of reception changes, the increase in load can be suppressed.

以上に説明した実施例を適用可能な通信機の例を説明する。本発明が適用可能な通信機は以下に例示する構成に限らず、適用先の変更や、類似機能を持つ構成要素への置き換えなどの種々の変形が可能である。The above-described embodiments are now being applied to examples of communication devices. The communication devices to which the present invention can be applied are not limited to the configurations exemplified below; various modifications are possible, such as changing the application target or replacing components with those having similar functions.

通信機は、ECUなど一般的なコンピュータや電子回路で構成されるものでよい。また、ソフトウェアなどによって仮想的に実現されるものでもよい。送受信は、例えばプロセス間通信やモジュール間のデータの送受信など、ソフトウェア間のデータの送受信でもよい。The communication device can be a general-purpose computer or electronic circuit, such as an ECU. It can also be virtually implemented using software. Transmission and reception can include data transmission between software programs, such as inter-process communication or data transmission between modules.

本実施例の説明のため、通信機は送信機と受信機とで分けて構成する。送信機が受信機の機能を有してもよいし、受信機が送信機の機能を有してもよい。複数の送信機又は受信機がネットワークで接続される構成でもよい。For the purpose of explaining this embodiment, the communication device is configured as a transmitter and a receiver. The transmitter may also function as a receiver, or the receiver may also function as a transmitter. Multiple transmitters or receivers may be connected via a network.

送信機と受信機は、信号やデータの送受信が可能に接続される。通信の方法は有線、無線のいずれでもよく、いずれの通信方式でもよい。車載機器、ECUでは主に様々なCAN通信が用いられる。The transmitter and receiver are connected to enable the transmission and reception of signals and data. The communication method can be either wired or wireless, and any communication method is acceptable. In automotive equipment and ECUs, various CAN communications are primarily used.

図10は、本発明の実施例の送信機と受信機の構成を示す図である。Figure 10 shows the configuration of a transmitter and receiver according to an embodiment of the present invention.

本実施例における鍵を用いた暗号化通信は、ECU10、20の間で行われる。また、ECU10、20とゲートウェイ50との間でも鍵を用いた暗号化通信が行われる。さらに、ECU10と管理センタ100の間や、ゲートウェイ50と管理センタ100の間でも鍵を用いた暗号化通信が行われる。これらの場合、あるタイミングでは、一方の装置(例えばECU10)が送信機となり、対向する他方の装置(例えばECU20)が受信機となる。また、他のタイミングでは送受信が入れ替わって通信が行われる(例えば、ECU20が送信機となり、ECU10が受信機となる)。In this embodiment, encrypted communication using keys takes place between ECUs 10 and 20. Encrypted communication using keys also occurs between ECUs 10 and 20 and the gateway 50. Furthermore, encrypted communication using keys also occurs between ECU 10 and the management center 100, and between the gateway 50 and the management center 100. In these cases, at certain times, one device (e.g., ECU 10) acts as the transmitter, and the other device (e.g., ECU 20) acts as the receiver. At other times, the roles of transmission and reception are reversed (for example, ECU 20 acts as the transmitter and ECU 10 acts as the receiver).

ECU10の内部には、マイコン12が搭載されている。マイコン12は、プログラムを実行する少なくとも一つのプロセッサ(CPU)13と、揮発性記憶領域を提供するRAM14と、他の装置との通信を制御する少なくとも一つの通信部15と、プログラムやデータを不揮発性記憶領域に保持する不揮発性メモリ16を有する。同様にECU20の内部には、マイコン22が搭載されている。マイコン22は、プログラムを実行する少なくとも一つのプロセッサ(CPU)23と、揮発性記憶領域を提供するRAM24と、他の装置との通信を制御する少なくとも一つの通信部25と、プログラムやデータを不揮発性記憶領域に保持する不揮発性メモリ26を有する。The ECU 10 has a microcontroller 12 inside. The microcontroller 12 has at least one processor (CPU) 13 that executes programs, RAM 14 that provides a volatile storage area, at least one communication unit 15 that controls communication with other devices, and non-volatile memory 16 that holds programs and data in a non-volatile storage area. Similarly, the ECU 20 has a microcontroller 22 inside. The microcontroller 22 has at least one processor (CPU) 23 that executes programs, RAM 24 that provides a volatile storage area, at least one communication unit 25 that controls communication with other devices, and non-volatile memory 26 that holds programs and data in a non-volatile storage area.

ゲートウェイ50は、ECU間の通信を制御する装置であり、プログラムを実行する制御部51と、他の装置との通信を制御する通信部52を有する。The gateway 50 is a device that controls communication between ECUs, and has a control unit 51 that executes a program and a communication unit 52 that controls communication with other devices.

管制センタ110は、ECU10にデータやプログラムを提供する計算機であり、アプリケーション部111と通信部112とを有する。アプリケーション部111は、データやプログラムをECU10に提供する処理を実行する。通信部112は、ECU10やゲートウェイ50との通信を制御する。The control center 110 is a computer that provides data and programs to the ECU 10, and has an application unit 111 and a communication unit 112. The application unit 111 executes the process of providing data and programs to the ECU 10. The communication unit 112 controls communication with the ECU 10 and the gateway 50.

通常時のセキュリティ通信では、送信機は共通鍵を用いて、送信するデータとフレッシュネス値を入力にハッシュ値(ここでは主にMACを扱う)を計算する。前述した第2の方法については、フレッシュネス値は必須ではないものの、再送信攻撃の防止のために適用するとよい。In normal secure communication, the transmitter uses a shared key to calculate a hash value (primarily the MAC address) using the data to be transmitted and a freshness value as input. While the freshness value is not mandatory for the second method mentioned earlier, it is recommended to apply it to prevent retransmission attacks.

送信機は、データと、フレッシュネス値の少なくとも一部と、ハッシュ値の少なくとも一部を結合して、フレームとして送信する。The transmitter combines the data, at least a portion of the freshness value, and at least a portion of the hash value, and transmits it as a frame.

受信機は、セキュリティ通信のフレームを受信し、データと、フレッシュネス値と、ハッシュ値を取得する。The receiver receives the security communication frame and obtains the data, freshness value, and hash value.

送信機がフレッシュネス値の一部のみを送信している場合、受信機が記録している送信機のフレッシュネス値に基づいて、フレッシュネス値の全部を計算する。例えば、フレッシュネス値の下位バイト部分しか送信されていない場合は、上位バイトの部分は、受信機が記録している送信機のフレッシュネス値から推論し、計算する。If the transmitter transmits only a portion of the freshness value, the receiver calculates the entire freshness value based on the transmitter's freshness value recorded by the receiver. For example, if only the lower byte portion of the freshness value is transmitted, the upper byte portion is inferred and calculated from the transmitter's freshness value recorded by the receiver.

このとき、受信経験があるフレッシュネス値である場合や、受信を許可する範囲外である場合は、認証失敗とする。後述するハッシュ計算結果の判定の後にフレッシュネス値を判定してもよい。一般的に、フレッシュネス値の判定よりハッシュ計算の方が計算負荷が大きいので、フレッシュネス値の判定を先に実施したほうが効率が良い。ハッシュ計算や復号などセキュリティ計算を実施しないとフレッシュネス値が分からない場合、セキュリティ計算を先に実施するとよい。In this case, authentication fails if the freshness value is one that has been received before or if it is outside the range for which reception is permitted. The freshness value may be determined after the hash calculation result, as described later. Generally, hash calculation is computationally more demanding than freshness value determination, so it is more efficient to determine the freshness value first. If the freshness value cannot be determined without performing security calculations such as hash calculation or decryption, it is best to perform the security calculations first.

ハッシュ値の一部を送信している場合、受信機で計算したハッシュ値を、送信機と同様の方法で一部を取り出して比較する。If only a portion of the hash value is being transmitted, the receiver calculates the hash value, extracts a portion of it in the same way as the transmitter, and compares it.

受信したハッシュ値と計算したハッシュ値が一致した場合は、受信機はフレームを受理する。即ち認証成功とする。失敗した場合は受理しない。即ち認証失敗とする。失敗した場合は、失敗時の処理を実施してよい。例えば、失敗した旨を通知するようにしてもよい。If the received hash value matches the calculated hash value, the receiver accepts the frame, i.e., authentication is successful. If it fails, it does not accept the frame, i.e., authentication fails. In the event of failure, the receiver may perform failure handling. For example, it may notify the receiver that it has failed.

各通信機は、鍵変更の指令を受け取ると、セキュリティ通信に用いる鍵を切り替える処理を開始する。鍵変更の指令は、ネットワーク上の特定の機器が通信機に送信してもよいし、いずれかの通信機がネットワーク上の通信機に送信してもよい。使用する鍵を予め用意しておいて、鍵変更の指令で使用する鍵を切り替えてもよいし、鍵変更の指令やその一連の処理において使用する鍵を選択してもよいし、通信機間での鍵の共有を使用してもよい。また、鍵変更の指令は、一時的に接続される外部ツールによって送信されるものでもよい。Upon receiving a key change command, each communication device begins the process of switching the key used for secure communication. The key change command may be sent from a specific device on the network to a communication device, or from any communication device to any communication device on the network. The keys to be used may be prepared in advance and switched upon receiving the key change command, or the key to be used may be selected during the key change command and the subsequent processing, or key sharing between communication devices may be used. Furthermore, the key change command may be sent by an external tool that is temporarily connected.

本実施例の第1の方法を適用する場合について説明する。The case in which the first method of this embodiment is applied will be described.

送信機は、鍵変更の指令を受信し、切り替え後の新鍵が準備できたとき、受信機から鍵準備完了通知1を待機する状態を開始する。この間も、通常の処理は継続され、変更前の旧鍵を用いてセキュリティ通信が継続する。通知の送受信に新鍵を用いた認証を付与しない構成とする場合は、鍵変更タイミング通知2で通知される鍵変更のタイミングまでに新鍵が準備できればよい。The transmitter receives a command to change the key, and when the new key is ready after the switch, it enters a state of waiting for a key readiness notification 1 from the receiver. During this time, normal processing continues, and security communication continues using the old key before the change. If the configuration does not require authentication using the new key for sending and receiving notifications, it is sufficient for the new key to be ready by the key change timing notified by the key change timing notification 2.

受信機は、鍵変更の指令を受信し、切り替え後の新鍵が準備できたとき、鍵準備完了通知1を送信する。受信機は、新鍵を使用可能になるタイミングで鍵準備完了通知1を送信してもよいし、送信機が新鍵を使用可能になるタイミングのずれを考慮して、受信機が新鍵を使用可能になるタイミングの後の所定の時間後に送信してもよい。また、鍵準備完了通知1を送信するタイミングで、送信機が新鍵を使用可能な状態になっていない場合を考慮して、鍵準備完了通知1を定期的に送信してもよい。送信機から鍵変更タイミング通知2を受信するまでに、鍵準備完了通知1を送信すれば十分である。The receiver receives a command to change the key and, when the new key after the change is ready, sends a key readiness notification 1. The receiver may send the key readiness notification 1 when the new key becomes usable, or it may send it at a predetermined time after the transmitter becomes usable, taking into account the timing difference in when the transmitter becomes usable with the new key. Alternatively, the receiver may send the key readiness notification 1 periodically to account for cases where the transmitter is not yet ready to use the new key at the time of sending the key readiness notification 1. It is sufficient to send the key readiness notification 1 before receiving the key change timing notification 2 from the transmitter.

送信機は、受信機から鍵準備完了通知1を受信した後、鍵変更タイミング通知2を送信する。After receiving the key preparation completion notification 1 from the receiver, the transmitter sends the key change timing notification 2.

本実施例では、フレッシュネス値の値を用いて使用する鍵の切り替えタイミングを特定する。鍵変更タイミング通知2に、鍵変更タイミング3とするフレッシュネス値の情報を含める。通知する鍵変更タイミング3は、通知送信直後のタイミングとしてもよいが、送信処理や受信処理の順番入れ替わりによって、受信機が鍵変更タイミング通知2を受信処理する前に新鍵を用いたセキュリティ通信フレームを受信処理してしまう恐れがあるため、通知の送信タイミングより未来のタイミングとすることが望ましい。In this embodiment, the freshness value is used to determine the timing of the key change. The key change timing notification 2 includes information on the freshness value that will be used as the key change timing 3. The key change timing 3 to be notified may be the timing immediately after the notification is sent, but because there is a risk that the receiver may receive a security communication frame using the new key before processing the key change timing notification 2 due to a change in the order of transmission and reception processing, it is desirable to set the timing to be in the future from the timing of the notification transmission.

受信機は、鍵変更タイミング通知2に含まれる切り替えタイミングのフレッシュネス値を取得した場合、以降の受信処理時にフレッシュネス値が当該切り替えタイミング値未満の場合は旧鍵を用いて認証処理を行い、当該切り替えタイミング値以降の場合は新鍵を用いて認証処理を行う(S303~S305)。When the receiver obtains the freshness value of the switching timing included in the key change timing notification 2, if the freshness value is less than the switching timing value during subsequent reception processing, the receiver performs authentication processing using the old key; if it is after the switching timing value, it performs authentication processing using the new key (S303-S305).

ここで、各通知には新鍵を用いてハッシュ値を計算した結果を付与してもよい。例えば、フレッシュネス値や特定のデータ列や送信する通知のペイロードを用いて計算したハッシュ値を通知に付与するとよい。送信機と受信機が、互いに知りえる情報と鍵を用いてハッシュ値を計算してもよい。このようにすることで、同じ新鍵に変更される場合のみ処理を継続することができ、例えば、送信機と受信機で切り替え先の新鍵の値が、エラーなどが原因で異なる場合、異なる新鍵を使用した通信の開始を抑制できる。各通知において認証に失敗した場合は、エラー処理を実行してもよい。例えば、鍵不一致を知らせる通知を送信したり、エラーを記録してもよい。Here, each notification may be accompanied by the result of a hash value calculated using the new key. For example, a hash value calculated using the freshness value, a specific data sequence, or the payload of the notification to be sent may be added to the notification. The transmitter and receiver may also calculate the hash value using information and keys that they know to each other. In this way, processing can be continued only when the same new key is used, and for example, if the new key values of the transmitter and receiver differ due to an error, the initiation of communication using different new keys can be suppressed. If authentication fails in each notification, error handling may be performed. For example, a notification indicating a key mismatch may be sent, or the error may be logged.

鍵準備完了通知1を旧鍵又は認証不要な状態で送信してもよい。鍵準備完了通知1を旧鍵や認証不要状態で送信する構成では、新鍵を準備できていない送信機で鍵変更処理が開始していることをネットワーク上で検知できる。Key Readiness Notification 1 may be sent using the old key or in a state that does not require authentication. In a configuration where Key Readiness Notification 1 is sent using the old key or in a state that does not require authentication, it is possible to detect on the network that the key change process has started on a transmitter that has not yet prepared the new key.

図5は、本実施例の動作例のタイミングチャートであり、鍵0、鍵1、鍵2へ順に切り替えた場合の動作例を示す。Figure 5 is a timing chart of an example of operation in this embodiment, showing an example of operation when switching sequentially to key 0, key 1, and key 2.

鍵0から鍵1への変更時は、鍵0が旧鍵、鍵1が新鍵となり、送信機の鍵準備が完了した後、受信機の鍵準備が完了する場合の動作例を示す。鍵1から鍵2への変更時は、鍵1が旧鍵、鍵2が新鍵となる。また、受信機の鍵準備が完了した後、送信機の鍵準備が完了する場合の動作例を示す。When changing from key 0 to key 1, key 0 becomes the old key and key 1 becomes the new key. An example of operation is shown where the transmitter's key preparation is complete before the receiver's key preparation. When changing from key 1 to key 2, key 1 becomes the old key and key 2 becomes the new key. An example of operation is also shown where the receiver's key preparation is complete before the transmitter's key preparation.

鍵0を使用中において、鍵を0から1に変更する鍵変更指令がされたとき(t15)、先に送信機で鍵の準備ができた(t16)。送信機は、受信機の鍵準備完了(t21)後に送信される鍵準備完了通知1を待つ(t22)。送信機は、鍵準備完了通知1を受信(t22)後に鍵変更タイミング通知2を送信する(t24)。鍵変更タイミング通知2は鍵変更タイミング3の情報を含む。送信機及び受信機は、鍵変更タイミング3に到達したとき(t29)、送信時に使用する鍵を0から1に変更する。受信機は、鍵変更タイミング3(t29)以降に受信したセキュリティ通信フレームは鍵1で認証し、鍵変更タイミング3以前(t28まで)に受信したセキュリティ通信フレームは鍵0で認証する。フレッシュネス値をタイミング特定に使用する場合、時間tはフレッシュネス値であり、受信機側で処理の順番が入れ替わっても、フレッシュネス値で使用する鍵が管理される。When key 0 is in use, and a key change command is issued to change the key from 0 to 1 (t15), the transmitter has already prepared the key (t16). The transmitter waits for a key preparation completion notification 1 to be sent after the receiver has finished preparing the key (t21) (t22). After receiving the key preparation completion notification 1 (t22), the transmitter sends a key change timing notification 2 (t24). The key change timing notification 2 includes information about key change timing 3. When key change timing 3 is reached (t29), the transmitter and receiver change the key to be used for transmission from 0 to 1. The receiver authenticates security communication frames received after key change timing 3 (t29) with key 1, and authenticates security communication frames received before key change timing 3 (up to t28) with key 0. When the freshness value is used for timing determination, time t is the freshness value, and even if the order of processing is changed on the receiver side, the key to be used is managed by the freshness value.

次に、鍵1から鍵2に変更する鍵変更指令がされたとき(t33)、受信機が先に鍵の準備ができた(t34)。受信機は鍵準備完了通知1を送信する(t35)。送信機は鍵の準備ができていない間(t34からt38まで)、鍵準備完了通知1を無視する(t35、t37)。送信機は鍵準備ができた(t38)後に、鍵準備完了通知1を受信したとき(t39)、鍵変更タイミング通知2を送信する(t40)。鍵変更タイミング通知2は鍵変更タイミング3の情報を含む。受信機は、鍵変更タイミング通知2を受信後、鍵準備完了通知1の送信を停止してもよい。送信機及び受信機は、鍵0から鍵1に変更した場合と同様に、鍵変更タイミング3で使用する鍵を切り替える。Next, when a key change command is issued to change from key 1 to key 2 (t33), the receiver is ready to use the key first (t34). The receiver sends a key ready notification 1 (t35). The transmitter ignores the key ready notification 1 while the key is not ready (t34 to t38) (t35, t37). After the transmitter is ready to use the key (t38), when it receives the key ready notification 1 (t39), it sends a key change timing notification 2 (t40). The key change timing notification 2 includes information about the key change timing 3. The receiver may stop sending the key ready notification 1 after receiving the key change timing notification 2. The transmitter and receiver switch the key to be used at key change timing 3, similar to when changing from key 0 to key 1.

図6は、フレッシュネス値を用いないで所定期間の決定する第2の方法を採用した場合の動作例のタイミングチャートである。Figure 6 is a timing chart of an example of operation when a second method is adopted, which determines the predetermined period without using freshness values.

図5との処理の主な違いは、送信機は、新鍵1の準備が完了してから(t16)、所定の時間1a(t16からt24)の間は鍵0を用いてセキュリティ通信フレームを送信する。受信機は、鍵準備完了後(t19)から鍵0での認証に失敗し鍵1での認証に成功する(t24)まで、鍵0で認証処理を行う。また、受信機は、鍵1での認証成功後(t24)後も、所定の時間だけ鍵0での認証も実施する(図4参照)。The main difference in processing from Figure 5 is that the transmitter transmits security communication frames using key 0 for a predetermined time 1a (from t16 to t24) after the preparation of new key 1 is complete (t16). The receiver performs authentication processing with key 0 from after the key preparation is complete (t19) until authentication with key 0 fails and authentication with key 1 is successful (t24). In addition, even after successful authentication with key 1 (t24), the receiver also performs authentication with key 0 for a predetermined time (see Figure 4).

受信機の鍵準備が先に完了する鍵1から鍵2への切り替え時も同様に、受信機は鍵準備完了後(t34)、鍵1で認証失敗し、鍵2で認証成功するまで(t46)、鍵1での認証処理を継続し、鍵2での認証成功後(t46)所定の時間(t47)まで鍵1での認証も実施する。Similarly, when switching from key 1 to key 2, where the receiver's key preparation is completed first, the receiver continues the authentication process with key 1 after key preparation is complete (t34), until authentication with key 1 fails and authentication with key 2 succeeds (t46). After successful authentication with key 2 (t46), it also performs authentication with key 1 until a predetermined time (t47).

通信機が相互に通信をする場合、前述した送信機と受信機の機能及び処理を各通信機に持たせるとよい。例えば、通信機1と通信機2が通信するとき、通信機1は通信機2に対する受信機の機能と送信機の機能を有し、通信機2は通信機1に対する受信機の機能と送信機の機能を有する。通信機1から通信機2へのセキュリティ通信と通信機2から通信機1へのセキュリティ通信の処理は独立して実施される。例えば、通信機1から通信機2へのセキュリティ通信に関する共通鍵の変更時に通信機2から通信機1へのセキュリティ通信に関する共通鍵を変更しなくてもよい。すなわち、通信経路各々でセキュリティ通信の処理は独立していると考えてもよい。このような場合、本発明の処理を各通信経路に適用すればよい。本発明の処理は通信経路ごとに独立して実施されるとよい。フレッシュネス値、鍵、鍵変更タイミング3などの通信制御情報は通信経路ごとに管理される。複数の通信経路で同時に鍵が変更される場合などは、各通信経路で新鍵と旧鍵を共用してもよい。また、送信経路と受信経路において、同じ共通鍵を用いてもよい。When communication devices communicate with each other, it is preferable to have each communication device possess the functions and processing of the transmitter and receiver described above. For example, when communication device 1 and communication device 2 communicate, communication device 1 has the functions of a receiver and a transmitter for communication device 2, and communication device 2 has the functions of a receiver and a transmitter for communication device 1. The processing of security communication from communication device 1 to communication device 2 and security communication from communication device 2 to communication device 1 is performed independently. For example, when the common key for security communication from communication device 1 to communication device 2 is changed, it is not necessary to change the common key for security communication from communication device 2 to communication device 1. In other words, it is possible to consider the processing of security communication to be independent for each communication path. In such cases, the processing of the present invention can be applied to each communication path. It is preferable that the processing of the present invention be performed independently for each communication path. Communication control information such as freshness value, key, and key change timing 3 is managed for each communication path. When the key is changed simultaneously in multiple communication paths, the new key and the old key may be shared in each communication path. Also, the same common key may be used in the transmission path and the reception path.

さらに、複数の受信機を設けてもよい。この場合、図1のステップS102において、全ての受信機からの鍵準備完了通知1を受信したときYESと判定される。Furthermore, multiple receivers may be provided. In this case, in step S102 of Figure 1, the determination is YES when key readiness completion notifications 1 are received from all receivers.

さらに、複数の送信機を設けてもよい。この場合、送信元ごとに独立して受信処理を実行するとよい。フレッシュネス値、鍵、鍵変更タイミング3などの通信制御情報は送信元ごとに管理される。複数の通信経路で同時に鍵が変更される場合、各通信経路で新鍵と旧鍵を共用してもよい。この場合、受信機の所定の期間2は、すべての送信機について、鍵変更タイミング通知2を受信して鍵変更タイミング3を経過した、又は新鍵での認証に成功したタイミング以降であって、任意の期間経過後(例えば、旧鍵での受信をしえないタイミング以降)に、旧鍵をロック又は削除するとよい。また、全ての送信機において、同時に鍵が変更される場合、少なくとも一部の送信機から鍵変更タイミング通知2を受信できなかった場合、エラーとして扱い、エラー時処理を実行してもよい。Furthermore, multiple transmitters may be provided. In this case, it is preferable to perform the reception process independently for each transmitter. Communication control information such as freshness value, key, and key change timing 3 is managed for each transmitter. If the key is changed simultaneously on multiple communication paths, the new key and old key may be shared across each communication path. In this case, the predetermined period 2 of the receiver may be, for all transmitters, after the key change timing notification 2 has been received and the key change timing 3 has elapsed, or after successful authentication with the new key, and after an arbitrary period has elapsed (for example, after the timing at which reception with the old key is no longer possible), the old key may be locked or deleted. Also, if the key is changed simultaneously on all transmitters, and the key change timing notification 2 is not received from at least some transmitters, it may be treated as an error, and error handling may be performed.

フレッシュネス値を用いる場合、フレッシュネス値の代わりに送信毎に増加するカウント値を用いてもよく、このカウント値は所定の範囲内で繰り返す値にしてもよい。受信機は、鍵変更タイミング通知2を受信した後、鍵変更タイミング3までの期間での、送信の前後関係が分かればよい。例えば、0から100の値を採用した場合、現在の値からマイナス30のカウントに相当する値は過去の値としてよい。ここで、現在の値が20の場合、30を減じると-10となり、0~100の範囲内に修正すると90となる。このとき、20から89は将来の値で、90から100と0から19は過去の値として扱うとよい。30以上の受信処理の入れ替わりは発生しないとすると、順番が入れ替わって受信しうるカウント値、例えば91は過去の値であると判定できる。カウント値が20の場合、鍵変更タイミングを89など将来の値に設定することで、受信機は鍵変更タイミング通知2を受信してからカウント値89を最初に通過するタイミングで、使用する鍵を切り替えればよい。When using a freshness value, a count value that increases with each transmission may be used instead of the freshness value, and this count value may be a value that repeats within a predetermined range. The receiver only needs to know the sequence of transmissions during the period from when it receives the key change timing notification 2 until the key change timing 3. For example, if a value from 0 to 100 is adopted, a value corresponding to a count of minus 30 from the current value may be considered a past value. Here, if the current value is 20, subtracting 30 gives -10, and adjusting it within the range of 0 to 100 gives 90. In this case, values from 20 to 89 can be treated as future values, and values from 90 to 100 and from 0 to 19 can be treated as past values. Assuming that there are no more than 30 changes in the order of reception processing, a count value that could be received out of order, such as 91, can be determined to be a past value. If the count value is 20, by setting the key change timing to a future value such as 89, the receiver only needs to switch the key to be used at the timing when it first passes the count value 89 after receiving the key change timing notification 2.

認証処理時に、フレッシュネス値を原因とした認証失敗が発生する場合(図3のS310など)、失敗の要因に応じて、鍵変更処理における認証結果の扱いを変更してもよい。If an authentication failure occurs during the authentication process due to a freshness value issue (e.g., S310 in Figure 3), the handling of the authentication result in the key change process may be modified depending on the cause of the failure.

ネットワーク上の通信機が、鍵を管理する鍵管理通信機に鍵変更を要求して、鍵変更要求を受けた鍵管理通信機が鍵変更処理を開始してもよい。このように構成することで、ネットワーク上のいずれの通信機でも鍵変更要求が可能となり、特定の一つの通信機が鍵変更タイミングや鍵の値を管理することで、鍵変更要求が重なったときに発生しうる、使用鍵に違いが生じることを防止できる。また、各通信機がセキュリティリスクを検知して、鍵変更を要求することができるので、セキュリティリスクを検知するための負荷を分散できる。A communication device on the network may request a key change from a key management communication device that manages the keys, and the key management communication device, upon receiving the request, may begin the key change process. This configuration allows any communication device on the network to request a key change, and by having a single specific communication device manage the key change timing and key values, it prevents discrepancies in the keys used that could occur when multiple key change requests overlap. Furthermore, since each communication device can detect security risks and request key changes, the load of detecting security risks can be distributed.

本発明は、なりすまし防止のための通信の他、暗号通信に用いる鍵の変更に関しても利用できる。第1の方法を適用する場合、暗号通信の送信順序が分かるシーケンス番号が付与されることで、使用鍵の変更タイミングを特定できる。シーケンス番号のみを平文で送信してもよく、復号成功を判定可能であれば、シーケンス番号を暗号文に含めてもよい。また、鍵準備完了通知1や鍵変更タイミング通知2は旧鍵を用いて暗号化してもよい。鍵の変更処理中において、少なくともシーケンス番号のみを旧鍵で暗号化してもよい。こうすることで、新鍵と旧鍵の入り混じる状況においても一意にシーケンス番号を特定することができる。復号成否を判定可能な場合は新鍵を用いてもよい。鍵準備完了通知1は旧鍵で暗号化して、鍵変更タイミング通知2は新鍵で暗号化してもよい。暗号化の代わりに、暗号復号用の鍵を用いたハッシュ値を付与してもよい。This invention can be used not only for communication to prevent impersonation, but also for changing keys used in encrypted communication. When applying the first method, the timing of key changes can be identified by assigning a sequence number that indicates the transmission order of encrypted communication. The sequence number may be sent in plaintext only, or it may be included in the ciphertext if it is possible to determine the success of decryption. In addition, the key preparation completion notification 1 and the key change timing notification 2 may be encrypted using the old key. During the key change process, at least the sequence number may be encrypted using the old key. This makes it possible to uniquely identify the sequence number even in a situation where new and old keys are mixed. If it is possible to determine the success or failure of decryption, the new key may be used. The key preparation completion notification 1 may be encrypted with the old key, and the key change timing notification 2 may be encrypted with the new key. Instead of encryption, a hash value using the encryption/decryption key may be assigned.

以上に説明したセキュリティ通信の鍵を変更とする技術は、タイミングを問わずに鍵を変更するアプリケーションにも適用できる。例えば、車両走行中のセキュリティ通信の利用中にセキュリティ通信に干渉を検知した場合に、直ちに鍵を変更でき、セキュリティリスク耐性を向上できる。すなわち、データの送信タイミングを表す値(例えばフレッシュネス値)が同じ通信のハッシュ値が正しい場合に、鍵を変更するとよい。The technique of changing the key of a security communication, as described above, can also be applied to applications that change the key regardless of timing. For example, if interference is detected in a security communication while a vehicle is in motion, the key can be changed immediately, improving resilience to security risks. In other words, it is advisable to change the key when the hash value of the communication is correct and the value representing the data transmission timing (e.g., freshness value) is the same.

例えば、フレッシュネス値が同じで、異なる内容の通信のハッシュ値が正しい値のデータを受信した場合、意図した通信相手と意図しない通信相手からのセキュリティ通信の信号を受信した可能性があり、セキュリティ通信用の鍵が流出した可能性がある。このとき、予め用意していた別の新鍵に変更すれば、新鍵を知らない意図しない通信相手は通信を継続できず、以降の通信のセキュリティを確保できる。For example, if data with the same freshness value but different communication content has the correct hash value, it's possible that security communication signals were received from both an intended and an unintended communication partner, potentially resulting in the leakage of a security communication key. In this case, changing to a pre-prepared new key would prevent the unintended communication partner, who doesn't know the new key, from continuing the communication, thus ensuring the security of subsequent communications.

鍵の流出と判定できる一つの例は、受信したフレッシュネス値とハッシュ値の少なくとも一部を受信履歴として記録し、受信したメッセージについて、ハッシュ値が正しく、同じフレッシュネス値が受信履歴に存在して、かつハッシュ値が異なる場合、鍵が流出したと判断することができる。ここで、ハッシュ値が同じ場合は再送攻撃がされたと判定してもよい。異なるメッセージに対して、同じハッシュ値が算出される可能性は低い為、ハッシュ値が異なる場合は流出した鍵による通信が実施されたと判定できる。また、ハッシュ値の少なくとも一部を記録することで、全ての受信メッセージを記録して比較する場合に比べて、メモリの節約が可能となる。ハッシュ値の一部を記録する場合は、受信したハッシュ値を同様の方法で一部を取り出すとよい。One way to determine if a key has been leaked is to record at least a portion of the received freshness value and hash value as part of the reception history. If a received message has a correct hash value, the same freshness value exists in the reception history, and the hash value is different, then it can be determined that the key has been leaked. Here, if the hash values are the same, it can be determined that a retransmission attack has occurred. Since it is unlikely that the same hash value will be calculated for different messages, if the hash values are different, it can be determined that communication was carried out using the leaked key. In addition, recording at least a portion of the hash value saves memory compared to recording and comparing all received messages. When recording a portion of the hash value, it is best to extract a portion of the received hash value in a similar manner.

以後、別な図を使用して本発明の実施例の鍵変更のタイミングを説明する。Hereafter, the timing of key changes in the embodiment of the present invention will be explained using a different diagram.

図8は、本実施例の鍵変更のタイミングを示す図である。Figure 8 shows the timing of the key change in this embodiment.

図8に示すように、鍵が変更され、鍵変更タイミング通知が送信されると、鍵変更後の所定期間1だけ送信機は旧鍵での送信を継続する。受信機は所定期間2だけ旧鍵で受信メッセージを認証する。なお、新鍵は変更の都度受け取っても、予め受け取っておいてもよい。このようにすると、ネットワーク上の送信機と受信機との間で鍵が不一致の期間も、旧鍵と新鍵との混在を許容し、セキュリティ通信を継続できる。As shown in Figure 8, when a key is changed and a key change timing notification is sent, the transmitter continues to transmit using the old key for a predetermined period 1 after the key change. The receiver authenticates received messages using the old key for a predetermined period 2. The new key may be received each time a key change occurs, or it may be received in advance. In this way, even during periods when the keys do not match between the transmitter and receiver on the network, a mixture of old and new keys is permitted, and secure communication can continue.

図9は、本実施例の鍵変更のタイミングを示す図である。Figure 9 shows the timing of the key change in this embodiment.

図9に示すように、鍵が変更され、鍵変更タイミング通知が送信されると、受信機が新鍵を利用可能になるまでの所定期間1だけ送信機は旧鍵での送信を継続する。送信機は鍵変更タイミングをその変更前に受信機に通知する。受信機は、新鍵が利用可能になった後も、鍵変更タイミングのずれを考慮して、所定期間2だけ旧鍵での認証を許容する。すなわち、一方の鍵での認証に失敗した場合、他方の鍵で認証を試みる。As shown in Figure 9, when a key is changed and a key change timing notification is sent, the transmitter continues to transmit using the old key for a predetermined period 1 until the receiver can use the new key. The transmitter notifies the receiver of the key change timing before the change occurs. Even after the new key becomes available, the receiver allows authentication with the old key for a predetermined period 2, taking into account the difference in key change timing. That is, if authentication with one key fails, the receiver attempts authentication with the other key.

以上に説明したように、本発明の実施例の通信システムでは、送信機は、変更後の新鍵が使用可能になると、鍵変更タイミングに関する通知を送信し、新鍵が使用可能になった後の第1の所定の期間において変更前の旧鍵でデータを送信し、受信機は、新鍵が使用可能になった後の第2の所定の期間において旧鍵で受信時の認証処理を行い、前記送信機から前記鍵変更タイミングに関する通知を受信した場合、前記鍵変更タイミングより前に送信されたデータは旧鍵で認証処理を行い、前記鍵変更タイミングより後に送信されたデータは新鍵で認証処理を行うので、鍵変更に伴うセキュリティ通信の失敗の軽減できる。また、鍵変更中においても、通常時のようにセキュリティ通信を継続できるので、任意のタイミングで鍵を変更できる。暗号の復号成否で鍵が正しいかを判定することで、様々なセキュリティ通信に適用できる。As described above, in the communication system of the embodiment of the present invention, when the new key becomes available, the transmitter sends a notification regarding the key change timing, transmits data using the old key during a first predetermined period after the new key becomes available, and the receiver performs authentication processing using the old key during a second predetermined period after the new key becomes available. When the receiver receives the notification regarding the key change timing from the transmitter, data transmitted before the key change timing is authenticated using the old key, and data transmitted after the key change timing is authenticated using the new key, thus reducing the failure of security communication due to key changes. Furthermore, since security communication can continue as usual even during key changes, the key can be changed at any time. By determining whether the key is correct based on the success or failure of decryption, it can be applied to various types of security communication.

また、受信機は、第2の所定の期間において旧鍵を用いた認証に失敗した場合、前記新鍵で認証処理を行うことで、通知を受信しなくても正しい鍵に切り替えできる。Furthermore, if the receiver fails to authenticate using the old key during the second predetermined period, it can switch to the correct key without receiving a notification by performing authentication with the new key.

また、受信機は、新鍵で認証が可能となった場合に鍵準備完了通知を送信機に送信し、第1の所定の期間は、鍵準備完了通知を受信するまでの期間とすることで、通知を用いて正しい鍵に確実に切り替えできる。Furthermore, the receiver sends a key readiness notification to the transmitter when authentication becomes possible with the new key, and the first predetermined period is defined as the period until the key readiness notification is received, thereby ensuring that the correct key is reliably switched to using the notification.

また、受信機は、新鍵で認証が可能となった場合に鍵準備完了通知を送信し、第1の所定の期間は、鍵準備完了通知を受信し、さらに所定の期間経過する又は所定の条件を満たすまでの期間とすることで、受信機の鍵変更の準備期間を考慮して正しい鍵に確実に切り替えできる。Furthermore, the receiver sends a key readiness notification when authentication becomes possible with the new key. The first predetermined period is defined as the period from receiving the key readiness notification until a further predetermined period has elapsed or predetermined conditions have been met, thereby ensuring a reliable switch to the correct key, taking into account the receiver's preparation period for the key change.

また、送信機は、第1の所定の期間が終了するタイミングを、鍵変更タイミング通知によって、受信機に通知することで、送信機と受信機の間で鍵変更タイミングを確実に整合できる。Furthermore, the transmitter can ensure that the key change timing is reliably synchronized between the transmitter and the receiver by notifying the receiver of the timing when the first predetermined period ends through a key change timing notification.

また、第2の所定の期間は、鍵変更タイミング通知に含まれる鍵変更タイミングまでの期間とすることで、送信機と受信機の間で鍵変更タイミングを確実に整合できる。Furthermore, by making the second predetermined period the period until the key change timing included in the key change timing notification, the key change timing can be reliably synchronized between the transmitter and the receiver.

また、第1の所定の期間及び第2の所定の期間は、セキュリティ通信に用いるフレッシュネス値によって特定されるので、データの到着順序が入れ替わってもセキュリティ通信を継続できる。また、既存のフレッシュネス値を使用するので、鍵を管理するために別にカウンタを設ける必要がない。Furthermore, since the first and second predetermined periods are determined by the freshness value used for secure communication, secure communication can continue even if the order of data arrival changes. Also, because an existing freshness value is used, there is no need to set up a separate counter for key management.

なお、本発明は前述した実施例に限定されるものではなく、添付した特許請求の範囲の趣旨内における様々な変形例及び同等の構成が含まれる。例えば、前述した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに本発明は限定されない。また、ある実施例の構成の一部を他の実施例の構成に置き換えてもよい。また、ある実施例の構成に他の実施例の構成を加えてもよい。また、各実施例の構成の一部について、他の構成の追加・削除・置換をしてもよい。Furthermore, the present invention is not limited to the embodiments described above, but includes various modifications and equivalent configurations within the spirit of the attached claims. For example, the embodiments described above are described in detail to make the present invention easier to understand, and the present invention is not necessarily limited to having all the described configurations. Also, some of the configurations of one embodiment may be replaced with those of another embodiment. Also, some of the configurations of another embodiment may be added to the configuration of one embodiment. Also, some of the configurations of each embodiment may be added, deleted, or replaced with other configurations.

また、前述した各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等により、ハードウェアで実現してもよく、プロセッサがそれぞれの機能を実現するプログラムを解釈し実行することにより、ソフトウェアで実現してもよい。Furthermore, each of the aforementioned configurations, functions, processing units, and processing means may be implemented in hardware, for example, by designing them as integrated circuits, or they may be implemented in software by having the processor interpret and execute programs that realize each function.

各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリ、ハードディスク、SSD(Solid State Drive)等の記憶装置、又は、ICカード、SDカード、DVD等の記録媒体に格納することができる。Information such as programs, tables, and files that implement each function can be stored in memory, hard disks, SSDs (Solid State Drives), or recording media such as IC cards, SD cards, and DVDs.

また、制御線や情報線は説明上必要と考えられるものを示しており、実装上必要な全ての制御線や情報線を示しているとは限らない。実際には、ほとんど全ての構成が相互に接続されていると考えてよい。Furthermore, the control lines and information lines shown are those deemed necessary for explanation purposes and do not necessarily represent all control lines and information lines required for implementation. In reality, it can be assumed that almost all components are interconnected.

Claims (7)

送信機と受信機の間で鍵を用いてセキュリティ通信を行う通信システムであって、
前記鍵を前記セキュリティ通信中に変更可能であって、
前記送信機は、
変更後の新鍵が使用可能になると、鍵変更タイミングに関する通知を送信し、
前記新鍵が使用可能になった後の第1の所定の期間において変更前の旧鍵でデータを送信し、
前記受信機は、
前記新鍵が使用可能になった後の前記鍵変更タイミングまでの期間において前記旧鍵で受信時の認証処理を行い、
前記送信機から前記鍵変更タイミングに関する通知を受信した場合、鍵変更タイミングより前に送信されたデータは前記旧鍵で認証処理を行い、前記鍵変更タイミングより後に送信されたデータは前記新鍵で認証処理を行い、
鍵管理装置から前記新鍵を受信後前記新鍵でデータの受信経験がない場合、又は前記鍵変更タイミング以前前記旧鍵を用いた認証に失敗した場合、前記新鍵で認証処理を行うことを特徴とする通信システム。
A communication system that uses a key to perform secure communication between a transmitter and a receiver,
The key can be changed during the security communication,
The aforementioned transmitter is
Once the new key becomes available, a notification regarding the key change will be sent.
During a first predetermined period after the new key becomes available, data is transmitted using the old key before the change.
The aforementioned receiver is
During the period between when the new key becomes available and the key change timing, the authentication process upon receipt is performed using the old key.
When the transmitter receives a notification regarding the key change timing, data transmitted before the key change timing will be authenticated using the old key, and data transmitted after the key change timing will be authenticated using the new key.
A communication system characterized in that , if there is no experience of receiving data with the new key after receiving the new key from the key management device, or if authentication using the old key failed before the key change timing, authentication processing is performed with the new key.
請求項1に記載の通信システムであって、
前記第1の所定の期間は、前記受信機が前記新鍵で認証が可能となるまでの期間であることを特徴とする通信システム。
A communication system according to claim 1,
A communication system characterized in that the first predetermined period is the period until the receiver becomes capable of authentication with the new key.
請求項1に記載の通信システムであって、
前記受信機は、前記新鍵で認証が可能となった場合に鍵準備完了通知を前記送信機に送信し、
前記第1の所定の期間は、前記鍵準備完了通知を受信するまでの期間であることを特徴とする通信システム。
A communication system according to claim 1,
The receiver sends a key preparation completion notification to the transmitter when authentication becomes possible with the new key.
A communication system characterized in that the first predetermined period is the period until the notification of completion of key preparation is received.
請求項1に記載の通信システムであって、
前記受信機は、前記新鍵で認証が可能となった場合に鍵準備完了通知を送信し、
前記第1の所定の期間は、前記鍵準備完了通知を受信し、さらに所定の期間経過する又は所定の条件を満たすまでの期間であることを特徴とする通信システム。
A communication system according to claim 1,
The receiver sends a key preparation completion notification when authentication becomes possible with the new key.
The communication system is characterized in that the first predetermined period is the period from the time the notification of key preparation completion is received until a further predetermined period has elapsed or predetermined conditions have been met.
請求項1に記載の通信システムであって、
前記送信機は、前記第1の所定の期間が終了するタイミングを、鍵変更タイミング通知によって、前記受信機に通知することを特徴とする通信システム。
A communication system according to claim 1,
The communication system is characterized in that the transmitter notifies the receiver of the timing of the end of the first predetermined period by key change timing notification.
請求項1に記載の通信システムであって、
前記第1の所定の期間は、前記セキュリティ通信に用いるフレッシュネス値によって特定されることを特徴とする通信システム。
A communication system according to claim 1,
A communication system characterized in that the first predetermined period is determined by a freshness value used for the security communication.
鍵を用いて送信機とセキュリティ通信を行う受信機であって、
前記鍵が前記セキュリティ通信中に変更される場合、変更後の新鍵が使用可能になった後の鍵変更タイミングまでの期間において変更前の旧鍵で受信時の認証処理を行い、
前記送信機から鍵変更タイミングに関する通知を受信した場合、前記鍵変更タイミングより前に送信されたデータは前記旧鍵で認証処理を行い、前記鍵変更タイミングより後に送信されたデータは前記新鍵で認証処理を行い、
鍵管理装置から前記新鍵を受信後前記新鍵でデータの受信経験がない場合、又は前記鍵変更タイミング以前前記旧鍵を用いた認証に失敗した場合、前記新鍵で認証処理を行うことを特徴とする受信機。
A receiver that uses a key to perform secure communication with a transmitter,
If the key is changed during the security communication, the authentication process upon reception will be performed using the old key before the change during the period between when the new key becomes available and when the key change occurs .
When the transmitter receives a notification regarding the key change timing, data transmitted before the key change timing will be authenticated using the old key, and data transmitted after the key change timing will be authenticated using the new key.
A receiver characterized in that, if there is no experience of receiving data with the new key after receiving the new key from the key management device , or if authentication using the old key failed before the key change timing, the receiver performs authentication processing with the new key.
JP2024510588A 2022-03-28 2022-03-28 Communication systems, transmitters, and receivers Active JP7842853B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/014982 WO2023187896A1 (en) 2022-03-28 2022-03-28 Communication system, transmitter, and receiver

Publications (2)

Publication Number Publication Date
JPWO2023187896A1 JPWO2023187896A1 (en) 2023-10-05
JP7842853B2 true JP7842853B2 (en) 2026-04-08

Family

ID=88199655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2024510588A Active JP7842853B2 (en) 2022-03-28 2022-03-28 Communication systems, transmitters, and receivers

Country Status (2)

Country Link
JP (1) JP7842853B2 (en)
WO (1) WO2023187896A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006019975A (en) 2004-06-30 2006-01-19 Matsushita Electric Ind Co Ltd ENCRYPTED PACKET COMMUNICATION SYSTEM, RECEPTION DEVICE PROVIDED IN THE SAME, TRANSMISSION DEVICE, AND ENCRYPTION PACKET COMMUNICATION METHOD, RECEPTION METHOD, TRANSMISSION METHOD, RECEPTION PROGRAM, AND TRANSMISSION PROGRAM
JP2018182665A (en) 2017-04-20 2018-11-15 富士通株式会社 Communication apparatus, communication system and encrypted communication control method
JP2019140577A (en) 2018-02-13 2019-08-22 株式会社デンソー Electronic control device and communication system
JP2022012202A (en) 2020-07-01 2022-01-17 Necプラットフォームズ株式会社 First communication apparatus, second communication apparatus, system, method and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006019975A (en) 2004-06-30 2006-01-19 Matsushita Electric Ind Co Ltd ENCRYPTED PACKET COMMUNICATION SYSTEM, RECEPTION DEVICE PROVIDED IN THE SAME, TRANSMISSION DEVICE, AND ENCRYPTION PACKET COMMUNICATION METHOD, RECEPTION METHOD, TRANSMISSION METHOD, RECEPTION PROGRAM, AND TRANSMISSION PROGRAM
JP2018182665A (en) 2017-04-20 2018-11-15 富士通株式会社 Communication apparatus, communication system and encrypted communication control method
JP2019140577A (en) 2018-02-13 2019-08-22 株式会社デンソー Electronic control device and communication system
JP2022012202A (en) 2020-07-01 2022-01-17 Necプラットフォームズ株式会社 First communication apparatus, second communication apparatus, system, method and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
馬場 達也,マスタリングIPsec,第2版,株式会社オライリー・ジャパン,2006年08月18日,pp. 140-144, 187-197

Also Published As

Publication number Publication date
WO2023187896A1 (en) 2023-10-05
JPWO2023187896A1 (en) 2023-10-05

Similar Documents

Publication Publication Date Title
US10419900B2 (en) Method and apparatus for managing application terminal remotely in wireless communication system
US10789138B2 (en) SMB service fault processing method and storage device
US20250209153A1 (en) Password management system and method for providing access to a password protected device
KR20110083889A (en) Method for processing data under remote control in data storage device and device therefor
CN110362984B (en) Method and device for operating service system by multiple devices
CN112669104B (en) Data processing method of leasing equipment
JP7627303B2 (en) Secure Element Arrays in Internet of Things Systems
CN108141358B (en) Method for generating a cryptographic key in a circuit arrangement
US7266201B1 (en) Non-disruptive authentication administration
CN114844674B (en) Dynamic authorization method, system, electronic equipment and storage medium
JP7842853B2 (en) Communication systems, transmitters, and receivers
CN114615309B (en) Client access control method, device, system, electronic equipment and storage medium
CN110166452B (en) Access control method and system based on JavaCard shared interface
CN118316922A (en) Over-the-air method, apparatus, electronic device and storage medium
CN113343203B (en) Digital car key processing method, device and platform system
US11171786B1 (en) Chained trusted platform modules (TPMs) as a secure bus for pre-placement of device capabilities
JP6126062B2 (en) Network device and MAC address authentication method for network device
US12604165B2 (en) Communication control method and communication device
US20240135010A1 (en) Method for managing acces by a user to at least one application, associated computer program and system
KR102220774B1 (en) System and method for encryption processing in terminal
EP4651427A1 (en) Data processing system and corresponding operating method
JP6681755B2 (en) Vehicle communication network device and communication method
CN114257606A (en) Data processing method, file management system, storage medium, and program product
EP4672793A1 (en) SYSTEM AND PROCEDURE FOR RESETTING A PASSWORD
WO2025067628A1 (en) Access control

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250708

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20260106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20260206

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20260303

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20260327

R150 Certificate of patent or registration of utility model

Ref document number: 7842853

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150