Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5602602B2 - Communication apparatus, control method, and program - Google Patents
[go: Go Back, main page]

JP5602602B2 - Communication apparatus, control method, and program - Google Patents

Communication apparatus, control method, and program Download PDF

Info

Publication number
JP5602602B2
JP5602602B2 JP2010267502A JP2010267502A JP5602602B2 JP 5602602 B2 JP5602602 B2 JP 5602602B2 JP 2010267502 A JP2010267502 A JP 2010267502A JP 2010267502 A JP2010267502 A JP 2010267502A JP 5602602 B2 JP5602602 B2 JP 5602602B2
Authority
JP
Japan
Prior art keywords
message
communication device
wsc
communication
key
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
JP2010267502A
Other languages
Japanese (ja)
Other versions
JP2012119917A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010267502A priority Critical patent/JP5602602B2/en
Publication of JP2012119917A publication Critical patent/JP2012119917A/en
Application granted granted Critical
Publication of JP5602602B2 publication Critical patent/JP5602602B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Description

本発明は、通信装置、制御方法及びプログラムに関する。   The present invention relates to a communication device, a control method, and a program.

IEEE802.11規格シリーズに準拠した無線LANにおいて無線通信を行うにあたっては、各通信装置の使用前に多数の設定項目を設定しておく必要がある。   When performing wireless communication in a wireless LAN compliant with the IEEE802.11 standard series, it is necessary to set many setting items before using each communication device.

具体的には、ネットワーク識別子としてのSSID(Service Set Identifier)や、暗号方式、暗号鍵、認証方式、認証鍵等、無線通信を行うために必要な各種通信パラメータが挙げられる。そして、従来、これらの設定項目はユーザが全て手入力で設定していたため、ユーザにとって非常に煩雑な作業となっていた。   Specifically, various communication parameters required for performing wireless communication, such as SSID (Service Set Identifier) as a network identifier, an encryption method, an encryption key, an authentication method, an authentication key, and the like can be given. Conventionally, these setting items are all manually set by the user, which is very complicated for the user.

これに対し、近年、各種通信パラメータを通信装置に簡単に設定できるようにするための業界標準の自動設定方法として、Wi−Fi Protected Setup(以下、WPS。非特許文献1参照)が規格化され、現在、通信装置への搭載が進められている。   On the other hand, in recent years, Wi-Fi Protected Setup (hereinafter referred to as WPS, see Non-Patent Document 1) has been standardized as an industry-standard automatic setting method that allows various communication parameters to be easily set in a communication device. Currently, it is being installed in communication devices.

図8は、WPSに開示されている、通信装置A(受信装置として機能する通信装置)と通信装置B(提供装置として機能する通信装置)との間におけるWPSによる通信パラメータの自動設定処理のシーケンスを簡潔に示したものである。図8に示すWSC−Start(F805)からWSC−Done(F814)までの各メッセージは、RFC3748 Extensible Authentication Protocolにより規定されたEAPプロトコルに基づいて送受信される。   FIG. 8 is a sequence of communication parameter automatic setting processing by WPS between communication apparatus A (communication apparatus functioning as a receiving apparatus) and communication apparatus B (communication apparatus functioning as a providing apparatus) disclosed in WPS. Is shown briefly. Each message from WSC-Start (F805) to WSC-Done (F814) shown in FIG. 8 is transmitted / received based on the EAP protocol defined by RFC3748 Extensible Authentication Protocol.

ここで、図8に示すWSC−M1(F806)、WSC−M2(F807)、及びWSC−M3(F808)の各メッセージのフォーマットの詳細を図9〜図11に示す。   Details of the format of each message of WSC-M1 (F806), WSC-M2 (F807), and WSC-M3 (F808) shown in FIG. 8 are shown in FIGS.

図9に示すとおり、WSC−M1メッセージ(F806)は、EAPヘッダのほか、WPSのバージョン情報(Version)901を要素として備える。更に、受信装置の乱数(Enrollee Nonce)902および受信装置の公開鍵(Public Key)903を要素として備える。   As shown in FIG. 9, the WSC-M1 message (F806) includes WPS version information (Version) 901 as an element in addition to the EAP header. Furthermore, a receiving device's random number 902 and a receiving device's public key 903 are provided as elements.

また、図10に示すとおり、WSC−M2メッセージ(F806)は、WPSのバージョン情報(Version)1001、受信装置の乱数(Enrollee Nonce)1003を要素として備える。更に、提供装置の乱数(Registrar Nonce)1004、提供装置の公開鍵(Public Key)1005、およびメッセージ認証コード(Authenticator)1006を要素として備える。   Also, as shown in FIG. 10, the WSC-M2 message (F806) includes WPS version information (Version) 1001 and a random number (Enrolle Nonce) 1003 of the receiving device as elements. Furthermore, a provision device random number 1004, a public key 1005 of the providing device, and a message authentication code 1006 are provided as elements.

なお、WSC−M2メッセージ(F807)が備える受信装置の乱数(Enrollee Nonce)1003は、WSC−M1メッセージ(F806)が備える受信装置の乱数(Enrollee Nonce)902と同一の値である必要がある。   It should be noted that the receiving device random number 1003 included in the WSC-M2 message (F807) needs to be the same value as the receiving device random number 902 included in the WSC-M1 message (F806).

また、メッセージ認証コード(Authenticator)1006は、1つ前に受信したメッセージ(ここではWSC−M1メッセージ)と今回送信するメッセージ(ここではWSC−M2メッセージ)とから算出されるハッシュ値である。当該ハッシュ値は受信装置として機能する通信装置Aで検算することが可能であり、当該ハッシュ値を用いることで送受信されたメッセージが改ざんされていないか、あるいは一部破壊されていないかといった情報を確認することができる。   A message authentication code (Authenticator) 1006 is a hash value calculated from the message received immediately before (here, the WSC-M1 message) and the message transmitted this time (here, the WSC-M2 message). The hash value can be verified by the communication device A functioning as a receiving device, and information such as whether the message transmitted / received by using the hash value has not been falsified or partially destroyed is used. Can be confirmed.

また、図11に示すとおり、WSC−M3メッセージ(F808)は、WPSのバージョン情報(Version)1101、提供装置の乱数(Registrar Nonce)1103を要素として備える。更に、メッセージ認証コード(Authenticator)1104を要素として備える。   As shown in FIG. 11, the WSC-M3 message (F808) includes WPS version information (Version) 1101 and a random number (Register Nonce) 1103 of the providing device as elements. Further, a message authentication code (Authenticator) 1104 is provided as an element.

なお、WSC−M3メッセージ(F808)が備える提供装置の乱数(Registrar Nonce)1103は、WSC−M2メッセージ(F807)が備える提供装置の乱数(Registrar Nonce)1004と同一の値である必要がある。また、メッセージ認証コード(Authenticator)1104は、1つ前に受信したメッセージ(ここではWSC−M2メッセージ)と今回送信するメッセージ(ここではWSC−M3メッセージ)とから算出されるハッシュ値である。   Note that the random number (Register Nonce) 1103 of the providing apparatus included in the WSC-M3 message (F808) needs to be the same value as the random number (Registrar Nonce) 1004 of the providing apparatus included in the WSC-M2 message (F807). A message authentication code (Authenticator) 1104 is a hash value calculated from the message received immediately before (here, WSC-M2 message) and the message transmitted this time (here, WSC-M3 message).

なお、図8に示すWSC−M8メッセージ(F813)では、通信装置A(提供装置)から通信装置B(受信装置)への通信パラメータの送信を行うが、この際、通信パラメータは、各通信装置の公開鍵と乱数とから算出された共通鍵を用いて暗号化されている。   In the WSC-M8 message (F813) shown in FIG. 8, communication parameters are transmitted from the communication apparatus A (providing apparatus) to the communication apparatus B (receiving apparatus). It is encrypted using a common key calculated from the public key and random number.

このように、WPSによる通信パラメータの自動設定処理においては、互いに、公開鍵暗号方式の公開鍵と各通信装置固有の乱数とを送信し、通信装置間における共通鍵の算出を行う。これにより、通信装置A(提供装置)から通信装置B(受信装置)へのと通信パラメータの送信にあたり、より安全な仕組みを提供することができる。   As described above, in the communication parameter automatic setting process by WPS, the public key of the public key cryptosystem and the random number specific to each communication device are transmitted to each other, and the common key between the communication devices is calculated. Thereby, a safer mechanism can be provided in transmitting communication parameters from the communication device A (providing device) to the communication device B (receiving device).

“Wi−Fi Protected Setup Specification”, Version 1.0h, December, 2006“Wi-Fi Protected Setup Specification”, Version 1.0h, December, 2006

しかしながら、共通鍵の算出処理は複雑であり演算時間がかかるが、コンパクトデジタルカメラをはじめとする各種組み込み機器のように、低性能のCPUが搭載される通信装置の場合、高い演算能力を期待することはできない。   However, the calculation process of the common key is complicated and takes a long calculation time. However, in the case of a communication device equipped with a low-performance CPU such as various embedded devices such as a compact digital camera, a high calculation capability is expected. It is not possible.

一方で、通信装置が共通鍵の算出処理を実行している間、対向する通信装置では、自装置が送信したメッセージに対する、通信装置からの応答の有無を判断する。このため、共通鍵の算出処理に時間がかかり所定時間内に応答がない場合には、タイムアウト処理を動作させることとなり、結果的に通信パラメータの自動設定処理が正常に終了しなくなってしまう。   On the other hand, while the communication device is executing the common key calculation process, the opposing communication device determines whether there is a response from the communication device to the message transmitted by the own device. For this reason, if the common key calculation process takes time and there is no response within a predetermined time, the timeout process is activated, and as a result, the communication parameter automatic setting process does not end normally.

図12は、このような状況を詳細に説明するための自動設定処理のシーケンス図である。なお、説明にあたり、通信装置B(提供装置)と通信装置A(受信装置)とは同一のネットワークに接続されているものとする。また、F1202からF1206までの処理では、上記WPSによる通信パラメータの自動設定処理の仕様にしたがって、メッセージのやりとりが行われているものとする。   FIG. 12 is a sequence diagram of automatic setting processing for explaining such a situation in detail. In the description, it is assumed that the communication device B (providing device) and the communication device A (receiving device) are connected to the same network. In the processes from F1202 to F1206, it is assumed that messages are exchanged in accordance with the specification of the communication parameter automatic setting process by the WPS.

図12において、WSC−M1メッセージ(F1206)は、先に述べたとおり通信装置A(受信装置)の公開鍵を備える。このため、WSC−M1メッセージ(F1206)を受信した通信装置B(提供装置)では、内部に保持している秘密鍵と当該受信した公開鍵とに基づいて、共通鍵の算出処理を実行する(F1207)。   In FIG. 12, the WSC-M1 message (F1206) includes the public key of the communication device A (receiving device) as described above. For this reason, the communication device B (providing device) that has received the WSC-M1 message (F1206) executes a common key calculation process based on the private key held inside and the received public key ( F1207).

このとき、通信装置B(提供装置)では、低性能ののCPUにより共通鍵の算出処理(F1207)を実行するため、処理の完了までには時間がかかる。このため、WSC−M1メッセージ(F1206)を送信した通信装置A(受信装置)では、対向する通信装置Bから後続のメッセージが送信されない状態が続くこととなり、タイムアウトを発生する(F1208)。   At this time, since the communication device B (providing device) executes the common key calculation processing (F1207) by the low-performance CPU, it takes time to complete the processing. For this reason, in the communication apparatus A (reception apparatus) that transmitted the WSC-M1 message (F1206), a state in which a subsequent message is not transmitted from the opposite communication apparatus B continues, and a timeout occurs (F1208).

タイムアウトが発生すると、通信装置A(受信装置)では、WSC−M1メッセージ(F1209)を再送する。このとき、再送されるWSC−M1メッセージ(F1209)と、先に送信されたWSC−M1メッセージ(F1206)とでは、受信装置の乱数(Enrollee Nonce)が異なっている。   When timeout occurs, the communication device A (reception device) retransmits the WSC-M1 message (F1209). At this time, the retransmitted WSC-M1 message (F1209) is different from the previously transmitted WSC-M1 message (F1206) in the random number (Enrolle Nonce) of the receiving device.

一方、通信装置B(提供装置)では、共通鍵の算出処理(F1207)が終了したことを契機としてWSC−M2メッセージ(F1210)を送信する。これに伴って、通信装置A(受信装置)では、WSC−M2メッセージ(F1210)を受信する。このとき、当該WSC−M2メッセージ(F1210)は、再送されたWSC−M1メッセージ(F1209)ではなく、先に送信されたWSC−M1メッセージ(F1206)に基づいて構築されたメッセージとなっている。   On the other hand, the communication device B (providing device) transmits a WSC-M2 message (F1210) when the common key calculation process (F1207) ends. Along with this, the communication device A (reception device) receives the WSC-M2 message (F1210). At this time, the WSC-M2 message (F1210) is not a retransmitted WSC-M1 message (F1209) but a message constructed based on the previously transmitted WSC-M1 message (F1206).

このため、通信装置A(受信装置)では、受信すべきメッセージと異なることを理由に、当該WSC−M2メッセージ(F1210)を無視し、WSC−M1メッセージ(F1211)を再送することとなる。WSC−M1メッセージ(F1211)を受信した通信装置B(提供装置)では、当該WSC−M1メッセージ(F1211)に基づいて、再び共通鍵の算出処理を実施する(F1212)。   For this reason, the communication device A (reception device) ignores the WSC-M2 message (F1210) and retransmits the WSC-M1 message (F1211) because it is different from the message to be received. The communication device B (providing device) that has received the WSC-M1 message (F1211) performs the common key calculation process again based on the WSC-M1 message (F1211) (F1212).

このとき、通信装置B(提供装置)において実行される共通鍵の算出処理(F1212)は、先の共通鍵の算出処理(F1207)と同様、処理が完了するまでに時間がかかる。このため、通信装置A(受信装置)では、再びタイムアウトを発生し(F1213)、WSC−M1メッセージ(F1213)を再々送することとなる。   At this time, the common key calculation process (F1212) executed in the communication apparatus B (providing apparatus) takes time until the process is completed, similar to the previous common key calculation process (F1207). For this reason, the communication device A (reception device) again generates a timeout (F1213) and retransmits the WSC-M1 message (F1213).

このように、共通鍵の算出処理に多くの処理時間を要する通信装置の場合、WPSによる通信パラメータの自動設定処理が正常に終了しないという問題がある。   Thus, in the case of a communication apparatus that requires a long processing time for the common key calculation process, there is a problem that the communication parameter automatic setting process by WPS does not end normally.

本発明は、上記課題に鑑みてなされたものであり、共通鍵の算出に時間がかかってしまっても、通信パラメータの自動設定処理を正常に完了させることができるようにすることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to allow communication parameter automatic setting processing to be completed normally even if it takes time to calculate a common key. .

上記の目的を達成するために、本発明に係る通信装置は、例えば、以下のような構成を備える。即ち、
通信装置であって、
他の通信装置から公開鍵と乱数とが含まれるメッセージを受信する受信手段と、
前記受信手段において受信されたメッセージに含まれる前記公開鍵と、前記通信装置が予め保持する秘密鍵とを用いて、共通鍵を算出する算出手段と、
前記算出手段による前記共通鍵の算出の開始から完了までの間に、前記受信手段において前記他の通信装置から前記メッセージを複数回受信し、該複数回のメッセージそれぞれに含まれる前記公開鍵が同一である場合に、前記受信手段において最後に受信されたメッセージに含まれる乱数を含むメッセージを前記他の通信装置に送信する送信手段とを有することを特徴とする。
In order to achieve the above object, a communication apparatus according to the present invention has the following configuration, for example. That is,
A communication device,
Receiving means for receiving a message including a public key and a random number from another communication device;
Calculating means for calculating a common key using the public key included in the message received by the receiving means and a secret key held in advance by the communication device;
Between the start and completion of the calculation of the common key by the calculation means, the reception means receives the message from the other communication device a plurality of times, and the public key included in each of the plurality of messages is the same In this case, the receiving unit includes a transmitting unit that transmits a message including a random number included in the message received last to the other communication device.

本発明によれば、共通鍵の算出に時間がかかってしまっても、通信パラメータの自動設定処理を正常に完了させることが可能となる。   According to the present invention, even if it takes time to calculate a common key, it is possible to normally complete communication parameter automatic setting processing.

本発明の一実施形態に係る通信装置によって形成されるネットワークの一例を示す図である。It is a figure which shows an example of the network formed by the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置の機能構成を示す図である。It is a figure which shows the function structure of the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置による通信パラメータの自動設定処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the communication parameter automatic setting process by the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置における通信パラメータの自動設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the communication parameter automatic setting process in the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置における通信パラメータの自動設定処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the communication parameter automatic setting process in the communication apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る通信装置における通信パラメータの自動設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the communication parameter automatic setting process in the communication apparatus which concerns on one Embodiment of this invention. 非特許文献2に開示されているWPSによる通信パラメータの自動設定処理の流れを示すシーケンス図である。FIG. 10 is a sequence diagram showing a flow of communication parameter automatic setting processing by WPS disclosed in Non-Patent Document 2. 非特許文献2に開示されているWSC−M1のメッセージフォーマットを示す図である。It is a figure which shows the message format of WSC-M1 currently disclosed by the nonpatent literature 2. FIG. 非特許文献2に開示されているWSC−M2のメッセージフォーマットを示す図である。It is a figure which shows the message format of WSC-M2 currently disclosed by the nonpatent literature 2. FIG. 非特許文献2に開示されているWSC−M3のメッセージフォーマットを示す図である。It is a figure which shows the message format of WSC-M3 currently disclosed by the nonpatent literature 2. FIG. 低性能CPUが搭載された通信装置におけるWPSによる通信パラメータの自動設定処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the communication parameter automatic setting process by WPS in the communication apparatus carrying low-performance CPU.

以下、本発明の各実施形態の通信装置について、図面を参照しながら詳細に説明する。なお、以下では、IEEE802.11シリーズに準拠した無線LANに適用された場合について説明するが、本発明の適用先は、必ずしもIEEE802.11準拠した無線LANには限定されるものではない。   Hereinafter, communication devices according to embodiments of the present invention will be described in detail with reference to the drawings. In the following description, the case where the present invention is applied to a wireless LAN compliant with the IEEE 802.11 series will be described. However, the application destination of the present invention is not necessarily limited to the wireless LAN compliant with IEEE 802.11.

[第1の実施形態]
<1.ネットワーク構成>
はじめに、本発明の一実施形態に係る通信装置が形成するネットワークについて説明する。図1は、本発明の一実施形態に係る通信装置Bと、該通信装置Bに対向する通信装置Aとによって形成されるネットワークAを示す図である。
[First Embodiment]
<1. Network configuration>
First, a network formed by a communication apparatus according to an embodiment of the present invention will be described. FIG. 1 is a diagram illustrating a network A formed by a communication device B according to an embodiment of the present invention and a communication device A facing the communication device B.

図1に示すように、ネットワークAでは、通信装置Aが受信装置101として機能し、通信装置Bが提供装置102として機能する。なお、ネットワークAはインフラストラクチャネットワークであってもよいし、アドホックネットワークであってもよい。   As illustrated in FIG. 1, in the network A, the communication device A functions as the reception device 101, and the communication device B functions as the providing device 102. Note that the network A may be an infrastructure network or an ad hoc network.

<2.通信装置のハードウェア構成>
次に、ネットワークAを形成する通信装置A及び通信装置Bのハードウェア構成について説明する。なお、本実施形態において、通信装置Aと通信装置Bとは、ハードウェア構成が同じであるため、ここでは図2を用いて通信装置Bのハードウェア構成についてのみ説明する。
<2. Hardware configuration of communication device>
Next, the hardware configuration of the communication device A and the communication device B that form the network A will be described. In the present embodiment, the communication device A and the communication device B have the same hardware configuration, and therefore only the hardware configuration of the communication device B will be described here with reference to FIG.

図2において、201は、記憶部202に記憶される制御プログラムを実行することにより通信装置全体を制御する制御部である。制御部201は、他の通信装置(通信装置A)との間で通信パラメータの自動設定処理を実行する。   In FIG. 2, reference numeral 201 denotes a control unit that controls the entire communication apparatus by executing a control program stored in the storage unit 202. The control unit 201 executes communication parameter automatic setting processing with another communication device (communication device A).

202は制御部201が実行する制御プログラムと、通信パラメータ等の各種情報を記憶する記憶部である。後述する通信パラメータの自動設定処理は、記憶部202に記憶された制御プログラムが読み出され制御部201にて実行されることにより実現される。   A storage unit 202 stores a control program executed by the control unit 201 and various types of information such as communication parameters. The communication parameter automatic setting process, which will be described later, is realized by reading out a control program stored in the storage unit 202 and executing it in the control unit 201.

203はIEEE802.11シリーズに準拠した無線LANにおいて無線通信を行うための無線部である。204は各種表示を行う表示部であり、LCDやLEDのように視覚で認知可能な情報の出力、あるいはスピーカなどの音出力が可能となっている。つまり、表示部204は視覚情報および音情報の少なくともどちらか一方を出力する機能を備える。   Reference numeral 203 denotes a wireless unit for performing wireless communication in a wireless LAN compliant with the IEEE 802.11 series. A display unit 204 performs various displays, and can output visually recognizable information such as an LCD or LED, or can output sound such as a speaker. That is, the display unit 204 has a function of outputting at least one of visual information and sound information.

205は通信パラメータの自動設定処理を開始するトリガを与える設定ボタンである。設定ボタン205が操作されると、通信パラメータの自動設定処理が開始される。制御部201では、ユーザによる設定ボタン205の操作を検出すると、後述する自動設定処理を実施する。   Reference numeral 205 denotes a setting button for giving a trigger for starting communication parameter automatic setting processing. When the setting button 205 is operated, communication parameter automatic setting processing is started. When the control unit 201 detects an operation of the setting button 205 by the user, the control unit 201 performs an automatic setting process described later.

206はアンテナ制御部、207はアンテナである。また、208は、ユーザが各種入力を行うための入力部である。   Reference numeral 206 denotes an antenna control unit, and 207 denotes an antenna. Reference numeral 208 denotes an input unit for the user to make various inputs.

<3.通信装置の機能構成>
次に、ネットワークAを形成する通信装置A及び通信装置Bの制御部201において実現される、通信パラメータの自動設定機能について図3を用いて説明する。なお、本実施形態では、通信装置Aの制御部201と通信装置Bの制御部201とは、それぞれが通信パラメータの自動設定機能として、共通の自動設定機能を有しているものとする。
<3. Functional configuration of communication device>
Next, a communication parameter automatic setting function realized in the control unit 201 of the communication device A and the communication device B forming the network A will be described with reference to FIG. In the present embodiment, it is assumed that the control unit 201 of the communication device A and the control unit 201 of the communication device B each have a common automatic setting function as a communication parameter automatic setting function.

図3において、301は自動設定制御部であり、設定ボタン205の制御や、入力部208および表示部204の制御など通信パラメータの自動設定処理についての全体的な制御を行う。   In FIG. 3, reference numeral 301 denotes an automatic setting control unit that performs overall control of communication parameter automatic setting processing such as control of the setting button 205 and control of the input unit 208 and the display unit 204.

302はパケット受信部であり、無線部203を通じて受信したパケットの解析処理等を実行する。303はパケット送信部であり、通信パラメータの自動設定処理において必要なパケットの組み立て及び対向する通信装置へのパケットの送信などを行う。   Reference numeral 302 denotes a packet receiving unit that executes processing for analyzing packets received through the wireless unit 203. A packet transmission unit 303 assembles packets necessary for communication parameter automatic setting processing and transmits packets to the opposite communication device.

304は暗号鍵計算部であり、公開鍵暗号方式による共通鍵の算出処理を実行する。305はハッシュ計算部であり、メッセージ認証コード(Autheticator)の算出処理を実行する。   An encryption key calculation unit 304 executes a common key calculation process using a public key encryption method. Reference numeral 305 denotes a hash calculator, which executes a process for calculating a message authentication code (Authenticator).

306は通信パラメータ受信部であり、通信装置が受信装置として機能する場合には、対向する通信装置(提供装置として機能する通信装置)から通信パラメータを受信し、受信した通信パラメータの正当性の確認等を行う。   Reference numeral 306 denotes a communication parameter reception unit. When the communication device functions as a reception device, the communication parameter is received from the opposite communication device (communication device functioning as a providing device), and the validity of the received communication parameter is confirmed. Etc.

307は通信パラメータ提供部であり、通信装置が提供装置として機能する場合には、対向する通信装置(受信装置として機能する通信装置)への通信パラメータの送信を行う。   Reference numeral 307 denotes a communication parameter providing unit. When the communication device functions as a providing device, the communication parameter is transmitted to the opposite communication device (communication device functioning as a receiving device).

308は通信パラメータ記憶部であり、通信装置が提供装置として機能する場合には、当該通信パラメータ記憶部308から通信パラメータが取り出され、対向する通信装置(受信装置)へと送信される。一方、通信装置が受信装置として機能する場合には、通信パラメータ受信部306で受信した通信パラメータが格納される。   Reference numeral 308 denotes a communication parameter storage unit. When the communication device functions as a providing device, the communication parameter is extracted from the communication parameter storage unit 308 and transmitted to the opposite communication device (receiving device). On the other hand, when the communication device functions as a receiving device, the communication parameter received by the communication parameter receiving unit 306 is stored.

なお、全ての機能ブロックはソフトウェアもしくはハードウェア的に相互関係を有するものとする。また、上記機能ブロックは一例であり、複数の機能ブロックを1つの機能ブロックで構成するようにしてもよいし、何れかの機能ブロックを更に複数の機能ブロックに分けて構成するようにしてもよい。   Note that all functional blocks have a mutual relationship in terms of software or hardware. Further, the above functional block is an example, and a plurality of functional blocks may be configured by one functional block, or any one functional block may be further divided into a plurality of functional blocks. .

<4.通信装置A及び通信装置Bによる通信パラメータの自動設定処理>
次に、通信装置A及び通信装置Bによる通信パラメータの自動設定処理の流れについて、図4に示すシーケンス図を用いて説明する。図4に示すように、受信装置として機能する通信装置Aは、提供装置として機能する通信装置Bとの間で接続処理(F401)を実行する。これにより、通信装置Aと通信装置Bとは、同一のネットワークAに接続される。
<4. Communication Parameter Automatic Setting Processing by Communication Device A and Communication Device B>
Next, the flow of communication parameter automatic setting processing by the communication device A and the communication device B will be described with reference to the sequence diagram shown in FIG. As illustrated in FIG. 4, the communication device A that functions as a receiving device executes connection processing (F401) with the communication device B that functions as a providing device. Thereby, the communication device A and the communication device B are connected to the same network A.

なお、その後の処理のうち、処理(F402)〜処理(F406)は、WPSによる通信パラメータの自動設定処理の仕様に従った、一般的なパケットの送受信処理であるため、ここでは詳細な説明を省略する。   Of the subsequent processes, the processes (F402) to (F406) are general packet transmission / reception processes in accordance with the specification of the communication parameter automatic setting process by WPS. Omitted.

WSC−M1メッセージ(F406)には、上述したように、受信装置として機能する通信装置Aの公開鍵(Public Key)が含まれている。そして、WSC−M1メッセージ(F406)を受信した通信装置Bでは、内部に保持している秘密鍵と、受信したWSC−M1メッセージ(F406)に含まれる公開鍵とに基づいて、共通鍵を算出する共通鍵算出処理を実行する。   As described above, the WSC-M1 message (F406) includes the public key of the communication apparatus A functioning as a receiving apparatus. Then, the communication device B that has received the WSC-M1 message (F406) calculates a common key based on the private key held inside and the public key included in the received WSC-M1 message (F406). The common key calculation process is executed.

共通鍵算出処理(F407)は、低性能のCPUが搭載された通信装置Bにおいては、処理の完了までに時間がかかる。そのため、WSC−M1メッセージ(F406)を送信した通信装置Aでは、通信装置Bから後続のメッセージが送信されない状態が続くこととなり、タイムアウトを発生する。   The common key calculation process (F407) takes time to complete in the communication apparatus B in which the low-performance CPU is mounted. Therefore, in the communication device A that has transmitted the WSC-M1 message (F406), a state in which a subsequent message is not transmitted from the communication device B continues, and a timeout occurs.

そして、タイムアウトが発生すると、通信装置AではWSC−M1メッセージ(F408)を再送する。このとき、送信されるWSC−M1メッセージ(F408)は、先に送信したWSC−M1メッセージ(F406)とは、受信装置の乱数(Enrollee Nonce)が異なっている。   When a timeout occurs, the communication device A retransmits the WSC-M1 message (F408). At this time, the WSC-M1 message (F408) to be transmitted is different from the previously transmitted WSC-M1 message (F406) in the random number (Enrolle Nonce) of the receiving device.

一方、通信装置Bでは、共通鍵算出処理(F407)が終了したことを契機として、WSC−M2メッセージを構築する。このとき、通信装置Bでは、共通鍵算出処理(F407)の実行中に、新たなWSC−M1メッセージ(F408)を受信している。   On the other hand, the communication apparatus B constructs a WSC-M2 message when the common key calculation process (F407) is completed. At this time, the communication apparatus B receives a new WSC-M1 message (F408) while the common key calculation process (F407) is being executed.

そこで、通信装置Bでは、構築済みのWSC−M2メッセージに対して、受信装置の乱数(Enrollee Nonce)及びメッセージ認証コード(Authenticator)を差し替え、WSC−M2メッセージの再構築を行う。なお、それ以外の要素は既に構築済みのメッセージフォーマットのままにしておく。   Therefore, the communication apparatus B replaces the random number (Enrolle Nonce) and message authentication code (Authenticator) of the receiving apparatus with respect to the constructed WSC-M2 message, and reconstructs the WSC-M2 message. The other elements are left in the already constructed message format.

通信装置Bでは、WSC−M2メッセージを再構築した後に、通信装置Aへ当該WSC−M2メッセージを送信する(F409)。このとき送信されるWSC−M2メッセージ(F409)の受信装置の乱数(Enrollee Nonce)及びメッセージ認証コード(Authenticator)には、最新のWSC−M1メッセージ(F408)に対応した値が格納されている。このため、通信装置Aでは、その後の処理を正常に実行することができる。   The communication device B reconstructs the WSC-M2 message and then transmits the WSC-M2 message to the communication device A (F409). A value corresponding to the latest WSC-M1 message (F408) is stored in the random number (Enrolle Nonce) and message authentication code (Authenticator) of the WSC-M2 message (F409) transmitted at this time. For this reason, in the communication apparatus A, subsequent processing can be normally executed.

この結果、処理(F410〜F417)が上記WPSによる通信パラメータの自動設定処理の仕様に沿って実行され、通信パラメータの自動設定処理が正常に完了することとなる。   As a result, the processing (F410 to F417) is executed in accordance with the specification of the communication parameter automatic setting processing by the WPS, and the communication parameter automatic setting processing is normally completed.

<5.通信装置Bにおける通信パラメータの自動設定処理の流れ>
次に、通信装置Bにおける通信パラメータの自動設定処理について説明する。図5は、通信装置Bにおける通信パラメータの自動設定処理の流れを示すフローチャートである。なお、ここでは、説明の簡略化のため、WSC−M1メッセージ(F406)の受信からWSC−M2メッセージ(F409)の送信までの処理の流れについて説明する。
<5. Flow of communication parameter automatic setting process in communication apparatus B>
Next, communication parameter automatic setting processing in the communication apparatus B will be described. FIG. 5 is a flowchart showing a flow of communication parameter automatic setting processing in the communication apparatus B. Here, for simplification of description, the flow of processing from reception of the WSC-M1 message (F406) to transmission of the WSC-M2 message (F409) will be described.

ステップS501において、通信装置Bは通信装置AからWSC−M1メッセージ(F406)を受信する。ステップS502では、ステップS501において受信したWSC−M1メッセージ(F406)を解析する。   In step S501, the communication apparatus B receives the WSC-M1 message (F406) from the communication apparatus A. In step S502, the WSC-M1 message (F406) received in step S501 is analyzed.

ステップS503では、ステップS502における解析の結果、WSC−M1メッセージ(F406)に含まれる受信装置の公開鍵(Public Key)と、通信装置Bが内部で保持している秘密鍵とを用いて、共通鍵(DH−Key)を計算する。この共通鍵(DH−Key)は、WPS仕様書に定義されているとおり、通信パラメータを送信する際の暗号処理および、メッセージ認証コードの算出処理に用いる鍵の基となる情報である。   In step S503, as a result of the analysis in step S502, the public key (Public Key) of the receiving device included in the WSC-M1 message (F406) and the secret key held internally by the communication device B are used. The key (DH-Key) is calculated. The common key (DH-Key) is information serving as a basis of a key used for encryption processing when transmitting communication parameters and calculation processing of a message authentication code, as defined in the WPS specification.

なお、上述したとおり、低性能のCPUが搭載された通信装置Bでは、共通鍵(DH−Key)の算出処理の完了までには時間がかかる。   As described above, in the communication apparatus B equipped with a low-performance CPU, it takes time to complete the calculation process of the common key (DH-Key).

ステップS503における共通鍵(DH−key)の算出処理が終了すると、通信装置Bでは、ステップS504においてWSC−M2メッセージを構築する。なお、WSC−M2メッセージのフォーマットは図10を用いて説明したとおりである。   When the calculation process of the common key (DH-key) in step S503 ends, the communication apparatus B constructs a WSC-M2 message in step S504. The format of the WSC-M2 message is as described with reference to FIG.

ステップS504においてWSC−M2メッセージを構築した後は、ステップS505において、新たなWSC−M1メッセージ(F408)を受信しているか否かを確認する。   After constructing the WSC-M2 message in step S504, it is confirmed in step S505 whether a new WSC-M1 message (F408) has been received.

ステップS505において受信していないことが確認された場合には、ステップS510に進み、ステップS504において構築したWSC−M2メッセージ(最初に構築したWSC−M2メッセージ)を通信装置Aに送信する。   If it is confirmed in step S505 that the message has not been received, the process proceeds to step S510, and the WSC-M2 message constructed in step S504 (the first constructed WSC-M2 message) is transmitted to the communication apparatus A.

一方、ステップS505において、新たなWSC−M1メッセージ(F408)を受信したことが確認された場合には、ステップS506に進む。   On the other hand, if it is confirmed in step S505 that a new WSC-M1 message (F408) has been received, the process proceeds to step S506.

ステップS506では、ステップS505において受信したことが確認された新たなWSC−M1メッセージ(F408)を解析する。ステップS507では、ステップS506における解析の結果、先に受信したWSC−M1メッセージ(F406)と新たに受信したWSC−M1メッセージ(F408)との間に差異があるか否かを判断する。   In step S506, the new WSC-M1 message (F408) confirmed to be received in step S505 is analyzed. In step S507, as a result of the analysis in step S506, it is determined whether there is a difference between the previously received WSC-M1 message (F406) and the newly received WSC-M1 message (F408).

具体的には、先に受信したWSC−M1メッセージ(F406)が備える受信装置の乱数(Enrollee Nonce)について、新たに受信したWSC−M1メッセージ(F408)との間で差異があるか否かを判定する。   Specifically, whether or not there is a difference between the newly received WSC-M1 message (F408) and the random number (Enrolle Nonce) of the receiving device included in the previously received WSC-M1 message (F406). judge.

ステップS507において、受信装置の乱数(Enrollee Nonce)について差異がないと判定された場合には、ステップS510に進む。ステップS510では、ステップS504において構築したWSC−M2メッセージ(最初に構築したWSC−M2メッセージ)を通信装置Aに送信する。   If it is determined in step S507 that there is no difference in the random number (Enrolle Nonce) of the receiving apparatus, the process proceeds to step S510. In step S510, the WSC-M2 message constructed in step S504 (the first constructed WSC-M2 message) is transmitted to communication apparatus A.

一方、ステップS507において、受信装置の乱数(Enrollee Nonce)について差異があったと判定された場合には、ステップS508に進む。   On the other hand, if it is determined in step S507 that there is a difference with respect to the random number of the receiving device (Enrolle Nonce), the process proceeds to step S508.

ステップS508では、先に受信したWSC−M1メッセージ(F406)が備える公開鍵(Public Key)について、新たに受信したWSC−M1メッセージ(F408)との間で差異があるか否かを判定する。   In step S508, it is determined whether the public key (Public Key) included in the previously received WSC-M1 message (F406) is different from the newly received WSC-M1 message (F408).

ステップS508において、公開鍵(Public Key)について差異があると判定された場合には、ステップS503に戻り、共通鍵(DH−Key)の再計算を行う。   If it is determined in step S508 that there is a difference with respect to the public key (public key), the process returns to step S503 to recalculate the common key (DH-Key).

一方、ステップS508において、公開鍵(Public Key)について差異がない(同一である)と判定された場合には、ステップS509に進む。ステップS509では、ステップS503において計算した共通鍵(DH−Key)を、そのまま使用してWSC−M2メッセージを再構築する。つまり、受信装置の乱数(Enrollee Nonce)とメッセージ認証コード(Authenticator)のみを再計算してWSC−M2メッセージを再構築する。   On the other hand, if it is determined in step S508 that there is no difference (the same) with respect to the public key (public key), the process proceeds to step S509. In step S509, the common key (DH-Key) calculated in step S503 is used as it is to reconstruct the WSC-M2 message. That is, only the random number (Enrolle Nonce) and the message authentication code (Authenticator) of the receiving device are recalculated to reconstruct the WSC-M2 message.

具体的には、受信装置の乱数(Enrollee Nonce)を、ステップS504で設定した値から、ステップS506において取得された乱数(つまり、複数回受信したメッセージのうち、最後のメッセージに含まれる乱数)に置き換える。なお、メッセージ認証コード(Authenticator)はハッシュ計算のみであるため、通信装置BのCPUの演算能力が低い場合であっても、通信装置Aの動作には影響しない。   Specifically, the random number of the receiving device (Enrolle Nonce) is changed from the value set in step S504 to the random number acquired in step S506 (that is, the random number included in the last message among the messages received a plurality of times). replace. Note that since the message authentication code (Authenticator) is only hash calculation, the operation of the communication apparatus A is not affected even when the CPU of the communication apparatus B has a low calculation capability.

ステップS509においてWSC−M2メッセージが再構築されると、ステップS510では、再構築したWSC−M2メッセージ(F409)を通信装置Aに対して送信する。その後は、図4を用いて説明したシーケンス図に従って自動設定処理が正常に実行される。   When the WSC-M2 message is reconstructed in step S509, the reconstructed WSC-M2 message (F409) is transmitted to the communication apparatus A in step S510. Thereafter, the automatic setting process is normally executed according to the sequence diagram described with reference to FIG.

以上の説明から明らかなように、本実施形態にかかる通信装置(提供装置)では、共通鍵算出処理の実施中に同一のメッセージが再送された場合に、必要な部分のみを差し替えたうえで、メッセージを再構築し送信する構成とした。   As is clear from the above description, in the communication device (providing device) according to the present embodiment, when the same message is retransmitted during the execution of the common key calculation process, only the necessary part is replaced, The message is reconstructed and sent.

この結果、提供装置として機能する通信装置BのCPUの演算能力が低く、公開鍵暗号方式による共通鍵の算出処理に時間がかかる場合であっても、通信パラメータの自動設定処理を正常に完了させることが可能となった。   As a result, the communication parameter automatic setting process is normally completed even when the CPU of the communication apparatus B functioning as the providing apparatus has a low calculation capability and the common key calculation process using the public key cryptography takes time. It became possible.

[第2の実施形態]
上記第1の実施形態においては、提供装置である通信装置Bにおいて共通鍵の算出処理を実行する場合について説明した。しかしながら、本発明はこれに限定されない。例えば、上記第1の実施形態とは逆に、受信装置である通信装置AのCPUの演算能力が低い場合であって、受信装置である通信装置Aにおいて共通鍵の算出処理が行われる場合についても同様である。
[Second Embodiment]
In the first embodiment, the case has been described in which the common key calculation process is executed in the communication apparatus B as the providing apparatus. However, the present invention is not limited to this. For example, contrary to the first embodiment, when the CPU of the communication device A that is the receiving device has a low calculation capability and the communication device A that is the receiving device performs the common key calculation process. Is the same.

そこで、本実施形態では、CPUの演算能力の低い通信装置Aにおいて共通鍵の算出処理を実行する場合について説明する。なお、ネットワークAの構成、通信装置のハードウェア構成、及び通信装置の機能構成については、図1〜図3を用いて既に説明済みであるため、ここでは説明を省略する。   Therefore, in the present embodiment, a case will be described in which a common key calculation process is executed in the communication apparatus A having a low CPU computing power. The configuration of the network A, the hardware configuration of the communication device, and the functional configuration of the communication device have already been described with reference to FIGS.

<1.通信装置A及び通信装置Bによる通信パラメータの自動設定処理>
はじめに、本実施形態に係る通信装置A(受信装置として機能する通信装置)と該通信装置Aに対向する通信装置B(提供装置として機能する通信装置)とによる通信パラメータの自動設定処理の流れについて図6に示すシーケンス図を用いて説明する。
<1. Communication Parameter Automatic Setting Processing by Communication Device A and Communication Device B>
First, a communication parameter automatic setting process performed by the communication apparatus A (communication apparatus functioning as a receiving apparatus) and a communication apparatus B (communication apparatus functioning as a providing apparatus) facing the communication apparatus A according to the present embodiment. This will be described with reference to the sequence diagram shown in FIG.

図6に示すように、受信装置として機能する通信装置Aは、提供装置として機能する通信装置Bとの間で接続処理(F601)を実行する。これにより、通信装置Aと通信装置Bとは、同一のネットワークAに接続される。   As illustrated in FIG. 6, the communication device A that functions as a receiving device executes connection processing (F601) with the communication device B that functions as a providing device. Thereby, the communication device A and the communication device B are connected to the same network A.

なお、接続された後の処理のうち、処理(F602)〜処理(F607)は、WPSによる通信パラメータの自動設定処理の仕様に従った、一般的なパケットの送受信処理であるため、ここでは詳細な説明を省略する。   Of the processes after being connected, the processes (F602) to (F607) are general packet transmission / reception processes in accordance with the specification of the communication parameter automatic setting process by WPS. The detailed explanation is omitted.

WSC−M2メッセージ(F607)には、上述したように、提供装置として機能する通信装置Bの公開鍵(Public Key)が含まれている。そして、WSC−M2メッセージ(F607)を受信した通信装置Aでは、内部に保持している秘密鍵と、受信したWSC−M2メッセージ(F607)に含まれる公開鍵とに基づいて、共通鍵の算出処理を実行する(F608)。   As described above, the WSC-M2 message (F607) includes the public key of the communication apparatus B that functions as the providing apparatus. Then, in the communication apparatus A that has received the WSC-M2 message (F607), the common key is calculated based on the secret key held therein and the public key included in the received WSC-M2 message (F607). The process is executed (F608).

共通鍵算出処理(F608)は、低性能のCPUが搭載された通信装置Aでは、上記第1の実施形態の通信装置B(提供装置)と同様、処理の完了までに時間がかかる。そのため、WSC−M2メッセージ(F607)を送信した通信装置Bでは、通信装置Aから後続のメッセージが送信されない状態が続くこととなり、タイムアウトを発生する。   The common key calculation process (F608) takes a long time to complete in the communication apparatus A in which a low-performance CPU is mounted, as in the communication apparatus B (providing apparatus) in the first embodiment. Therefore, in the communication device B that has transmitted the WSC-M2 message (F607), a state in which a subsequent message is not transmitted from the communication device A continues, and a timeout occurs.

そして、タイムアウトが発生すると、通信装置BではWSC−M2メッセージ(F609)を再送する。このとき、送信されるWSC−M2メッセージ(F609)は、先に送信したWSC−M2メッセージ(F607)とは、提供装置の乱数(Registrar Nonce)が異なっている。   When a timeout occurs, the communication apparatus B retransmits the WSC-M2 message (F609). At this time, the transmitted WSC-M2 message (F609) differs from the previously transmitted WSC-M2 message (F607) in the random number (Registrar Nonce) of the providing device.

一方、通信装置Aでは、共通鍵算出処理(F608)が終了したことを契機として、WSC−M3メッセージを構築する。このとき、通信装置Aでは、共通鍵算出処理(F608)の実行中に、新たなWSC−M2メッセージ(F609)を受信している。   On the other hand, the communication apparatus A constructs a WSC-M3 message when the common key calculation process (F608) ends. At this time, the communication device A receives a new WSC-M2 message (F609) while the common key calculation process (F608) is being executed.

そこで、通信装置Aでは、構築済みのWSC−M3メッセージに対して、提供装置の乱数(Registrar Nonce)及びメッセージ認証コード(Authenticator)を差し替え、WSC−M3メッセージの再構築を行う。なお、それ以外の要素は既に構築済みのメッセージフォーマットのままにしておく。   Therefore, the communication apparatus A replaces the random number (Registrar Nonce) and the message authentication code (Authenticator) of the providing apparatus with respect to the constructed WSC-M3 message, and reconstructs the WSC-M3 message. The other elements are left in the already constructed message format.

通信装置Aでは、WSC−M3メッセージを再構築した後に、通信装置Bへ当該WSC−M3メッセージを送信する(F610)。このとき送信されるWSC−M3(F610)及びメッセージ認証コード(Authenticator)には、最新のWSC−M2メッセージ(F609)に対応した値が格納されている。このため、通信装置Bでは、その後の処理を正常に実行することができる。   The communication apparatus A transmits the WSC-M3 message to the communication apparatus B after reconstructing the WSC-M3 message (F610). In the WSC-M3 (F610) and the message authentication code (Authenticator) transmitted at this time, values corresponding to the latest WSC-M2 message (F609) are stored. For this reason, in the communication apparatus B, the subsequent processing can be normally executed.

この結果、処理(F611〜F617)が上記WPSによる通信パラメータの自動設定処理の仕様に沿って実行され、通信パラメータの自動設定処理が正常に完了することとなる。   As a result, the processing (F611 to F617) is executed in accordance with the specification of the communication parameter automatic setting processing by the WPS, and the communication parameter automatic setting processing is normally completed.

<2.通信装置Aにおける通信パラメータの自動設定処理の流れ>
次に、通信装置Aにおける通信パラメータの自動設定処理について説明する。図7は、通信装置Aにおける通信パラメータの自動設定処理の流れを示すフローチャートである。なお、ここでは、説明の簡略化のため、WSC−M1メッセージ(F606)の送信からWSC−M3メッセージ(F610)の送信までの処理の流れについて説明する。
<2. Flow of communication parameter automatic setting processing in communication apparatus A>
Next, communication parameter automatic setting processing in the communication apparatus A will be described. FIG. 7 is a flowchart showing a flow of communication parameter automatic setting processing in the communication apparatus A. Here, for simplification of description, the flow of processing from the transmission of the WSC-M1 message (F606) to the transmission of the WSC-M3 message (F610) will be described.

ステップS701において、通信装置Aは通信装置BへWSC−M1メッセージ(F606)を送信する。ステップS701におけるWSC−M1メッセージ(F606)の送信に応答して、通信装置Bでは、WSC−M2メッセージ(F607)を送信し、通信装置Aでは、当該WSC−M2メッセージ(F607)を受信する。ステップS703では、ステップS702において受信したWSC−M2メッセージ(F607)を解析する。   In step S701, the communication apparatus A transmits a WSC-M1 message (F606) to the communication apparatus B. In response to the transmission of the WSC-M1 message (F606) in step S701, the communication apparatus B transmits a WSC-M2 message (F607), and the communication apparatus A receives the WSC-M2 message (F607). In step S703, the WSC-M2 message (F607) received in step S702 is analyzed.

ステップS704では、ステップS703における解析の結果、WSC−M2メッセージ(F607)に含まれる公開鍵(Public Key)と、通信装置Aが内部で保持している秘密鍵とに基づいて、共通鍵(DH−Key)を算出する。この共通鍵(DH−Key)は、WPS仕様書に定義されているとおり、通信パラメータを送信する際の暗号処理および、メッセージ認証コードの算出処理に用いる鍵の基となる情報である。   In step S704, as a result of the analysis in step S703, based on the public key (Public Key) included in the WSC-M2 message (F607) and the private key held internally by the communication device A, the common key (DH -Key) is calculated. The common key (DH-Key) is information serving as a basis of a key used for encryption processing when transmitting communication parameters and calculation processing of a message authentication code, as defined in the WPS specification.

なお、上述したとおり、低性能のCPUが搭載された通信装置Aでは、共通鍵(DH−Key)の算出処理の完了までには時間がかかる。   As described above, in the communication device A in which the low-performance CPU is mounted, it takes time to complete the calculation process of the common key (DH-Key).

ステップS704における共通鍵(DH−key)の算出処理が終了すると、通信装置Aでは、ステップS705においてWSC−M3メッセージを構築する。なお、WSC−M3メッセージのフォーマットは図11を用いて説明したとおりである。   When the calculation process of the common key (DH-key) in step S704 ends, the communication apparatus A constructs a WSC-M3 message in step S705. The format of the WSC-M3 message is as described with reference to FIG.

ステップS705においてWSC−M3メッセージを構築した後は、ステップS706において、新たなWSC−M2メッセージ(F609)を受信しているか否かを確認する。   After constructing the WSC-M3 message in step S705, it is confirmed in step S706 whether a new WSC-M2 message (F609) has been received.

ステップS706において受信していないことが確認された場合には、ステップS711に進み、ステップS705において構築したWSC−M3メッセージ(最初に構築したWSC−M3メッセージ)を通信装置Bに送信する。   If it is confirmed in step S706 that it has not been received, the process proceeds to step S711, and the WSC-M3 message constructed in step S705 (the first constructed WSC-M3 message) is transmitted to the communication apparatus B.

一方、ステップS706において、新たなWSC−M2メッセージ(F609)を受信していたことが確認された場合には、ステップS707に進む。   On the other hand, if it is confirmed in step S706 that a new WSC-M2 message (F609) has been received, the process proceeds to step S707.

ステップS707では、ステップS706において受信していたことが確認された新たなWSC−M2メッセージ(F609)を解析する。ステップS708では、ステップS707における解析の結果、先に受信したWSC−M2メッセージ(F607)と新たに受信したWSC−M2メッセージ(F609)との間に差異があるか否かを判断する。   In step S707, the new WSC-M2 message (F609) confirmed to have been received in step S706 is analyzed. In step S708, as a result of the analysis in step S707, it is determined whether there is a difference between the previously received WSC-M2 message (F607) and the newly received WSC-M2 message (F609).

具体的には、先に受信したWSC−M2(F607)メッセージが備える提供装置の乱数(Registrar Nonce)について、新たに受信したWSC−M2メッセージ(F609)との間で差異があるか否かを判定する。   Specifically, whether or not there is a difference between the newly received WSC-M2 message (F609) and the random number (Registrar Nonce) of the providing device included in the previously received WSC-M2 (F607) message. judge.

ステップS708において、提供装置の乱数(Registrar Nonce)について差異がないと判定された場合には、ステップS711に進む。ステップS711では、ステップS705において構築したWSC−M3メッセージ(最初に構築したWSC−M3メッセージ)を通信装置Bに送信する。   If it is determined in step S708 that there is no difference in the random number (Registrar Nonce) of the providing apparatus, the process proceeds to step S711. In step S711, the WSC-M3 message constructed in step S705 (the first constructed WSC-M3 message) is transmitted to the communication apparatus B.

一方、ステップS708において、提供装置の乱数(Registrar Nonce)について差異があると判定された場合には、ステップS709に進む。   On the other hand, if it is determined in step S708 that there is a difference in the random number of the providing device, the process proceeds to step S709.

ステップS709では、先に受信したWSC−M2メッセージ(F607)が備える公開鍵(Public Key)について、新たに受信したWSC−M2メッセージ(F609)との間で差異があるか否かを判定する。   In step S709, it is determined whether the public key (Public Key) included in the previously received WSC-M2 message (F607) is different from the newly received WSC-M2 message (F609).

ステップS709において、公開鍵(Public Key)について差異があると判定された場合には、ステップS704に戻り、共通鍵(DH−Key)の再計算を行う。   If it is determined in step S709 that there is a difference in the public key (public key), the process returns to step S704 to recalculate the common key (DH-Key).

一方、ステップS709において、公開鍵(Public Keyが)について差異がない(同一である)と判定された場合には、ステップS710に進む。ステップS710では、ステップS704において算出した共通鍵(DH−Key)を、そのまま使用してWSC−M3メッセージを再構築する。つまり、提供装置の乱数(Registrar Nonce)とメッセージ認証コード(Authenticator)のみを再計算してWSC−M3メッセージを再構築する。   On the other hand, if it is determined in step S709 that there is no difference (same) as to the public key (public key), the process proceeds to step S710. In step S710, the common key (DH-Key) calculated in step S704 is used as it is to reconstruct the WSC-M3 message. That is, only the random number (Registrar Nonce) and the message authentication code (Authenticator) of the providing device are recalculated to reconstruct the WSC-M3 message.

具体的には、提供装置の乱数(Registrar Nonce)について、ステップS705で設定した値から、ステップS707において取得された乱数(つまり、複数回受信したメッセージのうちの最後のメッセージに含まれる乱数)に置き換える。なお、メッセージ認証コード(Authenticator)はハッシュ計算のみであるため、通信装置AのCPUの演算能力が低い場合であっても、通信装置Bの動作には影響しない。   Specifically, the random number of the providing apparatus (Registrar Nonce) is changed from the value set in step S705 to the random number acquired in step S707 (that is, the random number included in the last message among the messages received a plurality of times). replace. Since the message authentication code (Authenticator) is only hash calculation, the operation of the communication device B is not affected even if the CPU of the communication device A has a low calculation capability.

ステップS710においてWSC−M3メッセージが再構築されると、ステップS711では、再構築したWSC−M3メッセージ(F610)を通信装置Bに対して送信する。その後は、図6を用いて説明したシーケンス図に従って自動設定処理が正常に実行される。   When the WSC-M3 message is reconstructed in step S710, the reconstructed WSC-M3 message (F610) is transmitted to the communication apparatus B in step S711. Thereafter, the automatic setting process is normally executed according to the sequence diagram described with reference to FIG.

以上の説明から明らかなように、本実施形態に係る通信装置(受信装置)では、共通鍵算出処理の実施中に同一のメッセージが再送された場合に、必要な部分のみを差し替えたうえで、メッセージを再構築し送信する構成とした。   As is clear from the above description, in the communication device (receiving device) according to the present embodiment, when the same message is retransmitted during the execution of the common key calculation process, only the necessary part is replaced, The message is reconstructed and sent.

この結果、受信装置として機能する通信装置AのCPUの演算能力が低く、公開鍵暗号方式による共通鍵の算出処理に時間がかかる場合であっても、通信パラメータの自動設定処理を正常に完了させることが可能となった。   As a result, the communication parameter automatic setting process is normally completed even when the CPU of the communication apparatus A functioning as a receiving apparatus has a low calculation capability and it takes a long time to calculate the common key using the public key cryptosystem. It became possible.

[第3の実施形態]
上記第1及び第2の実施形態では、IEEE802.11準拠の無線LANシステムに適用した場合について説明した。しかしながら、本発明はこれに限定されず、ワイヤレスUSB、MBOA、Bluetooth(登録商標)、UWB、ZigBee等の他の無線システムに適用してもよい。また、有線LAN等の有線通信システムに適用してもよい。
[Third Embodiment]
In the first and second embodiments, the case where the present invention is applied to a wireless LAN system compliant with IEEE 802.11 has been described. However, the present invention is not limited to this, and may be applied to other wireless systems such as wireless USB, MBOA, Bluetooth (registered trademark), UWB, and ZigBee. Moreover, you may apply to wired communication systems, such as wired LAN.

なお、ここでいうMBOAとは、Multi Band OFDM Allianceの略である。また、UWBには、ワイヤレスUSB、ワイヤレス1394、WINETなどが含まれるものとする。   In addition, MBOA here is an abbreviation for Multi Band OFDM Alliance. UWB includes wireless USB, wireless 1394, WINET, and the like.

また、上記第1及び第2の実施形態では、通信パラメータとしてネットワーク識別子、暗号方式、暗号鍵、認証方式、認証鍵等を例に挙げたが、本発明はこれに限定されず、他の設定項目であってもよい。あるいは、当該他の設定項目が上記通信パラメータに加えて含まれていてもよい。   In the first and second embodiments, the network identifier, the encryption method, the encryption key, the authentication method, the authentication key, and the like have been exemplified as communication parameters. However, the present invention is not limited to this, and other settings are possible. It may be an item. Alternatively, the other setting items may be included in addition to the communication parameters.

[他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

Claims (5)

通信装置であって、
他の通信装置から公開鍵と乱数とが含まれるメッセージを受信する受信手段と、
前記受信手段において受信されたメッセージに含まれる前記公開鍵と、前記通信装置が予め保持する秘密鍵とを用いて、共通鍵を算出する算出手段と、
前記算出手段による前記共通鍵の算出の開始から完了までの間に、前記受信手段において前記他の通信装置から前記メッセージを複数回受信し、該複数回のメッセージそれぞれに含まれる前記公開鍵が同一である場合に、前記受信手段において最後に受信されたメッセージに含まれる乱数を含むメッセージを前記他の通信装置に送信する送信手段と
を有することを特徴とする通信装置。
A communication device,
Receiving means for receiving a message including a public key and a random number from another communication device;
Calculating means for calculating a common key using the public key included in the message received by the receiving means and a secret key held in advance by the communication device;
Between the start and completion of the calculation of the common key by the calculation means, the reception means receives the message from the other communication device a plurality of times, and the public key included in each of the plurality of messages is the same In this case, the communication device further comprises: a transmission unit that transmits a message including a random number included in the message last received by the reception unit to the other communication device.
前記算出手段による前記共通鍵の算出の開始から完了までの間に、前記受信手段において前記他の通信装置から異なる公開鍵が含まれる前記メッセージを受信した場合、前記算出手段は、前記異なる公開鍵を用いて共通鍵を算出することを特徴とする請求項1に記載の通信装置。   When the receiving unit receives the message including a different public key from the other communication device between the start and completion of the calculation of the common key by the calculating unit, the calculating unit The communication apparatus according to claim 1, wherein a common key is calculated using 前記算出手段による前記共通鍵の算出の開始から完了までの間に、前記受信手段において前記他の通信装置から前記メッセージを複数回受信し、該複数回のメッセージそれぞれに含まれる前記公開鍵が同一であり、前記乱数も同一であった場合、前記送信手段は、前記受信手段において最初に受信されたメッセージに含まれる乱数を含むメッセージを前記他の通信装置に送信することを特徴とする請求項1に記載の通信装置。   Between the start and completion of the calculation of the common key by the calculation means, the reception means receives the message from the other communication device a plurality of times, and the public key included in each of the plurality of messages is the same When the random numbers are also the same, the transmission unit transmits a message including a random number included in a message first received by the reception unit to the other communication device. The communication apparatus according to 1. 通信装置の制御方法であって、
受信手段が、他の通信装置から公開鍵と乱数とが含まれるメッセージを受信する受信工程と、
算出手段が、前記受信工程において受信されたメッセージに含まれる前記公開鍵と、前記通信装置が予め保持する秘密鍵とを用いて、共通鍵を算出する算出工程と、
送信手段が、前記算出工程における前記共通鍵の算出の開始から完了までの間に、前記受信工程において前記他の通信装置から前記メッセージを複数回受信し、該複数回のメッセージそれぞれに含まれる前記公開鍵が同一である場合に、前記受信工程において最後に受信されたメッセージに含まれる乱数を含むメッセージを前記他の通信装置に送信する送信工程と
を有することを特徴とする通信装置の制御方法。
A communication device control method comprising:
A receiving step for receiving a message including a public key and a random number from another communication device;
A calculating step in which a calculating unit calculates a common key using the public key included in the message received in the receiving step and a secret key held in advance by the communication device;
The transmission means receives the message from the other communication device a plurality of times in the reception step between the start and completion of the calculation of the common key in the calculation step, and is included in each of the plurality of messages. And a transmission step of transmitting, to the other communication device, a message including a random number included in the message received last in the reception step when the public keys are the same. .
通信装置において、コンピュータに、
他の通信装置から公開鍵と乱数とが含まれるメッセージを受信する受信工程と、
前記受信工程において受信されたメッセージに含まれる前記公開鍵と、前記通信装置が予め保持する秘密鍵とを用いて、共通鍵を算出する算出工程と、
前記算出工程における前記共通鍵の算出の開始から完了までの間に、前記受信工程において前記他の通信装置から前記メッセージを複数回受信し、該複数回のメッセージそれぞれに含まれる前記公開鍵が同一である場合に、前記受信工程において最後に受信されたメッセージに含まれる乱数を含むメッセージを前記他の通信装置に送信する送信工程と
を実行させることを特徴とするプログラム。
In the communication device, the computer
A receiving step of receiving a message including a public key and a random number from another communication device;
A calculation step of calculating a common key using the public key included in the message received in the reception step and a secret key held in advance by the communication device;
Between the start and completion of the calculation of the common key in the calculation step, the message is received a plurality of times from the other communication device in the reception step, and the public key included in each of the plurality of messages is the same In this case, a program for executing a transmission step of transmitting a message including a random number included in the message received last in the reception step to the other communication device.
JP2010267502A 2010-11-30 2010-11-30 Communication apparatus, control method, and program Active JP5602602B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010267502A JP5602602B2 (en) 2010-11-30 2010-11-30 Communication apparatus, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010267502A JP5602602B2 (en) 2010-11-30 2010-11-30 Communication apparatus, control method, and program

Publications (2)

Publication Number Publication Date
JP2012119917A JP2012119917A (en) 2012-06-21
JP5602602B2 true JP5602602B2 (en) 2014-10-08

Family

ID=46502281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010267502A Active JP5602602B2 (en) 2010-11-30 2010-11-30 Communication apparatus, control method, and program

Country Status (1)

Country Link
JP (1) JP5602602B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015186192A1 (en) * 2014-06-03 2015-12-10 三菱電機株式会社 Communication apparatus, communication system and communication method
JP6486228B2 (en) * 2015-07-21 2019-03-20 キヤノン株式会社 Communication apparatus, control method, and program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004248270A (en) * 2003-01-24 2004-09-02 Matsushita Electric Ind Co Ltd Shared key exchange method and communication device
JP5193850B2 (en) * 2008-12-26 2013-05-08 株式会社東芝 Wireless communication method

Also Published As

Publication number Publication date
JP2012119917A (en) 2012-06-21

Similar Documents

Publication Publication Date Title
US20250278504A1 (en) Hosted device provisioning protocol with servers and a networked initiator
US11683162B2 (en) Hosted device provisioning protocol with servers and a networked responder
JP5053424B2 (en) RELAY DEVICE, WIRELESS COMMUNICATION DEVICE, NETWORK SYSTEM, PROGRAM, AND METHOD
EP3051744B1 (en) Key configuration method and apparatus
TWI483601B (en) A method for distributing encryption means
WO2006093161A1 (en) Key distribution control apparatus, radio base station apparatus, and communication system
JP6328152B2 (en) Network device configured to derive a shared key
CN110024350A (en) Key derivation functions of the NTP based on password
US20180176230A1 (en) Data packet transmission method, apparatus, and system, and node device
CN114364062B (en) Method for safely accessing gateway of Internet of vehicles
JP2020043474A (en) Communication device, communication method, and program
CN111050321B (en) Data processing method, device and storage medium
JP2023506463A (en) Encrypted communication device and encrypted communication method
JP6570355B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
JP5602602B2 (en) Communication apparatus, control method, and program
JP6804026B2 (en) Encrypted communication system
CN113302877A (en) Method and apparatus for providing a message authentication code suitable for short messages
Bandirmali et al. WSNSec: A scalable data link layer security protocol for WSNs
KR20100087768A (en) Apparatus and method for negotiating pairwise master key for securing peer links in wireless mesh networks
Trabalza et al. INDIGO: Secure CoAP for Smartphones: Enabling E2E Secure Communication in the 6IoT
JP2025507264A (en) Early indications for changing cipher strength during configuration
Baehr et al. On the practicality of elliptic curve cryptography for medical sensor networks
JP2007110487A (en) Lan system and its communication method
JPWO2010032391A1 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD AND PROGRAM USING THEM
Tjäder End-to-end security enhancement of an iot platform using object security

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140715

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140820

R151 Written notification of patent or utility model registration

Ref document number: 5602602

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151