CN105337740B - An authentication method, client, relay device and server - Google Patents
An authentication method, client, relay device and server Download PDFInfo
- Publication number
- CN105337740B CN105337740B CN201410373794.6A CN201410373794A CN105337740B CN 105337740 B CN105337740 B CN 105337740B CN 201410373794 A CN201410373794 A CN 201410373794A CN 105337740 B CN105337740 B CN 105337740B
- Authority
- CN
- China
- Prior art keywords
- verification code
- server
- encrypted
- client
- verification
- 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
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本申请属于信息通信领域,尤其涉及即时通讯/电子商务领域中一种身份验证的方法、客户端、中继设备及服务器。The present application belongs to the field of information communication, and in particular relates to an identity verification method, client, relay device and server in the field of instant messaging/e-commerce.
背景技术Background technique
随着互联网的高速发展,人们的生活与互联网的联系越来越紧密。现实生活中已经出现了如一些线下自助信用卡还款、自助公交卡充值、以及通过支付宝等线上第三方支付系统完成线下支付的自助服务等。With the rapid development of the Internet, people's lives are more and more closely connected with the Internet. In real life, there have been some offline self-service credit card repayment, self-service bus card recharge, and self-service offline payment through online third-party payment systems such as Alipay.
通常用户在使用这些自助服务时,提供自助服务的服务器或者与服务器相连接的公用设备端需要对用户进行身份验证。如果用户直接在公用设备或服务器上输入验证密码,可能会遭遇偷窥、木马、针孔电子眼等非法手段而导致用户密码泄露。随着智能移动终端的发展,目前现有技术中出现了一种可以通过移动终端与服务器或者公用设置在线进行信息交互完成身份验证的方法。在该方法中,移动终端可以通过扫描服务器或公用设备上的二维码信息获取与自助服务的相关信息,或者服务器或公用设备通过扫描客户端上用户的二维码信息获取用户的账号信息等,然后移动终端与服务器或公用设备通过获取的信息进一步的在线进行信息交互,完成身份验证。Usually, when a user uses these self-service services, the server that provides the self-service service or the public device connected to the server needs to authenticate the user. If the user directly enters the verification password on the public device or server, the user's password may be leaked due to illegal means such as voyeurism, Trojan horse, and pinhole electronic eye. With the development of intelligent mobile terminals, there is currently a method in the prior art that can complete identity verification through online information interaction between a mobile terminal and a server or a public setting. In this method, the mobile terminal can obtain information related to self-service by scanning the two-dimensional code information on the server or public device, or the server or public device can obtain the user's account information by scanning the two-dimensional code information of the user on the client terminal, etc. , and then the mobile terminal and the server or public equipment further conduct information exchange online through the acquired information to complete the identity verification.
目前,上述客户端与服务器或公用设备进行身份验证的信息交互过程,通常是通过客户端所在电信运营商的无线通信网络实现的。例如联通用户可以基于联通运营商的GSM网络或者WCDMA网络与服务器进行通信,完成身份验证。但是,如果用户所在的电信运营商的无线通信网络不稳定或者无覆盖,或者因用户的流量限制等而导致所述无线通信网络无法正常使用,该方法就会无法完成对用户的身份验证。At present, the above-mentioned information exchange process of authentication between the client and the server or the public device is usually realized through the wireless communication network of the telecommunications operator where the client is located. For example, a Unicom user can communicate with the server based on the Unicom operator's GSM network or WCDMA network to complete identity verification. However, if the wireless communication network of the telecommunication operator where the user is located is unstable or has no coverage, or the wireless communication network cannot be used normally due to the user's traffic restriction, etc., this method cannot complete the authentication of the user.
发明内容SUMMARY OF THE INVENTION
本申请目的在于提供一种身份验证方法、客户端、公用设备、服务器及系统,可以在用户所在的电信运营商的无线通信网络无法正常使用时完成对用户的身份验证。The purpose of the present application is to provide an identity verification method, client, public equipment, server and system, which can complete the identity verification of the user when the wireless communication network of the telecommunication operator where the user is located cannot be used normally.
本申请提供的一种身份验证方法是这样实现的:An authentication method provided by this application is implemented as follows:
服务器获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应 的加密算法;The server obtains the account information of the user, and queries the encryption algorithm corresponding to the obtained account information based on the stored user information;
服务器利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;The server encrypts the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
服务器建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码;The server establishes a wireless network, and sets a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name conforming to the agreed format;
客户端利用存储的解密算法对所述加密后的第一验证码进行解密;客户端根据对所述加密后的第一验证码的解密结果进行身份验证。The client uses the stored decryption algorithm to decrypt the encrypted first verification code; the client performs identity verification according to the decryption result of the encrypted first verification code.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
服务器获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;The server obtains the account information of the user, and queries the encryption algorithm corresponding to the obtained account information based on the stored user information;
服务器利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;The server encrypts the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
服务器建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后第一验证码;The server establishes a wireless network, and sets a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name conforming to the agreed format;
客户端利用存储的解密算法对所述加密后的第一验证码进行解密,所述客户端将对所述加密后第一验证码的解密结果通过所述无线网络发送至所述服务器;The client uses the stored decryption algorithm to decrypt the encrypted first verification code, and the client sends the decryption result of the encrypted first verification code to the server through the wireless network;
服务器接收所述解密结果,并根据所述解密结果进行身份验证。The server receives the decryption result and performs authentication according to the decryption result.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
服务器获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;The server obtains the account information of the user, and queries the encryption algorithm corresponding to the obtained account information based on the stored user information;
服务器利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;The server encrypts the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
服务器建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后第一验证码;The server establishes a wireless network, and sets a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name conforming to the agreed format;
客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;在解密成功 时,所述客户端利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码,并将所述加密后的第三验证码通过所述无线网络发送至服务器;The client uses the stored decryption algorithm to decrypt the extracted encrypted first verification code; when the decryption is successful, the client uses the stored decryption algorithm to encrypt the third verification code of the client to form an encrypted first verification code. a third verification code, and send the encrypted third verification code to the server through the wireless network;
服务器接收所述加密后的第三验证码,并利用与获取的用户的账号信息相对应的加密算法对所述加密后的第三验证码进行解密;所述服务器根据对所述加密后的第三验证码的解密结果进行身份验证。The server receives the encrypted third verification code, and decrypts the encrypted third verification code by using an encryption algorithm corresponding to the acquired user's account information; the server decrypts the encrypted third verification code according to the encrypted third verification code. The decryption result of the three-captcha code is used for authentication.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
中继设备获取输入的账号信息,并将所述获取的账号信息发送至服务器;The relay device obtains the input account information, and sends the obtained account information to the server;
服务器接收所述账号信息,并基于存储的用户信息查询与所述获取的用户账号信息相对应的加密算法;所述服务器将所述加密算法发送至所述中继设备;The server receives the account information, and queries the encryption algorithm corresponding to the obtained user account information based on the stored user information; the server sends the encryption algorithm to the relay device;
中继设备接收所述加密算法,并利用所述接收的加密算法对所述中继设备的第一验证码进行加密,形成加密后的第一验证码;中继设备建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码;The relay device receives the encryption algorithm, and uses the received encryption algorithm to encrypt the first verification code of the relay device to form an encrypted first verification code; the relay device establishes a wireless network and provides The established wireless network sets the network name in the agreed format; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码,并利用存储的解密算法对所述加密后的第一验证码进行解密;客户端根据对所述加密后第一验证码的解密结果进行身份验证。The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format, and uses the stored decryption algorithm to decrypt the encrypted first verification code. A verification code is decrypted; the client performs identity verification according to the decryption result of the encrypted first verification code.
一种身份验证方法,所述方法包括An authentication method, the method includes
中继设备获取输入的账号信息,并将所述获取的账号信息发送至服务器;The relay device obtains the input account information, and sends the obtained account information to the server;
服务器接收所述账号信息,并基于存储的用户信息查询与所述获取的用户账号信息相对应的加密算法;所述服务器将所述加密算法发送至所述中继设备;The server receives the account information, and queries the encryption algorithm corresponding to the obtained user account information based on the stored user information; the server sends the encryption algorithm to the relay device;
中继设备接收所述加密算法,并利用所述接收的加密算法对中继设备的第一验证码进行加密,形成加密后的第一验证码;中继设备建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码;The relay device receives the encryption algorithm, and uses the received encryption algorithm to encrypt the first verification code of the relay device to form an encrypted first verification code; the relay device establishes a wireless network and provides the The network name in the agreed format of the wireless network settings; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;所述客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密,并将对所述提取的加密后第一验证码的解密结果通过所述无线网络发送至中继设备;The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format; the client uses the stored decryption algorithm to extract the encrypted first verification code. The encrypted first verification code is decrypted, and the decryption result of the extracted encrypted first verification code is sent to the relay device through the wireless network;
中继设备接收客户端发送的所述解密结果并将所述解密结果发送至服务器;The relay device receives the decryption result sent by the client and sends the decryption result to the server;
服务器接收中继设备发送的所述解密结果,并根据所述解密结果进行身份验证。The server receives the decryption result sent by the relay device, and performs authentication according to the decryption result.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
中继设备获取输入的账号信息,并将所述获取的账号信息发送至服务器;The relay device obtains the input account information, and sends the obtained account information to the server;
服务器接收所述账号信息,并基于存储的用户信息查询与所述获取的用户账号信息相对 应的加密算法;所述服务器将所述加密算法发送至所述中继设备;The server receives the account information, and queries the encryption algorithm corresponding to the obtained user account information based on the stored user information; the server sends the encryption algorithm to the relay device;
中继设备接收所述加密算法,并利用所述接收的加密算法对中继设备的第一验证码进行加密,形成加密后的第一验证码;中继设备建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码;The relay device receives the encryption algorithm, and uses the received encryption algorithm to encrypt the first verification code of the relay device to form an encrypted first verification code; the relay device establishes a wireless network and provides the The network name in the agreed format of the wireless network settings; the network name includes the encrypted first verification code;
客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;所述客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;在解密成功时,所述消息接收端可以利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码;所述客户端将所述加密后的第三验证码发送通过所述无线网络发送至中继设备;The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format; the client uses the stored decryption algorithm to extract the encrypted first verification code. The encrypted first verification code is decrypted; when the decryption is successful, the message receiving end can use the stored decryption algorithm to encrypt the client's third verification code to form an encrypted third verification code; the client sending the encrypted third verification code to the relay device through the wireless network;
中继设备接收所述加密后的第三验证码,并将所述加密后的三验证码发送至服务器;The relay device receives the encrypted third verification code, and sends the encrypted three verification code to the server;
服务器接收所述加密后的第三验证码,并利用与获取的用户的账号信息相对应的加密算法对所述加密后的第三验证码进行解密;所述服务器根据对所述加密后的第二验证码的解密结果进行身份验证。The server receives the encrypted third verification code, and decrypts the encrypted third verification code by using an encryption algorithm corresponding to the acquired user's account information; the server decrypts the encrypted third verification code according to the encrypted third verification code. The decryption result of the second verification code is used for authentication.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
服务器获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;The server obtains the account information of the user, and queries the encryption algorithm corresponding to the obtained account information based on the stored user information;
服务器利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;The server encrypts the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
服务器建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码。The server establishes a wireless network, and sets a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
客户端扫描无线网络的网络名称;The client scans the network name of the wireless network;
客户端从扫描到的符合约定格式的网络名称中提取加密后的第一验证码;The client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format;
客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;The client uses the stored decryption algorithm to decrypt the extracted encrypted first verification code;
客户端根据对所述加密后的第一验证码的解密结果进行身份验证。The client performs identity verification according to the decryption result of the encrypted first verification code.
一种身份验证方法,所述方法包括:An authentication method, the method includes:
客户端扫描无线网络的网络名称;The client scans the network name of the wireless network;
客户端从扫描到的符合所述约定格式的网络名称中提取加密后的第一验证码;The client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format;
客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密,并将对所述提取的加密后第一验证码的解密结果通过扫描到无线网络发送至服务器或中继设备。The client uses the stored decryption algorithm to decrypt the extracted encrypted first verification code, and sends the decryption result of the extracted encrypted first verification code to the server or relay device by scanning the wireless network .
一种身份验证方法,其特征在于,所述方法包括:An identity verification method, characterized in that the method comprises:
客户端扫描无线网络的网络名称;The client scans the network name of the wireless network;
客户端从扫描到的符合所述约定格式的网络名称中提取加密后的第一验证码;The client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format;
客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;在解密成功时,所述客户端利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码;The client uses the stored decryption algorithm to decrypt the extracted encrypted first verification code; when the decryption is successful, the client uses the stored decryption algorithm to encrypt the third verification code of the client to form an encrypted first verification code. third verification code;
客户端将所述加密后的第三验证码通过所述无线网络发送至服务器或中继设备。The client sends the encrypted third verification code to the server or relay device through the wireless network.
一种身份验证的服务器,包括:An authenticated server that includes:
账号获取单元,用于获取用户的账号信息;an account acquisition unit, used to acquire the user's account information;
用户数据库,用于存储用户信息;所述用户信息可以包括用户的账号信息、用户的加密算法;a user database for storing user information; the user information may include user account information and user encryption algorithm;
查询单元,用于基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;a query unit, configured to query an encryption algorithm corresponding to the acquired account information based on the stored user information;
加密单元,生成第一验证码,并用于利用所述查询到的加密算法对所述第一验证码进行加密,形成加密后的第一验证码;an encryption unit that generates a first verification code, and is used to encrypt the first verification code by using the queried encryption algorithm to form an encrypted first verification code;
无线网络单元,用于建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码。The wireless network unit is configured to establish a wireless network and set a network name in a predetermined format for the established wireless network; the network name includes the encrypted first verification code.
一种身份验证客户端,包括:An authentication client that includes:
存储单元,用于存储网络名称的约定格式;还用于存储用户的账号信息的解密算法;The storage unit is used to store the agreed format of the network name; it is also used to store the decryption algorithm of the user's account information;
网络扫描单元,用于基于存储的网络名称的约定格式扫描符合所述约定格式的无线网络的网络名称;a network scanning unit, configured to scan the network name of the wireless network conforming to the agreed format based on the stored agreed format of the network name;
提取单元,用于从扫描到的符合约定格式的网络名称中提取加密后的第一验证码;an extraction unit, configured to extract the encrypted first verification code from the scanned network name conforming to the agreed format;
第一解密单元,用于基于存储的解密算法对所述提取的加密后的第一验证码进行解密。A first decryption unit, configured to decrypt the extracted encrypted first verification code based on the stored decryption algorithm.
一种身份验证的中继设备,包括:An authenticated relay device comprising:
信息获取单元,用于获取用户的账号信息;an information acquisition unit, used to acquire the user's account information;
信息接收单元,用于接收服务器发送的加密算法;an information receiving unit for receiving the encryption algorithm sent by the server;
信息加密单元,用于生成或从服务器接收第一验证码,并利用接收的加密算法对所述第一验证码进行加密,形成加密后的第一验证码;an information encryption unit for generating or receiving a first verification code from a server, and encrypting the first verification code by using the received encryption algorithm to form an encrypted first verification code;
无线网络广播单元,用于建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码。A wireless network broadcasting unit, configured to establish a wireless network, and set a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code.
本申请提供的一种身份验证方法中,服务器或公用设备可以建立无线网络,将利用公钥将随机生成的验证码加密后通过无线网络的网络名称广播出去。客户端可以通过自身携带的无线装置根据预定的规则扫描到所述服务器建立的无线网络,并可以根据预定的网络名称格 式提取加网络名称中加密后验证码。所述客户端利用自身存储的私钥对所述加密后验证码进行解密,如果解密成功,则可以通过身份验证。本申请的身份验证方法可以在用户所在电信运营商的无线通信网络无法正常使用时,可以通过服务器或公用设备建立的无线网络与客户端进行信息交互,完成身份验证。现有的移动设备大多配置有无线接入装置,例如WIFI接入装置等,利用本申请所述的方法还可以大幅度提高身份验证的应用场合,提高身份验证的便利性,而且还可以节省用户所在电信运营商的数据通信流量。In an identity verification method provided by this application, a server or a public device can establish a wireless network, and broadcast a randomly generated verification code after encrypting it with a public key through the network name of the wireless network. The client can scan the wireless network established by the server through the wireless device carried by itself according to the predetermined rule, and can extract the encrypted verification code in the network name according to the predetermined network name format. The client uses the private key stored by itself to decrypt the encrypted verification code, and if the decryption is successful, the authentication can be passed. The identity verification method of the present application can perform information exchange with the client through the wireless network established by the server or public equipment when the wireless communication network of the telecommunication operator where the user is located cannot be used normally to complete the identity verification. Most of the existing mobile devices are equipped with wireless access devices, such as WIFI access devices, etc. The method described in this application can also greatly improve the application occasions of identity verification, improve the convenience of identity verification, and save users The data traffic of your telecom operator.
附图说明Description of 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 accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in this application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请一种身份验证的方法的一种实施例的方法流程图;Fig. 1 is a method flow chart of an embodiment of a method for identity verification of the present application;
图2是本申请一种身份验证方法中网络名称的预定格式的示意图;Fig. 2 is the schematic diagram of the predetermined format of the network name in a kind of identity verification method of the present application;
图3是本申请一种身份验证方法的另一种实施例的方法流程图;3 is a method flow chart of another embodiment of an identity verification method of the present application;
图4是本申请一种身份验证方法的另一种实施例的方法流程图;4 is a method flow chart of another embodiment of an identity verification method of the present application;
图5是本申请一种身份验证的服务器的模块结构示意图;5 is a schematic diagram of a module structure of a server for identity verification of the present application;
图6是本申请一种身份验证的服务器的另一种实施例的模块结构示意图;6 is a schematic diagram of a module structure of another embodiment of an identity verification server of the present application;
图7是本申请一种身份验证的服务器的第一身份验证单元的模块结构示意图;7 is a schematic diagram of a module structure of a first identity verification unit of an identity verification server of the present application;
图8是本申请一种身份验证的服务器的另一种实施例的模块结构示意图;8 is a schematic diagram of a module structure of another embodiment of an identity verification server of the present application;
图9是本申请一种身份验证的服务器的第二身份验证单元的模块结构示意图;9 is a schematic diagram of a module structure of a second identity verification unit of a server for identity verification of the present application;
图10是本申请一种身份验证的客户端的模块结构示意图;10 is a schematic diagram of the module structure of a client for identity verification of the present application;
图11是本申请一种身份验证的客户端的另一种实施例的模块结构示意图;11 is a schematic diagram of a module structure of another embodiment of an identity verification client of the present application;
图12是本申请一种身份验证的客户端的另一种实施例的模块结构示意图;12 is a schematic diagram of a module structure of another embodiment of an identity verification client of the present application;
图13是本申请一种身份验证的客户端的另一种实施例的模块结构示意图;13 is a schematic diagram of a module structure of another embodiment of an identity verification client of the present application;
图14是本申请一种身份验证的中继设备的一种实施例的模块结构示意图;14 is a schematic diagram of a module structure of an embodiment of an identity verification relay device of the present application;
图15是本申请一种身份验证的中继设备的另一种实施例的模块结构示意图。FIG. 15 is a schematic structural diagram of a module of another embodiment of a relay device for identity verification according to the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅 是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described The embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of this application.
用户在线下使用自助服务之前,通常会在自助服务提供商的服务器注册用户信息,用于后续身份确认。该用户信息可以包括用户的账号信息、密码等信息。所述服务器可以获取并存储所述用户信息,具体的可以将所述用户信息存储在用户数据库中。所述用户数据库可以是存储在所述服务器的数据库,也可以是存储在其他设备上的数据库上。所述服务器在获取用户的用户信息后,可以生成与该用户的账号信息相对应的一对加密算法和解密算法。所述服务器可以存储包括用户的账号信息、密码等用户信息,还可以存储与用户账号信息相对应的加密算法和/或解密算法,具体的可以存储在所述用户数据库中。所述用户的加密算法可以与该用户的账号信息唯一相对应,所述服务器可以根据用户的账号信息查询到与该用户相对应的加密算法。所述服务器可以将与所述用户账号信息相对应的解密算法发送至用户的客户端中,可以由用户的客户端进行存储。所述用户的客户端可以预先安装相应的应用,所述客户端可以通过所述客户端上安装的相应的应用与服务器进行通信。用户可以在初次登陆所述安装的应用与服务器进行账号确认或其他验证时,可以通过所述客户端上的应用获取服务器发送的与该用户相对应的解密算法。所述客户端可以存储所述获取的解密算法。为了统一表述,可以将上述客户端一侧的应用统称为客户端。本申请所述的加密算法和解密算法,可以包括对明文信息的一种处理方法。所述加密算法可以包括对明文信息进行加密的信息处理方法,相应的,所述解密算法可以对所述加密算法进行加密的信息进行解密,获取正确的明文信息。所述加密算法和解密算法是对信息的处理方法,在具体的应用实例中,可以利用所述加密算法对明文信息进行加密,利用与加密算法相对应的解密算法进行解密,获取明文信息。当然,根据选取的加密算法和解密算法不同,在一些应用场景中也可以利用所述解密算法对明文信息进行加密,利用加密算法进行解密。Before users use self-service offline, they usually register user information on the server of the self-service provider for subsequent identity confirmation. The user information may include user account information, password and other information. The server may acquire and store the user information, and specifically may store the user information in a user database. The user database may be a database stored on the server, or a database stored on other devices. After acquiring the user information of the user, the server may generate a pair of encryption algorithm and decryption algorithm corresponding to the account information of the user. The server may store user information including user account information, passwords, etc., and may also store encryption algorithms and/or decryption algorithms corresponding to user account information, which may be specifically stored in the user database. The encryption algorithm of the user may uniquely correspond to the account information of the user, and the server may query the encryption algorithm corresponding to the user according to the account information of the user. The server may send the decryption algorithm corresponding to the user account information to the user's client, which may be stored by the user's client. The client of the user may pre-install a corresponding application, and the client may communicate with the server through the corresponding application installed on the client. When the user logs in the installed application for the first time to perform account confirmation or other verification with the server, the user can obtain the decryption algorithm corresponding to the user sent by the server through the application on the client. The client may store the obtained decryption algorithm. For a unified expression, the above-mentioned applications on the client side may be collectively referred to as clients. The encryption algorithm and decryption algorithm described in this application may include a method for processing plaintext information. The encryption algorithm may include an information processing method for encrypting plaintext information. Correspondingly, the decryption algorithm may decrypt the information encrypted by the encryption algorithm to obtain correct plaintext information. The encryption algorithm and the decryption algorithm are information processing methods. In a specific application example, the encryption algorithm can be used to encrypt the plaintext information, and the decryption algorithm corresponding to the encryption algorithm can be used to decrypt the plaintext information to obtain the plaintext information. Of course, depending on the selected encryption algorithm and decryption algorithm, in some application scenarios, the decryption algorithm may also be used to encrypt the plaintext information, and the encryption algorithm may be used to decrypt the information.
在进行身份验证时,所述客户端可以与所述服务器进行信息交互,可以通过验证客户端的解密算法能否解密服务器用加密算法加密的信息来进行身份验证。本申请提供的一种身份验证方法在进行身份验证时,所述服务器与客户端可以通过无线局域网络进行信息交互,完成身份验证。下面是本申请一种身份验证方法的一个实施例,图1是所述一种身份验证方法的一个实施例的方法流程图。如图1所示,所述方法包括:During identity verification, the client can exchange information with the server, and identity verification can be performed by verifying whether the decryption algorithm of the client can decrypt the information encrypted by the server with the encryption algorithm. In the identity verification method provided by the present application, when performing identity verification, the server and the client can exchange information through a wireless local area network to complete the identity verification. The following is an embodiment of an identity verification method of the present application, and FIG. 1 is a method flowchart of an embodiment of the identity verification method. As shown in Figure 1, the method includes:
S1:服务器可以获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应的加密算法。S1: The server may acquire account information of the user, and query an encryption algorithm corresponding to the acquired account information based on the stored user information.
用户可以在服务器输入用户的账号信息,所述服务器可以获取用户输入的账号信息。具体的,所述服务器可以通过设置在服务器的账号输入界面获取用户输入的账号信息。也可以 由其他专用的设备例如POS刷卡机、扫描仪等中继设备获取用户输入的账号信息,然后将获取的用户的账号信息发送至服务器。The user can input the user's account information on the server, and the server can obtain the account information input by the user. Specifically, the server may acquire account information input by the user through an account input interface provided on the server. The account information input by the user can also be acquired by other dedicated devices such as POS card swiping machines, scanners and other relay devices, and then the acquired account information of the user is sent to the server.
所述服务器获取用户的账号信息后,可以查询与该账号信息相对应的加密算法。所述与账号信息相对应的加密算法可以有与该加密算法相对应的解密算法。前述中,所述服务器可以存储包括用户的账号信息、密码等的用户信息,还可以存储与用户账号信息相对应的加密算法。所述服务器可以基于所述存储的用户信息查询与所述获取的账号信息相对应的加密信息。在本实施例中,所述服务器可以设置用户数据库,可以用于存储用户的所述用户信息、加密算法或解密算法等信息。所述用户数据库可以设置在所述服务器,也可以设置在其他的专用服务器上。所述服务器可以在所述用户数据库中查询是否有与所述获取的账号信息相对应的加密算法。通常情况下,如果所述用户A在进行身份验证之前在所述服务器注册登记过用户信息,所述服务器可以存储有用户A的账号信息、加密信息等信息。所述服务器获取用户A的账号信息后,可以查询到与所述用户A相对应的加密算法。After acquiring the account information of the user, the server may query the encryption algorithm corresponding to the account information. The encryption algorithm corresponding to the account information may include a decryption algorithm corresponding to the encryption algorithm. In the foregoing, the server may store user information including user account information, password, etc., and may also store an encryption algorithm corresponding to the user account information. The server may query encrypted information corresponding to the acquired account information based on the stored user information. In this embodiment, the server may set a user database, which may be used to store the user information, encryption algorithm or decryption algorithm and other information of the user. The user database can be set on the server or on other dedicated servers. The server may inquire whether there is an encryption algorithm corresponding to the acquired account information in the user database. Generally, if the user A has registered user information with the server before performing identity verification, the server may store user A's account information, encrypted information and other information. After acquiring the account information of the user A, the server can query the encryption algorithm corresponding to the user A.
本实施例中的所述的加密算法和解密算法具体的通常可以为密码体制中非对称密钥密码系统中的公钥和私钥。所述非对称密钥密码系统中的公钥和私钥密钥可以相互加密和解密。所述的公钥和私钥,可以是一种对明文信息进行加密或解密的公钥算法和私钥算法。在使用所述非对称密钥密码系统加密明文信息时,只有使用相互匹配的一对公钥/私钥才能完成对明文信息的解密过程。通常情况下,公钥可以是公开的,可以不需要保密,可以由服务器进行存储;私钥可以不公开,可以由上述与这一对公钥和私钥相对应的用户一侧进行存储。例如,所述私钥可以存储在所述用户客户端的某一应用中。The encryption algorithm and the decryption algorithm in this embodiment can generally be the public key and the private key in the asymmetric key cryptosystem in the cryptosystem. The public and private keys in the asymmetric key cryptosystem can be mutually encrypted and decrypted. The public key and private key may be a public key algorithm and a private key algorithm for encrypting or decrypting plaintext information. When using the asymmetric key cryptosystem to encrypt the plaintext information, the decryption process of the plaintext information can only be completed by using a pair of public key/private key that matches each other. In general, the public key can be public, it does not need to be kept secret, and can be stored by the server; the private key can be kept private, and can be stored by the user side corresponding to the pair of public key and private key. For example, the private key may be stored in an application of the user client.
当然,所述服务器获取用户输入的账号信息后,可以验证所述用户输入的账号信息是否合法,例如可以验证用户输入的账号信息格式是否符合预设的格式,或者验证用户输入的账号信息是否在服务器注册登记过等。在所述服务器验证用户输入的账号信息不合法时,所述服务器可以采用预置的处理方法进行处理。Of course, after acquiring the account information input by the user, the server can verify whether the account information input by the user is legal, for example, whether the format of the account information input by the user conforms to a preset format, or whether the account information input by the user is in the The server is registered and so on. When the server verifies that the account information input by the user is invalid, the server may use a preset processing method for processing.
服务器可以获取用户输入的账号信息,并可以在用户数据库存储的用户信息中查询与用户输入账号信息相对应的加密算法。The server may acquire account information input by the user, and may query the encryption algorithm corresponding to the account information input by the user in the user information stored in the user database.
S2:所述服务器利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后第一验证码。S2: The server encrypts the first verification code of the server by using the queried encryption algorithm to form the encrypted first verification code.
所述服务器查询到与用户输入账号相对应的加密算法后,可以对服务器的第一验证码进行加密。所述第一验证码A可以包括服务器根据用户的账号信息或加密算法等信息按照预定的算法生成的一位或多位的验证码,也可以是按照一定规则随机生成的一位或多位验证码。当然,所述第一验证码也可以包括服务器接收的其他服务器或专用设备发送来的验证码。当 所述服务器可以存储所述第一验证码。所述第一验证码A具体的可以包括字符串的形式,例如所述第一验证码A可以是一组16位的随机字符串。所述服务器在生成所述第一验证码A后,可以利用所述查询到的用户的加密算法,即本实施例中的公钥对所述第一验证码A进行加密。所述的公钥可以是一种加密/解密的公钥算法,所述服务器可以利用查询到的公钥对所述第一验证码A进行加密,形成加密后第一验证码,在此可以用A’表示所述加密后的第一验证码。The server may encrypt the first verification code of the server after inquiring about the encryption algorithm corresponding to the account input by the user. The first verification code A may include one or more verification codes generated by the server according to a predetermined algorithm according to information such as the user's account information or encryption algorithm, or may be one or more verification codes randomly generated according to certain rules. code. Of course, the first verification code may also include verification codes received by the server and sent by other servers or dedicated devices. When the server can store the first verification code. The first verification code A may specifically include the form of a character string. For example, the first verification code A may be a set of 16-bit random character strings. After generating the first verification code A, the server may encrypt the first verification code A by using the queried user's encryption algorithm, that is, the public key in this embodiment. The public key can be an encryption/decryption public key algorithm, and the server can use the queried public key to encrypt the first verification code A to form the encrypted first verification code, which can be used here. A' represents the encrypted first verification code.
服务器可以生成或接收第一验证码A,所述服务器可以用所述查询到的加密算法对所述第一验证码A进行加密,形成加密后第一验证码A’。The server may generate or receive the first verification code A, and the server may encrypt the first verification code A with the queried encryption algorithm to form the encrypted first verification code A'.
S3:服务器建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称可以包括所述加密后的第一验证码。S3: The server establishes a wireless network, and sets a network name in a predetermined format for the established wireless network; the network name may include the encrypted first verification code.
本实施例中所述的服务器可以建立无线网络,具体的可以通过搭设在服务器上的无线网设备建立无线网络。本实施例中所述服务器可以与所述无线网络设备设置在同一组设备中,也可以与所述无线网络设备分开,分别设置在不同的地方,之间可以通过设置的传输链路进行通信。所述服务器可以将所述加密后的第一验证码A’通过所述无线网络的网络名称广播出去。需要说明的是,本申请中所述的无线网络,可以包括短距离无线通信方式中的通信连接,例如蓝牙(Bluetooth)、红外(IrDA)、无线局域网(WI-FI或WLAN,大多采用802.11系列协议)、WIFI直连(Wi-Fi Direct)、超宽带通信(Ultra Wide Band)、紫峰(Zigbee)、近场通信(Near Field Communication,NFC)、WImax等通信技术。本申请结合上述通信方式介绍具体实现方案,同时不排除其他的通信方式应用于本申请下述的具体方案。The server described in this embodiment may establish a wireless network, and specifically, a wireless network may be established through a wireless network device set up on the server. In this embodiment, the server and the wireless network device may be installed in the same group of devices, or may be separated from the wireless network device and installed in different places respectively, and can communicate with each other through the configured transmission link. The server may broadcast the encrypted first verification code A' through the network name of the wireless network. It should be noted that the wireless network described in this application may include communication connections in short-range wireless communication methods, such as Bluetooth (Bluetooth), infrared (IrDA), wireless local area network (WI-FI or WLAN, mostly 802.11 series) Protocol), Wi-Fi Direct, Ultra Wide Band, Zigbee, Near Field Communication (NFC), WImax and other communication technologies. This application introduces specific implementation solutions in combination with the above communication methods, and does not exclude that other communication methods are applied to the specific solutions described below in this application.
具体的,在本实施例中所述服务器建立的无线网络可以为WIFI网络。无线保真(Wireless Fidelity,WIFI)技术通常是指基于802.11协议的无线局域网接入技术,属于在办公室或家庭等使用的短距离无线通信技术。WIFI网络通常可以由WIFI接入点(AccessPoint,AP)和终端组成。其中接入点AP可以通过无线网卡等设备建立无线网络,将终端设备连接到另一个网络中。所述的另一个网络可以为无线网络,或者有线网络。在本实施例中所述接入点AP可以通过ADSL或者其他的线路直接与服务器进行通信,通过相应的中继设备与服务器进行通信。所述接入点AP相当于不同网络之间的桥梁,其工作原理相当于一个内置无线发射器的集线器(HUB)或者是路由器,具有WIFI接入功能的客户端可通过AP建立的WIFI网络与所述服务器进行信息交互。Specifically, in this embodiment, the wireless network established by the server may be a WIFI network. Wireless Fidelity (Wireless Fidelity, WIFI) technology generally refers to a wireless local area network access technology based on the 802.11 protocol, and belongs to a short-range wireless communication technology used in offices or homes. A WIFI network may generally consist of a WIFI access point (Access Point, AP) and a terminal. The access point AP can establish a wireless network through devices such as a wireless network card, and connect the terminal device to another network. The other network may be a wireless network or a wired network. In this embodiment, the access point AP can directly communicate with the server through ADSL or other lines, and communicate with the server through a corresponding relay device. The access point AP is equivalent to a bridge between different networks, and its working principle is equivalent to a hub (HUB) or a router with a built-in wireless transmitter. The server performs information exchange.
所述服务器可以将所述加密后的第一验证码A’通过无线网络的网络名称广播出去。所述服务器建立无线网络时,可以为所述无线网络设置预定格式的网络名称。在本实施例中,所述服务器在建立WIFI网络时,可以为所述WIFI网络设置一个WIFI网络名称或标识符,该网络名或标识符通常称为SSID(Service Set Identifier,SSID)。所述SSID通常最多可以有 32个字符。所述SSID中可以包括所述加密后的第一验证码A’。在本实施例中,所述服务器可以采用根据约定的格式设置所述SSID,所述约定格式的SSID可以将所述加密后验证码A’。例如,可以将所述加密后的第一验证码A’作为所述SSID,然后通过WIFI网络广播出去。或者所述加密的第一验证码A’可以根据预先设置的SSID的约定格式位于所述约定格式的SSID的某字段中。例如所述SSID的格式可以为加密后第一验证码A’与预设名称或者账号信息等的组合,如可以为:AUTH+A’,或者可以为:账号名称+A’的格式。在图2是本实施例所述的一种约定格式的SSID的结构示意图,如图2所示,所述SSID网络名称,,及WFII的SSID约定的格式可以包括:AUTH(预设名称)+0000(分隔字符)+加密后的验证码A’(16位)。利用本实施例所述的约定格式的SSID,所述服务器广播的所述WIFI的SSID可以表示为:AUTH0000A’。The server may broadcast the encrypted first verification code A' through the network name of the wireless network. When the server establishes a wireless network, a network name in a predetermined format may be set for the wireless network. In this embodiment, when establishing a WIFI network, the server may set a WIFI network name or identifier for the WIFI network, and the network name or identifier is usually called SSID (Service Set Identifier, SSID). The SSID can usually be up to 32 characters long. The SSID may include the encrypted first verification code A'. In this embodiment, the server may set the SSID in an agreed format, and the SSID in the agreed format may encode the encrypted verification code A'. For example, the encrypted first verification code A' can be used as the SSID, and then broadcasted through the WIFI network. Or the encrypted first verification code A' may be located in a certain field of the SSID of the agreed format according to the preset SSID format. For example, the format of the SSID can be the combination of the encrypted first verification code A' and the preset name or account information, such as: AUTH+A', or can be the format of: account name+A'. FIG. 2 is a schematic diagram of the structure of an SSID in an agreed format described in this embodiment. As shown in FIG. 2 , the SSID network name , and the SSID of WFII in the agreed format may include: AUTH (preset name) + 0000 (separation character) + encrypted verification code A' (16 digits). Using the SSID in the agreed format described in this embodiment, the SSID of the WIFI broadcast by the server may be expressed as: AUTH0000A'.
当然,在本申请中,所述网络名称的约定格式可以为其他预先设定的网络名称的组成格式,本申请对此不做限定。相应的,所述服务器可以将所述组成网络名称的约定格式发送至所述客户端,具体的可以发送到客户端预置的特定应用中。所述客户端可以获知所述组成网络名称的约定格式,可以根据所述预定格式获取网络名称不同字段的信息。Of course, in this application, the agreed format of the network name may be the composition format of other preset network names, which is not limited in this application. Correspondingly, the server may send the agreed format of the constituent network name to the client, and specifically may be sent to a specific application preset by the client. The client may know the agreed format of the constituent network name, and may obtain information of different fields of the network name according to the predetermined format.
服务器可以建立WIFI网络,并为所述建立的WIFI网络设置约定格式的SSID。所述服务器建立的约定格式的SSID可以包括所述加密后的第一验证码A’。所述服务器可以广播所述服务器建立的WIFI网络。The server may establish a WIFI network, and set an SSID in a predetermined format for the established WIFI network. The SSID in the agreed format established by the server may include the encrypted first verification code A'. The server may broadcast the WIFI network established by the server.
S4:客户端可以扫描WIFI网络的网络名称,并从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码。S4: The client can scan the network name of the WIFI network, and extract the encrypted first verification code from the scanned network name that conforms to the agreed format.
本申请中所述的客户端通常可以包括拥有无线接入装置(例如无线网卡)的笔记本电脑、上网本、手机、个人数字助理Personal Digital Assistant,PDA)、移动互联网设备(Mobile Internet Device,MID)等终端设备。所述客户端可以扫描周围的无线网络,并在扫描到网络名称符合约定格式的WIFI网络时,获取所述无线网络的网络名称,并且可以从所述获取网络名称中提取加密后的第一验证码。The clients described in this application may generally include notebook computers, netbooks, mobile phones, personal digital assistants (PDAs), mobile Internet devices (MIDs), etc. that have wireless access devices (such as wireless network cards). Terminal Equipment. The client can scan the surrounding wireless networks, and when scanning a WIFI network whose network name conforms to the agreed format, obtain the network name of the wireless network, and can extract the encrypted first verification from the obtained network name. code.
前述中,所述服务器可以将所述组成网络名称的约定格式发送至所述客户端,因此,所述客户端可以获取到所述网络名称的约定格式,并可以根据所述网络名称的约定格式扫描周围符合所述约定格式的无线网络的网络名称。例如所述客户端接收的所述网络名称约定的格式可以包括:AUTH(预设名称)+0000(分隔字符)+加密后验证码A’(16位)。所述客户端可以扫描周围的无线网络,并从可以获取扫描的无线网络名称。所述客户端可以判断所述扫描的周围的无线网络的网络名称是否符合所述约定格式。所述客户端可以根据所述约定格式扫描到符合所述约定格式的网络名称:AUTH0000A’。所述服务器扫描到所述符合约定 格式的网络名称后,可以获取该WIFI网络的网络名称,并从中提取网络名称中所述加密后的第一验证码A’。In the foregoing, the server can send the agreed format of the network name to the client, so the client can obtain the agreed format of the network name, and can obtain the agreed format of the network name according to the agreed format of the network name. Scans for network names of wireless networks in the surrounding format that conform to the conventions described. For example, the format of the network name agreement received by the client may include: AUTH (preset name)+0000 (separation character)+encrypted verification code A' (16 bits). The client can scan the surrounding wireless networks, and can obtain the scanned wireless network names. The client may determine whether the scanned network names of the surrounding wireless networks conform to the agreed format. The client can scan a network name that conforms to the agreed format according to the agreed format: AUTH0000A'. After the server scans the network name that conforms to the agreed format, it can obtain the network name of the WIFI network, and extract the encrypted first verification code A' in the network name.
S501:客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;所述客户端根据对所述加密后的第一验证码的解密结果进行身份验证。S501: The client decrypts the extracted encrypted first verification code by using the stored decryption algorithm; the client performs identity verification according to the decryption result of the encrypted first verification code.
所述客户端可以利用自身存储的用户的解密算法对提取的所述加密后的第一验证码A’进行解密。本实施例中所述解密算法可以包括存储在客户端上的私钥。所述客户端可以利用所述存储的私钥对所述公钥加密后的第一验证码A’进行解密。前述中提到,在使用所述非对称密钥密码系统加密明文信息时,只有使用相互匹配的一对公钥/私钥才能完成对明文信息的解密过程。在本实施例中,所述公钥加密的第一验证码A,只有与所述公钥相匹配的私钥才能解密。如果所述客户端利用存储的私钥可以解密所述加密后的第一验证码A’,表示所述客户端存储的私钥与所述服务器对第一验证码A进行加密的公钥是一对相互匹配的密钥,则解密结果为成功。相应的,如果所述客户端利用存储在自身的私钥不可以解密所述加密后的第一验证码A’,则解密结果为失败。The client can decrypt the extracted encrypted first verification code A' by using the user's decryption algorithm stored by itself. The decryption algorithm described in this embodiment may include a private key stored on the client. The client can use the stored private key to decrypt the first verification code A' encrypted by the public key. As mentioned above, when using the asymmetric key cryptosystem to encrypt the plaintext information, the decryption process of the plaintext information can only be completed by using a pair of public keys/private keys that match each other. In this embodiment, the first verification code A encrypted by the public key can only be decrypted by the private key that matches the public key. If the client can decrypt the encrypted first verification code A' by using the stored private key, it means that the private key stored by the client and the public key used by the server to encrypt the first verification code A are the same. For keys that match each other, the decryption result is successful. Correspondingly, if the client cannot decrypt the encrypted first verification code A' by using the private key stored in itself, the decryption result is failure.
所述客户端可以根据对所述加密后的第一验证码的解密结果进行身份验证。例如,如果所述解密结果为成功,所述客户端可以通过身份验证。此时所述客户端可以获取预先设定的在身份验证通过的情况下的数据访问权限,具体的客户端上的应用可以设置用户在通过身份验证通过才对特定应用功能的访问权限。如果所述解密结果为不成功,则所述客户端不可以通过身份验证。在所述服务器建立的WIFI网络中,所述服务器可以设置客户端的接入认证方式,包括无加密认证、加密认证,本实施例中所述服务器可以将客户端的接入认证方式设置为无加密认证。所述客户端可以无需进行密码验证而连接到相应的WIFI网络中,与所述服务器建立通信。所述服务器建立的WIFI网络属于短距离通信的无线局域网,客户端可以通过接入到该WIFI网络与所述服务器进行信息交互,进行身份验证。The client may perform identity verification according to the decryption result of the encrypted first verification code. For example, if the decryption result is successful, the client can be authenticated. At this time, the client terminal can obtain the preset data access authority under the condition of passing the identity verification, and the application on the specific client terminal can set the user's access authority to the specific application function only after passing the identity verification. If the decryption result is unsuccessful, the client cannot pass the authentication. In the WIFI network established by the server, the server can set the access authentication mode of the client, including non-encrypted authentication and encrypted authentication. In this embodiment, the server can set the access authentication mode of the client to the non-encrypted authentication. . The client can connect to the corresponding WIFI network without performing password verification, and establish communication with the server. The WIFI network established by the server belongs to a wireless local area network for short-distance communication, and the client can exchange information with the server by accessing the WIFI network to perform identity verification.
在具体的一个应用场景中,服务器可以提供手机自助充值的服务。所述服务器可以根据用户输入的账号信息建立一个与该账号信息相对应的WIFI网络,只有通过身份验证的移动终端上的应用才可以访问服务器设置的手机自助充值服务的应用。所述移动终端上的应用也可以设置只有通过身份验证时才有权限发送访问服务器的手机自助充值服务的应用的请求。具体的,服务器可以通过端口扫描客户端上的二维码信息或通过用户C在服务器输入的账号信息获取用户C的账号信息:user123。所述服务器可以在用户数据库中查询账号信息为user123所对应的公钥为K_PUB。该公钥可以表示为与用户user123相对应的公钥加密算法。在查询到用户yongh123对应的公钥信息后,所述服务器可以随机生成一个16位第一验证码MK3D90HB8H2JT4VZ。所述服务器可以利用所述用户user123所对应的公钥K_PUB对所述 服务器随机生成的第一验证码MK3D90HB8H2JT4VZ进行加密,形成加密后的第一验证码PYKJH89LOEN7F56G。所述服务器可以通过WIFI设备建立一个WIFI网络,并可以按照SSID的约定格式设置所述WIFI网络的SSID。所述SSID的约定格式可以在此次身份验证之前发送到所述用户下载到客户端的应用中。所述SSID的约定格式可以为:AUTH(预设名称)+0000(分隔字符)+加密后验证码A’(16位)。所述服务器可以按照上述SSID的约定格式设置用户账号为user123所对应的服务器建立的WIFI网络的SSID,可以为:AUTH0000PYKJH89LOEN7F56G。所述服务器建立WIFI网络后,可以将包括加密后的第一验证码的SSID广播至周围空间。所述客户端可以通过所述移动终端上安装的应用扫描周围的符合所述约定格式的SSID的WIFI网络。所述客户端在扫描到符合所述约定格式的SSID的WIFI网络时,可以获取该WIFI网络的SSID为AUTH0000PYKJH89LOEN7F56G,并按照所述SSID的约定格式提取所述加密后的第一验证码PYKJH89LOEN7F56G。所述客户端可以利用存储在自身的私钥K_PRI对所述提取的加密后的第一验证码PYKJH89LOEN7F56G进行解密。所述客户端利用私钥K_PRI可以解密所述加密后的第一验证码PYKJH89LOEN7F56G,所述解密结果为成功,所述客户端上的应用可以通过身份验证,所述客户端上的特定应用可以根据预先设置的规则连接到所述SSID为AUTH0000PYKJH89LOEN7F56G的WIFI网络,并有权限访问服务器设置的手机自助充值服务的应用,或有权限向服务器发送访问手机自助充值服务的请求。所述服务器与所述客户端可以通过所述服务器建立的SSID为AUTH0000PYKJH89LOEN7F56G的WIFI网络进行信息交互,完成所述客户端的手机自助充值服务。In a specific application scenario, the server can provide the service of self-service recharging of mobile phones. The server can establish a WIFI network corresponding to the account information according to the account information input by the user, and only the application on the mobile terminal that has passed the identity verification can access the application of the mobile phone self-service recharge service set by the server. The application on the mobile terminal may also be set to have the right to send the application request for accessing the mobile phone self-service recharge service of the server only when the identity verification is passed. Specifically, the server may scan the QR code information on the client through the port or obtain the account information of the user C: user123 through the account information input by the user C on the server. The server may query the user database that the account information is that the public key corresponding to user123 is K_PUB. The public key can be represented as a public key encryption algorithm corresponding to the user user123. After querying the public key information corresponding to the user yongh123, the server may randomly generate a 16-bit first verification code MK3D90HB8H2JT4VZ. The server may use the public key K_PUB corresponding to the user user123 to encrypt the first verification code MK3D90HB8H2JT4VZ randomly generated by the server to form the encrypted first verification code PYKJH89LOEN7F56G. The server can establish a WIFI network through a WIFI device, and can set the SSID of the WIFI network according to the agreed format of the SSID. The agreed format of the SSID may be sent to the application downloaded by the user to the client before this authentication. The agreed format of the SSID may be: AUTH (preset name)+0000 (separation character)+encrypted verification code A' (16 bits). The server may set the SSID of the WIFI network established by the user account as the server corresponding to user123 according to the above-mentioned SSID convention format, which may be: AUTH0000PYKJH89LOEN7F56G. After the server establishes the WIFI network, it can broadcast the SSID including the encrypted first verification code to the surrounding space. The client may scan the surrounding WIFI networks that conform to the SSID in the agreed format through the application installed on the mobile terminal. When the client scans the WIFI network with the SSID in the agreed format, it can obtain the SSID of the WIFI network as AUTH0000PYKJH89LOEN7F56G, and extract the encrypted first verification code PYKJH89LOEN7F56G according to the agreed format of the SSID. The client can decrypt the extracted encrypted first verification code PYKJH89LOEN7F56G by using the private key K_PRI stored in itself. The client can decrypt the encrypted first verification code PYKJH89LOEN7F56G using the private key K_PRI, and the decryption result is successful, the application on the client can pass the authentication, and the specific application on the client can The preset rules are connected to the WIFI network whose SSID is AUTH0000PYKJH89LOEN7F56G, and have the authority to access the application of the mobile phone self-service recharge service set by the server, or have the authority to send a request to the server to access the mobile phone self-service recharge service. The server and the client can exchange information through the WIFI network with the SSID established by the server as AUTH0000PYKJH89LOEN7F56G, and complete the mobile phone self-service recharge service of the client.
本实施例所述的一种身份验证方法,可以利用WIFI网络的网络名称进行身份验证,解决了客户端所在运营商的无线通信网络不能正常使用时不能完成身份验证的问题。目前多数终端设备具有WIFI接入功能,利用本实施例所述的身份验证方法可以大幅度提供身份验证的应用场合,提供身份验证的便利性,而且还可以节省用户所在电信运营商的数据通信流量。The identity verification method described in this embodiment can use the network name of the WIFI network for identity verification, which solves the problem that the identity verification cannot be completed when the wireless communication network of the operator where the client is located cannot be used normally. At present, most terminal devices have the WIFI access function, and the identity verification method described in this embodiment can greatly provide the application occasion of identity verification, provide the convenience of identity verification, and also save the data communication traffic of the telecommunications operator where the user is located. .
当然,本申请中所述的服务器建立的WIFI网络可以通过相应的网关或设备与所述客户端所在运营商的无线通信网络或计算机互联网相连接,可以为所述客户端提供更多的服务。Of course, the WIFI network established by the server described in this application can be connected to the wireless communication network of the operator where the client is located or the computer Internet through a corresponding gateway or device, and can provide more services for the client.
上述实施例中可以由客户端进行身份验证。本申请还提供所述一种身份验证方法的另一种实施例,在该实施例中,所述客户端可以将解密结果反馈给服务器,由服务器根据解密结果进行身份验证。图3是本申请所述一种身份验证方法的另一种实施例的流程图。如图3所示,本实施例所述身份验证方法可以包括:In the above-mentioned embodiment, the authentication may be performed by the client. The present application also provides another embodiment of the authentication method. In this embodiment, the client can feed back the decryption result to the server, and the server performs authentication according to the decryption result. FIG. 3 is a flowchart of another embodiment of an identity verification method described in this application. As shown in FIG. 3 , the authentication method described in this embodiment may include:
S1:服务器可以获取用户的账号信息,并可以基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;S1: The server can obtain the account information of the user, and can query the encryption algorithm corresponding to the obtained account information based on the stored user information;
S2:服务器可以利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;S2: The server can encrypt the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
S3:服务器可以建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称可以包括所述加密后第一验证码;S3: The server may establish a wireless network, and set a network name in a predetermined format for the established wireless network; the network name may include the encrypted first verification code;
S4:客户端可以扫描无线网络;所述客户端可以从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;S4: the client can scan the wireless network; the client can extract the encrypted first verification code from the scanned network name that conforms to the agreed format;
S502:所述客户端可以利用存储的解密算法对所述加密后的第一验证码进行解密,所述客户端可以将对所述加密后第一验证码的解密结果通过所述无线网络发送至所述服务器;S502: The client can use the stored decryption algorithm to decrypt the encrypted first verification code, and the client can send the decryption result of the encrypted first verification code to the wireless network through the wireless network. the server;
S601:所述服务器可以接收所述解密结果,并根据所述解密结果进行身份验证。S601: The server may receive the decryption result, and perform identity verification according to the decryption result.
在本实施例中所述客户端可以将对所述提取的加密后的第一验证码的解密结果通过所述无线网络发送至所述服务器。所述客户端发送至服务器的对所述加密后的第一验证码的解密结果可以包括:In this embodiment, the client may send the decryption result of the extracted encrypted first verification code to the server through the wireless network. The decryption result of the encrypted first verification code sent by the client to the server may include:
客户端对所述提取的加密后的第一验证码解密成功或失败。The client succeeds or fails to decrypt the extracted encrypted first verification code.
所述服务器可以接收客户端返回的解密结果,所述服务器可以将根据所述解密结果进行份验证。例如,如果所述客户端返回的解密结果为成功,所述服务器可以通过所述客户端的身份验证,所述客户端可以获取所述服务器的相应权限,可以进行进一步的数据访问。如果所述客户端返回的解密结果为失败,则所述服务器可以不通过所述客户端的身份验证。The server may receive the decryption result returned by the client, and the server may perform authentication according to the decryption result. For example, if the decryption result returned by the client is successful, the server can pass the authentication of the client, and the client can obtain the corresponding authority of the server, and can perform further data access. If the decryption result returned by the client is failure, the server may not pass the authentication of the client.
优选的实施方式中,所述客户端可以将所述客户端对所述加密后的第一验证码进行解密获取的解密后第一验证码发送到服务器,由服务器根据所述解密后第一验证码进行身份验证。因此,该实施例中所述客户端发送至服务器的对所述加密后的第一验证码的解密结果可以包括:In a preferred embodiment, the client can send the decrypted first verification code obtained by the client decrypting the encrypted first verification code to the server, and the server can verify the encrypted first verification code according to the decrypted first verification code. code for authentication. Therefore, in this embodiment, the decryption result of the encrypted first verification code sent by the client to the server may include:
客户端对所述加密后的第一验证码进行解密获取的解密后第二验证码。The client decrypts the encrypted first verification code and obtains the decrypted second verification code.
相应的,所述服务器接收所述解密结果,并根据所述解密结果进行身份验证包括:所述服务器接收所述解密结果,并从所述解密结果中提取所述解密后的第二验证码;所述服务器比较所述第二验证码与所述第一验证码是否相同,并在比较结果相同时通过身份验证。Correspondingly, the server receiving the decryption result and performing identity verification according to the decryption result includes: the server receiving the decryption result and extracting the decrypted second verification code from the decryption result; The server compares whether the second verification code is the same as the first verification code, and passes the identity verification when the comparison result is the same.
所述客户端可以利用存储的解密算法对所述提取的加密后的第一验证码进行解密,在成功解密所述提取的加密后的第一验证码时可以获取解密后第二验证码。所述消息接收端可以将包括解密后第一验证码的解密结果通过所述无线网络发送至所述服务器。服务器端可以接收所述解密结果并从中提取所述解密后的第二验证码,并可以比较所述提取的解密后的第二验证码与所述服务器的第一验证码是否相同;所述服务器可以根据所述接收的解密后的第二验证码与所述第一验证码的比较结果进行身份验证。如果所述比较结果为相同,可以通过身 份验证;如果比较结果为不相同,可以不通过身份验证。The client can use the stored decryption algorithm to decrypt the extracted encrypted first verification code, and can obtain the decrypted second verification code when successfully decrypting the extracted encrypted first verification code. The message receiving end may send the decryption result including the decrypted first verification code to the server through the wireless network. The server side can receive the decryption result and extract the decrypted second verification code therefrom, and can compare whether the extracted decrypted second verification code is the same as the server's first verification code; the server Identity verification may be performed according to a comparison result between the received decrypted second verification code and the first verification code. If the comparison result is the same, the authentication may be passed; if the comparison result is not the same, the authentication may not be passed.
例如,所述客户端利用存储的私钥对所述加密后的第一验证码A’进行解密,在解密成功时可以得到的解密后的第二验证码为B。所述客户端可以通过所述服务器建立的无线网络将所述解密后的第二验证码B发送至所述服务器。所述服务器可以存储所述生成的第一验证码,因此,所述服务器接收所述解密后的第二验证码B后,比较所述第二验证码B与所述服务器生成的第一验证码A是否相同。如果所述第二验证码B与所述生成的第一验证码A的比较结果为相同,所述服务器可以通过身份验证;如果所述第二验证码B与所述生成的第一验证码A比较的结果为不相同,所述服务器可以不通过身份验证,此时所述服务器可以根据预置的处理方式进行处理。利用本实施例所述的方式进行身份验证,可以进一步提高身份验证的安全性。For example, the client uses the stored private key to decrypt the encrypted first verification code A', and the decrypted second verification code that can be obtained when the decryption is successful is B. The client may send the decrypted second verification code B to the server through the wireless network established by the server. The server can store the generated first verification code. Therefore, after receiving the decrypted second verification code B, the server compares the second verification code B with the first verification code generated by the server. A is the same. If the comparison result between the second verification code B and the generated first verification code A is the same, the server can pass the identity verification; if the second verification code B is the same as the generated first verification code A If the result of the comparison is not the same, the server may not pass the authentication, and at this time, the server may perform processing according to a preset processing method. Using the method described in this embodiment to perform identity verification can further improve the security of identity verification.
本申请还提供所述身份验证的另一种优选实施例。图4是本申请所述身份验证方法的另一种实施例的方法流程图。如图4所示,所述方法包括:The present application also provides another preferred embodiment of the identity verification. FIG. 4 is a method flowchart of another embodiment of the identity verification method described in the present application. As shown in Figure 4, the method includes:
S1:服务器可以获取用的账号信息,并可以基于存储的用户信息查询与所述用户的账号信息相对应的加密算法;S1: the server can obtain the account information for use, and can query the encryption algorithm corresponding to the account information of the user based on the stored user information;
S2:服务器可以利用所述查询到的加密算法对服务器的第一验证码进行加密,形成加密后的第一验证码;S2: The server can encrypt the first verification code of the server by using the queried encryption algorithm to form an encrypted first verification code;
S3:服务器可以建立无线网络,并可以为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码;S3: The server can establish a wireless network, and can set a network name in a predetermined format for the established wireless network; the network name includes the encrypted first verification code;
S4:客户端可以扫描无线网络;所述客户端可以从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;S4: the client can scan the wireless network; the client can extract the encrypted first verification code from the scanned network name that conforms to the agreed format;
S503:客户端可以利用存储的解密算法对所述提取的加密后的第一验证码进行解密;在解密成功时,所述消息接收端可以利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码;所述客户端可以将所述加密后的第三验证码发送通过所述无线网络发送至服务器;S503: The client can use the stored decryption algorithm to decrypt the extracted encrypted first verification code; when the decryption is successful, the message receiving end can use the stored decryption algorithm to encrypt the third verification code of the client , forming an encrypted third verification code; the client can send the encrypted third verification code to the server through the wireless network;
S602:服务器可以接收所述加密后的第三验证码,并可以利用与获取的用户的账号信息相对应的加密算法对所述加密后的第三验证码进行解密;所述服务器根据所述加密算法对所述加密后的第三验证码的解密结果进行身份验证。S602: The server can receive the encrypted third verification code, and can decrypt the encrypted third verification code by using an encryption algorithm corresponding to the acquired user's account information; the server can decrypt the encrypted third verification code according to the encrypted The algorithm performs identity verification on the decryption result of the encrypted third verification code.
需要说明的是,本申请中所述的加密算法或解密算法可以包括对信息进行一定规则变换的计算方法,其中可以包括利用加密算法进行解密、利用解密算法进行加密的应用场景。例如在本实施例中所述的加密算法和解密算法可以包括公钥和私钥,其中可以利用所述公钥对进行加密利用私钥进行解密,也可以利用私钥对信息进行加密利用公钥进行解密。该实施例 中,所述客户端利用存储的解密算法可以解密所述服务器发送的加密后的第一验证码,可以验证该客户端是所述接收服务器发送消息的消息接收者身份。进一步的,所述客户端可以利用存储的解密算法对所述客户端上的第三验证码进行加密,形成加密后的第三验证码。所述客户端可以将所述加密后的第三验证码通过所述无线网络发送至服务器。所述服务器可以利用与用户的账号信息相对应的加密算法对所述加密后的第三验证码进行解密。如果可以解密,可以验证客户端向所述服务器发送消息的消息发送者身份。具体的例如,所述客户端可以利用存储的私钥对第三验证码进行加密。所述第三验证码可以包括客户端按照一定规则或者随机生成的验证码信息。所述客户端可以将私钥加密后的第三验证码通过所述无线网络发送至服务器。所述服务器可以利用与用户账号信息相对应公钥对所述加密后的第三验证码进行解密。如果可以解密成功,所述服务器可以通过身份验证;如果解密失败,所述服务器可以不通过身份验证。It should be noted that the encryption algorithm or decryption algorithm described in this application may include a calculation method for performing certain rule transformation on information, which may include application scenarios in which the encryption algorithm is used for decryption and the decryption algorithm is used for encryption. For example, the encryption algorithm and decryption algorithm described in this embodiment may include a public key and a private key, wherein the public key pair may be used for encryption and the private key may be used for decryption, or the private key may be used to encrypt information and the public key may be used for decryption. to decrypt. In this embodiment, the client can decrypt the encrypted first verification code sent by the server by using the stored decryption algorithm, and can verify that the client is the recipient of the message sent by the receiving server. Further, the client can use the stored decryption algorithm to encrypt the third verification code on the client to form an encrypted third verification code. The client may send the encrypted third verification code to the server through the wireless network. The server may decrypt the encrypted third verification code by using an encryption algorithm corresponding to the user's account information. If decryption is possible, the identity of the message sender of the message sent by the client to the server can be verified. For example, the client may encrypt the third verification code by using the stored private key. The third verification code may include verification code information generated by the client according to certain rules or randomly. The client may send the third verification code encrypted by the private key to the server through the wireless network. The server may decrypt the encrypted third verification code by using the public key corresponding to the user account information. If the decryption succeeds, the server may pass the authentication; if the decryption fails, the server may fail the authentication.
上述实施例中,所述服务器根据所述加密算法对所述加密后的第三验证码的解密结果进行身份验证可以包括:In the above embodiment, the authentication performed by the server on the decryption result of the encrypted third verification code according to the encryption algorithm may include:
所述服务器对所述加密后的第三验证码解密成功时,获取解密后的第四验证码;所述服务器可以比较所述第四验证码与服务器的预置验证码是否相同,并在比较结果相同时进行身份验证。When the server decrypts the encrypted third verification code successfully, it obtains the decrypted fourth verification code; the server can compare whether the fourth verification code is the same as the server's preset verification code, and compare the encrypted third verification code. Authenticate when the result is the same.
在该实施例中,所述服务器可以解密所述加密后的第三验证码,获取解密后的第四验证码。所述服务器可以比较所述第四验证码与服务器的预置验证码是否相同。所述客户端加密的第三验证码和服务器的预置验证码通常可以包括所述服务器和客户端预先设置的用于进一步身份验证的信息。在具体的一个实施例中,所述客户端的第三验证码可以包括所述客户端对所述提取的加密后的第一验证码进行解密而获取的第二验证码,所述服务器的预置验证码可以包括所述服务器的第一验证码,相应的,所述服务器比较所述第四验证码与服务器的预置验证码是否相同包括:所述服务器比较所述第二验证码与所述服务器的第一验证码是否相同。例如,服务器在对账号信息为user123的用户进行身份验证时,可以生成第一验证码A,所述服务器可以存储该生成第一验证码A,并将所述生成的第一验证码A作为服务器的预置验证码。所述服务器可以通过加密算法(例如用户的公钥)进行加密得到加密后的第一验证码A’。所述服务器通过建立的WIFI的网络名称将所述加密后的第一验证码A’广播出去。所述客户端扫描到该无线网络并利用自身的私钥解密该无线网络中网络名称所包含的加密后第一验证码A’,可以得到解密后的第二验证码B。在本实施例中,所述客户端可以将所述第二验证码B作为所述客户端的第三验证码进行加密,可以利用客户端的私钥对所述第三验证码B进行加密,得到加密后的第三验证码B’,并可以通过所述无线网络发送服务器。所述 服务器可以利用与账号信息user123相对应的公钥对所述加密后的第三验证码B’进行解密,可以得到解密后的第四验证码C。进一步的,所述服务器可以比较所述解密后的第四验证码C与服务器存储的账号信息为user123的用户的第一验证码A是否相同。如果所述公钥解密后的第四验证码C与所述服务器第一验证码A的比较结果为相同,所述服务器可以通过身份验证;如果所述公钥解密后的第四验证码C与所述服务器第一验证码A的比较结果为不相同,所述服务器可以不通过身份验证。In this embodiment, the server may decrypt the encrypted third verification code to obtain the decrypted fourth verification code. The server may compare whether the fourth verification code is the same as a preset verification code of the server. The third verification code encrypted by the client and the preset verification code of the server may generally include information preset by the server and the client for further authentication. In a specific embodiment, the third verification code of the client may include a second verification code obtained by decrypting the extracted encrypted first verification code by the client. The verification code may include the first verification code of the server. Correspondingly, the server comparing whether the fourth verification code is the same as the preset verification code of the server includes: the server comparing the second verification code with the Whether the first verification code of the server is the same. For example, when the server authenticates the user whose account information is user123, the server may generate the first verification code A, the server may store the generated first verification code A, and use the generated first verification code A as the server preset verification code. The server may perform encryption through an encryption algorithm (such as the user's public key) to obtain the encrypted first verification code A'. The server broadcasts the encrypted first verification code A' through the network name of the established WIFI. The client scans the wireless network and uses its own private key to decrypt the encrypted first verification code A' contained in the network name in the wireless network, and can obtain the decrypted second verification code B. In this embodiment, the client can encrypt the second verification code B as the third verification code of the client, and can encrypt the third verification code B by using the private key of the client to obtain an encrypted After the third verification code B', and can be sent to the server through the wireless network. The server can use the public key corresponding to the account information user123 to decrypt the encrypted third verification code B', and can obtain the decrypted fourth verification code C. Further, the server may compare whether the decrypted fourth verification code C is the same as the first verification code A of the user whose account information is user123 stored by the server. If the comparison result between the fourth verification code C decrypted by the public key and the first verification code A of the server is the same, the server can pass the identity verification; if the fourth verification code C decrypted by the public key is the same as If the comparison result of the first verification code A of the server is not the same, the server may not pass the identity verification.
本申请所述的一种身份验证的另一个实施例中,所述客户端的第三验证码可以包括客户端的用户的账号信息,所述服务器的预置验证码可以包括服务器存储的用户信息,相应的,所述服务器比较所述解密后的第四验证码与服务器的预置验证码是否相同包括:所述服务器比较所述解密后的用户的账号信息与服务器存储的用户的账号信息是否相同。在本实施例中,所述客户端可以获取自身用户的账号信息,将所述客户端的用户的账号信息作为所述客户端的第三验证码。所述客户端在解密所述加密后的第一验证码后,可以利用存储的私钥对客户端上的用户的账号信息进行加密。例如可以利用客户端的私钥K_PRI对客户端的用户的账号信息user123进行加密,形成加密后的用户账号信息SFTFDK40AA9KANCM,并可以通过所述无线网络发送至服务器。所述服务器接收所述加密后的用户账号信息SFTFDK40AA9KANCM,可以利用账号信息user123所对应的公钥K_PUB对所述加密后的用户账号信息进行解密。所述服务器将解密后的用户的账号信息与服务器存储该用户的账号信息进行比较,如果相同,可以通过身份验证;如果不同,可以不通过身份验证。例如,如果所述服务器解密的账号信息为user123,与服务器存储的用户的账号信息123相同,可以通过身份验证。如果所述服务器解密的账号为user456,与服务器存储的用户的账号信息user123不相同,可以不通过身份验证。In another embodiment of the identity verification described in this application, the third verification code of the client may include account information of the user of the client, and the preset verification code of the server may include user information stored in the server, and correspondingly The server comparing whether the decrypted fourth verification code is the same as the server's preset verification code includes: the server comparing whether the decrypted user account information is the same as the user account information stored by the server. In this embodiment, the client terminal may acquire account information of its own user, and use the account information of the user of the client terminal as the third verification code of the client terminal. After decrypting the encrypted first verification code, the client can use the stored private key to encrypt the account information of the user on the client. For example, the account information user123 of the user of the client can be encrypted by using the private key K_PRI of the client to form encrypted user account information SFTFDK40AA9KANCM, which can be sent to the server through the wireless network. The server receives the encrypted user account information SFTFDK40AA9KANCM, and can use the public key K_PUB corresponding to the account information user123 to decrypt the encrypted user account information. The server compares the decrypted account information of the user with the account information of the user stored by the server, and if they are the same, they can pass the identity verification; if they are different, they can pass the identity verification. For example, if the account information decrypted by the server is user123, which is the same as the account information 123 of the user stored by the server, the authentication can be passed. If the account decrypted by the server is user456, which is different from the user's account information user123 stored by the server, the authentication may not be passed.
上述任意一项实施例所述的身份验证方法中,所述服务器为所述建立的无线网络设置的约定格式的网络名称中还可以包括不同应用的APPID信息,所述客户端可以根据所述网络名称的约定格式提取所述不同应用的APPID信息,并根据所述提取的APPID信息区分客户端上的不同应用。所述APPID信息可以包括用于区分客户端的不同应用的标识符。服务器可以预先设置针对不同应用的APPID信息,例如可以设置对应支付宝钱包应用的APPID为:“PAY_PACK”,可以设置对应QQ应用的APPID为:“IM_QQ”,或者设置对应阿里旺旺应用的APPD为:“IM_WW”等。相应的,所述SSID的约定格式中可以包括所述APPID信息,所述客户端获取所述约定格式SSID后可以根据所述SSID的约定格式提取所述APPID信息,并可以根据所述提取的APPID信息区分所述客户端上的不同应用。当然,在所述客户端发送至服务器的消息中也可以包括所述APPID信息,所述服务器可以通过所述APPID区 分所述客户端上的不同应用。通过本实施例,所述服务器或客户端可以通过建立的无线网络完成客户端上不同应用的身份验证。In the authentication method according to any one of the above embodiments, the network name in the agreed format set by the server for the established wireless network may also include APPID information of different applications, and the client may The agreed format of the name extracts the APPID information of the different applications, and differentiates the different applications on the client according to the extracted APPID information. The APPID information may include identifiers for distinguishing different applications of the client. The server can preset APPID information for different applications. For example, you can set the APPID corresponding to Alipay wallet application to: "PAY_PACK", you can set the APPID corresponding to QQ application to be: "IM_QQ", or set the APPID corresponding to Aliwangwang application to: " IM_WW" etc. Correspondingly, the agreed format of the SSID may include the APPID information, and the client may extract the APPID information according to the agreed format of the SSID after acquiring the SSID in the agreed format, and may extract the APPID information according to the extracted APPID. Information distinguishes different applications on the client. Of course, the APPID information may also be included in the message sent by the client to the server, and the server may distinguish different applications on the client through the APPID. With this embodiment, the server or the client can complete the authentication of different applications on the client through the established wireless network.
在另一种具体的应用场景中,上述所述网络名称中可以包括SessionID信息,所述SessionID信息可以包括服务器建立的用于标识所述服务器与客户端进行身份验证产生的会话的标识符。所述网络名称约定格式可以包括:会话标识+加密后验证码,如:SessionID+A’。所述SessionID可以区分所述服务器与不同客户端的会话,获区分所述服务器与同一客户端在不同时间的产生的会话。在具体的应用场景中,所述服务器可以建立多个不同的WIFI网络与多个客户端产生会话,进行信息交互,所述服务器可以为每一次会话建立不同的SessionID。所述SSID的约定格式中可以包括所述SessionID,所述客户端获取所述SSID后可以根据所述SSID的约定格式提取所述SessionID,所述客户端可以根据所述提取的SessionID区分判断与服务器进行交互的信息是否属于同一次会话。当然,所述客户端发送至服务器的消息中也可以包括所述SessionID信息,所述服务器可以根据所述SessionID判断与客户端进行交互的信息是否属于同一次会话。In another specific application scenario, the above-mentioned network name may include SessionID information, and the SessionID information may include an identifier established by the server to identify a session generated by the server and the client performing authentication. The network name convention format may include: session ID+encrypted verification code, such as: SessionID+A'. The SessionID can distinguish sessions between the server and different clients, and can distinguish sessions generated between the server and the same client at different times. In a specific application scenario, the server may establish multiple different WIFI networks to generate sessions with multiple clients for information exchange, and the server may establish a different SessionID for each session. The agreed format of the SSID may include the SessionID, the client can extract the SessionID according to the agreed format of the SSID after obtaining the SSID, and the client can distinguish and judge the server according to the extracted SessionID. Whether the information being interacted with belongs to the same session. Certainly, the message sent by the client to the server may also include the SessionID information, and the server may judge whether the information interacting with the client belongs to the same session according to the SessionID.
本申请另一种实施方式中,所述客户端可以不与所述服务器直接进行信息交互。所述客户端可以如POS机、公用服务设备等作为中继设备与所述服务器进行通信,完成身份验证。因此,本申请提供一种身份验证方法的另一种实施例,所述方法可以包括:In another implementation manner of the present application, the client may not directly perform information interaction with the server. The client can communicate with the server as a relay device, such as a POS machine, a public service device, etc., to complete identity verification. Therefore, the present application provides another embodiment of an identity verification method, and the method may include:
S201:中继设备获取输入的账号信息,并将所述获取的账号信息发送至服务器;S201: The relay device acquires the input account information, and sends the acquired account information to the server;
S202:服务器接收所述账号信息,并基于存储的用户信息查询与所述获取的用户账号信息相对应的加密算法;所述服务器将所述加密算法发送至所述中继设备;S202: The server receives the account information, and queries the encryption algorithm corresponding to the obtained user account information based on the stored user information; the server sends the encryption algorithm to the relay device;
S203:中继设备接收所述加密算法,并利用所述接收的加密算法对所述中继设备的第一验证码进行加密,形成加密后的第一验证码;S203: The relay device receives the encryption algorithm, and uses the received encryption algorithm to encrypt the first verification code of the relay device to form an encrypted first verification code;
S204:中继设备建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后第一验证码;S204: The relay device establishes a wireless network, and sets a network name in a predetermined format for the established wireless network; the network name includes the encrypted first verification code;
S205:客户端扫描无线网络的网络名称;所所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;S205: the client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name conforming to the agreed format;
S2061:所述客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;客户端根据对所述加密后第一验证码的解密结果进行身份验证。S2061: The client decrypts the extracted encrypted first verification code by using the stored decryption algorithm; the client performs identity verification according to the decryption result of the encrypted first verification code.
上述所述中继设备的第一验证码可以包括所述中继设备生成的第一验证码,或者从接收的服务器发送的第一验证码。The above-mentioned first verification code of the relay device may include the first verification code generated by the relay device, or the first verification code sent from the received server.
上述的一种身份验证方法的另一种实施方式中,在完成上S204后,可以包括:In another embodiment of the above-mentioned identity verification method, after completing S204, it may include:
S2062:所述客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密, 并可以将对所述提取的加密后第一验证码的解密结果通过所述无线网络发送至中继设备;S2062: The client decrypts the extracted encrypted first verification code by using the stored decryption algorithm, and can send the decryption result of the extracted encrypted first verification code to the wireless network through the wireless network. relay equipment;
S2071:所述中继设备可以接收客户端发送的所述解密结果并将所述解密结果发送至服务器;S2071: The relay device can receive the decryption result sent by the client and send the decryption result to the server;
S2081:所述服务器可以接收所述中继设备发送的解密结果,并根据所述解密结果进行身份验证。S2081: The server may receive the decryption result sent by the relay device, and perform identity verification according to the decryption result.
上述所述的一种身份验证方法,所述客户端发送的对所述解密后的第一验证码的解密结果包括:客户端对所述提取的加密后的第一验证码解密成功或失败。所述客户端发送的对所述解密后的第一验证码的解密结果包括:对所述提取的加密后的第一验证码解密成功或失败。如果所述解密结果为成功,可以通过身份验证;如果所述解密结果为失败,可以不通过身份验证。In the above-mentioned identity verification method, the decryption result of the decrypted first verification code sent by the client includes: the client successfully decrypts the extracted encrypted first verification code or fails. The decryption result of the decrypted first verification code sent by the client includes: decryption of the extracted encrypted first verification code succeeds or fails. If the decryption result is successful, the authentication may be passed; if the decryption result is failure, the authentication may not be passed.
当然,所述客户端发送的对所述解密后的第一验证码的解密结果可以包括:Certainly, the decryption result of the decrypted first verification code sent by the client may include:
客户端对所述加密后的第一验证码进行解密获取的解密后第二验证码;the decrypted second verification code obtained by the client decrypting the encrypted first verification code;
相应的,所述服务器接收中继设备发送的所述解密结果,并根据所述解密结果进行身份验证包括:所述服务器接收所述解密结果,并从中所述解密结果中提取第二验证码;所述服务器比较所述第二验证码与服务器的第一验证码是否相同,并在比较结果相同时通过身份证验证。Correspondingly, the server receiving the decryption result sent by the relay device, and performing identity verification according to the decryption result includes: the server receiving the decryption result, and extracting the second verification code from the decryption result; The server compares whether the second verification code is the same as the first verification code of the server, and passes the identity card verification when the comparison result is the same.
本申请的另一种身份验证方法中,所述方法可以包括:In another identity verification method of the present application, the method may include:
S201:中继设备获取输入的账号信息,并将所述获取的账号信息发送至服务器;S201: The relay device acquires the input account information, and sends the acquired account information to the server;
S202:服务器接收所述账号信息,并基于存储的用户信息查询与所述获取的用户账号信息相对应的加密算法;所述服务器将所述加密算法发送至所述中继设备;S202: The server receives the account information, and queries the encryption algorithm corresponding to the obtained user account information based on the stored user information; the server sends the encryption algorithm to the relay device;
S203:中继设备接收所述加密算法,并利用所述接收的加密算法对所述中继设备的第一验证码进行加密,形成加密后的第一验证码;S203: The relay device receives the encryption algorithm, and uses the received encryption algorithm to encrypt the first verification code of the relay device to form an encrypted first verification code;
S204:中继设备建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后第一验证码;S204: The relay device establishes a wireless network, and sets a network name in a predetermined format for the established wireless network; the network name includes the encrypted first verification code;
S205:客户端扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;S205: The client scans the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format;
S2063:客户端利用存储的解密算法对所述提取的加密后的第一验证码进行解密;在解密成功时,所述消息接收端可以利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码;所述客户端可以将所述加密后的第三验证码发送通过所述无线网络发送至中继设备;S2063: The client decrypts the extracted encrypted first verification code by using the stored decryption algorithm; when the decryption is successful, the message receiving end can use the stored decryption algorithm to encrypt the third verification code of the client, forming an encrypted third verification code; the client can send the encrypted third verification code to the relay device through the wireless network;
S3072:中继设备可以接收所述加密后的第三验证码,并将所述加密后的验证码发送至 服务器;S3072: The relay device can receive the encrypted third verification code, and send the encrypted verification code to the server;
S3082:服务器可以接收所述加密后的三验证码,并可以利用与获取的用户的账号信息相对应的加密算法对所述加密后的第三验证码进行解密;所述服务器根据所述加密算法对所述加密后的第三验证码的解密结果进行身份验证。S3082: The server can receive the encrypted three verification code, and can use the encryption algorithm corresponding to the acquired user's account information to decrypt the encrypted third verification code; the server can decrypt the encrypted third verification code according to the encryption algorithm Perform identity verification on the decryption result of the encrypted third verification code.
上述所述的客户端的第三验证码可以包括:客户端按照一定规则或者随机生成的验证码信息。上述实施例中,客户端可以利用自身的私钥对客户端的第三验证码进行加密,并通过所述中继设备发送至服务器。如果所述服务器可以利用相应的私钥解密所述加密后的第三验证码,则可以通过身份验证。The above-mentioned third verification code of the client terminal may include: verification code information generated by the client terminal according to certain rules or randomly. In the above embodiment, the client can use its own private key to encrypt the third verification code of the client, and send it to the server through the relay device. If the server can decrypt the encrypted third verification code by using the corresponding private key, the authentication can be passed.
优选的实施方式中,所述服务器根据所述加密算法对所述加密后的第三验证码的解密结果进行身份验证可以包括::In a preferred embodiment, the authentication performed by the server on the decryption result of the encrypted third verification code according to the encryption algorithm may include:
所述服务器在对所述加密后的第三验证码解密成功时,获取解密后的第四验证码;所述服务器比较所述第四验证码与服务器预置验证码是否相同,并在比较结果相同时通过身份验证。When the encrypted third verification code is successfully decrypted, the server obtains the decrypted fourth verification code; the server compares whether the fourth verification code is the same as the server preset verification code, and compares the result in the comparison result. Same time pass authentication.
参照本申请的其他实施例,所述客户端的第三验证码包括所述客户端对所述加密后的第一验证码进行解密获取的解密后第二验证码,所述服务器的预置验证码可以包括所述服务器的第一验证码;Referring to other embodiments of the present application, the third verification code of the client includes the decrypted second verification code obtained by the client decrypting the encrypted first verification code, the preset verification code of the server may include the first verification code of the server;
相应的,所述服务器比较所述第四验证码与服务器的预置验证码是否相同包括:所述服务器比较所述第二验证码与服务器的第一验证码是否相同;Correspondingly, the server comparing whether the fourth verification code is the same as the server's preset verification code includes: the server comparing whether the second verification code is the same as the server's first verification code;
或者,or,
所述客户端的第三验证码包括客户端的用户的账号信息,所述服务器的预置验证码包括服务器存储的用户的账号信息;The third verification code of the client includes account information of the user of the client, and the preset verification code of the server includes the account information of the user stored by the server;
相应的,所述服务器比较所述第四验证码与服务器的预置验证码是否相同包括:所述服务器比较所述解密后的用户的账号信息与服务器存储的用户的账号信息是否相同。Correspondingly, comparing, by the server, whether the fourth verification code is the same as the preset verification code of the server includes: comparing, by the server, whether the decrypted account information of the user is the same as the account information of the user stored by the server.
当然,所述中继设备建立的无线网络设置的约定格式的网络名称中还可以包括不同应用的APPID信息,所述客户端可以根据所述网络名称的约定格式提取所述不同应用的APPID信息,并根据所述提取的APPID信息区分客户端上的不同应用。Of course, the network name in the agreed format set by the relay device may also include APPID information of different applications, and the client can extract the APPID information of the different applications according to the agreed format of the network name, And different applications on the client are distinguished according to the extracted APPID information.
基于本申请所述的身份验证方法,本申请提供一种身份验证的服务器。图5是本申请所述身份验证的服务器的模块结构示意图。如图5所示,所述服务器可以包括:Based on the identity verification method described in this application, this application provides an identity verification server. FIG. 5 is a schematic diagram of the module structure of the identity verification server described in this application. As shown in Figure 5, the server may include:
账号获取单元101,可以用于获取用户的账号信息;The account obtaining unit 101 can be used to obtain the account information of the user;
用户数据库102,可以用于存储用户信息;所述用户信息可以包括用户的账号信息、用户的加密算法;The user database 102 can be used to store user information; the user information can include the user's account information and the user's encryption algorithm;
查询单元103,可以用于基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;The query unit 103 can be configured to query the encryption algorithm corresponding to the acquired account information based on the stored user information;
加密单元104,可以生成第一验证码,并用于利用所述查询到的加密算法对所述第一验证码进行加密,形成加密后的第一验证码;The encryption unit 104 can generate a first verification code, and is used to encrypt the first verification code by using the queried encryption algorithm to form an encrypted first verification code;
无线网络单元105,可以用于建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码。The wireless network unit 105 can be used to establish a wireless network, and set a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code.
图6是本申请所述的一种身份验证的服务器的另一种实施例的模块结构示意图,如图6所示,所述服务器还可以包括:FIG. 6 is a schematic diagram of a module structure of another embodiment of an identity verification server described in this application. As shown in FIG. 6 , the server may further include:
第一接收单元106,可以用于获取客户端或中继设备发送的对加密后的第一验证码的解密结果;The first receiving unit 106 can be used to obtain the decryption result of the encrypted first verification code sent by the client or the relay device;
第一身份验证单元107,可以用于根据所述接收单元106的解密结果进行身份验证。The first identity verification unit 107 may be configured to perform identity verification according to the decryption result of the receiving unit 106 .
图7上述所述第一身份验证单元107的模块结构示意图,如图7所示,所述第一身份验证单元107可以包括:FIG. 7 is a schematic diagram of the module structure of the above-mentioned first identity verification unit 107. As shown in FIG. 7 , the first identity verification unit 107 may include:
第一提取单元1071,可以用于从所述解密结果中提取解密后第一验证码;The first extraction unit 1071 can be used to extract the decrypted first verification code from the decrypted result;
第一比较单元1072,可以用于比较所述提取的解密后第一验证码与加密单元104生成的第一验证码是否相同;The first comparison unit 1072 can be used to compare whether the extracted decrypted first verification code is the same as the first verification code generated by the encryption unit 104;
第一验证单元1073,可以用于根据所述提取的解密后第一验证码与加密单元104生成的第一验证码的比较结果进行身份验证。The first verification unit 1073 may be configured to perform identity verification according to the comparison result of the extracted decrypted first verification code and the first verification code generated by the encryption unit 104 .
图8是本申请所述的一种身份验证的服务器的另一种实施例的模块结构示意图,如图8所示,所述服务器还可以包括:FIG. 8 is a schematic diagram of a module structure of another embodiment of an authentication server described in this application. As shown in FIG. 8 , the server may further include:
第二接收单元108,可以用于接收客户端或中继设备发送的加密后的第三验证码;The second receiving unit 108 can be configured to receive the encrypted third verification code sent by the client or the relay device;
解密单元109,可以用于利用用户数据库102中与获取的用户账号相对应的加密算法对所述加密后的第三验证码进行解密;The decryption unit 109 can be configured to decrypt the encrypted third verification code by using the encryption algorithm corresponding to the obtained user account in the user database 102;
第二身份验证单元1010,可以用于根据对所述加密后的第三验证码的解密结果进行身份验证。The second identity verification unit 1010 may be configured to perform identity verification according to the decryption result of the encrypted third verification code.
图9上述所述第一身份验证单元1010的模块结构示意图,如图9所示,所述第二身份验证单元1010,可以包括:FIG. 9 is a schematic diagram of the module structure of the first identity verification unit 1010 described above. As shown in FIG. 9 , the second identity verification unit 1010 may include:
第二提取单元1011,可以用于提取所述解密单元109对所述加密后的第三验证码解密获取的第四验证码;The second extraction unit 1011 can be configured to extract the fourth verification code obtained by the decryption unit 109 decrypting the encrypted third verification code;
第二比较单元1012,可以用于比较所述解密后的第四验证码与存储的预置验证码是否相同;The second comparison unit 1012 can be used to compare whether the decrypted fourth verification code is the same as the stored preset verification code;
第二验证单元1013,可以用于根据所述第四验证码与存储的预置验证码的比较结果进行身份验证。The second verification unit 1013 may be configured to perform identity verification according to the comparison result between the fourth verification code and the stored preset verification code.
所述第二比较单元1012存储的预置验证码,可以包括加密单元104生成的第一验证码,或者用户数据库存储的用户账号信息。The preset verification code stored in the second comparison unit 1012 may include the first verification code generated by the encryption unit 104 or the user account information stored in the user database.
本申请还提供一种身份验证的客户端,图10是所述一种身份验证的客户端的模块结构示意图。如图10所示,所述客户端可以包括:The present application also provides an authentication client, and FIG. 10 is a schematic diagram of the module structure of the authentication client. As shown in Figure 10, the client may include:
存储单元201,可以用于存储网络名称的约定格式;还可以用于存储用户的账号信息的解密算法;The storage unit 201 can be used to store the agreed format of the network name; it can also be used to store the decryption algorithm of the user's account information;
网络扫描单元202,可以用于基于存储的网络名称的约定格式扫描符合所述约定格式的无线网络的网络名称;The network scanning unit 202 can be configured to scan the network name of the wireless network conforming to the agreed format based on the stored agreed format of the network name;
提取单元203,可以用于从扫描到的符合约定格式的网络名称中提取加密后的第一验证码;The extraction unit 203 can be used to extract the encrypted first verification code from the scanned network name that conforms to the agreed format;
第一解密单元204,可以用于基于存储的解密算法对所述提取的加密后的第一验证码进行解密。The first decryption unit 204 may be configured to decrypt the extracted encrypted first verification code based on the stored decryption algorithm.
图11是上述所述一种身份验证的客户端的另一种实施例的模块结构示意图。如图11所示,所述客户端还可以包括:FIG. 11 is a schematic structural diagram of a module of another embodiment of the above-mentioned authentication client. As shown in Figure 11, the client may also include:
身份验证单元205,可以用于基于所述第一解密单元204的解密结果进行身份验证。The identity verification unit 205 may be configured to perform identity verification based on the decryption result of the first decryption unit 204 .
图12是上述所述一种身份验证的客户端的另一种实施例的模块结构示意图。如图12所示,所述客户端还可以包括:FIG. 12 is a schematic structural diagram of a module of another embodiment of the above-mentioned authentication client. As shown in Figure 12, the client may also include:
第一发送单元206,可以用于将对所述提取的加密后第一验证码的解密结果通过所述无线网络发送至服务器或中继设备。The first sending unit 206 may be configured to send the decryption result of the extracted encrypted first verification code to a server or a relay device through the wireless network.
所述客户端发送至服务器或中继设备的对所述加密后的第一验证码的解密结果包括:The decryption result of the encrypted first verification code sent by the client to the server or the relay device includes:
客户端对所述提取的加密后的第一验证码解密成功或失败;The client succeeds or fails to decrypt the extracted encrypted first verification code;
或者,or,
客户端对所述加密后的第一验证码进行解密获取的解密后第二验证码。The client decrypts the encrypted first verification code and obtains the decrypted second verification code.
图13是上述所述一种身份验证的客户端的另一种实施例的模块结构示意图。如图13所示,所述客户端还可以包括:FIG. 13 is a schematic structural diagram of a module of another embodiment of the above-mentioned authentication client. As shown in Figure 13, the client may also include:
第一加密单元207,可以用于在对所述提取的加密后的第一验证码进行解密成功时,利用利用存储的解密算法对客户端的第三验证码进行加密,形成加密后的第三验证码;The first encryption unit 207 can be used to encrypt the third verification code of the client by utilizing the stored decryption algorithm when the extracted encrypted first verification code is successfully decrypted to form an encrypted third verification code. code;
第二发送单元208,可以将所述加密后的第三验证码通过所述无线网络发送至服务器或中继设备。The second sending unit 208 can send the encrypted third verification code to a server or a relay device through the wireless network.
上述所述客户端的第三验证码包括:所述客户端对所述加密后的第一验证码进行解密获取的解密后第二验证码;或者,客户端的用户的账号信息。The third verification code of the client terminal includes: the decrypted second verification code obtained by decrypting the encrypted first verification code by the client terminal; or the account information of the user of the client terminal.
本申请还提供一种中继设备,图14是所述中继设备的模块结构示意图。如图14所示,所述中继设备可以包括:The present application also provides a relay device, and FIG. 14 is a schematic structural diagram of a module of the relay device. As shown in Figure 14, the relay device may include:
信息获取单元301,可以用于获取用户的账号信息;An information acquisition unit 301, which can be used to acquire account information of a user;
信息接收单元302,可以用于接收服务器发送的加密算法;The information receiving unit 302 can be used to receive the encryption algorithm sent by the server;
信息加密单元303,可以用于生成或从服务器接收第一验证码,并利用接收的加密算法对所述第一验证码进行加密,形成加密后的第一验证码;The information encryption unit 303 can be used to generate or receive a first verification code from the server, and encrypt the first verification code by using the received encryption algorithm to form an encrypted first verification code;
无线网络广播单元304,可以用于建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后的第一验证码。The wireless network broadcasting unit 304 can be used to establish a wireless network, and set a network name in an agreed format for the established wireless network; the network name includes the encrypted first verification code.
图15是上述所述的一种中继设备的另一种实施方式的模块结构示意图,如图15所示,所述中继设备还可以包括:FIG. 15 is a schematic structural diagram of a module of another implementation manner of the above-mentioned relay device. As shown in FIG. 15 , the relay device may further include:
反馈接收单元305,可以用于接收客户端发送的反馈结果;The feedback receiving unit 305 can be used to receive the feedback result sent by the client;
反馈发送单元306,可以用于将所述接收的客户端反馈结果发送至服务器。所述中继设备接收的客户端发送的反馈结果包括:The feedback sending unit 306 may be configured to send the received feedback result of the client to the server. The feedback results sent by the client and received by the relay device include:
客户端对加密后的第一验证码解密成功或失败;The client succeeds or fails to decrypt the encrypted first verification code;
或者,or,
客户端对加密后的第一验证码进行解密获取的解密后第二验证码;The client decrypts the encrypted first verification code and obtains the decrypted second verification code;
或者,or,
客户端利用存储的解密算法对客户端的第三验证码进行加密获取的加密后的第三验证码。The client encrypts the third verification code of the client by using the stored decryption algorithm to obtain the encrypted third verification code.
上述客户端、服务器、中继设备中所述的加密算法和解密算法可以包括非对称加密算法中的公钥和私钥。当然也可以包括其他的符合本申请身份验证算法的其他算法。具体的产品应用中所述的建立的无线网络可以包括WIFI网络。The encryption algorithm and decryption algorithm described in the above client, server, and relay device may include the public key and the private key in the asymmetric encryption algorithm. Of course, other algorithms that conform to the identity verification algorithm of the present application may also be included. The established wireless network described in the specific product application may include a WIFI network.
本申请还提供一种身份验证的系统,所述系统可以包括:The application also provides an identity verification system, the system may include:
客户端,可以用于扫描无线网络的网络名称;所述客户端从扫描到的符合所述约定格式的网络名称中提取所述加密后的第一验证码;还可以用于利用存储的解密算法对所述提取的加密后的第一验证码进行解密;还可以用于将对所述提取的加密后第一验证码的解密结果通过所述无线网络发送至所述服务器;The client can be used to scan the network name of the wireless network; the client extracts the encrypted first verification code from the scanned network name that conforms to the agreed format; it can also be used to utilize the stored decryption algorithm Decrypting the extracted encrypted first verification code; can also be used to send the decryption result of the extracted encrypted first verification code to the server through the wireless network;
服务器,可以用于获取用户的账号信息,并基于存储的用户信息查询与所述获取的账号信息相对应的加密算法;还可以用于利用所述查询到的加密算法对服务器的第一验证码进行 加密,形成加密后的第一验证码;还可以建立无线网络,并为所述建立的无线网络设置约定格式的网络名称;所述网络名称包括所述加密后第一验证码;还可以接收所述解密结果,并根据所述解密结果进行身份验证。The server can be used to obtain the user's account information, and based on the stored user information to query the encryption algorithm corresponding to the obtained account information; it can also be used to use the queried encryption algorithm to verify the server's first verification code Encryption is performed to form an encrypted first verification code; a wireless network can also be established, and a network name in an agreed format is set for the established wireless network; the network name includes the encrypted first verification code; it can also receive the decryption result, and perform authentication according to the decryption result.
利用本申请的所述的一种身份验证方法、客户端、服务器及中继设备,客户端可以利用中继设备或服务器建立的无线网络与服务器进行通信,进行身份验证。在此身份验证的过程中,可以利用建立的无线网络的网络名称进行身份验证信息的传递。利用本申请各个实施例,可以解决用户所在运营商的无线通信网络无法使用时无法进行身份验证的问题。而且,利用本申请,还可以大幅度提高身份验证的应用场合,提高身份验证的便利性。Using the identity verification method, client, server and relay device described in the present application, the client can communicate with the server by using the wireless network established by the relay device or the server to perform identity verification. During this authentication process, the network name of the established wireless network can be used to transmit the authentication information. With the various embodiments of the present application, the problem that the identity verification cannot be performed when the wireless communication network of the operator where the user is located is unavailable can be solved. Moreover, by using the present application, the application occasion of identity verification can be greatly improved, and the convenience of identity verification can be improved.
尽管上述内容中提到了802.11在内的协议之类的描述,但是,本申请并不局限于必须是完全符合规范的802.11在内的协议的情况。某些协议的基础上略加修改后的传输机制也可以实行上述本申请各实施例的方案。当然,即使不采用上述IP/TCP/UDP协议,而是采用私有协议,只要符合本申请上述各实施例的信息交互和信息判断反馈方式,仍然可以实现相同的申请,在此不再赘述。Although the descriptions of protocols including 802.11 are mentioned in the above content, the present application is not limited to the case where protocols including 802.11 must be fully compliant with the specification. A slightly modified transmission mechanism based on some protocols can also implement the solutions of the above embodiments of the present application. Of course, even if the above IP/TCP/UDP protocol is not used, but a private protocol is used, as long as the information exchange and information judgment feedback methods of the above embodiments of the present application are met, the same application can still be implemented, which will not be repeated here.
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, the controller can be implemented as logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded devices by logically programming the method steps. The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for realizing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions can be regarded as both a software module implementing a method and a structure within a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。The systems, devices, modules or units described in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described respectively. Of course, when implementing the present application, the functions of each unit may be implemented in one or more software and/or hardware.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in storage media, such as ROM/RAM, magnetic disks , CD-ROM, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present application.
本说明书中的各个实施例采用递进的方式描述,各个实施例之间相同相似的部分互相参 见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments.
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The present application may be used in numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, and the like.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
虽然通过实施例描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。Although the application has been described by way of examples, those of ordinary skill in the art will recognize that the application is subject to many modifications and variations without departing from the spirit of the application, and the appended claims are intended to include such modifications and changes without departing from the spirit of the application.
Claims (40)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410373794.6A CN105337740B (en) | 2014-07-31 | 2014-07-31 | An authentication method, client, relay device and server |
CN201910122054.8A CN110062382B (en) | 2014-07-31 | 2014-07-31 | Identity verification method, client, relay equipment and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410373794.6A CN105337740B (en) | 2014-07-31 | 2014-07-31 | An authentication method, client, relay device and server |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910122054.8A Division CN110062382B (en) | 2014-07-31 | 2014-07-31 | Identity verification method, client, relay equipment and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105337740A CN105337740A (en) | 2016-02-17 |
CN105337740B true CN105337740B (en) | 2019-01-04 |
Family
ID=55288056
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410373794.6A Active CN105337740B (en) | 2014-07-31 | 2014-07-31 | An authentication method, client, relay device and server |
CN201910122054.8A Active CN110062382B (en) | 2014-07-31 | 2014-07-31 | Identity verification method, client, relay equipment and server |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910122054.8A Active CN110062382B (en) | 2014-07-31 | 2014-07-31 | Identity verification method, client, relay equipment and server |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN105337740B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105629764A (en) * | 2016-03-22 | 2016-06-01 | 美的集团股份有限公司 | Centralized controller, control method of home equipment and smart home system |
CN108460251B (en) * | 2017-02-21 | 2021-06-29 | 腾讯科技(深圳)有限公司 | Method, device and system for running application program |
CN106921973A (en) * | 2017-04-07 | 2017-07-04 | 美的智慧家居科技有限公司 | Wireless network configuration method, device and system |
CN110460995A (en) * | 2018-05-07 | 2019-11-15 | 中国移动通信有限公司研究院 | A kind of wireless connection method, Internet of Things equipment and client equipment |
CN109639719B (en) * | 2019-01-07 | 2020-01-24 | 武汉稀云科技有限公司 | Identity verification method and device based on temporary identifier |
CN109767208B (en) * | 2019-01-08 | 2021-06-29 | 京东数字科技控股有限公司 | Payment method and payment device |
CN110278549B (en) * | 2019-05-05 | 2022-05-03 | 澳门理工学院 | Network conference method, network conference system and computer readable storage medium |
CN110048842B (en) * | 2019-05-30 | 2021-09-10 | 全链通有限公司 | Session key processing method, device and computer readable storage medium |
CN110176993A (en) * | 2019-05-30 | 2019-08-27 | 全链通有限公司 | Session cipher key distributing method, equipment and storage medium based on alliance's block chain |
CN110048843B (en) * | 2019-05-30 | 2021-09-10 | 全链通有限公司 | Session key transmission method, device and computer readable storage medium |
CN110225011B (en) * | 2019-05-30 | 2021-07-13 | 全链通有限公司 | Authentication method and device for user node and computer readable storage medium |
CN112019504B (en) * | 2020-07-22 | 2022-08-26 | 大箴(杭州)科技有限公司 | Method and device for acquiring wifi dynamic verification code |
CN114157451B (en) * | 2021-11-11 | 2022-06-07 | 广东石油化工学院 | Internet of things equipment identity authentication method, device and system and storage medium |
CN115174074B (en) * | 2022-07-19 | 2024-12-24 | 中国互联网络信息中心 | A method and system for adaptive national secret algorithm communication of domain name registration system |
CN118250005B (en) * | 2024-05-28 | 2024-08-20 | 慧翰微电子股份有限公司 | Internet of things product identity verification method based on communication module |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465735A (en) * | 2008-12-19 | 2009-06-24 | 北京大学 | Network user identification verification method, server and client terminal |
CN102510378A (en) * | 2011-10-31 | 2012-06-20 | 福建天晴数码有限公司 | Method for logging in online game through mobile equipment |
CN103052066A (en) * | 2013-01-05 | 2013-04-17 | 宋梁 | Method for performing data exchanging or authorizing based on wireless hotspot identification names |
CN103384399A (en) * | 2012-05-02 | 2013-11-06 | 阿里巴巴集团控股有限公司 | Near-field information transmission method, information transmission and reception client, information system |
CN103533608A (en) * | 2013-09-30 | 2014-01-22 | 深圳市同洲电子股份有限公司 | Wireless hotspot SSID (service set identifier) naming method and wireless hotspot identification method and equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FI974341A7 (en) * | 1997-11-26 | 1999-05-27 | Nokia Telecommunications Oy | Data connection privacy |
CN1777101A (en) * | 2005-11-22 | 2006-05-24 | 大连理工大学 | Real-time identity authentication method based on mobile phone, bluetooth and two-dimensional barcode |
US9137012B2 (en) * | 2006-02-03 | 2015-09-15 | Emc Corporation | Wireless authentication methods and apparatus |
CN101616142A (en) * | 2008-06-24 | 2009-12-30 | 香港城市大学 | Method and system for realizing information encryption transmission |
CN102111192B (en) * | 2011-03-03 | 2014-09-10 | 中兴通讯股份有限公司 | Bluetooth connection method and system |
-
2014
- 2014-07-31 CN CN201410373794.6A patent/CN105337740B/en active Active
- 2014-07-31 CN CN201910122054.8A patent/CN110062382B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465735A (en) * | 2008-12-19 | 2009-06-24 | 北京大学 | Network user identification verification method, server and client terminal |
CN102510378A (en) * | 2011-10-31 | 2012-06-20 | 福建天晴数码有限公司 | Method for logging in online game through mobile equipment |
CN103384399A (en) * | 2012-05-02 | 2013-11-06 | 阿里巴巴集团控股有限公司 | Near-field information transmission method, information transmission and reception client, information system |
CN103052066A (en) * | 2013-01-05 | 2013-04-17 | 宋梁 | Method for performing data exchanging or authorizing based on wireless hotspot identification names |
CN103533608A (en) * | 2013-09-30 | 2014-01-22 | 深圳市同洲电子股份有限公司 | Wireless hotspot SSID (service set identifier) naming method and wireless hotspot identification method and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110062382B (en) | 2024-09-17 |
CN105337740A (en) | 2016-02-17 |
CN110062382A (en) | 2019-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105337740B (en) | An authentication method, client, relay device and server | |
CN106034028B (en) | A terminal equipment authentication method, device and system | |
CN105684344B (en) | A kind of cipher key configuration method and apparatus | |
US9197420B2 (en) | Using information in a digital certificate to authenticate a network of a wireless access point | |
US10680835B2 (en) | Secure authentication of remote equipment | |
EP3700124B1 (en) | Security authentication method, configuration method, and related device | |
CN112566119B (en) | Terminal authentication method, device, computer equipment and storage medium | |
CN105577680A (en) | Key generation method, encrypted data analysis method, device and key management center | |
US9445269B2 (en) | Terminal identity verification and service authentication method, system and terminal | |
TW201706900A (en) | Method and device for authentication using dynamic passwords | |
TW201545526A (en) | Method, apparatus, and system for providing a security check | |
CN113556227B (en) | Network connection management method, device, computer readable medium and electronic equipment | |
CN110192381A (en) | Key transmission method and device | |
CN104135494A (en) | Same-account incredible terminal login method and system based on credible terminal | |
WO2014180296A1 (en) | Method, configuration device, and wireless device for establishing connection between devices | |
CN103297403A (en) | Method and system for achieving dynamic password authentication | |
CN101296138B (en) | Wireless terminal configuration generating method, system and device | |
CN113613227B (en) | Data transmission method and device of Bluetooth equipment, storage medium and electronic device | |
CN113411187A (en) | Identity authentication method and system, storage medium and processor | |
CN107211265B (en) | Method and device for secure interaction between terminals | |
CN102123166A (en) | Equipment and method for accessing target network application on the basis of instant messaging client | |
CN109510711B (en) | Network communication method, server, client and system | |
CN105141629A (en) | Method for improving network security of public Wi-Fi based on WPA/WPA2 PSK multiple passwords | |
US9356931B2 (en) | Methods and apparatuses for secure end to end communication | |
CN104753879A (en) | Method and system for authenticating cloud service provider through terminal and method and system for authenticating terminal through cloud service provider |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1219007 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20200924 Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands Patentee after: Innovative advanced technology Co.,Ltd. Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands Patentee before: Advanced innovation technology Co.,Ltd. Effective date of registration: 20200924 Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands Patentee after: Advanced innovation technology Co.,Ltd. Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands Patentee before: Alibaba Group Holding Ltd. |
|
TR01 | Transfer of patent right |