JP2008141667A - Secure communication method - Google Patents

Secure communication method Download PDF

Info

Publication number
JP2008141667A
JP2008141667A JP2006328438A JP2006328438A JP2008141667A JP 2008141667 A JP2008141667 A JP 2008141667A JP 2006328438 A JP2006328438 A JP 2006328438A JP 2006328438 A JP2006328438 A JP 2006328438A JP 2008141667 A JP2008141667 A JP 2008141667A
Authority
JP
Japan
Prior art keywords
nonce
authentication
authentication device
encryption
authenticated
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.)
Granted
Application number
JP2006328438A
Other languages
Japanese (ja)
Other versions
JP5028984B2 (en
Inventor
Hisahiro Fukuda
尚弘 福田
Tomoki Takazoe
智樹 高添
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2006328438A priority Critical patent/JP5028984B2/en
Publication of JP2008141667A publication Critical patent/JP2008141667A/en
Application granted granted Critical
Publication of JP5028984B2 publication Critical patent/JP5028984B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a secure communication method with which a new nonce with which an initial value is not easily inferred by a third person even when re-initiation occurs in an authentication device wherein re-initiation may occur, and which can be achieved at low cost. <P>SOLUTION: An authentication device A comprises a random number generating means 1a for generating a random number and a nonce generating means 2a for generating a nonce N, wherein the nonce generating means 2a is adaptive to generate an initial value N(1) of the nonce N on the basis of the random number generated by the random number generating means at least when re-initiating the authentication device A and a new nonce N(n+1), other than the initial value, in the case that the authentication device A authenticates a device B to be authenticated, is generated by making increment a nonce N(n) used for the last authentication. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本願発明は、通信ネットワークのセキュリティに関し、特に、互いに通信可能な通信機器間でナンスを用いた安全な認証を行うセキュア通信方法に関する。   The present invention relates to security of a communication network, and more particularly, to a secure communication method for performing secure authentication using a nonce between communication devices that can communicate with each other.

互いに通信可能な通信機器に基づく通信ネットワークにおいて、被認証機器と認証機器との間で通信確立を行い、実際にデータの送受信を実施するにあたり、相手の通信機器が信頼関係を保証する機器であるか否かを確認した上で通信を行うことが、安全な通信ネットワークを構築するためには非常に重要である。そこで、安全な通信システムを実現するために、従来から様々な認証プロトコルや鍵配布プロトコルが用いられている。   In a communication network based on communication devices that can communicate with each other, the communication device of the other party guarantees a trust relationship when establishing communication between the device to be authenticated and the authentication device and actually transmitting and receiving data. It is very important to perform communication after confirming whether or not to establish a secure communication network. Therefore, various authentication protocols and key distribution protocols have been used to realize a secure communication system.

例えば、特許第3078841号公報に示されるように、機器Aと機器Bの二機器間での通信を行う場合に、それぞれの機器には予め秘密に共通の鍵Kabが配布されており、さらに安全な認証を行うためには、予測不能な一度だけ使用される数であるナンスNが用いられる。図14に示すように、このプロトコルの実行は、ブロック501から開始され、機器Aが、自機の名称Aと生成したナンスNabを機器Bに送る。機器Aからのメッセージを受け取る際に、共有キーKab、ナンスNab、機器Bによって生成される新ナンスNbaおよびメッセージ発信元である自機の名称Bに基づく認証関数AUTH(Kab、Nab、Nba、B)が、機器Bによって計算される。ブロック502を参照すると、この認証関数の値とナンスNbaが、機器Bから機器Aに送られる。機器Bからのメッセージを受け取る際に、機器Aは、認証関数AUTH(Kab、Nab、Nba、B)の値を再計算し、機器Bが送ったメッセージ内の対応物と比較する。これが一致すると、機器Bの認証がもたらされる。その後、機器Aは、両方向認証を完了するため、共有キーKab、ナンスNabおよびナンスNbaに基づくもう1つの認証関数ACK(Kab、Nab、Nba)の値を計算する。ブロック503を参照すると、認証関数ACK(Kab、Nab、Nba)の値が機器Aから機器Bへ送られる。機器Aからのメッセージを受け取る際に、機器Bは、認証関数ACK(Kab、Nab、Nba)の値を再計算し、機器Aが送ったメッセージの対応物と比較する。これが一致すると、機器Aの認証がもたらされる。   For example, as shown in Japanese Patent No. 3078841, when communication is performed between two devices, device A and device B, a secret key Kab is secretly distributed to each device in advance. To perform secure authentication, a nonce N, which is an unpredictable one-time number, is used. As shown in FIG. 14, execution of this protocol is started from block 501, and device A sends device name A and the generated nonce Nab to device B. When receiving a message from the device A, the authentication function AUTH (Kab, Nab, Nba, B, based on the shared key Kab, the nonce Nab, the new nonce Nba generated by the device B, and the name B of the own device that is the message source. ) Is calculated by device B. Referring to block 502, the value of this authentication function and the nonce Nba are sent from device B to device A. When receiving the message from device B, device A recalculates the value of the authentication function AUTH (Kab, Nab, Nba, B) and compares it with the counterpart in the message sent by device B. If this matches, the device B is authenticated. Thereafter, the device A calculates the value of another authentication function ACK (Kab, Nab, Nba) based on the shared key Kab, nonce Nab, and nonce Nba to complete the two-way authentication. Referring to block 503, the value of the authentication function ACK (Kab, Nab, Nba) is sent from device A to device B. When receiving the message from device A, device B recalculates the value of the authentication function ACK (Kab, Nab, Nba) and compares it with the counterpart of the message sent by device A. If this matches, device A authentication is provided.

ここで、生成時点より以前に生成されていない値を生成する方法を用いて、機器A及び機器Bによって予測不能な一度だけ使用される数であるナンスNが生成されて認証に使用されているが、ナンスNを一度だけ使用される状態に保つために、ナンスNには連続数を用いる方法と乱数を用いる方法とがある。通常、連続数を用いる方法では、あるビット幅内でナンスNの値を逐次インクリメントする。しかし、以前のナンスNの値を溜め込んで後でカウンタの一周後にタイミングよく再送する再送攻撃が他の機器より行われることも考えられるので、ビット幅はすぐに一杯にならないように大きな値でなければならない。   Here, a nonce N, which is a number that is used only once and cannot be predicted by the devices A and B, is generated and used for authentication by using a method for generating a value that has not been generated before the generation time. However, in order to keep the nonce N used only once, there are a method using a continuous number and a method using a random number for the nonce N. Normally, in the method using the continuous number, the value of the nonce N is sequentially incremented within a certain bit width. However, since it is conceivable that a resend attack that accumulates the previous nonce N value and then resends in a timely manner after one round of the counter is performed from another device, the bit width must be a large value so that it does not fill up immediately. I must.

また、特表2004−525558号公報に示されるように、ナンスNは、暗号的に強力なランダム数生成装置によって生成される乱数を使用することによって、データのレコード暗号化と暗号解読のための一意的な識別子としての役割を果たすことができる。
特許第3078841号公報 特表2004−525558号公報
Moreover, as shown in Japanese translations of PCT publication No. 2004-525558, nonce N uses the random number produced | generated by the cryptographically strong random number generator, for record encryption and decryption of data. It can serve as a unique identifier.
Japanese Patent No. 3078841 JP-T-2004-525558

しかしながら、上記従来例であるセキュア通信方法にあっては、連続数を用いる方法でナンスを生成する場合には、何らかの障害によって認証機器の電源またはソフトウェアの再起動が発生すれば、認証機器の再起動時にナンスは同じ値から開始されるので、第三者からの攻撃を受けやすくなる。   However, in the secure communication method as the conventional example described above, when the nonce is generated by the method using the continuous number, if the authentication device power or the software is restarted due to some failure, the authentication device is restarted. Since the nonce starts at the same value at startup, it is more susceptible to attacks from third parties.

そこで、認証機器の電源停止または内部ソフトウェアのリブート時に、過去に使用されたナンスをフラッシュメモリなどの記憶媒体に保持して、再起動時の新たにナンスを生成する場合に、記憶媒体に保持しているナンスの値を参照して、過去のナンスと同値とならないようにナンスを生成することが考えられる。しかし、フラッシュメモリなどの不揮発性メモリには、書き込み回数の制限があり、制限以上の書き込みを行うと動作が保証されないという問題がある。さらに、制限される書き込み回数が多いフラッシュメモリを用いることはコストがかかるといった問題もある。   Therefore, when the power to the authentication device is stopped or the internal software is rebooted, the nonce used in the past is retained in a storage medium such as flash memory, and when a new nonce is generated at the time of restart, it is retained in the storage medium. It is conceivable to generate a nonce by referring to the value of the nonce that is not equal to the past nonce. However, a nonvolatile memory such as a flash memory has a limitation on the number of times of writing, and there is a problem that operation is not guaranteed if writing exceeding the limitation is performed. Furthermore, there is a problem that it is costly to use a flash memory having a large number of limited write operations.

また、第三者が起動時に生成されるナンスを推論することを困難にするために、ナンス生成に乱数を用いる方法を採用することが考えられるが、再起動直後の初期値以外のナンス生成にも乱数を用いる場合には、ナンスは、第三者による推論の可能性を低減するために、高価な乱数発生装置を用いて十分にランダムにする必要があり、コストがかかるといった問題点がある。   Also, in order to make it difficult for a third party to infer the nonce generated at startup, it is possible to use a method that uses a random number for nonce generation, but for nonce generation other than the initial value immediately after restart However, when using random numbers, the nonce needs to be sufficiently randomized using an expensive random number generator to reduce the possibility of inference by a third party, which is expensive. .

本願発明は、上記背景技術に鑑みて発明されたものであり、再起動が発生しうる認証機器において、再起動が発生した場合においても、第三者に容易に初期値を推測されることがないナンスを生成することができ、しかも低コストで実現可能なセキュア通信方法を提供することを目的とする。   The present invention has been invented in view of the above-described background art, and in an authentication device that can be restarted, even if a restart occurs, an initial value can be easily estimated by a third party. It is an object of the present invention to provide a secure communication method that can generate a nonce that is not necessary and can be realized at low cost.

上記課題を解決するために、本願請求項1記載の発明では、ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、乱数を発生させる乱数発生手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、乱数発生手段は、少なくとも認証機器の再起動時に、乱数を発生させるものであり、ナンス生成手段は、乱数発生手段で発生した乱数に基づいてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴としている。   In order to solve the above-described problem, the invention according to claim 1 of the present application is a secure communication method in which an authentication device authenticates a device to be authenticated via a network, and the authentication device and the device to be authenticated are used for the authentication. The key is stored in advance, and the authentication device includes at least random number generation means for generating a random number, nonce generation means for generating a nonce, and encryption of the nonce using the key or decryption of the encrypted nonce. Nonce encryption / decryption means for performing one and nonce transmission means for transmitting the nonce or encrypted nonce to the device to be authenticated, and the device to be authenticated uses the key of the nonce transmitted from the authentication device A nonce encryption / decryption unit that performs encryption or decryption using the key of the encrypted nonce transmitted from the authentication device, and a nonce encrypted by the reception nonce encryption / decryption unit And a nonce return means for transmitting the nonce decrypted by the nonce or the received nonce encryption / decryption means to the authentication device, and the random number generation means generates a random number at least when the authentication device is restarted. The means generates the initial value of the nonce based on the random number generated by the random number generation means, and the new nonce when the authentication device other than the initial value authenticates the device to be authenticated is used for the previous authentication. It is generated by incrementing the nonce.

本願請求項2記載の発明では、ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、現在の時刻を生成する時刻生成手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、時刻生成手段は、少なくとも認証機器の再起動時に、現在の時刻を生成するものであり、ナンス生成手段は、時刻生成手段で生成した時刻に基づいてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴としている。   The invention according to claim 2 of the present application is a secure communication method in which an authentication device authenticates a device to be authenticated via a network, and the authentication device and the device to be authenticated hold a key used for the authentication in advance, The authentication device includes a time generation unit that generates a current time, a nonce generation unit that generates a nonce, and a nonce encryption / decryption that performs at least one of encryption of a nonce using the key or decryption of an encrypted nonce And nonce transmitting means for transmitting the nonce or encrypted nonce to the device to be authenticated, and the device to be authenticated is an encryption or authentication device that uses the nonce key transmitted from the authentication device. The received nonce encryption / decryption means for decrypting the encrypted nonce transmitted using the key, and the nonce or reception nonce encrypted by the reception nonce encryption / decryption means A nonce reply means for transmitting the nonce decrypted by the signal decryption means to the authentication device, and the time generation means generates the current time at least when the authentication device is restarted. The initial value of the nonce is generated based on the time generated by the time generation means, and the new nonce when the authentication device other than the initial value authenticates the device to be authenticated is the nonce used for the previous authentication. It is generated by incrementing.

本願請求項3記載の発明では、ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、乱数を発生させる乱数発生手段と、現在の時刻を生成する時刻生成手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、乱数発生手段は、少なくとも認証機器の再起動時に、乱数を発生させるものであり、時刻生成手段は、少なくとも認証機器の再起動時に、現在の時刻を生成するものであり、ナンス生成手段は、ナンスの上位桁に時刻生成手段で生成した時刻を用い、ナンスの下位桁に乱数発生手段で発生した乱数を用いてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴としている。   The invention according to claim 3 of the present application is a secure communication method in which an authentication device authenticates a device to be authenticated via a network, and the authentication device and the device to be authenticated hold a key used for the authentication in advance, The authentication device includes: a random number generation unit that generates a random number; a time generation unit that generates a current time; a nonce generation unit that generates a nonce; and encryption of a nonce using the key or decryption of an encrypted nonce A nonce encryption / decryption unit that performs at least one of the nonce and a nonce transmission unit that transmits the nonce or the encrypted nonce to the device to be authenticated, and the device to be authenticated includes the key of the nonce transmitted from the authentication device. Receiving nonce encryption / decryption means for performing encryption using the key of the encrypted nonce transmitted from the authentication or authentication device, and reception nonce encryption / decryption means And a nonce reply means for transmitting the encoded nonce or the nonce decrypted by the received nonce encryption / decryption means to the authentication device, and the random number generation means generates a random number at least when the authentication device is restarted. Yes, the time generation means generates the current time at least when the authentication device is restarted, and the nonce generation means uses the time generated by the time generation means as the upper digit of the nonce, and the lower digit of the nonce. The initial value of the nonce is generated using the random number generated by the random number generator. The new nonce when the authentication device other than the initial value authenticates the device to be authenticated is the nonce used for the previous authentication. It is characterized by being generated by incrementing.

本願請求項4記載の発明では、上記請求項3記載のセキュア通信方法において、認証機器は、所定時間当たりの再起動頻度を検出するリブート頻度検出手段を備え、ナンス生成手段は、リブート頻度検出手段によって検出された所定時間当たりの再起動頻度に基づいて、生成するナンスの初期値の上位桁と下位桁の桁数比率を変更するものであることを特徴としている。   According to a fourth aspect of the present invention, in the secure communication method according to the third aspect, the authentication device includes a reboot frequency detecting unit that detects a restart frequency per predetermined time, and the nonce generating unit is a reboot frequency detecting unit. Based on the restart frequency per predetermined time detected by the above, the ratio of the number of upper digits and lower digits of the initial value of the generated nonce is changed.

本願請求項1記載の発明のセキュア通信方法においては、認証機器及び被認証機器は、認証に用いられる鍵を予め保持し、認証機器は、乱数発生手段と、ナンス生成手段と、ナンス暗号復号化手段と、ナンス送信手段とを備え、被認証機器は、受信ナンス暗号復号化手段と、ナンス返信手段とを備えているので、認証機器は、共通鍵とナンスを用いることによって、被認証機器を認証することができる。   In the secure communication method according to the first aspect of the present invention, the authentication device and the device to be authenticated hold in advance a key used for authentication, and the authentication device includes a random number generation means, a nonce generation means, and a nonce encryption / decryption Means and a nonce transmitting means, and the device to be authenticated includes a receiving nonce encryption / decryption means and a nonce reply means, so that the authentication device uses the common key and the nonce to It can be authenticated.

さらに、ナンス生成手段は、少なくとも認証機器の再起動時に、乱数発生手段で発生した乱数に基づいてナンスの初期値を生成するので、第三者が容易にナンスの初期値を推測することを防ぐことができる。また、認証機器は、初期値以外のナンスの生成について、前回の認証に用いたナンスをインクリメントして新たにナンスを生成するものであるので、ナンス生成手段は、常に異なるナンスを生成することができ、ナンスを一度だけ使用される状態に保つことができる。また、初期値以外のナンスは、連続的な数を用いる方法でナンスを生成することが可能であり、乱数を用いる必要がなく、低コスト化を実現できる。   Furthermore, since the nonce generation unit generates the initial value of the nonce based on the random number generated by the random number generation unit at least when the authentication device is restarted, it prevents a third party from easily guessing the initial value of the nonce. be able to. In addition, since the authentication device is to generate a nonce by incrementing the nonce used in the previous authentication for generating a nonce other than the initial value, the nonce generating unit may always generate a different nonce. And can keep the nonce used only once. In addition, nonces other than the initial value can be generated by a method using a continuous number, and it is not necessary to use random numbers, so that cost reduction can be realized.

本願請求項2記載の発明のセキュア通信方法においては、認証機器及び被認証機器は、認証に用いられる鍵を予め保持し、認証機器は、時刻生成手段と、ナンス生成手段と、ナンス暗号復号化手段と、ナンス送信手段とを備え、被認証機器は、受信ナンス暗号復号化手段と、ナンス返信手段とを備えているので、認証機器は、共通鍵とナンスを用いることによって、被認証機器を認証することができる。   In the secure communication method according to claim 2 of the present application, the authentication device and the device to be authenticated hold in advance a key used for authentication, and the authentication device includes a time generation means, a nonce generation means, and a nonce encryption / decryption Means and a nonce transmitting means, and the device to be authenticated includes a receiving nonce encryption / decryption means and a nonce reply means, so that the authentication device uses the common key and the nonce to It can be authenticated.

さらに、ナンス生成手段は、少なくとも認証機器の再起動時に、時刻生成手段で生成した現在の時刻に基づいてナンスの初期値を生成するので、過去の少なくとも認証機器の再起動時に生成したナンスの初期値と同値となることがなく、常に異なるナンスの初期値を生成することができる。また、認証機器が被認証機器を認証する際にナンスをインクリメントして新たにナンスを生成するものであるので、常に異なるナンスを生成することができ、ナンスを一度だけ使用される状態に保つことができる。また、初期値以外のナンスは、連続的な数を用いる方法でナンスを生成することが可能であり、低コスト化を実現できる。   Furthermore, since the nonce generation unit generates an initial value of the nonce based on the current time generated by the time generation unit at least when the authentication device is restarted, the nonce initial value generated when the authentication device was restarted at least in the past. The initial value of a different nonce can always be generated without being equal to the value. In addition, when the authentication device authenticates the device to be authenticated, a nonce is incremented and a new nonce is generated. Therefore, a different nonce can always be generated and the nonce can be used only once. Can do. In addition, nonces other than the initial value can be generated by a method using a continuous number, and cost reduction can be realized.

本願請求項3記載の発明のセキュア通信方法においては、認証機器及び被認証機器は、認証に用いられる鍵を予め保持し、認証機器は、乱数発生手段と、時刻生成手段と、ナンス生成手段と、ナンス暗号復号化手段と、ナンス送信手段とを備え、被認証機器は、受信ナンス暗号復号化手段と、ナンス返信手段とを備えているので、認証機器は、共通鍵とナンスを用いることによって、被認証機器を認証することができる。   In the secure communication method according to the third aspect of the present invention, the authentication device and the device to be authenticated hold in advance a key used for authentication, and the authentication device includes a random number generation means, a time generation means, a nonce generation means, The nonce encryption / decryption unit and the nonce transmission unit, and the device to be authenticated includes the reception nonce encryption / decryption unit and the nonce return unit, so that the authentication device uses the common key and the nonce. The device to be authenticated can be authenticated.

さらに、ナンス生成手段は、少なくとも認証機器の再起動時に、時刻生成手段で生成した現在の時刻に基づいてナンスの上位桁を生成し、乱数発生手段で発生した乱数に基づいてナンスの下位桁を生成するものであるので、ナンスの値が起動時に同じ値から開始することとはならず、常に異なるナンスの初期値を生成することができ、ナンスを一度だけ使用される状態に保つことができる。   Further, the nonce generating means generates the upper digit of the nonce based on the current time generated by the time generating means at least when the authentication device is restarted, and sets the lower digit of the nonce based on the random number generated by the random number generating means. Since it is generated, the nonce value does not start from the same value at startup, it is possible to always generate an initial value of a different nonce, and keep the nonce used only once .

また、ナンス生成手段は、認証機器が被認証機器を認証する際に、ナンスをインクリメントして新たにナンスを生成するものであるので、インクリメントによるナンスの変化頻度の少ない上位桁を、変化が緩やかであり同値が生じない時刻に基づいて生成することによって、ナンスとして用いることができる数値の消費を抑えることができる。   In addition, the nonce generating means generates a new nonce by incrementing the nonce when the authenticating device authenticates the device to be authenticated. Therefore, the generation of a numerical value that can be used as a nonce can be suppressed.

また、ナンス生成手段が、ナンスの下位桁を乱数に基づいて生成することによって、認証機器の再起動が非常に短時間で発生した場合に、ナンスの下位桁が近い値とならないようにすることができる。このことによって、過去にインクリメントによって生成されたナンスと、認証機器の起動によって新たに生成されたナンスの初期値とが同値になることを防ぐことができる。   In addition, the nonce generation means generates the low-order digit of the nonce based on random numbers so that the non-significant low-order digit does not become a close value when the authentication device restarts in a very short time. Can do. As a result, it is possible to prevent the nonce generated in the past from being incremented and the initial value of the nonce newly generated by activation of the authentication device from becoming the same value.

本願請求項4記載の発明のセキュア通信方法においては、特に、ナンス生成手段は、リブート頻度検出手段により検出された所定時間当たりの再起動頻度に基づいて、生成するナンスの上位桁と下位桁の桁数比率を変更するものであるので、再起動頻度が高い場合に、ナンスの上位桁の桁数比率を下げることができる。   In the secure communication method of the invention according to claim 4 of the present application, in particular, the nonce generation unit is configured to determine the upper digit and lower digit of the nonce to be generated based on the restart frequency per predetermined time detected by the reboot frequency detection unit. Since the digit number ratio is changed, the number ratio of the upper digits of the nonce can be lowered when the restart frequency is high.

認証機器が短時間に再起動を繰り返した場合には、ナンス生成手段は、ナンスの初期値の生成を頻繁に行うこととなるために、インクリメントによるナンスの生成を行う回数が少なくなるので、下位桁の使用可能な数値を十分に使用することがなく、上位桁を早く消費していくこととなる。この場合に、ナンスの上位桁の桁数を減らして、下位桁の桁数を増やすことによって、ナンスとして使用可能な数値を有効に使用することができる。   When the authentication device repeatedly restarts in a short time, the nonce generation means frequently generates the initial value of the nonce, so the number of nonce generations by increment is reduced, so The numerical values that can be used for the digits are not sufficiently used, and the upper digits are consumed quickly. In this case, by reducing the number of upper digits of the nonce and increasing the number of lower digits, a numerical value that can be used as a nonce can be used effectively.

図1〜図4は、本願発明の第1の実施形態であるセキュア通信方法を示している。例えば、図1に示すように、セキュア通信方法は、ネットワークを介して認証機器Aが被認証機器Bを認証するセキュア通信方法であって、認証機器A及び被認証機器Bは、前記認証に用いられる共通鍵Kaを予め保持しており、認証機器Aは、乱数を発生させる乱数発生手段1aと、ナンスNを生成するナンス生成手段2aと、前記共通鍵Kaを用いたナンスNの暗号化又は暗号化されたナンスE(N)の復号化の少なくとも一方を行うナンス暗号復号化手段3aと、ナンスN又は暗号化されたナンスE(N)を被認証機器Bへ送信するナンス送信手段4aとを備え、被認証機器Bは、認証機器Aより送信されてきたナンスNの前記共通鍵Kaを用いた暗号化又は認証機器Aより送信されてきた前記暗号化されたナンスE(N)の前記共通鍵Kaを用いた復号化を行う受信ナンス暗号復号化手段5bと、受信ナンス暗号復号化手段5bで暗号化されたナンスE(N)又は受信ナンス暗号復号化手段で復号化されたナンスNを認証機器Aへ送信するナンス返信手段6bとを備え、乱数発生手段1aは、少なくとも認証機器Aの再起動時に、乱数を発生させるものであり、ナンス生成手段2aは、乱数発生手段1aで発生した乱数に基づいてナンスNの初期値N(1)を生成するものであり、初期値N(1)以外の認証機器Aが被認証機器Bを認証する際の新たなナンスN(n+1)は、前回の認証に用いられたナンスN(n)をインクリメントして生成されるものである。   1 to 4 show a secure communication method according to the first embodiment of the present invention. For example, as shown in FIG. 1, the secure communication method is a secure communication method in which the authentication device A authenticates the device to be authenticated B via the network, and the authentication device A and the device to be authenticated B are used for the authentication. The authentication device A holds the common key Ka to be generated in advance, and the authentication device A encrypts the nonce N using the common key Ka, the random number generation unit 1a that generates a random number, the nonce generation unit 2a that generates the nonce N, or A nonce encryption / decryption unit 3a that performs at least one of decryption of the encrypted nonce E (N), and a nonce transmission unit 4a that transmits the nonce N or the encrypted nonce E (N) to the device to be authenticated B. The device to be authenticated B encrypts the nonce N transmitted from the authentication device A using the common key Ka or the encrypted nonce E (N) transmitted from the authentication device A. Common Receive nonce encryption / decryption means 5b that performs decryption using Ka, and nonce E (N) encrypted by reception nonce encryption / decryption means 5b or nonce N decrypted by reception nonce encryption / decryption means A random number generating means 1a for generating a random number at least when the authentication apparatus A is restarted, and the nonce generating means 2a is a random number generated by the random number generating means 1a. The initial value N (1) of the nonce N is generated based on the above, and the new nonce N (n + 1) when the authentication device A other than the initial value N (1) authenticates the device to be authenticated B is This is generated by incrementing the nonce N (n) used for the authentication.

以下、この実施形態のセキュア通信方法を、より具体的詳細に説明する。   Hereinafter, the secure communication method of this embodiment will be described in more detail.

図1に示す例は、同一の通信ネットワークに認証機器A及び被認証機器Bが接続され、この二機器間での通信を行う場合に、認証機器A及び被認証機器Bには予め共通鍵Kaが配布されており、さらに安全な認証を行うためには、一度だけ使用される数であるナンスNが用いられる。また、認証機器A及び被認証機器Bには、電源11、中央処理装置12、通信モジュール13、揮発性メモリ14、読み出し専用記憶装置15が搭載されている。   In the example shown in FIG. 1, when the authentication device A and the device to be authenticated B are connected to the same communication network, and communication is performed between the two devices, the authentication device A and the device to be authenticated B have a common key Ka beforehand. In order to perform more secure authentication, a nonce N, which is a number used only once, is used. The authentication device A and the device to be authenticated B are equipped with a power source 11, a central processing unit 12, a communication module 13, a volatile memory 14, and a read-only storage device 15.

電源11は、認証機器A及び被認証機器Bの電源を管理するものである。   The power supply 11 manages the power supply of the authentication device A and the device to be authenticated B.

認証機器Aの中央処理装置12aは、乱数発生手段1aと、ナンス生成手段2aと、ナンス暗号復号化手段3aと、ナンス送信手段4aとを備えるものである。また、被認証機器Bの中央処理装置12bは、受信ナンス暗号復号化手段5bと、ナンス返信手段6bとを備えるものである。この中央処理装置12は、電源11より電力が供給されて起動するものである。さらに、中央処理装置12は、揮発性メモリ14に一時的に保存されている乱数を読み出し、読み出し専用記憶装置15に予め保存されている共通鍵KaとナンスNを用いた暗号通信のプログラムを読み出し、各手段を用いることによって種々の演算を行い、通信モジュール13へ他の機器である認証機器A又は被認証機器Bとの送受信の命令を行うものである。   The central processing unit 12a of the authentication device A includes a random number generation unit 1a, a nonce generation unit 2a, a nonce encryption / decryption unit 3a, and a nonce transmission unit 4a. The central processing unit 12b of the device to be authenticated B includes a received nonce encryption / decryption unit 5b and a nonce reply unit 6b. The central processing unit 12 is activated by power supplied from the power source 11. Further, the central processing unit 12 reads a random number temporarily stored in the volatile memory 14, and reads a program for encryption communication using the common key Ka and the nonce N stored in advance in the read-only storage device 15. Various operations are performed by using each means, and commands for transmission / reception with the authentication device A or the device to be authenticated B, which are other devices, are sent to the communication module 13.

通信モジュール13は、中央処理装置12より命令を受けて、通信ネットワークを介して認証機器A又は被認証機器Bとの通信を行うものである。   The communication module 13 receives a command from the central processing unit 12 and performs communication with the authentication device A or the device to be authenticated B via the communication network.

揮発性メモリ14aは、乱数発生手段1aによって発生した乱数を一時的に保存するものであり、中央処理装置12aによって、乱数が読み出されてナンス生成手段2aによってナンスNの初期値N(1)の生成に用いられる。   The volatile memory 14a temporarily stores the random number generated by the random number generation unit 1a. The random number is read by the central processing unit 12a and the initial value N (1) of the nonce N by the nonce generation unit 2a. Used to generate

読み出し専用記憶装置15は、共通鍵KaとナンスNを用いた暗号通信のプログラムが予め保存されており、中央処理装置12よりこのプログラムが読み出されて実行される。   The read-only storage device 15 stores in advance a program for encrypted communication using the common key Ka and the nonce N, and this program is read from the central processing unit 12 and executed.

なお、揮発性メモリ14にはRAM(Random Access Memory)が用いられ、読み出し専用記憶装置15にはROM(Read Only Memory)が用いられる。   Note that a RAM (Random Access Memory) is used for the volatile memory 14, and a ROM (Read Only Memory) is used for the read-only storage device 15.

ここで、本明細書において、総称する場合にはアルファベットの添え字を省略した参照符号で示し、個別の構成を指す場合にはアルファベットの添え字を付した参照符号で示す。   Here, in this specification, when referring generically, it shows with the reference symbol which abbreviate | omitted the alphabetic suffix, and when referring to an individual structure, it shows with the reference symbol which attached | subjected the alphabetic suffix.

次に、認証機器Aと被認証機器Bとの間で、認証機器AによりナンスNが生成され、被認証機器Bに対して認証を行って、実際にセッションが開始されるまでの通信内容を図2〜図4に基づいて説明する。   Next, a nonce N is generated by the authentication device A between the authentication device A and the device to be authenticated B, and the communication contents until the session is actually started after the authentication to the device B to be authenticated are performed. This will be described with reference to FIGS.

図2に示すように、認証機器Aが再起動した場合、乱数発生手段1aは、乱数を発生させる(S101)。なお、乱数は、推測されないように一様な乱数である必要がある。例えば、擬似乱数にハッシュ関数を用いて乱数の生成を行うことができる。この乱数は、揮発性メモリ14aに一時的に保存される(S102)。ナンス生成手段2aは、揮発性メモリ14aに保存された乱数を読み出して、ナンスNの初期値N(1)を生成し、揮発性メモリ14aへ初期値N(1)を保存する(S103)。生成されたナンスNの初期値N(1)は、ナンス暗号復号化手段3aによって、予め保持されている共通鍵Kaを用いて暗号化される(S104)。さらに、暗号化されたナンスE(N(1))は、ナンス送信手段4aによって、被認証機器Bへ送信される(S105)。   As shown in FIG. 2, when the authentication device A is restarted, the random number generator 1a generates a random number (S101). Note that the random number needs to be a uniform random number so as not to be guessed. For example, a random number can be generated using a hash function as a pseudo-random number. This random number is temporarily stored in the volatile memory 14a (S102). The nonce generation means 2a reads the random number stored in the volatile memory 14a, generates an initial value N (1) of the nonce N, and stores the initial value N (1) in the volatile memory 14a (S103). The generated initial value N (1) of the nonce N is encrypted by the nonce encryption / decryption means 3a using the common key Ka held in advance (S104). Further, the encrypted nonce E (N (1)) is transmitted to the device to be authenticated B by the nonce transmitting means 4a (S105).

なお、上記の再起動とは、認証機器Aの電源11が再起動するコールドリブート及びソフトウェアがリセットされてハードウェアチェックの一部を省略して高速に起動するウォームリブートの両方を含むものである。また、認証機器Aは、製造後の初回の電源投入時に、上記再起動した場合と同様であるとして動作するものであってもよい。   The above restart includes both a cold reboot in which the power supply 11 of the authentication device A is restarted and a warm reboot in which the software is reset and a part of the hardware check is omitted to start up at high speed. Further, the authentication device A may operate as if it is restarted when the power is turned on for the first time after manufacture.

次に、図3に示すように、被認証機器Bは、認証機器Aより受信した暗号化されたナンスE(N(1))を受信ナンス暗号復号化手段5bによって、予め保持されている共通鍵Kaを用いてナンスN(1)へ復号化する(S106)。さらに、被認証機器Bは、復号化されたナンスN(1)をナンス返信手段6bによって、認証機器Aに送信する(S107)。   Next, as shown in FIG. 3, the device B to be authenticated has a common non-encrypted nonce E (N (1)) received from the authentication device A held in advance by the reception nonce encryption / decryption means 5b. Decryption into nonce N (1) using the key Ka (S106). Further, the device to be authenticated B transmits the decrypted nonce N (1) to the authentication device A by the nonce reply unit 6b (S107).

認証機器Aは、被認証機器Bより送信された復号化されたナンスN(1)を受信して(S108)、ナンス生成手段2aによって生成したナンスN(1)との照合を行い(S109)、一致している場合には、被認証機器Bを認証し(S110)、認証機器Aと被認証機器Bとの間のセッションが開始される。   The authentication device A receives the decrypted nonce N (1) transmitted from the device to be authenticated B (S108), and collates with the nonce N (1) generated by the nonce generation means 2a (S109). If they match, the device B to be authenticated is authenticated (S110), and a session between the device A and the device B to be authenticated is started.

再度、認証機器Aと被認証機器Bの間でセッションを開始する場合は、図4に示すように、認証機器Aは、揮発性メモリ14aに保存されている前回用いたナンスN(n)を読み出し、ナンス生成手段2aは、ナンスN(n)をインクリメントしたナンスN(n+1)を生成し、生成されたナンスN(n+1)は、揮発性メモリ14aに保存される(S151)。さらに、生成されたナンスN(n+1)は、ナンス暗号復号化手段3a によって、予め保持されている共通鍵Kaを用いて暗号化される(S152)。暗号化されたナンスE(N(n+1))は、ナンス送信手段4a によって、被認証機器Bへ送信される(S153)。   When the session is started again between the authentication device A and the device B to be authenticated, the authentication device A uses the previously used nonce N (n) stored in the volatile memory 14a as shown in FIG. The read / nonce generation unit 2a generates a nonce N (n + 1) obtained by incrementing the nonce N (n), and the generated nonce N (n + 1) is stored in the volatile memory 14a (S151). Furthermore, the generated nonce N (n + 1) is encrypted by the nonce encryption / decryption means 3a using the common key Ka held in advance (S152). The encrypted nonce E (N (n + 1)) is transmitted to the device to be authenticated B by the nonce transmitting means 4a (S153).

次に、被認証機器Bは、認証機器Aより受信した暗号化されたナンスE(N(n+1))を受信ナンス暗号復号化手段5bによって、予め保持されている共通鍵Kaを用いてナンスN(n+1)へ復号化する(S154)。さらに、被認証機器Bは、復号化されたナンスN(n+1)をナンス返信手段6bによって、認証機器Aに送信する(S155)。   Next, the device to be authenticated B receives the encrypted nonce E (N (n + 1)) received from the authentication device A by the reception nonce encryption / decryption means 5b using the common key Ka held in advance by the nonce N Decoding into (n + 1) (S154). Further, the device to be authenticated B transmits the decrypted nonce N (n + 1) to the authentication device A by the nonce reply unit 6b (S155).

認証機器Aは、被認証機器Bより送信された復号化されたナンスN(n+1)を受信して(S156)、ナンス生成手段2aによって生成したナンスN(n+1)との照合を行い(S157)、一致している場合には、被認証機器Bを認証し(S158)、認証機器Aと被認証機器Bとの間のセッションが再び開始される。   The authentication device A receives the decrypted nonce N (n + 1) transmitted from the device to be authenticated B (S156), and collates with the nonce N (n + 1) generated by the nonce generation unit 2a (S157). If they match, the device B to be authenticated is authenticated (S158), and the session between the device A and the device B to be authenticated is started again.

本実施形態の他の例として、認証機器Aから被認証機器Bへ送られるナンスNは、暗号化されず、被認証機器Bから認証機器Aへ送られるナンスNは暗号化されているセキュア通信方法がある。具体的には、認証機器Aは、ナンス生成手段2aによって生成されたナンスNを暗号化せずに、ナンス送信手段4aによって被認証機器Bへ送信する。被認証機器Bは、受信したナンスNを受信ナンス暗号復号化手段5bによって、予め保持されている共通鍵Kaを用いて暗号化し、暗号化されたナンスE(N)をナンス返信手段6bによって認証機器Aへ返信する。さらに、認証機器Aは、受信した暗号化されたナンスE(N)をナンス暗号復号化手段3aによって、予め保持されている共通鍵Kaを用いてナンスNへ復号化する。次に認証機器Aは、この復号化したナンスNと自機の有しているナンス生成手段2aによって生成されたナンスNとの照合を行い、一致している場合には、被認証機器Bを認証し、認証機器Aと被認証機器Bとの間のセッションが開始される。   As another example of this embodiment, the nonce N sent from the authentication device A to the device to be authenticated B is not encrypted, and the nonce N sent from the device to be authenticated B to the authentication device A is encrypted. There is a way. Specifically, the authentication device A transmits the nonce N generated by the nonce generation unit 2a to the device B to be authenticated by the nonce transmission unit 4a without encrypting the nonce N. The device to be authenticated B encrypts the received nonce N by the received nonce encryption / decryption means 5b using the common key Ka held in advance, and authenticates the encrypted nonce E (N) by the nonce return means 6b. Reply to device A. Further, the authentication device A decrypts the received encrypted nonce E (N) into the nonce N using the common key Ka held in advance by the nonce encryption / decryption means 3a. Next, the authentication device A compares the decrypted nonce N with the nonce N generated by the nonce generation unit 2a possessed by the own device. Authentication is performed, and a session between the authentication device A and the device to be authenticated B is started.

上述したように、初期値以外のナンスN(n+1)は、前回用いられたナンスN(n)をインクリメントすることによって生成されていく。ここで、初期値以外のナンスNはインクリメントすることによって連続的な数として生成されるが、このインクリメントとしては、2以上の数が増加する演算を行ってもよく、また、減算していく演算を行ってもよい。   As described above, the nonce N (n + 1) other than the initial value is generated by incrementing the previously used nonce N (n). Here, the nonce N other than the initial value is generated as a continuous number by incrementing, and as this increment, an operation in which a number of 2 or more is increased may be performed, or an operation in which subtraction is performed. May be performed.

したがって、認証機器A及び被認証機器Bは、共通鍵Kaを予め保持し、認証機器Aは、乱数発生手段1aと、ナンス生成手段2aと、ナンス暗号復号化手段3aと、ナンス送信手段4aとを備え、被認証機器Bは、受信ナンス暗号復号化手段5bと、ナンス返信手段6bとを備えているので、認証機器Aは、共通鍵KaとナンスNを用いることによって、被認証機器Bを認証することができる。   Therefore, the authentication device A and the device to be authenticated B hold the common key Ka in advance, and the authentication device A includes a random number generation unit 1a, a nonce generation unit 2a, a nonce encryption / decryption unit 3a, and a nonce transmission unit 4a. The authenticated device B includes the received nonce encryption / decryption unit 5b and the nonce return unit 6b, so that the authenticated device A uses the common key Ka and the nonce N to It can be authenticated.

さらに、ナンス生成手段2aは、少なくとも認証機器Aの再起動時に、乱数発生手段1aで発生した乱数に基づいてナンスNの初期値N(1)を生成するので、第三者が容易にナンスNの初期値N(1)を推測することを防ぐことができる。また、認証機器Aは、初期値以外のナンスNの生成について、前回の認証に用いたナンスN(n)をインクリメントして新たにナンスN(n+1)を生成するものであるので、ナンス生成手段2aは、常に異なるナンスNを生成することができ、ナンスNを一度だけ使用される状態に保つことができる。また、初期値以外のナンスNは、連続的な数を用いる方法でナンスNを生成することが可能であり、乱数を用いる必要がなく、低コスト化を実現できる。   Further, since the nonce generation unit 2a generates the initial value N (1) of the nonce N based on the random number generated by the random number generation unit 1a at least when the authentication device A is restarted, a third party can easily perform the nonce N It is possible to prevent the initial value N (1) from being estimated. Further, since the authentication device A is for generating a nonce N (n) other than the initial value, the nonce N (n + 1) used for the previous authentication is incremented to newly generate a nonce N (n + 1). 2a can always generate a different nonce N and keep the nonce N used only once. Further, the nonce N other than the initial value can be generated by a method using a continuous number, and it is not necessary to use a random number, and cost reduction can be realized.

図5は、本願発明の第2の実施形態であるセキュア通信方法を示している。ここでは、上記第1の実施形態と相違する事項についてのみ説明し、その他の事項(構成、作用効果等)については、上記第1の実施形態と同様であるのでその説明を省略する。   FIG. 5 shows a secure communication method according to the second embodiment of the present invention. Here, only matters different from those in the first embodiment will be described, and other matters (configuration, operational effects, and the like) are the same as those in the first embodiment, and thus description thereof will be omitted.

図5に示すように、セキュア通信方法は、ネットワークを介して認証機器Aが被認証機器Bを認証するセキュア通信方法であって、認証機器A及び被認証機器Bは、前記認証に用いられる共通鍵Kaを予め保持しており、認証機器Aは、現在の時刻を生成する時刻生成手段7aと、ナンスNを生成するナンス生成手段2aと、前記共通鍵Kaを用いたナンスNの暗号化又は暗号化されたナンスE(N)の復号化の少なくとも一方を行うナンス暗号復号化手段3aと、ナンスN又は暗号化されたナンスE(N)を被認証機器Bへ送信するナンス送信手段4aとを備え、被認証機器Bは、認証機器Aより送信されてきたナンスNの前記共通鍵Kaを用いた暗号化又は認証機器Aより送信されてきた前記暗号化されたナンスE(N)の前記共通鍵Kaを用いた復号化を行う受信ナンス暗号復号化手段5bと、受信ナンス暗号復号化手段5bで暗号化されたナンスE(N)又は受信ナンス暗号復号化手段で復号化されたナンスNを認証機器Aへ送信するナンス返信手段6bとを備え、時刻生成手段7aは、少なくとも認証機器Aの再起動時に、現在の時刻を生成するものであり、ナンス生成手段2aは、時刻生成手段7aで生成した時刻に基づいてナンスNの初期値N(1)を生成するものであり、初期値N(1)以外の認証機器Aが被認証機器Bを認証する際の新たなナンスN(n+1)は、前回の認証に用いられたナンスN(n)をインクリメントして生成されるものである。   As shown in FIG. 5, the secure communication method is a secure communication method in which the authentication device A authenticates the device to be authenticated B via the network, and the authentication device A and the device to be authenticated B are common for the authentication. The authentication device A holds the key Ka in advance, and the authentication device A encrypts the nonce N using the common key Ka, the time generation unit 7a that generates the current time, the nonce generation unit 2a that generates the nonce N, or A nonce encryption / decryption unit 3a that performs at least one of decryption of the encrypted nonce E (N), and a nonce transmission unit 4a that transmits the nonce N or the encrypted nonce E (N) to the device to be authenticated B. The device to be authenticated B encrypts the nonce N transmitted from the authentication device A using the common key Ka or the encrypted nonce E (N) transmitted from the authentication device A. Common key K A nonce encryption / decryption unit 5b that performs decryption using the nonce E (N) encrypted by the reception nonce encryption / decryption unit 5b or a nonce N decrypted by the reception nonce encryption / decryption unit A nonce reply means 6b for transmitting to A, the time generation means 7a generates the current time at least when the authentication device A is restarted, and the nonce generation means 2a is generated by the time generation means 7a. An initial value N (1) of the nonce N is generated based on the time, and a new nonce N (n + 1) when the authentication device A other than the initial value N (1) authenticates the device to be authenticated B is: It is generated by incrementing the nonce N (n) used for the previous authentication.

以下、この実施形態のセキュア通信方法を、より具体的詳細に説明する。   Hereinafter, the secure communication method of this embodiment will be described in more detail.

図6に示すように、認証機器Aが再起動した場合、時刻生成手段7aは、現在の時刻を生成する(S201)。この時刻は、例えば、西暦年、月、日、時、分、秒を用いて構成されるものであり、揮発性メモリ14aに一時的に保存される(S202)。ナンス生成手段2aは、揮発性メモリ14aに保存された時刻を読み出して、ナンスの初期値N(1)を生成し、揮発性メモリ14aへ初期値N(1)を保存する(S203)。   As shown in FIG. 6, when the authentication device A is restarted, the time generation unit 7a generates the current time (S201). This time is configured using, for example, the year, month, day, hour, minute, and second, and is temporarily stored in the volatile memory 14a (S202). The nonce generation unit 2a reads the time stored in the volatile memory 14a, generates the initial value N (1) of the nonce, and stores the initial value N (1) in the volatile memory 14a (S203).

なお、ナンスの初期値N(1)を生成した後、被認証機器Bを認証するまでのステップS204以降の認証のステップは、第1の実施形態のステップS104〜ステップS110と同様である。   It should be noted that the authentication steps after step S204 after the nonce initial value N (1) is generated until the device to be authenticated B is authenticated are the same as steps S104 to S110 of the first embodiment.

したがって、認証機器A及び被認証機器Bは、共通鍵Kaを予め保持し、認証機器Aは、時刻生成手段7aと、ナンス生成手段2aと、ナンス暗号復号化手段3aと、ナンス送信手段4aとを備え、被認証機器Bは、受信ナンス暗号復号化手段5bと、ナンス返信手段6bとを備えているので、認証機器Aは、共通鍵KaとナンスNを用いることによって、被認証機器Bを認証することができる。   Therefore, the authentication device A and the device to be authenticated B hold the common key Ka in advance, and the authentication device A includes the time generation unit 7a, the nonce generation unit 2a, the nonce encryption / decryption unit 3a, and the nonce transmission unit 4a. The authenticated device B includes the received nonce encryption / decryption unit 5b and the nonce return unit 6b, so that the authenticated device A uses the common key Ka and the nonce N to It can be authenticated.

さらに、ナンス生成手段2aは、少なくとも認証機器Aの再起動時に、時刻生成手段7aで生成した現在の時刻に基づいてナンスNの初期値N(1)を生成するので、過去の少なくとも認証機器Aの再起動時に生成したナンスNの初期値N(1)と同値となることがなく、常に異なるナンスNの初期値N(1)を生成することができる。   Furthermore, since the nonce generation unit 2a generates the initial value N (1) of the nonce N based on the current time generated by the time generation unit 7a at least when the authentication device A is restarted, at least the past authentication device A Thus, the initial value N (1) of the nonce N that is different from the initial value N (1) of the nonce N generated at the time of restart can be generated.

図7は、本願発明の第3の実施形態であるセキュア通信システム及びセキュア通信方法を示している。ここでは、上記第1及び第2の実施形態と相違する事項についてのみ説明し、その他の事項(構成、作用効果等)については、上記第1及び第2の実施形態と同様であるのでその説明を省略する。   FIG. 7 shows a secure communication system and a secure communication method according to the third embodiment of the present invention. Here, only matters different from those in the first and second embodiments will be described, and other matters (configuration, operational effects, etc.) are the same as those in the first and second embodiments, and therefore the description thereof. Is omitted.

図7に示すように、ネットワークを介して認証機器Aが被認証機器Bを認証するセキュア通信方法であって、認証機器A及び被認証機器Bは、前記認証に用いられる共通鍵Kaを予め保持しており、認証機器Aは、乱数を発生させる乱数発生手段1aと、現在の時刻を生成する時刻生成手段7aと、ナンスNを生成するナンス生成手段2aと、前記共通鍵Kaを用いたナンスNの暗号化又は暗号化されたナンスE(N)の復号化の少なくとも一方を行うナンス暗号復号化手段3aと、ナンスN又は暗号化されたナンスE(N)を被認証機器Bへ送信するナンス送信手段4aとを備え、被認証機器Bは、認証機器Aより送信されてきたナンスNの前記共通鍵Kaを用いた暗号化又は認証機器Aより送信されてきた前記暗号化されたナンスE(N)の前記共通鍵Kaを用いた復号化を行う受信ナンス暗号復号化手段5bと、受信ナンス暗号復号化手段5bで暗号化されたナンスE(N)又は受信ナンス暗号復号化手段で復号化されたナンスNを認証機器Aへ送信するナンス返信手段6bとを備え、乱数発生手段1aは、少なくとも認証機器Aの再起動時に、乱数を発生させるものであり、時刻生成手段7aは、少なくとも認証機器Aの再起動時に、現在の時刻を生成するものであり、ナンス生成手段2aは、ナンスNの上位桁に時刻生成手段7aで生成した時刻を用い、ナンスNの下位桁に乱数発生手段1aで発生した乱数を用いてナンスNの初期値N(1)を生成するものであり、初期値N(1)以外の認証機器Aが被認証機器Bを認証する際の新たなナンスN(n+1)は、前回の認証に用いられたナンスN(n)をインクリメントして生成されるものである。さらに、認証機器Aは、所定時間当たりの再起動頻度を検出するリブート頻度検出手段8aを備え、ナンス生成手段2aは、リブート頻度検出手段8aによって検出された所定時間当たりの再起動頻度に基づいて、生成するナンスNの初期値N(1)の上位桁と下位桁の桁数比率を変更するものである。   As shown in FIG. 7, a secure communication method in which an authentication device A authenticates a device to be authenticated B via a network, where the authentication device A and the device to be authenticated B hold a common key Ka used for the authentication in advance. The authentication device A includes a random number generation unit 1a that generates a random number, a time generation unit 7a that generates a current time, a nonce generation unit 2a that generates a nonce N, and a nonce using the common key Ka The nonce encryption / decryption means 3a that performs at least one of N encryption or decryption of the encrypted nonce E (N), and transmits the nonce N or the encrypted nonce E (N) to the device B to be authenticated. The non-authenticating device B includes a nonce transmitting unit 4a, and the authenticated device B encrypts the nonce N transmitted from the authenticating device A using the common key Ka or the encrypted nonce E transmitted from the authenticating device A. (N Received nonce encryption / decryption means 5b for performing decryption using the common key Ka and nonce E (N) encrypted by the reception nonce encryption / decryption means 5b or received nonce encryption / decryption means A nonce return means 6b for transmitting the nonce N to the authentication device A, the random number generation means 1a generates a random number at least when the authentication device A is restarted, and the time generation means 7a includes at least the authentication device A. The nonce generating means 2a uses the time generated by the time generating means 7a as the upper digit of the nonce N, and the random number generating means 1a generates the lower order digit of the nonce N. The initial value N (1) of the nonce N is generated using the random number, and the new nonce N (n + 1) when the authentication device A other than the initial value N (1) authenticates the device B to be authenticated is ,The previous And it is generated by incrementing nonce N a (n) used in testimony. Further, the authentication device A includes a reboot frequency detection unit 8a that detects a restart frequency per predetermined time, and the nonce generation unit 2a is based on the restart frequency per predetermined time detected by the reboot frequency detection unit 8a. The ratio of the number of upper and lower digits of the initial value N (1) of the nonce N to be generated is changed.

以下、この実施形態のセキュア通信方法を、より具体的詳細に説明する。   Hereinafter, the secure communication method of this embodiment will be described in more detail.

図8に示すように、認証機器Aが再起動した場合、時刻生成手段7aは、現在の時刻を生成する(S301)。この時刻は、例えば、西暦年、月、日、時、分、秒を用いて構成されるものであり、揮発性メモリ14aに一時的に保存される(S302)。また、乱数発生手段1aは、乱数を発生させる(S303)。この乱数も同様に、揮発性メモリ14aに一時的に保存される(S304)。ナンス生成手段2aは、揮発性メモリ14aに保存された時刻及び乱数を読み出して、ナンスNの初期値N(1)を生成する(S305)。   As shown in FIG. 8, when the authentication device A is restarted, the time generation unit 7a generates the current time (S301). This time is configured using, for example, the year, month, day, hour, minute, and second, and is temporarily stored in the volatile memory 14a (S302). The random number generation unit 1a generates a random number (S303). Similarly, this random number is temporarily stored in the volatile memory 14a (S304). The nonce generation means 2a reads the time and random number stored in the volatile memory 14a, and generates the initial value N (1) of the nonce N (S305).

生成されるナンスN(1)は、上位桁を時刻で構成され、下位桁を乱数で構成されるものである。例えば、ナンスNを32ビットとすると、上位16ビットが時刻、下位16ビットが乱数となる。ここでは、ナンスNの上位桁と下位桁ではインクリメントの頻度が異なることを利用して、インクリメントの頻度が小さい上位桁に変化が緩やかな時刻の値を用い、ナンスNとして用いることができる数値の消費を抑えている。また、ナンス生成手段2aは、下位桁に乱数を用いて、初期値N(1)を生成するので、再起動が非常に短時間で発生した場合においても、生成されるナンスN(1)が近い値となることを防止して、ナンスが一度だけ使用される状態を確保している。   The nonce N (1) to be generated is configured such that the upper digit is composed of time and the lower digit is composed of random numbers. For example, if the nonce N is 32 bits, the upper 16 bits are time and the lower 16 bits are random numbers. Here, using the fact that the frequency of increment is different between the upper digit and the lower digit of the nonce N, the value of the time that changes slowly is used for the upper digit with a small increment frequency, and a numerical value that can be used as the nonce N Consume consumption. In addition, since the nonce generation unit 2a generates an initial value N (1) using a random number as a lower digit, even if the restart occurs in a very short time, the generated nonce N (1) is This prevents a close value and ensures that the nonce is used only once.

さらに、リブート頻度検出手段8aは、認証機器Aの所定時間当たりの再起動頻度を検出して、この頻度をナンス生成手段2aへ送信するものである。ナンス生成手段2aは、受信した頻度よりナンスNの上位桁と下位桁の桁数比率の設定を行うものである。   Furthermore, the reboot frequency detection means 8a detects the restart frequency per predetermined time of the authentication device A, and transmits this frequency to the nonce generation means 2a. The nonce generation means 2a sets the ratio of the number of digits of the upper and lower digits of the nonce N based on the received frequency.

ここで、セッションの頻繁な更新による認証の頻度や再起動頻度を検出する方法は、揮発性メモリ14aなどに記憶された機器固有の再起動の頻度を得ることで可能である。例えば、再起動の頻度については、認証機器Aがサーバであるかクライアントであるかによって電源の入り切り頻度又はソフトウェアリセット頻度が異なる。認証機器Aがサーバであれば、電源の入り切り頻度又はソフトウェアリセット頻度は非常に少なく、認証機器Aがクライアントであれば、電源の入り切り又はソフトウェアリセットが頻繁に発生する可能性が高い。   Here, the method of detecting the authentication frequency and the restart frequency by frequent update of the session can be obtained by obtaining the device-specific restart frequency stored in the volatile memory 14a or the like. For example, regarding the frequency of restart, the power on / off frequency or the software reset frequency differs depending on whether the authentication device A is a server or a client. If the authentication device A is a server, the power on / off frequency or software reset frequency is very low, and if the authentication device A is a client, the power on / off or software reset is likely to occur frequently.

また、実際の再起動の回数をカウントすることによっても、所定時間当たりの再起動頻度を検出することができる。この場合、リブート頻度検出手段8aは、所定時間当たりの再起動頻度を定期的にナンス生成手段2aへ送信し、ナンス生成手段2aは、上位桁と下位桁の桁数比率を受信した頻度に応じて自動的に変更することができる。   Moreover, the restart frequency per predetermined time can also be detected by counting the actual number of restarts. In this case, the reboot frequency detection means 8a periodically transmits the restart frequency per predetermined time to the nonce generation means 2a, and the nonce generation means 2a responds to the frequency of receiving the digit number ratio between the upper and lower digits. Can be changed automatically.

リブート頻度検出手段8aで検出された所定時間当たりの再起動頻度が高い場合には、ナンス生成手段2aは、上位桁の桁数比率を小さくしてナンスNの生成を行う。ナンスNの上位桁は、認証機器の起動した時刻を用いて生成されるので、再起動頻度が高い場合、ナンスNの上位桁の更新が頻繁に行われる。このため、ナンス生成手段2aは、使用可能なナンスNの下位桁の数値を十分に使用せずに上位桁を消費してしまい、ナンスNの使用可能範囲を早く使い切ることとなる。   When the restart frequency per predetermined time detected by the reboot frequency detection unit 8a is high, the nonce generation unit 2a generates the nonce N by reducing the digit ratio of the upper digits. Since the upper digit of the nonce N is generated using the time when the authentication device is activated, the upper digit of the nonce N is frequently updated when the restart frequency is high. For this reason, the nonce generation means 2a consumes the upper digits without fully using the lower digits of the usable nonce N, and the usable range of the nonce N is used up quickly.

このような再起動頻度が高い場合に、ナンスNの上位桁の桁数比率を減少させることによって、上位桁の早期の消費を防止することができる。例えば、上位桁として、西暦年、月、時、分、秒を用いていたものから、西暦年、月、時を用いるものへ桁数を減らす場合、認証機器Aの再起動が短い時間に頻発した場合には、上位桁が前回の初期値と同値となり、上位桁の消費を抑えることができる。この場合においても、ナンスNの下位桁は、乱数によって生成されるので、前回の初期値と同値になることを防ぐことが可能である。   When such restart frequency is high, by reducing the number ratio of the upper digits of the nonce N, early consumption of the upper digits can be prevented. For example, when the number of digits is reduced from one that uses the year, month, hour, minute, and second as the upper digit to one that uses the year, month, and time, the restart of the authentication device A occurs frequently in a short time. In this case, the upper digit becomes the same value as the previous initial value, and consumption of the upper digit can be suppressed. Even in this case, since the lower digit of the nonce N is generated by a random number, it can be prevented from being the same value as the previous initial value.

なお、ナンスの初期値N(1)を生成した後、被認証機器Bを認証するまでのステップS306以降の認証のステップは、第1の実施形態のステップS104〜ステップS110と同様である。   It should be noted that the authentication steps after step S306 after the initial nonce value N (1) is generated until the device to be authenticated B is authenticated are the same as steps S104 to S110 of the first embodiment.

したがって、認証機器A及び被認証機器Bは、共通鍵Kaを予め保持し、認証機器Aは、乱数発生手段1aと、時刻生成手段7aと、ナンス生成手段2aと、ナンス暗号復号化手段3aと、ナンス送信手段4aとを備え、被認証機器Bは、受信ナンス暗号復号化手段5bと、ナンス返信手段6bとを備えているので、認証機器Aは、共通鍵KaとナンスNを用いることによって、被認証機器Bを認証することができる。   Therefore, the authentication device A and the device to be authenticated B hold the common key Ka in advance, and the authentication device A includes the random number generation unit 1a, the time generation unit 7a, the nonce generation unit 2a, and the nonce encryption / decryption unit 3a. And the non-authenticating device B includes the received nonce encryption / decryption unit 5b and the nonce return unit 6b, so that the authentication device A uses the common key Ka and the nonce N. The device to be authenticated B can be authenticated.

さらに、ナンス生成手段2aは、少なくとも認証機器Aの再起動時に、時刻生成手段7aで生成した現在の時刻に基づいてナンスNの上位桁を生成し、乱数発生手段1aで発生した乱数に基づいてナンスNの下位桁を生成するものであるので、ナンスNの値が起動時に同じ値から開始することとはならず、常に異なるナンスNの初期値N(1)を生成することができ、ナンスNを一度だけ使用される状態に保つことができる。   Further, the nonce generating unit 2a generates the upper digit of the nonce N based on the current time generated by the time generating unit 7a at least when the authentication device A is restarted, and based on the random number generated by the random number generating unit 1a. Since the lower digit of the nonce N is generated, the value of the nonce N does not start from the same value at the time of activation, and an initial value N (1) of a different nonce N can always be generated. N can be kept used only once.

また、ナンス生成手段2aは、認証機器Aが被認証機器Bを認証する際に、ナンスN(n)をインクリメントして新たにナンスN(n+1)を生成するものであるので、インクリメントによるナンスNの変化頻度の少ない上位桁を、変化が緩やかであり同値が生じない時刻に基づいて生成することによって、ナンスNとして用いることができる数値の消費を抑えることができる。   Further, when the authentication device A authenticates the device B to be authenticated, the nonce generation unit 2a generates a new nonce N (n + 1) by incrementing the nonce N (n). By generating the high-order digits with a small change frequency based on the time when the change is slow and the same value does not occur, consumption of the numerical value that can be used as the nonce N can be suppressed.

また、ナンス生成手段2aが、ナンスNの下位桁を乱数に基づいて生成することによって、認証機器Aの再起動が非常に短時間で発生した場合に、下位桁が近い値とならないようにすることができる。   In addition, the nonce generation unit 2a generates the lower digit of the nonce N based on the random number so that the lower digit does not become a close value when the authentication device A is restarted in a very short time. be able to.

このことによって、過去にインクリメントによって生成されたナンスNと、認証機器Aの起動によって新たに生成されたナンスNの初期値N(1)が同値になることを防ぐことができる。   Accordingly, it is possible to prevent the nonce N generated in the past from being incremented and the initial value N (1) of the nonce N newly generated by the activation of the authentication device A from being the same value.

さらに、ナンス生成手段2aは、リブート頻度検出手段8aにより検出された所定時間当たりの再起動頻度に基づいて、生成するナンスNの上位桁と下位桁の桁数比率を変更するものであるので、再起動頻度が高い場合に、ナンスNの上位桁の桁数比率を下げることができる。   Furthermore, the nonce generating means 2a changes the ratio of the number of digits of the upper and lower digits of the nonce N to be generated based on the restart frequency per predetermined time detected by the reboot frequency detecting means 8a. When the restart frequency is high, the digit number ratio of the upper digits of the nonce N can be lowered.

認証機器が短時間に再起動を繰り返した場合には、ナンス生成手段2aは、初期値N(1)の生成を頻繁に行うこととなるために、インクリメントによるナンスNの生成を行う回数が少なくなるので、下位桁の使用可能な数値を十分に使用することがなく、上位桁を早く消費していくこととなる。この場合に、ナンスの上位桁の桁数を減らして、下位桁の桁数を増やすことによって、ナンスNとして使用可能な数値を有効に使用することができる。   When the authentication device repeats restarting in a short time, the nonce generation means 2a frequently generates the initial value N (1), and therefore the number of generations of the nonce N by increment is small. Therefore, the usable numerical values of the lower digits are not sufficiently used, and the upper digits are consumed quickly. In this case, by reducing the number of upper digits of the nonce and increasing the number of lower digits, a numerical value usable as the nonce N can be used effectively.

なお、本願発明の互いに通信可能な通信機器は、認証機器及び被認証機器の両機能を有することができ、認証、被認証の区別なく、いずれの通信機器同士でもナンスN及び共通鍵Kaを用いたセキュア通信方法を使用することができるので、システム構築の自由度を高めることができる。   Note that the communication device capable of communicating with each other of the present invention can have both functions of an authentication device and a device to be authenticated, and the nonce N and the common key Ka can be used between any communication devices without distinction between authentication and authentication. Therefore, the degree of freedom in system construction can be increased.

例えば、本願発明の第3の実施形態は以下の構成とすることができる。   For example, the third embodiment of the present invention can be configured as follows.

図9に示すように、認証機器Aは、中央処理装置12aに、受信ナンス暗号復号化手段5aとナンス返信手段6aとを備えることによって、被認証機器としての機能を併せて備えることができる。また、被認証機器Bは、中央処理装置12bに、乱数発生手段1bと、ナンス生成手段2bと、ナンス暗号復号化手段3bと、ナンス送信手段4bと、時刻生成手段7bと、リブート頻度検出手段8bとを備えることによって、認証機器としての機能を併せて備えることができる。   As shown in FIG. 9, the authentication device A can be provided with a function as a device to be authenticated by providing the central processing unit 12a with the received nonce encryption / decryption unit 5a and the nonce reply unit 6a. In addition, the device B to be authenticated includes a random number generator 1b, a nonce generator 2b, a nonce encryption / decryptor 3b, a nonce transmitter 4b, a time generator 7b, and a reboot frequency detector in the central processing unit 12b. 8b can be provided with a function as an authentication device.

また、第1及び第2の実施形態の認証機器及び被認証機器も同様の構成を有することによって、認証機器及び被認証機器の両機能を有することができる。   In addition, the authentication device and the device to be authenticated of the first and second embodiments can have both functions of the authentication device and the device to be authenticated by having the same configuration.

なお、第1〜第3の実施形態では、認証機器AにおいてナンスNを生成して、被認証機器Bを認証する片方向認証についての例を示したが、被認証機器Bにおいて同様にナンスNを生成して、片方向認証と組み合わせた双方向認証を行うこともできる。さらに、複数機器間で通信を行うシステム場合にも、本願発明のセキュア通信方法を使用することができ、相互認証、第三者を介在する認証など、ナンスNを用いた様々な認証方式を行うこともできる。   In the first to third embodiments, an example of the one-way authentication in which the authentication device A generates the nonce N and authenticates the device to be authenticated B has been described. Can be generated to perform two-way authentication combined with one-way authentication. Furthermore, the secure communication method of the present invention can also be used in the case of a system that performs communication between a plurality of devices, and various authentication methods using nonce N such as mutual authentication and authentication involving a third party are performed. You can also

上記の第1〜第3の実施形態は、一つのシンプルな組込みデバイスにおける例であり、さらに、実装される暗号処理を行う装置が許容できれば、様々な認証のためのオプションを付加した形が考えられる。
上記の本願発明の実施形態以外にも暗号アルゴリズムを用いた認証方式は様々なパターンが考えられる。
The above-described first to third embodiments are examples in one simple embedded device. Further, if an apparatus for performing cryptographic processing can be allowed, various forms for adding options for authentication can be considered. It is done.
In addition to the embodiment of the present invention described above, various patterns can be considered for the authentication method using the encryption algorithm.

例えば、ISO/IECの9798−2標準として2者間の通信を認証するメカニズムが存在する。この認証メカニズムは、タイムスタンプを用いた片方向認証方式やナンスNを用いた相互認証方式である。ここで、タイムスタンプを用いた片方向認証方式は、ナンスNは必要としない認証方式である。   For example, there is a mechanism for authenticating communication between two parties as the ISO / IEC 9798-2 standard. This authentication mechanism is a one-way authentication method using a time stamp or a mutual authentication method using nonce N. Here, the one-way authentication method using the time stamp is an authentication method that does not require the nonce N.

ナンスNを用いた相互認証方式では、図10に示すように、機器bから機器aへ機器bのナンスNbを送り、機器aは機器bに機器aのナンスNaと機器bのナンスNbおよび機器bへのメッセージを識別するため“b”という値を付けて共通鍵Kabで暗号化して
{Na、Nb、B}Kabを送り、機器bは、機器aに復号化した機器aのナンスNaを自身のナンスNbと共に共通鍵Kabで暗号化して{Nb、Na}Kabを送っている。括弧内はKabによって暗号化されていることを示している。
In the mutual authentication method using the nonce N, as shown in FIG. 10, the nonce Nb of the device b is sent from the device b to the device a, and the device a sends the nonce Na of the device a, the nonce Nb of the device b, and the device In order to identify the message to b, the value “b” is attached and encrypted with the common key Kab and {Na, Nb, B} Kab is sent. The device b sends the decrypted nonce Na of the device a to the device a. It encrypts with its own nonce Nb with a common key Kab and sends {Nb, Na} Kab. The information in parentheses indicates that it is encrypted by Kab.

また、第三者認証方式でも幅広くナンスNが用いられている。図11に示した例では、機器aと機器bの間が直接認証を行わず、信頼できる第三者機器Pとで認証を行うものである。機器aは機器Pに送信したい通信相手の識別のために“a”、“b”の値およびナンスNaを送信する。機器Pは機器aと機器Pの間の共通鍵KapでナンスNaと、識別の値“b”と、機器aと機器bとの間の共通鍵Kab、および機器bのみが復号できるように共通鍵Kabと“a”の値を機器bと機器Pの間の共通鍵Kbpで暗号化したメッセージをさらにKapで暗号化し、{Na、b、Kab、{Kab、a}Kbp}Kapとして機器aに送る。機器aはKapでそのメッセージを復号化し、{Kab、a}Kbpを機器bに送る。機器bはKbpでそのメッセージを復号しKabを得る。生成したナンスNbを得られたKabで暗号化して機器aに送る。機器aはそのメッセージを復号化し、受け取った証にNbから1引いた値をKabで暗号化して機器bに送る。   Nonce N is also widely used in third-party authentication methods. In the example shown in FIG. 11, authentication between the device a and the device b is not performed directly, but is performed with the reliable third-party device P. The device a transmits the values of “a” and “b” and the nonce Na for identifying the communication partner to be transmitted to the device P. The device P is common so that only the nonce Na, the identification value “b”, the common key Kab between the devices a and b, and the device b can be decrypted with the common key Kap between the devices a and P. A message obtained by encrypting the value of the key Kab and “a” with the common key Kbp between the devices b and P is further encrypted with Kap, and the device a is represented as {Na, b, Kab, {Kab, a} Kbp} Kap. Send to. Device a decrypts the message with Kap and sends {Kab, a} Kbp to device b. Device b decrypts the message with Kbp and obtains Kab. The generated nonce Nb is encrypted with the obtained Kab and sent to the device a. The device a decrypts the message, encrypts a value obtained by subtracting 1 from Nb in the received certificate, and sends it to the device b.

また、上記の第1〜第3の実施形態では、認証機器Aと被認証機器Bの認証に共通鍵Kabを用いたが、暗号を用いた認証方式においては秘密裏に渡された認証機器Aの鍵、被認証機器Bの鍵を片方、または双方で保持して認証してもよい。また、公開鍵の仕組みを使えば、認証機器A、被認証機器Bの公開鍵を用いて、復号化時にはそれぞれ公開鍵に対する秘密鍵を用いればよい。   In the first to third embodiments, the common key Kab is used for authentication of the authentication device A and the device to be authenticated B. However, in the authentication method using encryption, the authentication device A that is secretly passed. And the key of the device B to be authenticated may be held in one or both for authentication. If the public key mechanism is used, the public keys of the authentication device A and the device to be authenticated B may be used, and the secret key for the public key may be used for decryption.

例えば、ISO/IECの9798−3標準として公開鍵暗号を用いた認証方式もある。認証としてタイムスタンプを用いた片方向認証方式を用いる場合には、ナンスNは必要とされない。CA(PKa)は機器aの公開鍵PKaが機器aの証明書に含まれている。SIGN(Ta、b)PKa−1は機器aの公開鍵に対する秘密鍵PKa−1でデジタル署名を行っている。機器aは機器bに対して、CA(PKa)、Ta、b、SIGN(Ta、b)PKa−1を送信して認証が行われる。ここで、Taはタイムスタンプである。“b”は機器bへのメッセージであるという識別の値である。   For example, there is an authentication method using public key cryptography as the ISO / IEC 9798-3 standard. When a one-way authentication method using a time stamp is used for authentication, the nonce N is not required. In CA (PKa), the public key PKa of the device a is included in the certificate of the device a. SIGN (Ta, b) PKa-1 performs a digital signature with the private key PKa-1 for the public key of the device a. The device a is authenticated by transmitting CA (PKa), Ta, b, and SIGN (Ta, b) PKa-1 to the device b. Here, Ta is a time stamp. “B” is an identification value indicating that the message is to the device b.

また、図12に示した例では、機器bから機器aへ機器bのナンスNbを送り、機器aは機器bに機器aの公開鍵PKaを含む証明書CA(PKa)、機器aのナンスNa、機器bへのメッセージの識別の値“b”、およびNa、Nb、“b”を秘密鍵PKa−1でデジタル署名してCA(PKa)、Na、b、SIGN(Na、Nb、b)PKa−1を送り、機器bは機器aに機器bの公開鍵PKbを含む証明書CA(PKa)、機器aへのメッセージの識別の値“a”、およびNb、Na、aを秘密鍵PKb−1でデジタル署名してCA(PKb)、a、SIGN(Nb、Na、a)PKb−1を送っている。括弧内はKabによって暗号化されていることを示している。   In the example shown in FIG. 12, the nonce Nb of the device b is sent from the device b to the device a, and the device a sends a certificate CA (PKa) including the public key PKa of the device a to the device b, and a nonce Na of the device a. , Digitally sign the message identification value “b” and Na, Nb, “b” with the private key PKa-1 to CA (PKa), Na, b, SIGN (Na, Nb, b) PKa-1 is sent, and the device b sends to the device a a certificate CA (PKa) including the public key PKb of the device b, a value “a” for identifying the message to the device a, and Nb, Na, and a private key PKb. CA (PKb), a, SIGN (Nb, Na, a) PKb-1 are sent with a digital signature at -1. The information in parentheses indicates that it is encrypted by Kab.

また、上記の第1〜第3の実施形態では、暗号鍵によるメッセージの暗号化を用いた認証だけを取り上げたが、それ以外にも暗号化よりも処理が高速なハッシュ系の技術を用いた2者間の認証プロトコルも存在する。   In the first to third embodiments described above, only authentication using message encryption with an encryption key has been taken up, but other than that, a hash system technique that is faster than encryption is used. There are also two-party authentication protocols.

図13に示した例では、機器aが暗号化していないナンスNaを機器bに送り、機器bは暗号化されていないナンスNbと共通鍵KbaでNa、Nbと“b”を、高速なハッシュ系の技術を用いた処理をして機器aに送り、機器aは同様にNaとNbを、高速なハッシュ系の技術を用いた処理をして送るものである。   In the example shown in FIG. 13, the device a sends a non-encrypted nonce Na to the device b, and the device b uses the non-encrypted nonce Nb and the common key Kba for Na, Nb and “b”, and a high-speed hash. The processing using the system technology is sent to the device a, and the device a similarly sends Na and Nb after processing using the high-speed hash system technology.

このように、ISO/IECの標準の例では、タイムスタンプ方式を除けば、ナンスNを用いた認証方式は多岐に渡る。   As described above, in the ISO / IEC standard example, there are various authentication methods using the nonce N except for the time stamp method.

本願発明の第1の実施形態であるセキュア通信方法の構成を示すブロック構成図である。It is a block block diagram which shows the structure of the secure communication method which is 1st Embodiment of this invention. 同セキュア通信システムにおけるナンス生成と通信認証のフローチャート及びシーケンス図である。It is a flowchart and sequence diagram of nonce generation and communication authentication in the secure communication system. 同セキュア通信システムにおけるナンス生成と通信認証のフローチャート及びシーケンス図である。It is a flowchart and sequence diagram of nonce generation and communication authentication in the secure communication system. 同セキュア通信システムにおけるナンス生成と通信認証のフローチャート及びシーケンス図である。It is a flowchart and sequence diagram of nonce generation and communication authentication in the secure communication system. 本願発明の第2の実施形態であるセキュア通信方法の構成を示すブロック構成図である。It is a block block diagram which shows the structure of the secure communication method which is the 2nd Embodiment of this invention. 同セキュア通信システムにおけるナンス生成と通信認証のフローチャート及びシーケンス図である。It is a flowchart and sequence diagram of nonce generation and communication authentication in the secure communication system. 本願発明の第3の実施形態であるセキュア通信方法の構成を示すブロック構成図である。It is a block block diagram which shows the structure of the secure communication method which is the 3rd Embodiment of this invention. 同セキュア通信システムにおけるナンス生成と通信認証のフローチャート及びシーケンス図である。It is a flowchart and sequence diagram of nonce generation and communication authentication in the secure communication system. 本願発明の第3の実施形態の変形例であるセキュア通信システムの構成を示すブロック構成図である。It is a block block diagram which shows the structure of the secure communication system which is a modification of the 3rd Embodiment of this invention. 2機器間の通信を認証するメカニズムの一例を示すフローチャートである。It is a flowchart which shows an example of the mechanism which authenticates communication between two apparatuses. 2機器間の通信を認証するメカニズムの一例を示すフローチャートである。It is a flowchart which shows an example of the mechanism which authenticates communication between two apparatuses. 2機器間の通信を認証するメカニズムの一例を示すフローチャートである。It is a flowchart which shows an example of the mechanism which authenticates communication between two apparatuses. 2機器間の通信を認証するメカニズムの一例を示すフローチャートである。It is a flowchart which shows an example of the mechanism which authenticates communication between two apparatuses. 従来例であるセキュア通信システムの認証プロトコルを示すフローチャートである。It is a flowchart which shows the authentication protocol of the secure communication system which is a prior art example.

符号の説明Explanation of symbols

A 認証機器
B 被認証機器
Ka 共通鍵
1 乱数発生手段
2 ナンス生成手段
3 ナンス暗号復号化手段
4 ナンス送信手段
5 受信ナンス暗号復号化手段
6 ナンス返信手段
7 時刻生成手段
8 リブート頻度検出手段
11 電源
12 中央処理装置
13 通信モジュール
14 揮発性メモリ
15 読み出し専用記憶装置
A Authentication device B Device to be authenticated Ka Common key 1 Random number generation means 2 Nonce generation means 3 Nonce encryption / decryption means 4 Nonce transmission means 5 Reception nonce encryption / decryption means 6 Nonce return means 7 Time generation means 8 Reboot frequency detection means 11 Power supply 12 central processing unit 13 communication module 14 volatile memory 15 read-only storage device

Claims (4)

ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、乱数を発生させる乱数発生手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、乱数発生手段は、少なくとも認証機器の再起動時に、乱数を発生させるものであり、ナンス生成手段は、乱数発生手段で発生した乱数に基づいてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴とするセキュア通信方法。   A secure communication method in which an authentication device authenticates an authentication target device via a network, wherein the authentication device and the authentication target device hold a key used for the authentication in advance, and the authentication device generates a random number. Generating means, nonce generating means for generating a nonce, nonce encryption / decryption means for performing at least one of encryption of the nonce using the key or decryption of the encrypted nonce, and nonce or encrypted nonce A nonce transmitting means for transmitting to the device to be authenticated, the device to be authenticated encrypting using the key of the nonce transmitted from the authentication device or the encrypted nonce transmitted from the authentication device. A reception nonce encryption / decryption unit that performs decryption using the key, a nonce encrypted by the reception nonce encryption / decryption unit, or a nonce decrypted by the reception nonce encryption / decryption unit A random number generating means for generating a random number at least when the authentication apparatus is restarted. The nonce generating means The new nonce when an authentication device other than the initial value authenticates the device to be authenticated is to be generated by incrementing the nonce used for the previous authentication. A secure communication method. ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、現在の時刻を生成する時刻生成手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、時刻生成手段は、少なくとも認証機器の再起動時に、現在の時刻を生成するものであり、ナンス生成手段は、時刻生成手段で生成した時刻に基づいてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴とするセキュア通信方法。   A secure communication method in which an authentication device authenticates a device to be authenticated via a network. The authentication device and the device to be authenticated hold a key used for the authentication in advance, and the authentication device generates a current time. A time generation means for generating a nonce, a nonce generation means for generating a nonce, a nonce encryption / decryption means for performing at least one of encryption of the nonce using the key or decryption of the encrypted nonce, and nonce or encryption A nonce transmitting means for transmitting the nonce transmitted to the device to be authenticated, and the device to be authenticated is encrypted using the key of the nonce transmitted from the authentication device or the encrypted device transmitted from the authentication device. Received nonce encryption / decryption means for performing decryption using the nonce key and nonce encrypted by the received nonce encryption / decryption means or decrypted by the received nonce encryption / decryption means A nonce return means for transmitting a nonce to the authentication device, and the time generation means generates the current time at least when the authentication device is restarted. The nonce initial value is generated based on this, and the new nonce when the authentication device other than the initial value authenticates the device to be authenticated is generated by incrementing the nonce used in the previous authentication. There is provided a secure communication method. ネットワークを介して認証機器が被認証機器を認証するセキュア通信方法であって、認証機器及び被認証機器は、前記認証に用いられる鍵を予め保持しており、認証機器は、乱数を発生させる乱数発生手段と、現在の時刻を生成する時刻生成手段と、ナンスを生成するナンス生成手段と、前記鍵を用いたナンスの暗号化又は暗号化されたナンスの復号化の少なくとも一方を行うナンス暗号復号化手段と、ナンス又は暗号化されたナンスを被認証機器へ送信するナンス送信手段とを備え、被認証機器は、認証機器より送信されてきたナンスの前記鍵を用いた暗号化又は認証機器より送信されてきた前記暗号化されたナンスの前記鍵を用いた復号化を行う受信ナンス暗号復号化手段と、受信ナンス暗号復号化手段で暗号化されたナンス又は受信ナンス暗号復号化手段で復号化されたナンスを認証機器へ送信するナンス返信手段とを備え、乱数発生手段は、少なくとも認証機器の再起動時に、乱数を発生させるものであり、時刻生成手段は、少なくとも認証機器の再起動時に、現在の時刻を生成するものであり、ナンス生成手段は、ナンスの上位桁に時刻生成手段で生成した時刻を用い、ナンスの下位桁に乱数発生手段で発生した乱数を用いてナンスの初期値を生成するものであり、初期値以外の認証機器が被認証機器を認証する際の新たなナンスは、前回の認証に用いられたナンスをインクリメントして生成されるものであることを特徴とするセキュア通信方法。   A secure communication method in which an authentication device authenticates an authentication target device via a network, wherein the authentication device and the authentication target device hold a key used for the authentication in advance, and the authentication device generates a random number. Generating means, time generating means for generating a current time, nonce generating means for generating a nonce, and nonce encryption / decryption for performing at least one of encryption of a nonce using the key or decryption of an encrypted nonce And nonce transmitting means for transmitting the nonce or encrypted nonce to the device to be authenticated, and the device to be authenticated is an encryption or authentication device that uses the nonce key transmitted from the authentication device. A received nonce encryption / decryption means for performing decryption using the key of the encrypted nonce transmitted, and a nonce or reception node encrypted by the received nonce encryption / decryption means A nonce reply unit that transmits the nonce decrypted by the encryption / decryption unit to the authentication device, the random number generation unit generates a random number at least when the authentication device is restarted, and the time generation unit includes: At least when the authentication device is restarted, the current time is generated, and the nonce generation means uses the time generated by the time generation means as the upper digit of the nonce, and the random number generated by the random number generation means as the lower digit of the nonce Is used to generate an initial value of nonce, and a new nonce when an authentication device other than the initial value authenticates the device to be authenticated is generated by incrementing the nonce used for the previous authentication. A secure communication method, characterized by: 認証機器は、所定時間当たりの再起動頻度を検出するリブート頻度検出手段を備え、ナンス生成手段は、リブート頻度検出手段によって検出された所定時間当たりの再起動頻度に基づいて、生成するナンスの初期値の上位桁と下位桁の桁数比率を変更するものであることを特徴とする請求項3記載のセキュア通信方法。   The authentication device includes a reboot frequency detecting unit that detects a restart frequency per predetermined time, and the nonce generating unit generates an initial nonce generated based on the restart frequency per predetermined time detected by the reboot frequency detecting unit. 4. The secure communication method according to claim 3, wherein the ratio of the number of digits of the upper and lower digits of the value is changed.
JP2006328438A 2006-12-05 2006-12-05 Secure communication method Expired - Fee Related JP5028984B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006328438A JP5028984B2 (en) 2006-12-05 2006-12-05 Secure communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006328438A JP5028984B2 (en) 2006-12-05 2006-12-05 Secure communication method

Publications (2)

Publication Number Publication Date
JP2008141667A true JP2008141667A (en) 2008-06-19
JP5028984B2 JP5028984B2 (en) 2012-09-19

Family

ID=39602641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006328438A Expired - Fee Related JP5028984B2 (en) 2006-12-05 2006-12-05 Secure communication method

Country Status (1)

Country Link
JP (1) JP5028984B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953902A (en) * 2021-01-26 2021-06-11 湖南北斗微芯数据科技有限公司 Industrial Internet of things data encryption communication system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002244556A (en) * 2001-02-19 2002-08-30 Nippon Telegr & Teleph Corp <Ntt> Information providing device and method, information providing program and recording medium with the program recorded
JP2004304755A (en) * 2002-09-27 2004-10-28 Matsushita Electric Ind Co Ltd Group determination apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002244556A (en) * 2001-02-19 2002-08-30 Nippon Telegr & Teleph Corp <Ntt> Information providing device and method, information providing program and recording medium with the program recorded
JP2004304755A (en) * 2002-09-27 2004-10-28 Matsushita Electric Ind Co Ltd Group determination apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953902A (en) * 2021-01-26 2021-06-11 湖南北斗微芯数据科技有限公司 Industrial Internet of things data encryption communication system and method

Also Published As

Publication number Publication date
JP5028984B2 (en) 2012-09-19

Similar Documents

Publication Publication Date Title
US10482291B2 (en) Secure field-programmable gate array (FPGA) architecture
JP5815525B2 (en) Information processing apparatus, controller, key issuing authority, revocation list validity determination method, and key issuance method
US10565400B2 (en) Implementation of an integrity-protected secure storage
JP3999655B2 (en) Method and apparatus for access control with leveled security
CN1808966B (en) Safe data processing method and system
JP5175615B2 (en) Utilization device, server device, service utilization system, service utilization method, service utilization program, and integrated circuit
EP2361462B1 (en) Method for generating an encryption/decryption key
JP2007511810A (en) Proof of execution using random number functions
CN110381055B (en) RFID system privacy protection authentication protocol method in medical supply chain
CN102843232A (en) Generating secure device secret key
US20170099269A1 (en) Secure transmission system with upgraded encryption strength
JP2019514314A (en) Method, system and medium for using dynamic public key infrastructure to send and receive encrypted messages
US11853465B2 (en) Securing data stored in a memory of an IoT device during a low power mode
Feiri et al. Efficient and secure storage of private keys for pseudonymous vehicular communication
JP6888122B2 (en) Semiconductor device, update data provision method, update data reception method and program
US9860062B2 (en) Communication arrangement and method for generating a cryptographic key
JP6501701B2 (en) SYSTEM, TERMINAL DEVICE, CONTROL METHOD, AND PROGRAM
JP5028984B2 (en) Secure communication method
TWI761243B (en) Encryption system and encryption method for group instant massaging
US20050076217A1 (en) Integrating a device into a secure network
CN112350920A (en) Instant communication system based on block chain
JP2004038445A (en) Ic card and encryption method for the same
JP2010141639A (en) Communication system and communication method
JP2007318583A (en) Content reproducing apparatus
CN118300905A (en) Ciphertext transmission method, device, equipment and medium based on secret authentication mode

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111216

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120111

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: 20120529

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120611

R151 Written notification of patent or utility model registration

Ref document number: 5028984

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150706

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees