HK1229972B - Method, device and system for authenticating terminal device - Google Patents
Method, device and system for authenticating terminal device Download PDFInfo
- Publication number
- HK1229972B HK1229972B HK17103444.7A HK17103444A HK1229972B HK 1229972 B HK1229972 B HK 1229972B HK 17103444 A HK17103444 A HK 17103444A HK 1229972 B HK1229972 B HK 1229972B
- Authority
- HK
- Hong Kong
- Prior art keywords
- terminal
- key
- authorization
- decryption
- device identifier
- Prior art date
Links
Description
技术领域Technical Field
本申请属于通信信息处理领域,尤其涉及一种终端设备认证方法、装置及系统。The present application relates to the field of communication information processing, and in particular to a terminal device authentication method, device and system.
背景技术Background Art
随着移动互联网及物联网的发展,包括可穿戴设备(例如智能手环、智能手表等)的终端设备越来越普及,并逐渐成为未来智能移动产品应用的发展趋势。With the development of mobile Internet and the Internet of Things, terminal devices including wearable devices (such as smart bracelets, smart watches, etc.) are becoming more and more popular and are gradually becoming the development trend of future smart mobile product applications.
可穿戴设备中往往会包括用户的账户、身份、通讯、财产等多种敏感信息,如果可穿戴设备被恶意钓鱼、终端欺骗、信息拦截等攻击获取权限,将对用户造成不可估量的损失。因此,可穿戴设备的安全授权认证越来越被人们重视。目前基于可穿戴设备的安全应用产品也开始出现,其解决方案主要包括可穿戴设备基于智能终端(如移动智能手机、智能电器等)或者第三方应用的特征码对所述智能终端进行授权认证。Wearable devices often contain a variety of sensitive information, including user accounts, identities, communications, and property. If wearable devices are compromised through malicious phishing, terminal spoofing, or information interception, the user could suffer immeasurable losses. Consequently, the security authorization and authentication of wearable devices is gaining increasing attention. Security application products based on wearable devices are also beginning to emerge. These solutions primarily involve wearable devices authorizing and authenticating smart terminals (such as mobile smartphones and smart appliances) based on signature codes from third-party applications.
但现有的可穿戴设备授权认证解决方案中使用的特征码通常为单一不变的特征码,并且在认证过程中通常采用利用WIFI或者蓝牙等信道安全级别较低的为单向认证。现有技术的授权认证方法很容易导致特征码被截取、泄露或者使用伪造的智能终端进行欺骗,获取可穿戴设备的权限。现有技术中可穿戴设备的授权认证方法仍然存在较大的安全隐患。However, existing wearable device authentication solutions typically use a single, unchanging signature code, and the authentication process often employs one-way authentication over less secure channels like Wi-Fi or Bluetooth. Existing authentication methods can easily lead to signature code interception and leakage, or fraudulent use of counterfeit smart devices to gain access to wearable device permissions. Existing authentication methods for wearable devices still present significant security risks.
发明内容Summary of the Invention
本申请目的在于提供一种终端设备认证方法、装置及系统,可以为包括可穿戴设备的智能终端设备提供授权过程中的双向认证,提高终端设备授权认证的安全性。The purpose of this application is to provide a terminal device authentication method, device and system, which can provide two-way authentication during the authorization process for smart terminal devices including wearable devices, thereby improving the security of terminal device authorization authentication.
本申请提供的一种终端设备认证方法、装置及系统是这样实现的:The present application provides a terminal device authentication method, apparatus, and system that are implemented as follows:
一种终端设备认证方法,所述方法包括:A terminal device authentication method, the method comprising:
第一终端发送用存储的预置密钥对生成的第一密钥和第一终端的第一设备标识进行加密生成的授权开通请求消息;The first terminal sends an authorization activation request message generated by encrypting a first key generated by using a stored preset key and a first device identifier of the first terminal;
第二终端获取授权开通请求消息,用存储的预置密钥进行解密,并根据所述解密的结果判断是否开通设备授权;The second terminal obtains the authorization activation request message, decrypts it using the stored preset key, and determines whether to activate the device authorization based on the decryption result;
在所述解密的结果为成功时,发送利用所述解密获取的第一密钥对所述第二终端的第二设备标识进行加密生成的授权开通结果消息;When the decryption result is successful, sending an authorization activation result message generated by encrypting the second device identifier of the second terminal using the first key obtained by the decryption;
第一终端获取授权开通结果消息,并用所述第一密钥对所述授权开通结果消息进行解密;若解密成功,则开通设备授权。The first terminal obtains the authorization activation result message and decrypts the authorization activation result message using the first key; if the decryption is successful, the device authorization is activated.
一种终端设备认证方法,所述方法包括:A terminal device authentication method, the method comprising:
第一终端发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息;The first terminal sends an authorization request message generated by encrypting a second key generated by using the stored first key and the first device identifier of the first terminal;
第二终端获取授权请求消息,用存储的第一密钥进行解密;在所述解密成功时,判断是否存储有与所述解密获取的第一设备标识相对应的第一授权设备标识;The second terminal obtains the authorization request message and decrypts it using the stored first key; when the decryption is successful, determining whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored;
在所述判断结果为有时,所述第二终端基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息;When the judgment result is yes, the second terminal authorizes the first terminal based on the first device identifier, and sends an authorization result message generated by encrypting the second device identifier of the second terminal using the second key obtained by decryption;
第一终端获取授权结果消息,用所述第二密钥进行解密;在解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权。The first terminal obtains the authorization result message and decrypts it using the second key; when the decryption is successful, it determines whether a second authorized device identifier corresponding to the second device identifier obtained by the decryption is stored, and determines whether to authorize the second terminal based on the judgment result.
一种终端设备认证方法,所述方法包括:A terminal device authentication method, the method comprising:
第一终端发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息;The first terminal sends an authorization request message generated by encrypting a second key generated by using the stored first key and the first device identifier of the first terminal;
第一终端获取第二终端发送的授权结果消息,并用所述第二密钥进行解密;The first terminal obtains the authorization result message sent by the second terminal and decrypts it using the second key;
所述第一终端在所述解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权。When the decryption is successful, the first terminal determines whether a second authorized device identifier corresponding to the second device identifier obtained by the decryption is stored, and determines whether to authorize the second terminal based on the determination result.
一种终端设备认证方法,所述方法包括:A terminal device authentication method, the method comprising:
第二终端获取第一终端发送的授权请求消息,并用存储的第一密钥进行解密;The second terminal obtains the authorization request message sent by the first terminal and decrypts it using the stored first key;
所述第二终端在所述解密成功时,判断是否存储有与所述解密获取的第一设备标识相对应的第一授权设备标识;When the decryption is successful, the second terminal determines whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored;
所述第二终端在所述判断结果为有时,基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息。When the judgment result is yes, the second terminal authorizes the first terminal based on the first device identification, and sends an authorization result message generated by encrypting the second device identification of the second terminal using the second key obtained by decryption.
一种终端设备认证装置,所述装置包括:A terminal device authentication device, the device comprising:
第一存储单元,用于存储生成的第一密钥、获取的第二终端的第二授权设备标识;A first storage unit is used to store the generated first key and the obtained second authorized device identifier of the second terminal;
第一加密单元,用于生成第二密钥,并利用所述第一密钥对所述第二密钥和获取的第一设备标识进行加密,生成授权请求消息;a first encryption unit, configured to generate a second key, and encrypt the second key and the obtained first device identifier using the first key to generate an authorization request message;
第一通信模块,用于发送所述授权请求消息,还用于接收第二终端发送的授权结果消息;A first communication module, configured to send the authorization request message and to receive an authorization result message sent by the second terminal;
第一解密判断单元,用于利用所述第二密钥对所述授权结果消息进行解密,并在解密成功时,判断所述第一存储单元是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识;a first decryption judgment unit, configured to decrypt the authorization result message using the second key, and, when the decryption is successful, to judge whether the first storage unit stores a second authorized device identifier corresponding to the second device identifier obtained by the decryption;
第一授权模块,用于基于所述第一解密判断单元的判断结果确定是否对所述第二终端进行授权。The first authorization module is configured to determine whether to authorize the second terminal based on a determination result of the first decryption determination unit.
一种终端设备认证装置,所述装置包括:A terminal device authentication device, the device comprising:
第二通信模块,用于接收第一终端发送的授权请求消息和发送授权结果消息;A second communication module, configured to receive an authorization request message sent by the first terminal and send an authorization result message;
第二存储单元,用于存储获取的第一终端的第一授权设备标识和第一密钥;A second storage unit, configured to store the acquired first authorization device identifier and first key of the first terminal;
第二解密判断单元,用于利用存储的第一密钥对所述授权请求消息进行解密,并在解密成功时,判断所述第二存储单元是否存储有与所述第一设备标识相对应的第一授权设备标识;a second decryption judgment unit, configured to decrypt the authorization request message using the stored first key, and, when the decryption is successful, to judge whether the second storage unit stores a first authorization device identifier corresponding to the first device identifier;
第二授权模块,基于所述第二解密判断单元的判断结果确定是否对所述第一设备标识所对应所述第一终端进行授权。The second authorization module determines whether to authorize the first terminal corresponding to the first device identifier based on the judgment result of the second decryption judgment unit.
第二加密单元,用于在所述第二解密判断单元的判断结果为有时,利用所述第二密钥对所述第二终端的第二设备标识进行加密生成授权结果消息。The second encryption unit is configured to, when the judgment result of the second decryption judgment unit is yes, encrypt the second device identification of the second terminal using the second key to generate an authorization result message.
一种终端设备认证系统,所述系统包括:A terminal device authentication system, the system comprising:
第一终端,用于发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息;还用于获取第二终端发送的授权结果消息,并用所述第二密钥进行解密;还用于在解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权;The first terminal is configured to send an authorization request message generated by encrypting a second key generated by using a stored first key pair and a first device identifier of the first terminal; further configured to obtain an authorization result message sent by the second terminal and decrypt the message using the second key; further configured to, upon successful decryption, determine whether a second authorized device identifier corresponding to the second device identifier obtained by decryption is stored, and determine whether to authorize the second terminal based on the determination result;
第二终端,用于第一终端发送获取授权请求消息,并用存储的第一密钥进行解密;还用于在所述解密成功时,判断是否存储有与所述解密获取的所述第一设备标识相对应的第一授权设备标识;还用于在所述判断结果为有时,基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息。The second terminal is used for the first terminal to send an authorization request message and decrypt it with the stored first key; it is also used to determine whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored when the decryption is successful; it is also used to authorize the first terminal based on the first device identifier when the judgment result is yes, and send an authorization result message generated by encrypting the second device identifier of the second terminal with the second key obtained by the decryption.
一种终端设备认证系统,所述系统包括:A terminal device authentication system, the system comprising:
第一终端,用于发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息;还用于获取第二终端发送的授权结果消息,并用所述第二密钥进行解密;还用于在解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权;The first terminal is configured to send an authorization request message generated by encrypting a second key generated by using a stored first key pair and a first device identifier of the first terminal; further configured to obtain an authorization result message sent by the second terminal and decrypt the message using the second key; further configured to, upon successful decryption, determine whether a second authorized device identifier corresponding to the second device identifier obtained by decryption is stored, and determine whether to authorize the second terminal based on the determination result;
第二终端,用于第一终端发送获取授权请求消息,并用存储的第一密钥进行解密;还用于在所述解密成功时,判断是否存储有与所述解密获取的所述第一设备标识相对应的第一授权设备标识;还用于在所述判断结果为有时,基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息。The second terminal is used for the first terminal to send an authorization request message and decrypt it with the stored first key; it is also used to determine whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored when the decryption is successful; it is also used to authorize the first terminal based on the first device identifier when the judgment result is yes, and send an authorization result message generated by encrypting the second device identifier of the second terminal with the second key obtained by the decryption.
本申请提供的一种终端设备认证方法、装置及系统,可以保障多终端之间进行开通设备授权以及设备授权的认证。第一终端可以利用预存的预置密钥加密验证密钥和设备标识形成授权开通请求消息,这样只有同样存储有预置密钥的第二终端才可以进行解密,完成一方授权开通的认证。然后可以利用解密获取的验证密钥对第二终端的设备标识进行加密,由第一终端进行解密,解密成功才可以对所述第一终端开通授权认证,完成终端设备开通授权请求的双向认证。进一步的,在开通授权、获取授权设备的设备标识之后,可以利用本申请提供的终端设备认证方法进行终端设备或设备上的应用等权限进行授权认证。在设备授权过程中仍然采用多终端的双向认证,并在双向认证消息交互中加入设备标识和验证密钥,优选的实施方式中所使用的验证密钥还可以为动态更新,可以大大提高例如可穿戴设备的终端设备的授权认证,提高终端设备授权认证的安全性。The present application provides a terminal device authentication method, device and system that can ensure the activation of device authorization and authentication of device authorization between multiple terminals. The first terminal can use a pre-stored preset key to encrypt the verification key and device identification to form an authorization activation request message, so that only the second terminal that also stores the preset key can decrypt it and complete the authentication of one party's authorization activation. The verification key obtained by decryption can then be used to encrypt the device identification of the second terminal, which is then decrypted by the first terminal. Only after the decryption is successful can the authorization authentication for the first terminal be activated, completing the two-way authentication of the terminal device activation authorization request. Furthermore, after the authorization is activated and the device identification of the authorized device is obtained, the terminal device authentication method provided by the present application can be used to perform authorization authentication for the terminal device or the application on the device. In the device authorization process, two-way authentication of multiple terminals is still used, and the device identification and verification key are added to the two-way authentication message interaction. In the preferred embodiment, the verification key used can also be dynamically updated, which can greatly improve the authorization authentication of terminal devices such as wearable devices and improve the security of terminal device authorization authentication.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
图1是本申请一种终端设备认证方法一种实施例的方法流程示意图;FIG1 is a schematic diagram of a method flow of an embodiment of a terminal device authentication method of the present application;
图2是本申请一种终端设备认证方法一种实施例的方法流程示意图;FIG2 is a schematic diagram of a method flow of an embodiment of a terminal device authentication method of the present application;
图3是本申请一种终端设备认证方法另一种实施例的流程示意图;FIG3 is a flow chart of another embodiment of a terminal device authentication method of the present application;
图4是本申请一种终端设备认证方法另一种实施例的流程示意图;FIG4 is a flow chart of another embodiment of a terminal device authentication method of the present application;
图5是本申请一种终端设备认证装置一种实施例的模块结构示意图;FIG5 is a schematic diagram of the module structure of an embodiment of a terminal device authentication device of the present application;
图6是本申请一种终端设备认证装置另一种实施例的模块结构示意图;FIG6 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device of the present application;
图7是本申请一种终端设备认证装置另一种实施例的模块结构示意图;FIG7 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device of the present application;
图8是本申请一种终端设备认证装置一种实施例的模块结构示意图;FIG8 is a schematic diagram of the module structure of an embodiment of a terminal device authentication device of the present application;
图9是本申请一种终端设备认证装置另一种实施例的模块结构示意图;FIG9 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device of the present application;
图10是本申请一种终端设备认证装置另一种实施例的模块结构示意图。FIG10 is a schematic diagram of the module structure of another embodiment of a terminal device authentication apparatus of the present application.
具体实施方式DETAILED DESCRIPTION
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
本申请所述的终端可以包括但不限于可穿戴设备的终端设备。所述的终端设备的授权认证可以通过包括但不限于用户一侧的终端设备通过Wi-Fi或蜂窝移动网络等连接方式连接到互联网与服务器一侧的终端设备进行授权认证的应用场景,也可以通过包括但不限于蓝牙传输协议、NFC近场通信等以及有线连接等方式与其他智能终端设备连接进行授权认证的应用场景。下面本申请以可穿戴设备的终端设备与智能移动手机之间的授权认证为例对本申请所述方法及装置进行详细的说明。本申请中所述的可穿戴设备包括但不限于装载了智能处理芯片的腕表、眼镜、鞋、帽、服装、首饰等可以穿戴设备。The terminal described in this application may include but is not limited to terminal devices of wearable devices. The authorization and authentication of the terminal device may include but is not limited to application scenarios in which the terminal device on the user side is connected to the Internet and the terminal device on the server side through connection methods such as Wi-Fi or cellular mobile networks for authorization and authentication, and may also be connected to other smart terminal devices through methods such as but not limited to Bluetooth transmission protocol, NFC near-field communication, and wired connection for authorization and authentication. Below, this application takes the authorization and authentication between the terminal device of a wearable device and a smart mobile phone as an example to explain in detail the method and apparatus described in this application. The wearable devices described in this application include but are not limited to wearable devices such as watches, glasses, shoes, hats, clothing, and jewelry equipped with smart processing chips.
在终端设备之间进行授权认证之前,可以先进行验证要求授权认证的终端设备是否可信,在验证通过后可以向要求授权的终端设备开通授权认证,然后在进一步的进行授权。采用本申请所述的是否对终端设备授权认证开通的先行认证方法,可以有效减少非法终端设备进行授权认证,及早阻断可穿戴设备或者其他终端设备与非法终端的授权认证通讯。图1是本申请所述一种终端设备认证方法一个实施例的方法流程示意图,如图1所述,所述方法可以包括:Before authorization authentication is performed between terminal devices, it is possible to first verify whether the terminal device requiring authorization authentication is trustworthy. After the verification is passed, authorization authentication can be enabled for the terminal device requiring authorization, and then further authorization can be performed. The use of the pre-authentication method for whether authorization authentication is enabled for the terminal device described in this application can effectively reduce the number of illegal terminal devices performing authorization authentication, and block the authorization authentication communication between wearable devices or other terminal devices and illegal terminals as early as possible. Figure 1 is a method flow diagram of an embodiment of a terminal device authentication method described in this application. As shown in Figure 1, the method may include:
S1:第一终端发送用存储的预置密钥对生成的第一密钥和第一终端的第一设备标识进行加密生成的授权开通请求消息。S1: The first terminal sends an authorization activation request message generated by encrypting a first key generated by using a stored preset key and a first device identifier of the first terminal.
第一终端用存储的预置密钥key0对生成的第一密钥key1和第一终端的第一设备标识进行加密,形成授权开通请求消息MSG_A1,并发送所述授权开通请求消息MSG_A1。The first terminal encrypts the generated first key key1 and the first device identification of the first terminal using the stored preset key key0 to form an authorization activation request message MSG_A1, and sends the authorization activation request message MSG_A1.
所述的第一终端可以为上述所述的智能手机,在其他的应用场景中也可以为其他移动智能终端。在本实施例中可以将发送授权开通请求消息MSG_A1的终端设备作为第一终端,可以将接收所述授权开通请求消息MSG_A1的终端设备作为第二终端,在具体的实现方式中例如本实施例中可以将智能手机作为所述第一终端,将所述可穿戴设备作为第二终端。当然,上述实施例中对例如可穿戴设备的第二终端进行授权认证的第一终端也可以为专门设置的服务器,或者智能终端设备管理装置等。The first terminal can be the smartphone mentioned above, and can also be other mobile smart terminals in other application scenarios. In this embodiment, the terminal device that sends the authorization activation request message MSG_A1 can be used as the first terminal, and the terminal device that receives the authorization activation request message MSG_A1 can be used as the second terminal. In a specific implementation, for example, in this embodiment, the smartphone can be used as the first terminal, and the wearable device can be used as the second terminal. Of course, the first terminal that performs authorization authentication on the second terminal, such as the wearable device, in the above embodiment can also be a specially set server, or an intelligent terminal device management device, etc.
可以预先在所述第一终端中存储预置密钥key0,该预置密钥可以包括出厂时设置的初始化密钥,或者与第二终端预先约定设置的可以用于开通设备授权或者设备授权认证的密钥。所述第一终端可以生成第一密钥key1,所述第一密钥key1可以用于与包括所述可穿戴设备的第二终端进行授权认证。所述第一终端可以通过终端上的应用或者预置的密钥生成算法生成所述第一密钥key1,所述的第一密钥key1可以包括常规的数字、字符、符号等数据格式的密钥。A preset key key0 may be pre-stored in the first terminal. The preset key may include an initialization key set at the factory, or a key pre-agreed with the second terminal that can be used to activate device authorization or device authorization authentication. The first terminal may generate a first key key1, which may be used for authorization and authentication with the second terminal including the wearable device. The first terminal may generate the first key key1 through an application on the terminal or a preset key generation algorithm. The first key key1 may include a key in a conventional data format such as numbers, characters, or symbols.
然后,可以利用所述预置密钥key0对包括生成的所述第一密钥key1和第一终端的第一设备标识app_divice_id进行加密,形成所述第一终端的授权开通请求消息MSG_A1。所述第一终端的第一设备标识app_divice_id可以为用于唯一标识该第一终端设备的识别信息,具体的例如可以包括智能手机的IMEI、MAC或者其他设备标识串等。Then, the generated first key key1 and the first device identifier app_divice_id of the first terminal can be encrypted using the pre-set key key0 to form the authorization activation request message MSG_A1 of the first terminal. The first device identifier app_divice_id of the first terminal can be identification information used to uniquely identify the first terminal device, and specifically can include, for example, the IMEI, MAC address, or other device identification string of a smartphone.
在形成所述授权开通请求消息MSG_A1后,所述第一终端可以发送所述授权开通请求消息MSG_A1。具体的发送方式可以包括通过WIFI或者蓝牙等广播所述授权开通请求消息MSG_A1,当然也可以包括利用专用信道或者网络的其他通信方式等。After forming the authorization activation request message MSG_A1, the first terminal may send the authorization activation request message MSG_A1. Specifically, the sending method may include broadcasting the authorization activation request message MSG_A1 via WIFI or Bluetooth, or other communication methods such as using a dedicated channel or network.
第一终端可以利用存储的预置密钥对生成的第一密钥和第一终端的第一设备标识进行加密,形成授权开通请求消息MSG_A1,并可以以广播消息或者点对点等的方式发送所述授权开通请求消息MSG_A1。The first terminal may use the stored preset key to encrypt the generated first key and the first device identification of the first terminal to form an authorization activation request message MSG_A1, and may send the authorization activation request message MSG_A1 in a broadcast message or point-to-point manner.
S2:第二终端获取授权开通请求消息,用存储的预置密钥进行解密,并可以根据所述解密的结果判断是否开通设备授权。S2: The second terminal obtains the authorization activation request message, decrypts it using the stored preset key, and can determine whether to activate device authorization based on the decryption result.
所述第二终端可以获取所述第一终端发送的授权开通请求消息MSG_A1,可以利用存储的预置密钥key0对所述获取的授权开通请求消息MSG_A1进行解密;所述第二终端根据所述解密的结果判断是否开通设备授权。The second terminal can obtain the authorization activation request message MSG_A1 sent by the first terminal, and can use the stored preset key key0 to decrypt the obtained authorization activation request message MSG_A1; the second terminal determines whether to activate device authorization based on the decryption result.
所述第二终端可以以接受获取到所述第一终端以广播或者点对点的形式发送的授权开通消息。所述第二终端同样也预先存储预置密钥key0,如智能手环、智能手表等可穿戴设备中预先存储出厂时设置的预置密钥key0,所述第二终端中的预置密钥可以与所述第一终端如智能手机中存储的预置密钥相同,可以完成对应的信息加密或解密。当然在其他是实施方式中也可以为相互匹配的密钥。在实际应用中,所述第二终端的可穿戴设备的预置密钥通常可以包括出厂设备的验证密钥,所述第一终端的预置密钥可以包括第一终端通过某一应用从专用服务器或服务商侧下载获取,当然也可以包括预先出厂设置的密钥。The second terminal can receive the authorization activation message sent by the first terminal in the form of broadcast or point-to-point. The second terminal also pre-stores a preset key key0, such as the preset key key0 set at the factory in wearable devices such as smart bracelets and smart watches. The preset key in the second terminal can be the same as the preset key stored in the first terminal such as a smart phone, and can complete the corresponding information encryption or decryption. Of course, in other implementations, they can also be keys that match each other. In actual applications, the preset key of the wearable device of the second terminal can generally include the verification key of the factory device, and the preset key of the first terminal can include the first terminal downloading from a dedicated server or service provider through a certain application, and of course it can also include a key set in advance at the factory.
本申请中所述的第二终端可以包括但不限于装载了智能处理芯片的腕表、眼镜、鞋、帽、服装、首饰、手环、挂件等的可穿戴设备。The second terminal described in this application may include but is not limited to wearable devices such as watches, glasses, shoes, hats, clothing, jewelry, bracelets, pendants, etc. equipped with intelligent processing chips.
所述第二终端获取授权请求消息MSG_A1后可以用存储的预置密钥key0进行解密。如果所述第二终端获取的授权请求消息MSG_A1为同样采用预置密钥key0进行加密的消息,那么所述第二终端相应的可以利用自身的预置密钥key0进行解密成功。如果所述第二终端获取到的为非法终端设备采用伪造、终端设备欺骗等发送来的授权请求消息,其为非预置密钥key0加密处理,所述第二终端不能解密成功,则可以不对其开通设备授权认证。所述第二终端设备可以根据所述对获取的授权强求消息解密成功与否的解密判断与获取的授权请求消息相对应的终端设备是否合法,合法则对其开通设备授权,允许与其进行授权认证;否则可以将其视为非法终端设备,可以对其进行授权请求拒绝、屏蔽等处理。After the second terminal obtains the authorization request message MSG_A1, it can decrypt it with the stored preset key key0. If the authorization request message MSG_A1 obtained by the second terminal is also encrypted with the preset key key0, then the second terminal can correspondingly decrypt it successfully using its own preset key key0. If the second terminal obtains an authorization request message sent by an illegal terminal device using forgery, terminal device deception, etc., which is not encrypted with the preset key0, the second terminal cannot decrypt it successfully, and the device authorization authentication may not be activated for it. The second terminal device can determine whether the terminal device corresponding to the obtained authorization request message is legal based on the decryption success of the obtained authorization request message. If it is legal, the device authorization is activated for it and authorization authentication is allowed; otherwise, it can be regarded as an illegal terminal device, and its authorization request can be rejected, blocked, etc.
所述第二终端可以获取授权开通请求消息MSG_A1,对其进行解密,并可以根据解密的结果判断是否开通设备授权,是否允许与获取的授权开通请求消息MSG_A1的设备进行授权认证。The second terminal can obtain the authorization activation request message MSG_A1, decrypt it, and determine whether to activate device authorization based on the decryption result, and whether to allow authorization authentication with the device that obtained the authorization activation request message MSG_A1.
S3:在所述解密的结果为成功时,发送利用所述解密获取的第一密钥对所述第二终端的第二设备标识进行加密生成的授权开通结果消息。S3: When the decryption result is successful, sending an authorization activation result message generated by encrypting the second device identification of the second terminal using the first key obtained by the decryption.
在所述解密的结果为成功时,所述第二终端可以开通设备授权;所述第二终端利用所述解密获取的第一密钥key0对所述第二终端的第二设备标识auth_divice_id进行加密,形成授权开通结果消息MSG_B1,并发送所述授权开通结果消息MSG_B1。如果所述第二终端利用自身存储的预置密钥key0对获取的授权开通请求消息MSG_A1解密成功,则所述第二终端设备可以开通设备授权的服务,允许与其他终端设备进行授权认证的信息交互。If the decryption result is successful, the second terminal can activate device authorization. The second terminal uses the first key key0 obtained through decryption to encrypt the second terminal's second device identifier auth_divice_id, forming an authorization activation result message MSG_B1, and sends the authorization activation result message MSG_B1. If the second terminal successfully decrypts the obtained authorization activation request message MSG_A1 using its own stored preset key key0, the second terminal device can activate the device authorization service and allow authorization and authentication information to be exchanged with other terminal devices.
本申请优选的实施例中,在面对终端设备一对多或者多对多应用场景下,本申请优选的实施例提供一种基于设备标识区分不同终端设备的认证方法。具体的,在所述解密的结果为成功时,所述第二终端开通设备授权可以包括:In a preferred embodiment of the present application, in a one-to-many or many-to-many application scenario, a preferred embodiment of the present application provides an authentication method for distinguishing different terminal devices based on device identification. Specifically, when the decryption result is successful, the second terminal activating device authorization may include:
在所述解密的结果为成功时,所述第二终端基于所述解密获取的第一设备标识对所述第一终端开通设备授权。When the decryption result is successful, the second terminal activates device authorization for the first terminal based on the first device identification obtained by the decryption.
例如所述第二终端解密所述第一终端的授权开通请求消息MSG_A1成功时,可以获取得到所述第一终端设备的第一设备标识,可以存储本地应用文件中,然后所述第二终端在开通设备授权时可以设置为根据该解密成功的第一设备标识对所述第一设备标识对应的终端设备开通设备授权认证的服务,允许所述第二终端与该第一终端进行授权认证的消息交互。所述第二终端在对所述第一终端开通设备授权时仍然可以获取其他终端设备的授权开通请求消息MSG_A1,但可以对未解密成功的授权请求消息对应的终端设备不开通设备授权,也可以对第二终端设备未解密或者未记录的设备标识等终端设备不开通设备授权。For example, when the second terminal successfully decrypts the authorization activation request message MSG_A1 of the first terminal, it can obtain the first device identifier of the first terminal device and store it in a local application file. Then, when activating device authorization, the second terminal can be configured to activate device authorization and authentication services for the terminal device corresponding to the first device identifier based on the successfully decrypted first device identifier, allowing the second terminal to exchange authorization and authentication messages with the first terminal. When activating device authorization for the first terminal, the second terminal can still obtain the authorization activation request message MSG_A1 of other terminal devices, but may not activate device authorization for the terminal device corresponding to the unsuccessfully decrypted authorization request message, or may not activate device authorization for terminal devices such as the device identifier that the second terminal device has not decrypted or recorded.
上述所述解密成功后,所述第二终端可以完成对所述第一终端的开通授权请求的认证,然后所述第二终端可以进一步的向所述第一终端进行登记认证,可以用于所述第一终端对所述第二终端进行登记、识别和开通授权认证,完成所述第一终端对所述第二终端登记注册、开通设备授权认证等。本实施例中所述第二终端可以利用所述对授权开通请求消息MSG_A1解密获取的第一密钥key1对所述第二终端的第二设备标识auth_divice_id进行加密,形成授权开通结果消息MSG_B1。所述第二终端同样可以以WIFI或者蓝牙的方式广播消息,或者以其他点对点的通信方式发送所述授权开通结果消息MSG_B1。在多数如智能手环等可穿戴设备的第二终端中可以设置有短距离或者移动通信网络或者专有数据通信网络的模块,可以实现所述第一终端与所述第二终端之间的信息通信,完成信息交互。After the above decryption is successful, the second terminal can complete the authentication of the activation authorization request of the first terminal, and then the second terminal can further register and authenticate with the first terminal, which can be used by the first terminal to register, identify and activate authorization authentication for the second terminal, and complete the registration of the second terminal by the first terminal, activation device authorization authentication, etc. In this embodiment, the second terminal can use the first key key1 obtained by decrypting the authorization activation request message MSG_A1 to encrypt the second device identifier auth_divice_id of the second terminal to form an authorization activation result message MSG_B1. The second terminal can also broadcast messages in WIFI or Bluetooth mode, or send the authorization activation result message MSG_B1 in other point-to-point communication modes. In most wearable devices such as smart bracelets, the second terminal can be equipped with a module for a short-range or mobile communication network or a proprietary data communication network, which can realize information communication between the first terminal and the second terminal and complete information interaction.
所述第二终端在所述解密成功时可以利用获取的第一密钥加密所述第二设备标识,将收取开通结果消息反馈给所述第一终端。When the decryption is successful, the second terminal may use the obtained first key to encrypt the second device identification, and feed back a received activation result message to the first terminal.
S4:第一终端获取授权开通结果消息,用所述第一密钥进行解密;若解密成功,则开通设备授权。S4: The first terminal obtains the authorization activation result message and decrypts it using the first key; if the decryption is successful, the device authorization is activated.
所述第一终端可以接收获取所述第二终端发送的授权开通消息,例如智能手机通过蓝牙扫描获取得到可穿戴设备通过蓝牙广播的授权结果消息。所述第二终端可以利用所述生成的第一密钥key1对接收获取的授权开通结果消息MSG_B1进行解密。如果解密成功,则可以表示发送所述授权结果消息的第二终端设备是可靠的,可以登记所述第二终端的相关信息,例如第二终端设备的第二设备标识auth_divice_id,并可以开通设备授权,用于与可穿戴设备进行授权认证的消息交互,完成对第二终端的设备授权开通的认证。The first terminal can receive and obtain the authorization activation message sent by the second terminal, for example, a smartphone obtains the authorization result message broadcast by the wearable device via Bluetooth through Bluetooth scanning. The second terminal can use the generated first key key1 to decrypt the received authorization activation result message MSG_B1. If the decryption is successful, it can be indicated that the second terminal device that sent the authorization result message is reliable, and the relevant information of the second terminal, such as the second device identifier auth_divice_id of the second terminal device, can be registered. The device authorization can be activated for message interaction with the wearable device for authorization authentication, thereby completing the authentication of the device authorization activation of the second terminal.
优选的实施例中,在所述第一终端所述解密成功,开通设备授权可以包括:在所述第一终端设备解密成功时,基于所述解密获取的所述第二设备标识auth_divice_id对所述第二终端开通设备授权。In a preferred embodiment, when the decryption of the first terminal is successful, activating device authorization may include: when the decryption of the first terminal device is successful, activating device authorization for the second terminal based on the second device identifier auth_divice_id obtained by the decryption.
如智能手机的第一终端解密可穿戴设备的第二终端授权解密消息MSG_B1成功时,可以获取所述可穿戴设备的设备标识,可以在智能手机一侧登记存储可以穿戴设备的设备标识,也可以同时存储所述的第一密钥key1。这样,智能手机可以获取并存储可穿戴设备的设备标识,可以仅对所述存储的设备标识开通设备授权,由开放式开通设备授权增强为点对点式开通设备授权,可以有效阻止非法可穿戴设备开通设备授权认证服务,提高终端设备双向认证的安全性。If the smartphone's first terminal successfully decrypts the wearable device's second terminal's authorized decryption message MSG_B1, the wearable device's device identifier can be obtained. The smartphone can then register and store the wearable device identifier and the first key1. This allows the smartphone to obtain and store the wearable device identifier and enable device authorization only for the stored identifier. This upgrades open device authorization to point-to-point authorization, effectively preventing unauthorized wearable devices from accessing device authorization services and improving the security of two-way authentication on terminal devices.
通过上述开通授权认证的消息交互过程后,所述第一终端如智能手机中可以获取并存储有第二终端如智能手环等的第二设备标识auth_divice_id,并可以存储生成的所述生成的第一密钥key1;所述第二终端同样也可以存储有所述第一终端如智能手机的设备标识app_divice_id和所述第一密钥key1,完成所述第一终端和第二终端开通设备授权的双向认证。相比于传统的仅仅可穿戴设备对智能手机或服务器等的单向授权认证,本申请实施例在授权认证之前先进行开通设备授权的双向认证,可以大幅度提高终端设备认证授权的安全性。After the above-mentioned message interaction process of opening authorization authentication, the first terminal, such as a smartphone, can obtain and store the second device identification auth_divice_id of the second terminal, such as a smart bracelet, and can store the generated first key key1; the second terminal can also store the device identification app_divice_id of the first terminal, such as a smartphone, and the first key key1, completing the two-way authentication of the first and second terminals for opening device authorization. Compared with the traditional one-way authorization authentication of the wearable device to the smartphone or server, the embodiment of the present application performs two-way authentication for opening device authorization before authorization authentication, which can greatly improve the security of terminal device authentication and authorization.
在上述所述第一终端与第二终端双向开通设备授权服务/功能后,可以进行设备授权认证。图2是本申请所述的一种终端设备认证方法一种实施例的方法流程示意图,如图2所示,在所述第一终端和第二终端设备开通授权认证功能后进行授权认证的方法可以包括:After the device authorization service/function is activated in both directions on the first terminal and the second terminal, device authorization authentication can be performed. Figure 2 is a schematic diagram of a method flow of an embodiment of a terminal device authentication method described in this application. As shown in Figure 2, the method for performing authorization authentication after the authorization authentication function is activated on the first terminal and the second terminal device may include:
S1’:第一终端发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息。S1’: The first terminal sends an authorization request message generated by encrypting a second key generated by the stored first key and the first device identification of the first terminal.
第一终端可以用存储的第一密钥key1对生成的第二密钥key2和第一终端的第一设备标识app_divice_id进行加密形成授权请求消息MSG_A2,并发送所述授权请求消息MSG_A2。The first terminal may use the stored first key key1 to encrypt the generated second key key2 and the first device identification app_divice_id of the first terminal to form an authorization request message MSG_A2, and send the authorization request message MSG_A2.
所述第一终端可以利用所述第一终端上的应用生成第二密钥key2,所述生成的第二密钥key2可以包括随机或者按照预定算法生成的验证密钥,具体的可以参照上述第一终端开通设备授权过程中生成的第一密钥key1,在此不做赘述。前述中所述第一终端在开通设备授权时生成了第一密钥key1,并进行了存储,此处所述第一终端可以利用所述第已密钥对所述生成的第二密钥key2以及所述第一终端的第一设备标识app_divice_id进行加密,形成对可穿戴设备等第二终端的授权请求消息MSG_A2,并可以通过WIFI或蓝牙、红外等短距离通信方式或点对点或者其他专用通信方式发送所述授权请求消息MSG_A2,供所述第二终端接收处理。The first terminal can use the application on the first terminal to generate a second key key2. The generated second key key2 may include a verification key generated randomly or according to a predetermined algorithm. For details, please refer to the first key key1 generated during the device authorization process of the first terminal, which will not be described in detail here. In the aforementioned description, the first terminal generated the first key key1 when activating the device authorization and stored it. Here, the first terminal can use the second key to encrypt the generated second key key2 and the first device identifier app_divice_id of the first terminal to form an authorization request message MSG_A2 for the second terminal such as a wearable device, and can send the authorization request message MSG_A2 via short-distance communication methods such as WIFI, Bluetooth, infrared, or point-to-point or other dedicated communication methods for the second terminal to receive and process.
S2’:第二终端获取授权请求消息,用存储的第一密钥进行解密;在所述解密成功时,判断是否存储有与所述解密获取的第一设备标识相对应的第一授权设备标识。S2': The second terminal obtains the authorization request message and decrypts it using the stored first key; when the decryption is successful, it is determined whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored.
所述第二终端可以获取授权请求消息MSG_A2,并用存储的第一密钥key1对所述获取的授权请求消息MSG_A2进行解密。在所述解密成功时将所述解密获取的所述第一设备标识app_divice_id与存储的第一授权设备标识Pre_app_divice_id进行比较,判断是否有与所述第一设备标识app_divice_id相对应的第一授权设备标识Pre_app_divice_id。所述的第二终端可以为可穿戴设备,具体的可以包括但不限于装载了智能处理芯片的腕表、眼镜、鞋、帽、服装、首饰、手环、挂件等的可穿戴设备。The second terminal can obtain the authorization request message MSG_A2 and decrypt the obtained authorization request message MSG_A2 using the stored first key key1. If the decryption is successful, the first device identifier app_divice_id obtained by decryption is compared with the stored first authorization device identifier Pre_app_divice_id to determine whether there is a first authorization device identifier Pre_app_divice_id corresponding to the first device identifier app_divice_id. The second terminal can be a wearable device, specifically including but not limited to wearable devices such as watches, glasses, shoes, hats, clothing, jewelry, bracelets, pendants, etc. equipped with an intelligent processing chip.
本实施例中可穿戴设备的第二终端可以对智能手机的第一终端进行认证。前述中所述第二终端在开通设备授权请求的过程中可以获取第一终端发送的第一密钥key1,所述第二终端可以接收获取第一终端发送的授权请求消息MSG_A2,然后可以利用所述第一密钥key1对所述授权请求消息MSG_A2进行解密。如果解密失败,则所述第二终端对所述第一终端的设备授权失败。In this embodiment, the second terminal of the wearable device can authenticate the first terminal of the smartphone. As previously mentioned, during the device authorization request process, the second terminal can obtain the first key, key1, sent by the first terminal. The second terminal can receive the authorization request message, MSG_A2, sent by the first terminal and then decrypt the authorization request message, MSG_A2, using the first key, key1. If the decryption fails, the second terminal fails to authorize the first terminal.
如果解密成功,则可以将对所述授权请求消息MSG_A2解密获取的第一设备标识app_divice_id与开通设备授权服务时获取的并存储的设备标识进行比较,判断是否与开通授权服务时的设备标识相符。前述第二终端设备开通设备授权时可以获取存储第一终端的第一设备标识,此处可以将所述第二终端存储的所述第一设备标识作为第一授权设备标识Pre_app_divice_id,标记为可靠的终端设备的标识。当然,在终端设备面临一对多或者多对多的应用场景下,所述第二终端可以存储有多个所述第一授权设备标识,每一个所述第一授权设备标识可以对应一个第一终端设备。所述第二终端可以将所述第一设备标识app_divice_id与所述第一授权设备标识Pre_app_divice_id进行比较,判断是否存储有与所述第一设备标识app_divice_id相对应的第一授权设备标识Pre_app_divice_id。If the decryption is successful, the first device identification app_divice_id obtained by decrypting the authorization request message MSG_A2 can be compared with the device identification obtained and stored when the device authorization service is activated to determine whether it is consistent with the device identification when the authorization service is activated. The aforementioned second terminal device can obtain the first device identification of the first terminal when activating device authorization. Here, the first device identification stored by the second terminal can be used as the first authorization device identification Pre_app_divice_id and marked as the identification of a reliable terminal device. Of course, in the case of a one-to-many or many-to-many application scenario where the terminal device faces a one-to-many or many-to-many situation, the second terminal can store multiple first authorization device identifications, and each first authorization device identification can correspond to a first terminal device. The second terminal can compare the first device identification app_divice_id with the first authorization device identification Pre_app_divice_id to determine whether the first authorization device identification Pre_app_divice_id corresponding to the first device identification app_divice_id is stored.
如果判断结果为没有,则即使对所述授权消息MSG_A2解密成功,也可以设置不对所述授权消息中所述第一设备标识app_divice_id所对应的第一终端不进行授权,或者第二终端对所述第一终端授权认证失败。If the judgment result is no, even if the authorization message MSG_A2 is decrypted successfully, it can be set not to authorize the first terminal corresponding to the first device identifier app_divice_id in the authorization message, or the second terminal fails to authorize and authenticate the first terminal.
S3’:在所述判断结果为有时,所述第二终端基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息。S3': When the judgment result is yes, the second terminal authorizes the first terminal based on the first device identifier, and sends an authorization result message generated by encrypting the second device identifier of the second terminal using the second key obtained by decryption.
当然,在所述判断结果为有时,所述第二终端基于所述第一设备标识app_divice_id对所述第一终端进行授权;所述第二终端利用解密获取的第二密钥key2对所述第二终端的第二设备标识auth_divice_id进行加密,形成授权结果消息MSG_B2,并发送所述授权结果消息MSG_B2。Of course, when the judgment result is yes, the second terminal authorizes the first terminal based on the first device identification app_divice_id; the second terminal uses the second key key2 obtained by decryption to encrypt the second device identification auth_divice_id of the second terminal to form an authorization result message MSG_B2, and sends the authorization result message MSG_B2.
具体的,所述第二终端可以基于获取所述第一设备标识app_divice_id标记所述第一终端,对第一终端进行授权。本申请实施例中所述第二终端对所述第一终端进行授权认证之后,所述第一终端还需要对所述第二终端进行反向认证,提高智能手机与可穿戴设备之间授权认证的安全性和可靠性。因此,所述第二终端可以利用所述解密获取的第二密钥key2加密所述第二终端的第二设备标识auth_divice_id,形成反馈给所述第一终端的授权结果消息MSG_B2。当然,所述第二终端可以发送所述授权结果消息MSG_B2,具体的消息交互传输方式可以参照本申请其他实施例中第一终端与第二终端消息交互方式,在此不做赘述。Specifically, the second terminal can obtain the first device identifier app_divice_id to mark the first terminal and authorize the first terminal. In the embodiment of the present application, after the second terminal authorizes and authenticates the first terminal, the first terminal also needs to reversely authenticate the second terminal to improve the security and reliability of authorization and authentication between the smartphone and the wearable device. Therefore, the second terminal can use the second key key2 obtained by decryption to encrypt the second device identifier auth_divice_id of the second terminal, forming an authorization result message MSG_B2 that is fed back to the first terminal. Of course, the second terminal can send the authorization result message MSG_B2. The specific message interaction transmission method can refer to the message interaction method between the first terminal and the second terminal in other embodiments of the present application, which will not be repeated here.
S4’:第一终端获取授权结果消息,用所述第二密钥进行解密;在解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权。S4': The first terminal obtains the authorization result message and decrypts it using the second key; when the decryption is successful, it is determined whether a second authorized device identifier corresponding to the second device identifier obtained by the decryption is stored, and based on the determination result, it is determined whether to authorize the second terminal.
所述第一终端可以获取授权结果消息MSG_B2,并用所述第二密钥key2对所述授权结果消息MSG_B2进行解密;在解密成功时将所述解密获取的第二设备标识auth_divice_id与存储的第二授权设备标识Pre_auth_divice_id进行比较,判断是否有与所述第二设备标识auth_divice_id相对应的第二授权设备标识Pre_auth_divice_id,并基于所述判断结果确定是否对所述第二终端进行授权。The first terminal can obtain the authorization result message MSG_B2 and decrypt the authorization result message MSG_B2 using the second key key2; when the decryption is successful, the second device identification auth_divice_id obtained by the decryption is compared with the stored second authorization device identification Pre_auth_divice_id to determine whether there is a second authorization device identification Pre_auth_divice_id corresponding to the second device identification auth_divice_id, and determine whether to authorize the second terminal based on the judgment result.
所述第一终端可以通过WIFI或者蓝牙等获取授权结果消息MSG_B2,并利用所述生成的第二密钥key2进行解密。如果解密成功,则可以将对所述授权结果消息MSG_B2解密获取的第二设备标识auth_divice_id与开通设备授权服务时获取的并存储的设备标识进行比较,判断是否与开通授权服务时的设备标识相符。前述第一终端设备开通设备授权时可以获取并存储第二终端的第二设备标识,此处可以将所述第一终端存储的所述第二设备标识作为第二授权设备标识Pre_auth_divice_id,标记为可靠的终端设备的标识。当然,在终端设备面临一对多或者多对多的应用场景下,所述第一终端可以存储有多个所述第二授权设备标识,每一个所述第二授权设备标识可以对应一个第二终端设备,如存储有智能手环、智能手表的第二授权设备标识等。所述第一终端可以将所述第二设备标识auth_divice_id与所述第二授权设备标识Pre_auth_divice_id进行比较,判断是否存储有与所述第二设备标识auth_divice_id相对应的第二授权设备标识Pre_auth_divice_id。The first terminal can obtain the authorization result message MSG_B2 through WIFI or Bluetooth, and decrypt it using the generated second key key2. If the decryption is successful, the second device identification auth_divice_id obtained by decrypting the authorization result message MSG_B2 can be compared with the device identification obtained and stored when the device authorization service is activated to determine whether it is consistent with the device identification when the authorization service is activated. The aforementioned first terminal device can obtain and store the second device identification of the second terminal when the device authorization is activated. Here, the second device identification stored by the first terminal can be used as the second authorization device identification Pre_auth_divice_id and marked as a reliable terminal device identification. Of course, in the case of a one-to-many or many-to-many application scenario where the terminal device faces one-to-many or many-to-many, the first terminal can store multiple second authorization device identifications, and each second authorization device identification can correspond to a second terminal device, such as storing the second authorization device identification of a smart bracelet or a smart watch. The first terminal may compare the second device identifier auth_divice_id with the second authorized device identifier Pre_auth_divice_id to determine whether a second authorized device identifier Pre_auth_divice_id corresponding to the second device identifier auth_divice_id is stored.
进一步的,所述第一终端可以基于所述判断结果确定是否对所述第二设终端进行授权。如果所述判断结果为有,则所述第一终端对所述第二终端进行授权。例如智能手机判断获取的智能手环的第二设备标识与授权认证开通时存储的智能手环的第二授权设备标识相同,则所述智能手机可以基于所述智能手环的第二设备标识对所述智能手环进行授权,完成对所述智能手环的授权认证。然后所述第一终端可以执行相应的对第二终端的授权操作。当然,如果所述判断结果为获取的第二终端设备标识与存储的第二授权设备标识不相符,则对所述第二终端授权失败。Further, the first terminal can determine whether to authorize the second terminal based on the judgment result. If the judgment result is yes, the first terminal authorizes the second terminal. For example, if the smartphone determines that the second device identifier of the smart bracelet obtained is the same as the second authorized device identifier of the smart bracelet stored when the authorization authentication is turned on, the smartphone can authorize the smart bracelet based on the second device identifier of the smart bracelet and complete the authorization authentication of the smart bracelet. Then the first terminal can perform the corresponding authorization operation on the second terminal. Of course, if the judgment result is that the acquired second terminal device identifier does not match the stored second authorized device identifier, the authorization to the second terminal fails.
本申请提供的一种终端设备认证方法,在终端设备认证之前可以先进行设备授权开通请求的认证,将不符合设备授权开通要设备的终端设备排除在外,可以有效先行避免非法终端要求开通设备授权。在设备授权认证的过程中,尤其是可穿戴设备的客户端与智能终端的服务器端的授权认证采用了基于预置密钥和生成的第一密钥、第二密钥的双向认证,相比于传统的可穿戴设备仅对服务器端的单向认证大幅度提高了设备之间认证的安全性和可靠性,可以有效避免可穿戴设备被恶意钓鱼、终端欺骗等。The present application provides a terminal device authentication method that can first authenticate the device authorization activation request before the terminal device is authenticated, and exclude terminal devices that do not meet the device authorization activation requirements, which can effectively prevent illegal terminals from requesting device authorization. In the process of device authorization authentication, especially the authorization authentication between the client of the wearable device and the server of the smart terminal adopts a two-way authentication based on a preset key and a generated first key and a second key. Compared with the traditional wearable device's one-way authentication of the server, the security and reliability of authentication between devices are greatly improved, which can effectively prevent the wearable device from being maliciously phished, terminal deception, etc.
现有技术通常在授权认证过程中使用的验证特征码为固定不变的特征码,一旦特征码被窃取,会导致攻击者利用获取的特征码获取终端设备的权限,安全可靠性较差。本申请所述的一种终端设备认证方法还提供一种优选的实施例,在该优选的实施例中,进行双向授权认证的终端设备在每一次授权认证过程中可以变换验证密钥,这样,动态更新的验证密钥可以大幅度提高终端设备的授权认证的安全性。图3是本申请一种终端设备认证方法另一种实施例的流程示意图,如图3所示,所述一种终端设备认证方法还可以包括:The verification feature code usually used in the authorization and authentication process in the prior art is a fixed feature code. Once the feature code is stolen, the attacker will use the acquired feature code to obtain the authority of the terminal device, which has poor security and reliability. The terminal device authentication method described in this application also provides a preferred embodiment. In this preferred embodiment, the terminal device performing two-way authorization authentication can change the verification key during each authorization authentication process. In this way, the dynamically updated verification key can greatly improve the security of the authorization authentication of the terminal device. Figure 3 is a flow chart of another embodiment of a terminal device authentication method of the present application. As shown in Figure 3, the terminal device authentication method may also include:
S5’:在所述第二终端判断存储有与所述第一设备标识app_divice_id相对应的第一授权设备标识Pre_app_divice_id时,将所述第二密钥key2替换所述第一密钥key1;S5': when the second terminal determines that the first authorized device identifier Pre_app_divice_id corresponding to the first device identifier app_divice_id is stored, the first key key1 is replaced by the second key key2;
在所述第一终端判断存储有与所述解密获取的第二设备标识auth_divice_id相对应的第二授权设备标识Pre_auth_divice_id时,将所述第二密钥key2替换所述第一密钥key1。When the first terminal determines that a second authorized device identifier Pre_auth_divice_id corresponding to the second device identifier auth_divice_id obtained by decryption is stored, the first key key1 is replaced by the second key key2.
在所述优选的实施方式中,每一次新的授权认证,所述第一终端都可以生成新的第二验证密钥,在一次验证后,所述第一终端可以所述第二终端可以将新的第二验证密钥替换当前的第一验证密钥作为更新后的所述第一密钥。本申请优选的实施例中所述的终端设备认证方法采用验证密钥动态更新,可以提供终端设备授权认证的安全性。In the preferred embodiment, the first terminal can generate a new second verification key for each new authorization authentication. After one authentication, the first terminal can use the new second verification key to replace the current first verification key as the updated first key. The terminal device authentication method described in the preferred embodiment of the present application uses dynamic updating of verification keys to improve the security of terminal device authorization authentication.
在常规的终端设备验证,尤其是在例如智能终端(智能手机、平板电脑等)与可穿戴设备(智能手环、智能手表等)之间的验证多采用WIFI,或者是蓝牙通信等,这样的短距离信息传输在现代通信技术中属于信道安全级别较低的方式,信息传输过程中容易被攻击者拦截,传输的信息容易被窃取或者伪造。本申请所述一种终端设备认证方法另一种优选的实施例中,还可以进一步的在终端设备传输的信息内容中加入附加验证信息,确保信息接收的可靠性,进一步提高信息传输的安全性和可靠性。In conventional terminal device verification, especially in verification between smart terminals (smartphones, tablets, etc.) and wearable devices (smart bracelets, smart watches, etc.), WIFI or Bluetooth communication is often used. Such short-distance information transmission belongs to a method with a low channel security level in modern communication technology. The information transmission process is easily intercepted by attackers, and the transmitted information is easily stolen or forged. In another preferred embodiment of a terminal device authentication method described in the present application, additional verification information can be further added to the information content transmitted by the terminal device to ensure the reliability of information reception and further improve the security and reliability of information transmission.
图4是本申请所述一种终端设备认证方法另一种实施例的方法流程示意图,如图4所示,所述一种终端设备认证方法还可以包括:FIG4 is a schematic diagram of a method flow of another embodiment of a terminal device authentication method described in the present application. As shown in FIG4 , the terminal device authentication method may further include:
S6’:在所述第一终端发送的授权请求消息添加所述第一密钥对按照预定规则生成的附加信息进行加密的信息;S6': adding information that the first key is used to encrypt additional information generated according to a predetermined rule to the authorization request message sent by the first terminal;
在所述第二终端返回的授权结果消息中添加利用所述第二密钥加密所述附加信息的信息;Adding information that the additional information is encrypted using the second key to the authorization result message returned by the second terminal;
相应的,所述第一终端在解密所述授权结果消息成功时还判断所述解密获取的附加信息与发送授权请求消息时的附加信息是否相同,并根据所述判断结果确定是否对所述第二终端进行授权。Correspondingly, when the first terminal successfully decrypts the authorization result message, it also determines whether the additional information obtained by decryption is the same as the additional information when sending the authorization request message, and determines whether to authorize the second terminal based on the judgment result.
所述添加的附加信息通常可以包括但不限于挑战码challenge(一串随机数,可以用于加密消息,避免通信链路上传输明文信息)、摘要digest(用户登录的账户信息、会话ID等)等。本实施例中可以在传输的信息中加入挑战码、摘要等附件的验证信息,可以对信道传输的消息进行加密,并可以有效阻止攻击者发送终端设备已接收过的数据包,来达到欺骗系统的目的,在可穿戴设备的授权认证中可以有效提高授权认证的正确性。The added additional information typically includes, but is not limited to, a challenge code (a string of random numbers that can be used to encrypt messages to prevent plaintext transmission over the communication link), a digest (user login account information, session ID, etc.), etc. In this embodiment, verification information such as a challenge code and digest can be added to the transmitted information, thereby encrypting the message transmitted over the channel and effectively preventing attackers from sending data packets that have already been received by the terminal device to deceive the system. This can effectively improve the accuracy of authorization and authentication in wearable devices.
基于本申请所述的一种终端设备认证方法,本申请提供一种终端设备认证装置。图5是本申请所述一种终端设备认证装置的模块结构示意图,如图5所示,所述装置可以包括:Based on the terminal device authentication method described in this application, this application provides a terminal device authentication device. Figure 5 is a schematic diagram of the module structure of the terminal device authentication device described in this application. As shown in Figure 5, the device may include:
第一存储单元101,可以用于存储生成的第一密钥、获取的第二终端的第二授权设备标识;The first storage unit 101 may be used to store the generated first key and the obtained second authorized device identifier of the second terminal;
第一加密单元102,可以用于生成第二密钥,并利用所述第一密钥对所述第二密钥和获取的第一设备标识进行加密,生成授权请求消息;The first encryption unit 102 may be configured to generate a second key, and encrypt the second key and the obtained first device identifier using the first key to generate an authorization request message;
第一通信模块103,可以用于发送所述授权请求消息,还可以用于接收第二终端发送的授权结果消息。在具体的实施过程中,所述通信模块可以包括WIFI通信模块,或者基于短距离通信的蓝牙、红外通信模块等,当然也可以包括2G/3G/4G以及更高版本通信协议的移动通信网络模块和有线通信模块。The first communication module 103 can be used to send the authorization request message and can also be used to receive the authorization result message sent by the second terminal. In a specific implementation process, the communication module can include a WIFI communication module, or a Bluetooth or infrared communication module based on short-range communication, etc., and of course can also include a mobile communication network module and a wired communication module for 2G/3G/4G and higher communication protocols.
第一解密判断单元104,可以用于利用所述第二密钥对所述授权结果消息进行解密,并在解密成功时,判断所述第一存储单元101是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识;The first decryption judgment unit 104 may be configured to decrypt the authorization result message using the second key, and when the decryption is successful, determine whether the first storage unit 101 stores a second authorized device identifier corresponding to the second device identifier obtained by decryption;
第一授权模块105,可以用于基于所述第一解密判断单元104的判断结果确定是否对所述第二终端进行授权。The first authorization module 105 may be configured to determine whether to authorize the second terminal based on the determination result of the first decryption determination unit 104 .
本实施例所述的一种终端设备认证装置可以用于对可以穿戴设备进行认证的例如智能手机、平板电脑或者专用的服务器等终端设备,可以有效、安全的对可穿戴设备进行设备授权认证,提高设备授权认证的安全性。The terminal device authentication device described in this embodiment can be used to authenticate terminal devices such as smartphones, tablet computers, or dedicated servers that can authenticate wearable devices. It can effectively and securely perform device authorization authentication on wearable devices, thereby improving the security of device authorization authentication.
本申请所述一种终端设备认证装置另一种优选的实施例中,所述存储单元101存储的第一密钥还可以动态更新,在每一次设备授权认证中都进行密钥更新,可以大幅度提高设备授权认证的安全性和可靠性。图6是本申请所述一种终端设备认证装置另一种实施例的模块结构示意图,如图6所示,优选的实施例中所述终端设备认证装置还可以包括:In another preferred embodiment of the terminal device authentication device described in this application, the first key stored in the storage unit 101 can also be dynamically updated. The key is updated during each device authorization authentication, which can significantly improve the security and reliability of device authorization authentication. Figure 6 is a schematic diagram of the module structure of another embodiment of the terminal device authentication device described in this application. As shown in Figure 6, the terminal device authentication device in the preferred embodiment can also include:
第一密钥更新模块106,可以用于在所述第一解密判断单元104的判断结果为有时将所述第一加密单元102生成的第二密钥替换所述第一存储单元101存储的第一密钥。The first key updating module 106 may be configured to replace the first key stored in the first storage unit 101 with the second key generated by the first encryption unit 102 when the judgment result of the first decryption judgment unit 104 is yes.
为保障授权认证的终端装置验证密钥的同步更新,本实施例中所述的第一密钥更新模块106可以在所述第一解密判断单元104判断所述第一存储单元101是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识时将所述第一加密单元102生成的第二密钥替换所述第一存储单元101存储的第一密钥。如果所述判断结果为有,则可以接收授权请求消息的第二终端通过了授权认证,第二终端中预先存储的验证密钥如第一密钥也更新为第二密钥,那么在下次授权认证时可以保障授权认证的双向终端设备加密解密时密钥的一致性。To ensure the synchronous update of the verification key of the terminal device undergoing authorization authentication, the first key update module 106 described in this embodiment can replace the first key stored in the first storage unit 101 with the second key generated by the first encryption unit 102 when the first decryption judgment unit 104 determines whether the first storage unit 101 stores a second authorized device identifier corresponding to the second device identifier obtained through decryption. If the judgment result is yes, the second terminal that can receive the authorization request message has passed the authorization authentication. The verification key pre-stored in the second terminal, such as the first key, is also updated to the second key. This ensures key consistency during encryption and decryption of the bidirectional terminal devices undergoing authorization authentication during the next authorization authentication.
在本申请的另一种实施例中,为进一步加强授权认证的终端设备通信信道信息传输的安全性,图7是本申请所述一种终端设备认证装置另一种实施例的模块结构示意图,如图7所示,所述的一种终端设备认证装置还可以包括:In another embodiment of the present application, to further enhance the security of information transmission in the communication channel of the authorized and authenticated terminal device, FIG7 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device described in the present application. As shown in FIG7 , the terminal device authentication device may further include:
附加信息模块107,可以用于在所述授权请求消息添加所述第一密钥对按照预定规则生成的附加信息进行加密的信息;The additional information module 107 may be configured to add information in the authorization request message that is encrypted using the first key to generate additional information according to a predetermined rule;
相应的,所述第一解密判断单元104在解密所述授权结果消息成功时还判断所述解密获取的附加信息与所述添加至授权请求消息的附加信息是否相同,所述第一授权模块105根据所述附加信息的判断结果确定是否对所述第二终端进行授权。Correspondingly, when the first decryption judgment unit 104 successfully decrypts the authorization result message, it also determines whether the additional information obtained by decryption is the same as the additional information added to the authorization request message. The first authorization module 105 determines whether to authorize the second terminal based on the judgment result of the additional information.
在本申请所述的终端设备认证装置的一种实施例中,所述的第二终端可以为可穿戴设备,具体的所述的第二终端可以包括但不限于装载了智能处理芯片的腕表、眼镜、鞋、帽、服装、首饰、手环、挂件的可穿戴设备。In one embodiment of the terminal device authentication device described in the present application, the second terminal may be a wearable device. Specifically, the second terminal may include but is not limited to wearable devices such as watches, glasses, shoes, hats, clothing, jewelry, bracelets, and pendants equipped with intelligent processing chips.
上述所述的终端设备热阻装置可以用于对可以穿戴设备进行认证的例如智能手机、平板电脑或者专用的服务器等终端设备,相应的,本申请还提供一种可以用于例如智能手表、智能手环等可穿戴设备的终端设备中进行认证的装置,用于对例如智能手机、服务器等终端设备进行授权认证。图8是本申请所述一种终端设备认证装置一种实施例的模块结构示意图,如图8所示,所述装置可以包括:The terminal device thermal resistance device described above can be used to authenticate wearable devices, such as smartphones, tablets, or dedicated servers. Accordingly, the present application also provides a device that can be used for authentication in wearable devices, such as smart watches and smart bracelets, for authorizing and authenticating terminal devices, such as smartphones and servers. Figure 8 is a schematic diagram of the module structure of an embodiment of a terminal device authentication device described in the present application. As shown in Figure 8, the device may include:
第二通信模块201,可以用于接收第一终端发送的授权请求消息和发送授权结果消息;The second communication module 201 may be configured to receive an authorization request message sent by the first terminal and send an authorization result message;
第二存储单元202,可以用于存储获取的第一终端的第一授权设备标识和第一密钥;The second storage unit 202 may be used to store the acquired first authorization device identifier and first key of the first terminal;
第二解密判断单元203,可以用于利用存储的第一密钥对所述授权请求消息进行解密,并在解密成功时,判断所述第二存储单元202是否存储有与所述第一设备标识相对应的第一授权设备标识;The second decryption judgment unit 203 may be configured to decrypt the authorization request message using the stored first key, and when the decryption is successful, determine whether the second storage unit 202 stores a first authorization device identifier corresponding to the first device identifier;
第二授权模块204,可以基于所述第二解密判断单元203的判断结果确定是否对所述第一设备标识所对应所述第一终端进行授权。The second authorization module 204 may determine whether to authorize the first terminal corresponding to the first device identifier based on the determination result of the second decryption determination unit 203 .
第二加密单元205,可以用于在所述第二解密判断单元203的判断结果为有时,利用所述第二密钥对所述第二终端的第二设备标识进行加密生成授权结果消息。The second encryption unit 205 may be configured to, when the determination result of the second decryption determination unit 203 is yes, encrypt the second device identification of the second terminal using the second key to generate an authorization result message.
本实施例提供的终端设备认证的装置,可以在可穿戴设备的终端中对智能手机等请求授权的终端设备进行认证,完成终端设备的双向授权认证。在本实施例中可以利用开通授权请求时获取的第一密钥解密授权请求消息获取第一设备标识,并将其与存储的第一授权设备标识进行比较,进而判断请求授权的第一终端是否合法,并根据判断结果确定是否对第一终端进行授权。这样在可以穿戴设备的终端设备中可以有效对请求授权认证的智能终端、服务器等进行反向认证,提高终端设备授权认证的安全性。The terminal device authentication device provided in this embodiment can authenticate a terminal device such as a smartphone that requests authorization in a terminal of a wearable device, thereby completing two-way authorization authentication of the terminal device. In this embodiment, the first key obtained when opening the authorization request can be used to decrypt the authorization request message to obtain the first device identifier, and then compare it with the stored first authorized device identifier to determine whether the first terminal requesting authorization is legitimate, and determine whether to authorize the first terminal based on the judgment result. In this way, the smart terminal, server, etc. that requests authorization authentication can be effectively reversely authenticated in the terminal device that can be used as a wearable device, thereby improving the security of the terminal device authorization authentication.
优选的实施例中,上述所述可以用于可穿戴设备的终端设备认证的装置也可以进行验证密钥的动态更新,提高终端设备授权认证的安全性和可靠性。图9是本申请所述一种终端设备认证装置另一种实施例的模块结构示意图,如图9所示,所述装置还可以包括:In a preferred embodiment, the terminal device authentication device described above for wearable devices can also dynamically update the verification key to improve the security and reliability of terminal device authorization authentication. Figure 9 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device described in this application. As shown in Figure 9, the device can also include:
第二密钥更新模块206,可以用于在所述第二解密判断单元203判断所述第二存储单元202存储有与所述解密获取的第一设备标识相对应的第一授权设备标识时将所述解密获取的第二密钥替换所述第二存储单元201存储的第一密钥。The second key update module 206 can be used to replace the first key stored in the second storage unit 201 with the second key obtained by decryption when the second decryption judgment unit 203 determines that the second storage unit 202 stores a first authorized device identifier corresponding to the first device identifier obtained by decryption.
如前述所述,第二终端解密成功后,可以将存储的第一密钥更换为解密授权请求消息时获取的第二密钥,实现终端设备授权认证中验证密钥的动态更新,提供验证过程的安全性和可靠性。As mentioned above, after the second terminal successfully decrypts, it can replace the stored first key with the second key obtained when decrypting the authorization request message, thereby realizing dynamic update of the verification key in the terminal device authorization authentication and providing security and reliability of the verification process.
图10是本申请所述一种终端设备认证装置另一种实施例的模块结构示意图,如图10所示另一种优选的实施例中,所述装置还可以包括:FIG10 is a schematic diagram of the module structure of another embodiment of a terminal device authentication device described in the present application. In another preferred embodiment as shown in FIG10 , the device may further include:
附加信息处理模块207,可以用于在所述授权结果消息中添加利用所述解密获取的第二密钥加密所述解密获取的附加信息的信息。The additional information processing module 207 may be configured to add information of the additional information obtained by decryption and encrypted using the second key obtained by decryption to the authorization result message.
在终端设备授权认证的传输消息中加入附加信息可以防止伪造的传输消息,进一步加强授权认证的终端设备通信信道信息传输的安全性。Adding additional information to the transmission message of the terminal device authorization and authentication can prevent forged transmission messages and further enhance the security of the information transmission of the communication channel of the terminal device for authorization and authentication.
基于本申请所述的可以用于可穿戴设备的第一终端设备和智能手机、平板电脑、服务器的第二终端设备的终端设备认证装置,本申请提供一种终端设备认证系统,所述系统具体的可以包括:Based on the terminal device authentication apparatus described in this application, which can be used for a first terminal device of a wearable device and a second terminal device of a smartphone, tablet computer, or server, the present application provides a terminal device authentication system, which can specifically include:
第一终端,可以用于发送用存储的第一密钥对生成的第二密钥和第一终端的第一设备标识进行加密生成的授权请求消息;还可以用于获取第二终端发送的授权结果消息,并用所述第二密钥进行解密;还可以用于在解密成功时,判断是否存储有与所述解密获取的第二设备标识相对应的第二授权设备标识,并基于所述判断结果确定是否对所述第二终端进行授权;The first terminal may be configured to send an authorization request message generated by encrypting a second key generated by a stored first key pair and the first device identifier of the first terminal; may also be configured to obtain an authorization result message sent by the second terminal and decrypt the message using the second key; and may also be configured to, upon successful decryption, determine whether a second authorized device identifier corresponding to the second device identifier obtained by decryption is stored, and determine whether to authorize the second terminal based on the determination result.
第二终端,可以用于第一终端发送获取授权请求消息,并用存储的第一密钥进行解密;还可以用于在所述解密成功时,判断是否存储有与所述解密获取的所述第一设备标识相对应的第一授权设备标识;还可以用于在所述判断结果为有时,基于所述第一设备标识对所述第一终端进行授权,并发送用所述解密获取的第二密钥对所述第二终端的第二设备标识进行加密生成的授权结果消息。The second terminal can be used by the first terminal to send an authorization request message and decrypt it with the stored first key; it can also be used to determine whether a first authorized device identifier corresponding to the first device identifier obtained by the decryption is stored when the decryption is successful; it can also be used to authorize the first terminal based on the first device identifier when the judgment result is yes, and send an authorization result message generated by encrypting the second device identifier of the second terminal with the second key obtained by the decryption.
上述一种终端设备认证系统优选的实施例中,还可以包括:In a preferred embodiment of the above terminal device authentication system, the system may further include:
用于所述第一终端在判断存储有与所述解密获取的第二设备标识相对应的第二授权设备标识时将所述第二密钥替换所述第一密钥的装置:means for the first terminal to replace the first key with the second key when the first terminal determines that a second authorized device identifier corresponding to the second device identifier obtained by decryption is stored:
用于所述第二终端在判断有与所述第一设备标识相对应的第一授权设备标识时将所述第二密钥替换所述第一密钥的装置。The device is used for the second terminal to replace the first key with the second key when the second terminal determines that there is a first authorized device identifier corresponding to the first device identifier.
上述实施例中所述的终端设备认证系统,可以实现终端设备之间双向授权认证,提供设备授权认证的安全性,优选的实施例中采用的验证密钥动态更新,可以进一步提高设备授权认证的安全性和可靠性。The terminal device authentication system described in the above embodiment can realize two-way authorization authentication between terminal devices and provide security of device authorization authentication. The dynamic update of verification keys adopted in the preferred embodiment can further improve the security and reliability of device authorization authentication.
本申请还提供一种可以在授权认证之前进行开通设备授权认证终端设备认证系统,可以保障请求与之进行授权认证的终端设备有权限进行授权认证。因此,本申请提供的一种终端设备认证系统具体的可以包括:This application also provides a terminal device authentication system that can perform device authorization authentication before authorization authentication, which can ensure that the terminal device requesting authorization authentication has the authority to perform authorization authentication. Therefore, the terminal device authentication system provided by this application can specifically include:
第一终端,可以用于发送用存储的预置密钥对生成的第一密钥和第一终端的第一设备标识进行加密生成的授权开通请求消息;还可用于获取第二终端发送授权开通结果消息,并用所述第一密钥对所述授权开通结果消息;若解密成功,则开通设备授权;The first terminal can be used to send an authorization activation request message generated by encrypting a first key generated by a stored preset key pair and a first device identifier of the first terminal; and can also be used to obtain an authorization activation result message sent by the second terminal and decrypt the authorization activation result message using the first key; if decryption is successful, the device authorization is activated;
第二终端,可以用于获取第一终端发送的授权开通请求消息,用存储的预置密钥进行解密,并根据所述解密的结果判断是否开通设备授权;还可以用于在所述解密的结果为成功时,发送利用所述解密获取的第一密钥对所述第二终端的第二设备标识进行加密生成的授权开通结果消息。The second terminal can be used to obtain the authorization activation request message sent by the first terminal, decrypt it using the stored preset key, and determine whether to activate the device authorization based on the decryption result; it can also be used to send an authorization activation result message generated by encrypting the second device identifier of the second terminal using the first key obtained by the decryption when the decryption result is successful.
优选的实施例中,在所述终端设备认证系统中还可以包括下述中的至少一种。In a preferred embodiment, the terminal device authentication system may further include at least one of the following.
用于在所述第一终端在所述解密成功时基于所述解密获取的所述第二设备标识对所述第二终端开通设备授权的装置;means for activating device authorization for the second terminal based on the second device identification obtained by the decryption when the decryption is successful by the first terminal;
用于在所述第二终端在所述解密的结果为成功时基于所述解密获取的第一设备标识对所述第一终端开通设备授权的装置。The device is configured to enable device authorization for the first terminal based on the first device identification obtained by the decryption when the decryption result is successful.
上述所述终端设备认证系统中第二终端可以包括但不限于装载了智能处理芯片的腕表、眼镜、鞋、帽、服装、首饰、手环、挂件的可穿戴设备。The second terminal in the above-mentioned terminal device authentication system may include but is not limited to wearable devices such as watches, glasses, shoes, hats, clothing, jewelry, bracelets, and pendants equipped with intelligent processing chips.
本申请提供的终端设备认证方法、装置及系统,可以实现多终端之间开通设备授权以及设备授权的双向认证,相比于现有技术中终端设备尤其是可穿戴设备的单向认证大大提高了终端设备认证的安全性。The terminal device authentication method, device and system provided in this application can realize the activation of device authorization and two-way authentication of device authorization between multiple terminals, which greatly improves the security of terminal device authentication compared with the one-way authentication of terminal devices, especially wearable devices, in the existing technology.
尽管本申请内容中提到基于移动通信网络、WIFI、蓝牙等消息传输之类的信息交互,但是,本申请并不局限于必须是完全标准的数据传输协议的情况。某些协议的基础上略加修改后的传输机制也可以实行上述本申请各实施例的方案。当然,即使不采用上述通用或标准的协议,而是采用私有协议,只要符合本申请上述各实施例的信息交互和信息判断反馈方式,仍然可以实现相同的申请,在此不再赘述。Although the content of this application mentions information interaction based on message transmission such as mobile communication networks, WIFI, Bluetooth, etc., this application is not limited to the case where it must be a completely standard data transmission protocol. A slightly modified transmission mechanism based on certain protocols can also implement the solutions of the above-mentioned embodiments of this application. Of course, even if the above-mentioned universal or standard protocols are not adopted, but a private protocol is adopted, as long as the information interaction and information judgment feedback methods of the above-mentioned embodiments of this application are met, the same application can still be implemented, and no further details will be given here.
上述实施例阐明的单元或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本申请时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现。The units or modules described in the above embodiments can be implemented by computer chips or physical devices, or by products with certain functions. For ease of description, the above devices are described separately according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and/or hardware, or a module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units.
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内部包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art will also appreciate that, in addition to implementing the controller in pure computer-readable program code, it is entirely possible to implement the same functionality by logically programming the method steps in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered structures within the hardware component. Alternatively, the devices for implementing various functions can be considered both software modules implementing the method and structures within the hardware component.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构、类等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘、智能芯片等,包括若干指令用以使得一台计算机设备(可以是个人计算机,移动终端,服务器,可穿戴设备,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM/RAM, a disk, an optical disk, a smart chip, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, a wearable device, or a network device, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.
本说明书中的各个实施例采用递进的方式描述,各个实施例之间相同或相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。本申请可用于众多通用或专用的计算机系统或者包括智能处理芯片终端的环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、可编程的电子设备、网络PC、小型计算机、大型计算机、可穿戴设备等以及包括以上任何系统或设备的分布式计算环境等等。The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. The present application can be used in many general or special computer systems or environments or configurations including intelligent processing chip terminals. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, wearable devices, etc., as well as distributed computing environments including any of the above systems or devices, etc.
虽然通过实施例描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。Although the present application has been described with reference to the embodiments, those skilled in the art will appreciate that there are many modifications and variations to the present application without departing from the spirit of the present application. It is intended that the appended claims include these modifications and variations without departing from the spirit of the present application.
Claims (22)
Publications (3)
| Publication Number | Publication Date |
|---|---|
| HK1229972A1 HK1229972A1 (en) | 2017-11-24 |
| HK1229972A HK1229972A (en) | 2017-11-24 |
| HK1229972B true HK1229972B (en) | 2020-07-31 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106034028B (en) | A terminal equipment authentication method, device and system | |
| US11501294B2 (en) | Method and device for providing and obtaining graphic code information, and terminal | |
| CN114765534A (en) | Private key distribution system based on national password identification cryptographic algorithm | |
| CN111512608B (en) | Authentication Protocol Based on Trusted Execution Environment | |
| CN105050081B (en) | Method, device and system for connecting network access device to wireless network access point | |
| US8112787B2 (en) | System and method for securing a credential via user and server verification | |
| EP2950506B1 (en) | Method and system for establishing a secure communication channel | |
| CN110545252B (en) | A method, terminal, control function entity and application server for authentication and information protection | |
| KR101706117B1 (en) | Apparatus and method for other portable terminal authentication in portable terminal | |
| CA2879910C (en) | Terminal identity verification and service authentication method, system and terminal | |
| JP2017514421A (en) | Authentication apparatus and method | |
| EP3997851B1 (en) | Method, first device, first server, second server and system for accessing a private key | |
| CN101621794A (en) | Method for realizing safe authentication of wireless application service system | |
| CN108352982B (en) | Communication device, communication method, and recording medium | |
| CN101895881B (en) | Method for realizing GBA secret key and pluggable equipment of terminal | |
| WO2019001834A1 (en) | Methods and apparatuses for access control to a network device from a user device | |
| US20240106633A1 (en) | Account opening methods, systems, and apparatuses | |
| US9876774B2 (en) | Communication security system and method | |
| KR101358375B1 (en) | Prevention security system and method for smishing | |
| CN109451504B (en) | Internet of things module authentication method and system | |
| CN107786978B (en) | NFC authentication system based on quantum encryption | |
| HK1229972B (en) | Method, device and system for authenticating terminal device | |
| HK1229972A1 (en) | Method, device and system for authenticating terminal device | |
| HK1229972A (en) | Method, device and system for authenticating terminal device | |
| CN104333448B (en) | Network authentication system and method thereof |