HK1237156B - Authentication method, apparatus, terminal device and system - Google Patents

Authentication method, apparatus, terminal device and system Download PDF

Info

Publication number
HK1237156B
HK1237156B HK17111024.8A HK17111024A HK1237156B HK 1237156 B HK1237156 B HK 1237156B HK 17111024 A HK17111024 A HK 17111024A HK 1237156 B HK1237156 B HK 1237156B
Authority
HK
Hong Kong
Prior art keywords
verification information
server
quantum
client
quantum state
Prior art date
Application number
HK17111024.8A
Other languages
Chinese (zh)
Other versions
HK1237156A1 (en
HK1237156A (en
Inventor
付颖芳
Original Assignee
阿里巴巴集团控股有限公司
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of HK1237156A1 publication Critical patent/HK1237156A1/en
Publication of HK1237156A publication Critical patent/HK1237156A/en
Publication of HK1237156B publication Critical patent/HK1237156B/en

Links

Description

用于认证的方法、装置、终端设备及系统Method, device, terminal equipment and system for authentication

技术领域Technical Field

本申请涉及电子技术领域,具体的说是一种用于客户端的认证方法、装置及终端设备,一种用于服务端的认证方法、装置及终端设备,以及一种用于用户认证的系统。The present application relates to the field of electronic technology, and specifically to an authentication method, apparatus, and terminal device for a client, an authentication method, apparatus, and terminal device for a server, and a system for user authentication.

背景技术Background Art

由于静态口令认证机制存在易遭受窃听攻击、口令猜测攻击、重放攻击及口令泄露等问题,而动态口令由于它使用便捷,能与各种业务系统快速无缝互操作,而成为身份认证技术的主流,被广泛应用于电子商务、网游、金融等领域。Since static password authentication mechanisms are vulnerable to eavesdropping attacks, password guessing attacks, replay attacks, and password leaks, dynamic passwords have become the mainstream of identity authentication technology because of their ease of use and ability to quickly and seamlessly interoperate with various business systems. They are widely used in e-commerce, online games, finance, and other fields.

动态口令认证机制是基于某种密码算法,将用户的身份代码和某种不确定因素作为密码算法的输入参数,经过算法变换得到一个变化的结果,将其作为用户的登录口令。认证服务器端使用相应的算法进行计算,并将计算结果与用户的登录口令进行比对,若相同则接受登录。由此得到变化的、不重复的动态口令,且无需用户记忆,一个口令只能使用一次,重复使用将被拒绝接受登录。The dynamic password authentication mechanism is based on a cryptographic algorithm. It takes the user's ID and some uncertain factors as input parameters. The algorithm transforms the result into a variable, which serves as the user's login password. The authentication server uses the corresponding algorithm to perform a calculation and compares the result with the user's login password. If they match, the user is allowed to log in. This generates a dynamic, unique password that the user does not need to remember. A password can only be used once; repeated use will result in login rejection.

现有生成动态口令认证的终端有硬件令牌、短信密码、手机令牌、软件令牌四种,这四种存在如下不足:一是仅实现服务器对客户端的单向认证,无法防范假冒的服务器欺骗合法用户,如果攻击者截取服务器的认证信息,可以利用数据库,口令重放等手段冒充服务器欺骗客户端。二是容易遭受小数攻击,当客户端向认证服务器请求认证时,攻击者可通过网络窃听截获认证服务器传送的挑战信息(即Seed和Iteration),并修改Iteration为较小值,然后假冒服务器将截获的Seed和较小的Iteration发给客户端。客户端利用攻击者传送的Seed和Iteration计算出一次性口令,并传送给服务器。攻击者再次截获客户端传来的一次性口令,并利用已知的单向散列函数依次计算较大Iteration的一次性口令,获得此用户后继的一系列口令,因此,攻击者可以冒充合法用户,发起小数攻击。三是难以抵御中间人攻击,中间人攻击的具体过程为:位于客户端和服务器端之间的攻击者可能截获认证信息,一方面假冒客户端与服务器端连接,另一方面假冒服务器端与客户端连接。客户端登录传送一次性口令给服务器端,攻击者可以截获一次性口令,使客户端无法登录,造成网络连接断开、连接超时等假象。同时,可以利用截获的一次性口令假冒客户端登录到服务器端。四是客户端和服务端的敏感保密数据(比如硬件令牌丢失,其PIN密码的保护)的存储缺乏安全手段。Existing terminals for generating dynamic password authentication include hardware tokens, SMS passwords, mobile phone tokens, and software tokens. These four types of tokens have the following shortcomings: First, they only provide one-way authentication from the server to the client, failing to prevent fake servers from spoofing legitimate users. If an attacker intercepts the server's authentication information, they can use databases, password replay, and other means to impersonate the server and deceive the client. Second, they are vulnerable to decimal attacks. When a client requests authentication from the authentication server, an attacker can intercept the challenge information (i.e., Seed and Iteration) sent by the authentication server through network eavesdropping and modify the Iteration to a smaller value. The fake server then sends the intercepted Seed and Iteration to the client. The client calculates a one-time password using the attacker's Seed and Iteration and sends it to the server. The attacker then intercepts the client's one-time password again and uses a known one-way hash function to sequentially calculate one-time passwords with larger Iterations, obtaining a series of subsequent passwords for the user. This allows the attacker to impersonate the legitimate user and launch a decimal attack. Third, it is difficult to defend against man-in-the-middle attacks. The specific process of a man-in-the-middle attack is as follows: an attacker between the client and the server may intercept the authentication information, on the one hand, impersonate the client to connect to the server, and on the other hand, impersonate the server to connect to the client. The client sends a one-time password to the server when logging in. The attacker can intercept the one-time password, making it impossible for the client to log in, causing the network connection to be disconnected or the connection to time out. At the same time, the intercepted one-time password can be used to impersonate the client to log in to the server. Fourth, the storage of sensitive and confidential data on the client and server (such as the protection of the PIN password if the hardware token is lost) lacks security measures.

发明内容Summary of the Invention

鉴于上述问题,本申请提供一种用于客户端的认证方法、一种用于客户端的认证装置及一种用于客户端的认证终端设备,一种用于服务端的认证方法、一种用于服务端的认证装置及一种用于服务端的认证终端设备,以及一种用于用户认证的系统。In view of the above problems, the present application provides an authentication method for a client, an authentication device for a client and an authentication terminal device for a client, an authentication method for a server, an authentication device for a server and an authentication terminal device for a server, and a system for user authentication.

本申请采用的技术方案是:The technical solution adopted in this application is:

本申请提供一种用于客户端的认证方法,包括:This application provides a client authentication method, including:

生成第一动态交互验证信息;generating first dynamic interaction verification information;

将所述第一动态交互验证信息发送至服务端;Sending the first dynamic interaction verification information to the server;

接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息;Receiving second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server;

根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息;determining whether the server is legitimate according to the second dynamic interaction verification information, and generating third dynamic interaction verification information according to the second dynamic interaction verification information;

若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。If it is legal, the third dynamic interaction verification information is sent to the server, so that the server can determine whether the client has passed the authentication based on the third dynamic interaction verification information.

可选的,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the client and the server both pre-store corresponding or identical information processing methods, and a result of the client processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the server processing the dynamic interactive verification information;

所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate according to the second dynamic interaction verification information includes:

根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期判断所述服务端是否合法。The second dynamic interaction verification information is processed according to a pre-stored information processing method, and whether the server is legitimate is determined based on whether the processing result meets expectations.

可选的,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;Optionally, the client and the server both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the client and the server;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法的步骤,包括:The step of processing the second dynamic interactive verification information according to a pre-stored information processing method and determining whether the server is legitimate based on the processing result includes:

根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;querying a corresponding pre-stored information processing method according to the information processing method identifier in the first dynamic interactive verification information;

根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期判断所述服务端是否合法。The second dynamic interaction verification information is processed according to the information processing method, and whether the server is legitimate is determined based on whether the processing result meets expectations.

可选的,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the client and the server and is changed periodically.

可选的,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识;Optionally, both the client and the server pre-store the same quantum state library containing a quantum state preparation base, the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, each quantum state preparation base has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并通过所述量子态制备基生成第一量子比特串;The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation basis on the server according to the quantum state preparation basis identifier, and generating a first quantum bit string through the quantum state preparation basis;

所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate according to the second dynamic interaction verification information includes:

采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;Measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

根据所述比特值测量结果是否符合预期判断所述服务端是否合法。Whether the server is legitimate is determined based on whether the bit value measurement result meets expectations.

可选的,所述生成第一动态交互验证信息的步骤,包括:Optionally, the step of generating the first dynamic interaction verification information includes:

从量子态库中选择至少一种量子态制备基;Selecting at least one quantum state preparation basis from a quantum state library;

提取所述量子态制备基的量子态制备基标识;extracting a quantum state preparation base identifier of the quantum state preparation base;

生成包含所述量子态制备基标识的第一动态交互验证信息。Generate first dynamic interactive verification information including the quantum state preparation base identifier.

可选的,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,每一次认证选择的量子态制备基均不相同。Optionally, the at least one quantum state preparation base is selected from the quantum state library in a random selection manner, and the quantum state preparation base selected for each authentication is different.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并根据所述第一量子比特串长度通过所述量子态制备基生成的第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base on the server according to the quantum state preparation base identifier, and generating a first quantum bit string through the quantum state preparation base according to the length of the first quantum bit string, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;Optionally, the second dynamic interactive verification information further includes a decimal first quantum bit string obtained by performing decimal conversion on the first quantum bit string;

所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate according to the second dynamic interaction verification information includes:

采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;Measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;Converting the decimal first quantum bit string into a converted first quantum bit string according to a decimal conversion method;

测量所述第一量子比特串的长度,获得比特串长度测量结果;Measuring the length of the first quantum bit string to obtain a bit string length measurement result;

根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。Whether the server is legitimate is determined based on whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations.

可选的,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the client and the server both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating a first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量的步骤,包括:Optionally, the step of measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier includes:

在量子态库中查找与所述量子态制备基标识对应的量子态制备基;Searching for a quantum state preparation base corresponding to the quantum state preparation base identifier in a quantum state library;

随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The quantum state of the quantum state preparation basis is randomly selected to measure the bit value of the first quantum bit string.

可选的,所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,包括:Optionally, the step of generating third dynamic interaction verification information according to the second dynamic interaction verification information includes:

将所述比特值测量结果及测量时使用的量子态的量子位标识作为第三动态交互验证信息。The bit value measurement result and the quantum bit identifier of the quantum state used in the measurement are used as third dynamic interactive verification information.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的代码及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a code of a quantum state preparation basis selected by the server and a length of the second quantum bit string;

所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,包括:The step of generating third dynamic interaction verification information according to the second dynamic interaction verification information includes:

在量子态库中查询与所述服务端选择的量子态制备基的代码相对应的量子态制备基;Querying the quantum state preparation base corresponding to the code of the quantum state preparation base selected by the server in the quantum state library;

根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;generating a second qubit string using the quantum state preparation basis according to the length of the second qubit string;

生成包含所述第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information including the second quantum bit string.

可选的,所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,还包括:将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;Optionally, the step of generating third dynamic interactive verification information according to the second dynamic interactive verification information further includes: converting the second quantum bit string according to a decimal conversion method to obtain a decimal second quantum bit string;

所述生成包含所述第二量子比特串的第三动态交互验证信息的步骤,包括:The step of generating third dynamic interactive verification information including the second quantum bit string comprises:

生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information including the second quantum bit string and the decimal second quantum bit string.

可选的,所述若合法,则将所述第三动态交互验证信息发送至服务端的步骤,包括:Optionally, if the authentication is legal, the step of sending the third dynamic interaction verification information to the server includes:

若合法,则将所述第二量子比特串采用所述量子态制备基发送至服务端。If it is legal, the second quantum bit string is sent to the server using the quantum state preparation basis.

可选的,所述客户端的量子态库与所述服务端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the client is synchronized with the quantum state library of the server and is changed regularly according to predetermined rules.

可选的,所述第一动态交互验证信息包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证。Optionally, the first dynamic interaction verification information includes an identity identifier of the client, and the identity identifier is used by the server to perform preliminary authentication on the client.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述将所述第一动态交互验证信息发送至服务端的步骤,包括:Optionally, the step of sending the first dynamic interaction verification information to the server includes:

将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;Encrypting all or part of the first dynamic interaction verification information with a key and sending the encrypted information to the server;

所述若合法,则将所述第三动态交互验证信息发送至服务端的步骤,包括:If the verification result is valid, the step of sending the third dynamic interaction verification information to the server includes:

若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。If it is legal, all or part of the third dynamic interactive verification information is encrypted with a key and sent to the server.

可选的,所述密钥与所述服务端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息的步骤,包括:Optionally, the step of receiving second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server includes:

接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;receiving second dynamic interaction verification information sent by the server and generated based on the first dynamic interaction verification information, at least part of which is encrypted;

采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted portion of information is decrypted using a decryption key corresponding to the key used for encryption on the server side.

可选的,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

相应的,本申请还提供一种用于客户端的认证装置,包括:Accordingly, the present application also provides an authentication device for a client, comprising:

第一动态交互验证信息生成单元,用于生成第一动态交互验证信息;A first dynamic interaction verification information generating unit, configured to generate first dynamic interaction verification information;

第一动态交互验证信息发送单元,用于将所述第一动态交互验证信息发送至服务端;A first dynamic interaction verification information sending unit, configured to send the first dynamic interaction verification information to a server;

第二动态交互验证信息接收单元,用于接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息;A second dynamic interaction verification information receiving unit is configured to receive second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server;

第二动态交互验证信息验证单元,用于根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息;a second dynamic interaction verification information verification unit, configured to determine whether the server is legitimate based on the second dynamic interaction verification information, and to generate third dynamic interaction verification information based on the second dynamic interaction verification information;

第三动态交互验证信息发送单元,用于若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。The third dynamic interaction verification information sending unit is configured to send the third dynamic interaction verification information to the server if the third dynamic interaction verification information is valid, so that the server can determine whether the client has passed the authentication based on the third dynamic interaction verification information.

可选的,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the client and the server both pre-store corresponding or identical information processing methods, and a result of the client processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the server processing the dynamic interactive verification information;

所述第二动态交互验证信息验证单元包括:The second dynamic interaction verification information verification unit includes:

处理判断子单元,用于根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing and judging subunit is used to process the second dynamic interactive verification information according to a pre-stored information processing method, and judge whether the server is legal according to the processing result.

可选的,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;Optionally, the client and the server both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the client and the server;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述处理判断子单元,包括:The processing and judging subunit includes:

处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;a processing method query subunit, configured to query a corresponding pre-stored information processing method according to the information processing method identifier in the first dynamic interactive verification information;

处理方法处理子单元,用于根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing method processing subunit is used to process the second dynamic interactive verification information according to the information processing method, and determine whether the server is legal based on the processing result.

可选的,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the client and the server and is changed periodically.

可选的,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识;Optionally, both the client and the server pre-store the same quantum state library containing a quantum state preparation base, the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, each quantum state preparation base has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并通过所述量子态制备基生成第一量子比特串;The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation basis on the server according to the quantum state preparation basis identifier, and generating a first quantum bit string through the quantum state preparation basis;

所述第二动态交互验证信息验证单元包括:The second dynamic interaction verification information verification unit includes:

第一量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;a first quantum measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

第一量子判断子单元,用于根据所述比特值测量结果是否符合预期判断所述服务端是否合法。The first quantum judgment subunit is used to judge whether the server is legal according to whether the bit value measurement result meets expectations.

可选的,所述第一动态交互验证信息生成单元包括:Optionally, the first dynamic interaction verification information generating unit includes:

第一制备基选择子单元,用于从量子态库中选择至少一种量子态制备基;A first preparation base selection subunit, configured to select at least one quantum state preparation base from a quantum state library;

第一标识提取子单元,用于提取所述量子态制备基的量子态制备基标识;A first identifier extraction subunit, configured to extract a quantum state preparation base identifier of the quantum state preparation base;

第一验证信息生成子单元,用于生成包含所述量子态制备基标识的第一动态交互验证信息。The first verification information generating subunit is used to generate first dynamic interactive verification information including the quantum state preparation base identifier.

可选的,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,每一次认证选择的量子态制备基均不相同。Optionally, the at least one quantum state preparation base is selected from the quantum state library in a random selection manner, and the quantum state preparation base selected for each authentication is different.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并根据所述第一量子比特串长度通过所述量子态制备基生成的第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base on the server according to the quantum state preparation base identifier, and generating a first quantum bit string through the quantum state preparation base according to the length of the first quantum bit string, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;Optionally, the second dynamic interactive verification information further includes a decimal first quantum bit string obtained by performing decimal conversion on the first quantum bit string;

所述第二动态交互验证信息验证单元包括:The second dynamic interaction verification information verification unit includes:

第二量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;a second quantum measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

第二转换子单元,用于将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;A second conversion subunit, configured to convert the decimal first quantum bit string into a converted first quantum bit string according to a decimal conversion method;

第二长度测量子单元,用于测量所述第一量子比特串的长度,获得比特串长度测量结果;A second length measurement subunit, configured to measure the length of the first quantum bit string and obtain a bit string length measurement result;

第二判断子单元,用于根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。The second judgment subunit is configured to judge whether the server is legal according to whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations.

可选的,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the client and the server both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating a first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述第一量子测量子单元包括:Optionally, the first quantum measurement subunit includes:

第一量子查询子单元,用于在量子态库中查找与所述量子态制备基标识对应的量子态制备基;A first quantum query subunit is configured to search a quantum state preparation base corresponding to the quantum state preparation base identifier in a quantum state library;

第一随机测量子单元,用于随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The first random measurement subunit is used to randomly select the quantum state of the quantum state preparation basis to measure the bit value of the first quantum bit string.

可选的,所述第二动态交互验证信息验证单元包括:Optionally, the second dynamic interaction verification information verification unit includes:

第三动态验证信息生成子单元,用于将所述比特值测量结果及测量时使用的量子态的量子位标识作为第三动态交互验证信息。The third dynamic verification information generating subunit is configured to use the bit value measurement result and the quantum bit identifier of the quantum state used in the measurement as the third dynamic interactive verification information.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation basis identifier and a second quantum bit string length selected by the server;

所述第二动态交互验证信息验证单元包括:The second dynamic interaction verification information verification unit includes:

第二量子查询子单元,用于在量子态库中查询与所述服务端选择的量子态制备基标识相对应的量子态制备基;A second quantum query subunit is used to query the quantum state preparation base corresponding to the quantum state preparation base identifier selected by the server in the quantum state library;

第二量子制备子单元,用于根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;A second quantum preparation subunit, configured to generate a second quantum bit string using the quantum state preparation basis according to the length of the second quantum bit string;

第三信息生成子单元,用于生成包含所述第二量子比特串的第三动态交互验证信息。The third information generation subunit is used to generate third dynamic interactive verification information containing the second quantum bit string.

可选的,所述第二动态交互验证信息验证单元还包括:Optionally, the second dynamic interaction verification information verification unit further includes:

十进制转换子单元,用于将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;a decimal conversion subunit, configured to convert the second quantum bit string according to a decimal conversion method to obtain a decimal second quantum bit string;

所述第三信息生成子单元包括:The third information generating subunit includes:

十进制第三信息生成子单元,用于生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。The decimal third information generation subunit is used to generate third dynamic interactive verification information including the second quantum bit string and the decimal second quantum bit string.

可选的,所述第三动态交互验证信息发送单元包括:Optionally, the third dynamic interaction verification information sending unit includes:

第三动态交互验证信息量子发送子单元,用于若合法,则将所述第二量子比特串采用所述量子态制备基发送至服务端。The third dynamic interactive verification information quantum sending subunit is used to send the second quantum bit string to the server using the quantum state preparation basis if it is legal.

可选的,所述客户端的量子态库与所述服务端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the client is synchronized with the quantum state library of the server and is changed regularly according to predetermined rules.

可选的,所述第一动态交互验证信息包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证。Optionally, the first dynamic interaction verification information includes an identity identifier of the client, and the identity identifier is used by the server to perform preliminary authentication on the client.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述第一动态交互验证信息发送单元包括:Optionally, the first dynamic interaction verification information sending unit includes:

第一动态交互验证信息加密子单元,用于将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;A first dynamic interaction verification information encryption subunit is configured to encrypt all or part of the first dynamic interaction verification information using a key and then send the encrypted information to the server;

所述第三动态交互验证信息发送单元包括:The third dynamic interaction verification information sending unit includes:

第三动态交互验证信息加密子单元,用于若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。The third dynamic interaction verification information encryption subunit is configured to encrypt all or part of the third dynamic interaction verification information with a key and then send the encrypted information to the server if the information is legitimate.

可选的,所述密钥与所述服务端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述第二动态交互验证信息接收单元包括:Optionally, the second dynamic interaction verification information receiving unit includes:

加密第二动态交互验证信息接收子单元,用于接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;an encrypted second dynamic interaction verification information receiving subunit, configured to receive second dynamic interaction verification information generated based on the first dynamic interaction verification information and at least part of which is encrypted and sent by the server;

第二动态交互验证信息解密子单元,用于采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The second dynamic interactive verification information decryption subunit is used to decrypt the encrypted part of the information using a decryption key corresponding to the key used for encryption by the server.

可选的,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

本申请还提供一种用于服务端的认证方法,包括:This application also provides an authentication method for the server, including:

接收客户端发送的第一动态交互验证信息;Receiving first dynamic interaction verification information sent by the client;

根据所述第一动态交互验证信息生成第二动态交互验证信息;generating second dynamic interaction verification information according to the first dynamic interaction verification information;

将所述第二动态交互验证信息发送至所述客户端;Sending the second dynamic interaction verification information to the client;

接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息;Receiving third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client;

根据所述第三动态交互验证信息判断所述客户端是否通过认证。Determine whether the client passes the authentication according to the third dynamic interaction verification information.

可选的,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the server and the client both pre-store corresponding or identical information processing methods, and a result of the server processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the client processing the dynamic interactive verification information;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interaction verification information is processed using an information processing method corresponding to or the same as that of the client, and whether the client has passed the authentication is determined based on whether the processing result meets expectations.

可选的,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;Optionally, the server and the client both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the server and the client;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;searching for a corresponding information processing method according to the information processing method identifier in the first dynamic interactive verification information;

采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first dynamic interaction verification information is processed using the information processing method to generate second dynamic interaction verification information.

可选的,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the server and the client and is changed periodically.

可选的,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;Optionally, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, where the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier;

所述第一动态交互验证信息包括所述客户端选择的至少一种量子态制备基的量子态制备基标识;The first dynamic interactive verification information includes a quantum state preparation base identifier of at least one quantum state preparation base selected by the client;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier;

采用所述量子态制备基生成第一量子比特串;Generating a first quantum bit string using the quantum state preparation basis;

生成包含所述第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string is generated.

可选的,所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:Optionally, the step of sending the second dynamic interaction verification information to the client includes:

将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first quantum bit string is sent to the client using the quantum state preparation basis.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier;

根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;Generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;Converting the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string is generated.

可选的,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the server and the client both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;以及Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier; and

根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;searching the quantum string length database for a corresponding first quantum bit string length according to the first quantum bit string length code;

根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;Generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;Converting the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string is generated.

可选的,所述第三动态交互验证信息包括所述客户端测量所述第二动态交互验证信息时采用的量子态的量子位标识以及比特值测量结果;Optionally, the third dynamic interactive verification information includes a quantum bit identifier and a bit value measurement result of the quantum state used by the client when measuring the second dynamic interactive verification information;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;Measuring the bit value of the first qubit string using the quantum state corresponding to the qubit identifier to obtain a server-side bit value measurement result;

比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The bit value measurement result is compared with the bit value measurement result of the server, and whether the client passes the authentication is determined based on whether the comparison result meets a preset judgment condition.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client according to the quantum state preparation base identifier and the second quantum bit string length selected by the server;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;Measuring the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。Whether the client has passed the authentication is determined based on whether the second quantum bit value measurement result meets expectations.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes a second quantum bit string generated by the client according to the quantum state preparation basis identifier and the length of the second quantum bit string selected by the server, and a decimal second quantum bit string obtained by performing decimal conversion on the second quantum bit string;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;Measuring the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;Converting the decimal second quantum bit string into a converted second quantum bit string according to a decimal conversion method;

测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;Measuring the length of the second quantum bit string to obtain a second quantum bit string length measurement result;

根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。Whether the server has passed the authentication is determined based on whether the second quantum bit value measurement result meets expectations and whether the second quantum bit string length measurement result meets expectations.

可选的,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the server is synchronized with the quantum state library of the client and is changed regularly according to a predetermined rule.

可选的,所述第一动态交互验证信息包括客户端的身份标识;Optionally, the first dynamic interaction verification information includes an identity identifier of the client;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述客户端的身份标识对所述客户端进行初步认证;Performing preliminary authentication on the client according to the identity identifier of the client;

若初步认证通过,则根据所述第一动态交互验证信息生成第二动态交互验证信息。If the preliminary authentication is passed, second dynamic interaction verification information is generated according to the first dynamic interaction verification information.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:Optionally, the step of sending the second dynamic interaction verification information to the client includes:

将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。All or part of the second dynamic interaction verification information is encrypted with a key and sent to the server.

可选的,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption by the client are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述接收客户端发送的第一动态交互验证信息的步骤,包括:Optionally, the step of receiving the first dynamic interaction verification information sent by the client includes:

接收客户端发送的至少部分信息已加密的第一动态交互验证信息;Receiving first dynamic interaction verification information sent by a client, at least part of which is encrypted;

采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密;Decrypting the encrypted portion of information using a decryption key corresponding to the key used for encryption by the client;

所述接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息的步骤,包括:The step of receiving third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client includes:

接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;receiving third dynamic interaction verification information sent by the client, at least part of which is encrypted and generated based on the second dynamic interaction verification information;

采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted portion of information is decrypted using a decryption key corresponding to the key used for encryption on the client.

可选的,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the client are symmetric quantum keys of each other, or are public-private keys of each other.

相应的,本申请还提供一种用于服务端的认证装置,包括:Accordingly, the present application also provides an authentication device for a server, comprising:

第一动态交互验证信息接收单元,用于接收客户端发送的第一动态交互验证信息;A first dynamic interaction verification information receiving unit, configured to receive first dynamic interaction verification information sent by a client;

第二动态交互验证信息生成单元,用于根据所述第一动态交互验证信息生成第二动态交互验证信息;a second dynamic interaction verification information generating unit, configured to generate second dynamic interaction verification information according to the first dynamic interaction verification information;

第二动态交互验证信息发送单元,用于将所述第二动态交互验证信息发送至所述客户端;A second dynamic interaction verification information sending unit, configured to send the second dynamic interaction verification information to the client;

第三动态交互验证信息接收单元,用于接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息;a third dynamic interaction verification information receiving unit, configured to receive third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client;

第三动态交互验证信息判断单元,用于根据所述第三动态交互验证信息判断所述客户端是否通过认证。The third dynamic interaction verification information judgment unit is configured to judge whether the client has passed the authentication according to the third dynamic interaction verification information.

可选的,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the server and the client both pre-store corresponding or identical information processing methods, and a result of the server processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the client processing the dynamic interactive verification information;

所述第三动态交互验证信息判断单元包括:The third dynamic interaction verification information judgment unit includes:

第三动态交互验证信息处理子单元,用于采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interactive verification information processing subunit is configured to process the third dynamic interactive verification information using an information processing method corresponding to or the same as that of the client, and determine whether the client has passed the authentication based on whether the processing result meets expectations.

可选的,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;Optionally, the server and the client both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the server and the client;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述第二动态交互验证信息生成单元包括:The second dynamic interaction verification information generating unit includes:

处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;a processing method query subunit, configured to search for a corresponding information processing method according to the information processing method identifier in the first dynamic interactive verification information;

第一信息处理子单元,用于采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first information processing sub-unit is configured to process the first dynamic interaction verification information using the information processing method to generate second dynamic interaction verification information.

可选的,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the server and the client and is changed periodically.

可选的,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;Optionally, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, where the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier;

所述第一动态交互验证信息包括所述客户端选择的至少一种量子态制备基的量子态制备基标识;The first dynamic interactive verification information includes a quantum state preparation base identifier of at least one quantum state preparation base selected by the client;

所述第二动态交互验证信息生成单元包括:The second dynamic interaction verification information generating unit includes:

第一服务端量子查询子单元,用于根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A first server-side quantum query subunit is configured to search for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第一服务端比特串生成子单元,用于采用所述量子态制备基生成第一量子比特串;A first server-side bit string generation subunit, configured to generate a first quantum bit string using the quantum state preparation basis;

第一服务端验证信息生成子单元,用于生成包含所述第一量子比特串的第二动态交互验证信息。The first server-side verification information generation subunit is used to generate second dynamic interactive verification information containing the first quantum bit string.

可选的,所述第二动态交互验证信息发送单元包括:Optionally, the second dynamic interaction verification information sending unit includes:

第一量子比特串发送子单元,用于将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first quantum bit string sending subunit is used to send the first quantum bit string to the client using the quantum state preparation basis.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述第二动态交互验证信息生成单元包括:The second dynamic interaction verification information generating unit includes:

第二服务端量子查询子单元,用于根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A second server-side quantum query subunit is configured to search for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第二服务端比特串生成子单元,用于根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;A second server-side bit string generation subunit is configured to generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

第二十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;A second decimal conversion subunit, configured to convert the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

第二服务端验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The second server-side verification information generation subunit is used to generate second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string.

可选的,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the server and the client both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述第二动态交互验证信息生成单元包括:The second dynamic interaction verification information generating unit includes:

第三服务端量子查询子单元,根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A third server-side quantum query subunit searches for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第三服务端长度查询子单元,根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;a third server-side length query subunit, searching the quantum string length database for a corresponding first quantum bit string length according to the first quantum bit string length code;

第三服务端比特串生成子单元,用于根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;A third server-side bit string generation subunit is configured to generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

第三十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;A third decimal conversion subunit, configured to convert the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

第三服务端验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The third server-side verification information generation subunit is used to generate second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string.

可选的,所述第三动态交互验证信息包括所述客户端测量所述第二动态交互验证信息时采用的量子态的量子位标识以及比特值测量结果;Optionally, the third dynamic interactive verification information includes a quantum bit identifier and a bit value measurement result of the quantum state used by the client when measuring the second dynamic interactive verification information;

所述第三动态交互验证信息判断单元包括:The third dynamic interaction verification information judgment unit includes:

服务端第一量子串测量子单元,用于采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;A server-side first quantum string measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state corresponding to the quantum bit identifier to obtain a server-side bit value measurement result;

服务端测量比较子单元,用于比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The server-side measurement comparison subunit is configured to compare the bit value measurement result with the server-side bit value measurement result, and determine whether the client has passed the authentication based on whether the comparison result meets a preset judgment condition.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client according to the quantum state preparation base identifier and the second quantum bit string length selected by the server;

所述第三动态交互验证信息判断单元包括:The third dynamic interaction verification information judgment unit includes:

第一服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;第一服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。The first server-side bit string measurement subunit is used to measure the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result; the first server-side measurement judgment subunit is used to judge whether the client has passed the authentication based on whether the second quantum bit value measurement result meets expectations.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes a second quantum bit string generated by the client according to the quantum state preparation basis identifier and the length of the second quantum bit string selected by the server, and a decimal second quantum bit string obtained by performing decimal conversion on the second quantum bit string;

所述第三动态交互验证信息判断单元包括:The third dynamic interaction verification information judgment unit includes:

第二服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;A second server-side bit string measurement subunit is configured to measure the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

第二服务端十进制转换子单元,用于将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;A second server-side decimal conversion subunit is configured to convert the decimal second quantum bit string into a converted second quantum bit string according to a decimal conversion method;

第二服务端长度判断子单元,用于测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;The second server-side length determination subunit is configured to measure the length of the second quantum bit string and obtain a second quantum bit string length measurement result;

第二服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。The second server-side measurement and judgment subunit is used to judge whether the server has passed the authentication based on whether the second quantum bit value measurement result meets expectations and whether the second quantum bit string length measurement result meets expectations.

可选的,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the server is synchronized with the quantum state library of the client and is changed regularly according to a predetermined rule.

可选的,所述第一动态交互验证信息包括客户端的身份标识;Optionally, the first dynamic interaction verification information includes an identity identifier of the client;

所述第二动态交互验证信息生成单元包括:The second dynamic interaction verification information generating unit includes:

初步认证子单元,用于根据所述客户端的身份标识对所述客户端进行初步认证;A preliminary authentication subunit, configured to perform preliminary authentication on the client according to the identity identifier of the client;

第二动态交互验证信息生成子单元,用于若初步认证通过,则根据所述第一动态交互验证信息生成第二动态交互验证信息。The second dynamic interaction verification information generating subunit is configured to generate second dynamic interaction verification information according to the first dynamic interaction verification information if the preliminary authentication is passed.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述第二动态交互验证信息发送单元包括:Optionally, the second dynamic interaction verification information sending unit includes:

加密第二动态交互验证信息发送子单元,用于将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。The encrypted second dynamic interaction verification information sending subunit is configured to encrypt all or part of the second dynamic interaction verification information with a key and then send the encrypted information to the server.

可选的,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption by the client are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述第一动态交互验证信息接收单元包括:Optionally, the first dynamic interaction verification information receiving unit includes:

加密第一动态交互验证信息接收子单元,用于接收客户端发送的至少部分信息已加密的第一动态交互验证信息;The encrypted first dynamic interaction verification information receiving subunit is configured to receive the first dynamic interaction verification information sent by the client, at least part of which is encrypted;

第一动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密;A first dynamic interactive authentication information decryption subunit, configured to decrypt the encrypted portion of information using a decryption key corresponding to the key used for encryption by the client;

所述第三动态交互验证信息接收单元包括:The third dynamic interaction verification information receiving unit includes:

加密第三动态交互验证信息接收子单元,用于接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;an encrypted third dynamic interaction verification information receiving subunit, configured to receive third dynamic interaction verification information generated based on the second dynamic interaction verification information, at least part of which is encrypted and sent by the client;

第三动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The third dynamic interactive verification information decryption subunit is used to decrypt the encrypted part of the information using a decryption key corresponding to the key used for encryption by the client.

可选的,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the client are symmetric quantum keys of each other, or are public-private keys of each other.

本申请还提供一种用于客户端的认证终端设备,包括:This application also provides an authentication terminal device for a client, including:

中央处理器;CPU;

输入输出单元;Input and output units;

存储器;Memory;

所述存储器中存储有本申请提供的用于客户端的认证方法;并在启动后能够根据上述方法运行。The memory stores the authentication method for the client provided in this application; and can run according to the above method after startup.

本申请还提供一种用于服务端的认证终端设备,包括:This application also provides an authentication terminal device for a server, including:

中央处理器;CPU;

输入输出单元;Input and output units;

存储器;Memory;

所述存储器中存储有本申请提供的用于服务端的认证方法;并在启动后能够根据上述方法运行。The memory stores the authentication method for the server provided in this application; and can run according to the above method after startup.

本申请还提供一种用于用户认证的系统,包括客户端和服务端,所述客户端配置有本申请提供的用于客户端的认证装置,所述服务端配置有本申请提供的用于服务端的认证装置。The present application also provides a system for user authentication, including a client and a server, wherein the client is configured with the authentication device for the client provided in the present application, and the server is configured with the authentication device for the server provided in the present application.

与现有技术相比,本申请具有以下优点:Compared with the prior art, this application has the following advantages:

本申请提供的一种用于客户端的认证方法,首先生成第一动态交互验证信息;然后将所述第一动态交互验证信息发送至服务端;接下来,接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息;然后根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息;若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。相较于传统的动态口令认证,本方法通过客户端与服务端的交互通信,实现了客户端与服务端的交互认证,可以防范假冒的服务器欺骗合法用户,同时,由于客户端和服务端均动态的利用对方的验证信息制作本方验证信息,再发给对方进行验证,因此,可以抵御中间人攻击,且可防御小数攻击,将所述验证信息采用量子态处理后,可以进一步提高验证信息传输及存储的安全性。The present application provides an authentication method for a client, which first generates a first dynamic interactive verification information; then sends the first dynamic interactive verification information to the server; next, receives the second dynamic interactive verification information generated by the server according to the first dynamic interactive verification information; then determines whether the server is legitimate according to the second dynamic interactive verification information, and generates a third dynamic interactive verification information according to the second dynamic interactive verification information; if it is legitimate, sends the third dynamic interactive verification information to the server, so that the server can determine whether the client has passed the authentication according to the third dynamic interactive verification information. Compared with the traditional dynamic password authentication, this method realizes the interactive authentication between the client and the server through the interactive communication between the client and the server, which can prevent fake servers from deceiving legitimate users. At the same time, since both the client and the server dynamically use the other party's verification information to make their own verification information and then send it to the other party for verification, it can resist man-in-the-middle attacks and decimal attacks. After the verification information is processed in a quantum state, the security of the transmission and storage of the verification information can be further improved.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请提供的一种用于客户端的认证方法实施例的流程图;FIG1 is a flow chart of an embodiment of an authentication method for a client provided by the present application;

图2是本申请提供的一种用于客户端的认证装置实施例的示意图;FIG2 is a schematic diagram of an embodiment of an authentication device for a client provided by the present application;

图3是本申请提供的一种用于服务端的认证方法实施例的流程图;FIG3 is a flow chart of an embodiment of an authentication method for a server provided by the present application;

图4是本申请提供的一种用于服务端的认证装置实施例的示意图。FIG4 is a schematic diagram of an embodiment of an authentication device for a server provided in the present application.

具体实施方式DETAILED DESCRIPTION

在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

本申请提供了一种用于客户端的认证方法、一种用于客户端的认证装置及一种用于客户端的认证终端设备,一种用于服务端的认证方法、一种用于服务端的认证装置及一种用于服务端的认证终端设备,以及一种用于用户认证的系统,下面依次结合附图对本申请的实施例进行详细说明。The present application provides an authentication method for a client, an authentication device for a client, and an authentication terminal device for a client, an authentication method for a server, an authentication device for a server, and an authentication terminal device for a server, as well as a system for user authentication. The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

请参考图1,其为本申请提供的一种用于客户端的认证方法实施例的流程图,所述方法包括如下步骤:Please refer to FIG1 , which is a flowchart of an embodiment of an authentication method for a client provided by this application. The method includes the following steps:

步骤S101:生成第一动态交互验证信息。Step S101: Generate first dynamic interaction verification information.

本步骤,首先生成第一动态交互验证信息,所述第一动态交互验证信息用于发送给服务端,供服务端根据所述第一动态交互验证信息生成第二动态交互验证信息。In this step, first dynamic interaction verification information is generated. The first dynamic interaction verification information is sent to the server, so that the server can generate second dynamic interaction verification information based on the first dynamic interaction verification information.

在本申请提供的一个实施例中,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的。所述生成第一动态交互验证信息的步骤,包括:生成可以使用所述信息处理方法处理的第一动态交互验证信息。In one embodiment provided herein, the client and the server both pre-store corresponding or identical information processing methods, and the client's processing result of dynamic interactive verification information according to the information processing method is corresponding or identical to the server's processing result of the dynamic interactive verification information. The step of generating first dynamic interactive verification information includes: generating first dynamic interactive verification information that can be processed using the information processing method.

在本申请提供的另一个实施例中,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识。所述生成第一动态交互验证信息的步骤,包括:生成包含所述信息处理方法标识的第一动态交互验证信息。所述信息处理方法标识用于所述服务端根据所述信息处理方法标识查找对应的信息处理方法。In another embodiment provided herein, the client and the server both pre-store multiple sets of corresponding or identical information processing methods, and each set of information processing methods has a corresponding or identical information processing method identifier on both the client and the server. The step of generating first dynamic interactive verification information includes generating first dynamic interactive verification information including the information processing method identifier. The information processing method identifier is used by the server to search for the corresponding information processing method based on the information processing method identifier.

进一步的,在本申请提供的一个实施例中,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更,这样,每一次认证时发送的所述信息处理方法标识对应的信息处理方法可能不同,从而增加破译的难度,有效避免所述第一动态交互验证信息被伪造或复制,提高安全性。Furthermore, in an embodiment provided in the present application, the information processing method identifier is synchronized between the client and the server and is changed periodically. In this way, the information processing method corresponding to the information processing method identifier sent during each authentication may be different, thereby increasing the difficulty of deciphering, effectively preventing the first dynamic interactive verification information from being forged or copied, and improving security.

在本申请提供的一个优选实施例中,所述客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识。所述生成第一动态交互验证信息的步骤,包括:In a preferred embodiment provided by the present application, the client and the server both pre-store the same quantum state library containing a quantum state preparation base, wherein the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier. The step of generating the first dynamic interactive verification information includes:

从量子态库中选择至少一种量子态制备基;Selecting at least one quantum state preparation basis from a quantum state library;

提取所述量子态制备基的量子态制备基标识;extracting a quantum state preparation base identifier of the quantum state preparation base;

生成包含所述量子态制备基标识的第一动态交互验证信息。Generate first dynamic interactive verification information including the quantum state preparation base identifier.

考虑到所述量子态制备基制作量子比特串时的参数可以预先设定好,也可以由客户端指定,因此,在本申请提供的一个实施例中,所述第一动态交互验证信息还包括第一量子比特串长度,以供所述服务端根据所述第一量子比特串长度生成对应的第一量子比特串,提高认证的可依据性。Taking into account that the parameters for producing the quantum bit string by the quantum state preparation base can be pre-set or specified by the client, in one embodiment provided in the present application, the first dynamic interactive verification information also includes the length of the first quantum bit string, so that the server can generate the corresponding first quantum bit string based on the length of the first quantum bit string, thereby improving the reliability of authentication.

在本申请提供的一个优选的具体实施例中,在所述客户端和服务端均安装一个轻量级的量子态库,所述量子态库中包含有多个不同的正交量子态制备基,每个量子态制备基有不同的量子态制备基标识,每个量子态制备基中的量子态对应相应的量子位标识,所述量子态制备基标识可以是一个编号。例如:量子态制备基{|0>,|1>}的编号为1,其中量子态|0>对应的量子位标识为1.1,量子态|1>对应的量子位标识为1.2;量子态制备基{|+>,|->}的编号为2,其中量子态|+>对应的量子位标识为2.1,量子态|2>对应的量子位标识为2.2,以此类推。In a preferred embodiment provided herein, a lightweight quantum state library is installed on both the client and server. The library contains multiple orthogonal quantum state preparation bases, each with a different quantum state preparation base identifier. The quantum states in each quantum state preparation base correspond to corresponding qubit identifiers, and the quantum state preparation base identifier can be a number. For example, the quantum state preparation base {|0>,|1>} is numbered 1, where the qubit identifier corresponding to quantum state |0> is 1.1, and the qubit identifier corresponding to quantum state |1> is 1.2; the quantum state preparation base {|+>,|->} is numbered 2, where the qubit identifier corresponding to quantum state |+> is 2.1, and the qubit identifier corresponding to quantum state |2> is 2.2, and so on.

需要说明的是,所述量子态制备基编号可以定期依据某类算法在客户端和服务端进行同步重编。比如x代表量子态当前编号,y代表下一次请求时的量子态编号,那么y可以以x为基数推导出来,推导规则可以是y=2x;或y=2+x等等客户端和服务端协商的规则。从而避免所述量子态库被盗或被破解后,导致伪造服务端对所述客户端发起欺骗行为。在本申请提供的一个实施例中,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,以保证每一次认证选择的量子态制备基均不相同,实现所述第一动态交互验证信息的动态可变性,从而避免所述第一动态交互验证信息被伪造或复制。It should be noted that the quantum state preparation base number can be periodically re-numbered synchronously on the client and server based on a certain type of algorithm. For example, x represents the current number of the quantum state, and y represents the quantum state number at the next request, then y can be derived with x as the base, and the derivation rule can be y=2x; or y=2+x, etc., rules negotiated by the client and the server. This prevents the quantum state library from being stolen or cracked, resulting in the counterfeit server initiating deception against the client. In one embodiment provided in the present application, the selection of at least one quantum state preparation base from the quantum state library is carried out in a random manner to ensure that the quantum state preparation base selected for each authentication is different, thereby realizing the dynamic variability of the first dynamic interactive verification information, thereby preventing the first dynamic interactive verification information from being forged or copied.

具体实施时,客户端从量子态库中随机选择一种或一种以上的量子态制备基,将量子态制备基的编号及以此编号发送的量子比特串长度ι作为第一动态交互验证信息,例如:{量子态制备基标识1,ι1;量子态制备基标识2,ι2;……量子态制备基标识n,ιn},比如假设客户端随机选择了量子态制备基编号为2、4两种量子态制备基,其长度分别为3,6,那么所述第一动态交互验证信息为{2,3;4,6}。During specific implementation, the client randomly selects one or more quantum state preparation bases from the quantum state library, and uses the number of the quantum state preparation base and the length ι of the quantum bit string sent with this number as the first dynamic interactive verification information, for example: {quantum state preparation base identifier 1, ι 1 ; quantum state preparation base identifier 2, ι 2 ; ... quantum state preparation base identifier n, ι n }. For example, assuming that the client randomly selects two quantum state preparation bases with quantum state preparation base numbers 2 and 4, and their lengths are 3 and 6 respectively, then the first dynamic interactive verification information is {2, 3; 4, 6}.

需要说明的是,在上述优选的实施例中,还可以将所述第一量子比特串长度以代码的形式发送,以提高本方法的破译难度,进一步提高安全性,例如,在所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码,所述服务端在接收到所述第一量子比特串长度代码后,在所述量子串长度数据库中查找对应的第一量子比特串长度,即可用于生成对应的第一量子比特串。It should be noted that in the above-mentioned preferred embodiment, the length of the first quantum bit string can also be sent in the form of a code to increase the difficulty of deciphering the present method and further improve the security. For example, the same quantum string length database is pre-stored on the client and the server, and the first dynamic interactive verification information also includes a first quantum bit string length code. After receiving the first quantum bit string length code, the server searches for the corresponding first quantum bit string length in the quantum string length database, which can be used to generate the corresponding first quantum bit string.

步骤S102:将所述第一动态交互验证信息发送至服务端。Step S102: Send the first dynamic interaction verification information to the server.

通过步骤S101,已生成第一动态交互验证信息,接下来,需要将所述第一动态交互验证信息发送至服务端。Through step S101, the first dynamic interaction verification information has been generated. Next, the first dynamic interaction verification information needs to be sent to the server.

在本申请提供的一个优选实施例中,所述第一动态交互验证信息包括量子态制备基标识和第一量子比特串长度;In a preferred embodiment provided in the present application, the first dynamic interactive verification information includes a quantum state preparation base identifier and a first quantum bit string length;

所述将所述第一动态交互验证信息发送至服务端的步骤,包括:The step of sending the first dynamic interaction verification information to the server includes:

将所述量子态制备基标识和第一量子比特串长度发送至服务端。The quantum state preparation basis identifier and the length of the first quantum bit string are sent to the server.

考虑到为了避免虚假客户端恶意攻击服务端,或伪造客户端进行认证,或非法用户访问,在本申请提供的一个实施例中,所述第一动态交互验证信息还包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证,例如所述客户端的用户识别码和身份证书等。所述服务端在接受到所述身份标识后,根据所述身份标识对所述客户端进行初步认证,若初步认证通过,则继续,否则,判断所述客户端非法,终止认证过程。To prevent fake clients from maliciously attacking the server, forging client authentication, or illegal user access, in one embodiment provided herein, the first dynamic interactive verification information also includes the client's identity identifier, which is used by the server to perform preliminary authentication of the client, such as the client's user identification code and identity certificate. After receiving the identity identifier, the server performs preliminary authentication of the client based on the identity identifier. If the preliminary authentication passes, the server continues; otherwise, the server determines that the client is illegal and terminates the authentication process.

仍以上述优选的实施例为例,所述将所述第一动态交互验证信息发送至服务端的步骤,包括:Still taking the above preferred embodiment as an example, the step of sending the first dynamic interaction verification information to the server includes:

将所述量子态制备基标识、第一量子比特串长度及客户端的身份标识发送至服务端,其中,所述客户端的身份标识包括客户端的用户识别码和身份证书。The quantum state preparation base identifier, the length of the first quantum bit string and the client's identity identifier are sent to the server, wherein the client's identity identifier includes the client's user identification code and identity certificate.

例如,提取的量子态制备基标识、第一量子比特串长度为{2,3;4,6},客户端的用户标识为userid_A,客户端的身份证书为Cer_A,则发送给服务端的第一动态交互验证信息为:{2,3;4,6},userid_A,Cer_A。For example, the extracted quantum state preparation base identifier and the length of the first quantum bit string are {2,3; 4,6}, the client's user identifier is userid_A, and the client's identity certificate is Cer_A, then the first dynamic interactive verification information sent to the server is: {2,3; 4,6}, userid_A, Cer_A.

考虑到数据传输的安全性,在本申请提供的一个实施例中,客户端需要将所述第一动态交互验证信息进行加密后再行发送,同时可以采用https加密传输协议传输。Taking into account the security of data transmission, in one embodiment provided in the present application, the client needs to encrypt the first dynamic interaction verification information before sending it, and can use the https encrypted transmission protocol for transmission.

所述将所述第一动态交互验证信息发送至服务端的步骤,包括:The step of sending the first dynamic interaction verification information to the server includes:

将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;Encrypting all or part of the first dynamic interaction verification information with a key and sending the encrypted information to the server;

仍以上述优选的实施例为例,客户端和服务端在通信之前都有各自的公私钥对和身份证书,或客户端和服务端共享一对对称量子密钥,公私钥对、身份证书及共享的对称量子密钥根据业务需求可以动态变化。在本申请提供的一个实施例中,基于客户端的计算能力考虑,在与服务端通信的时候,采用与服务端的对称量子密钥Key_AB来保证传输的敏感数据安全。Continuing with the above preferred embodiment, the client and server each have their own public-private key pair and identity certificate before communication, or they share a symmetric quantum key. The public-private key pair, identity certificate, and shared symmetric quantum key can be dynamically changed based on business needs. In one embodiment provided in this application, based on the client's computing power, when communicating with the server, the symmetric quantum key Key_AB is used to ensure the security of sensitive data transmitted.

在本申请提供的一个具体的实施例中,可以将所述第一动态交互验证信息中的部分信息加密后发送至服务端,例如,将量子态制备基标识和第一量子比特串长度采用对称量子密钥Key_AB进行加密,则发送给服务端的第一动态交互验证信息为:{2,3;4,6}Key_AB,userid_A,Cer_A。In a specific embodiment provided in the present application, part of the information in the first dynamic interactive verification information can be encrypted and sent to the server. For example, the quantum state preparation base identifier and the length of the first quantum bit string are encrypted using the symmetric quantum key Key_AB, and the first dynamic interactive verification information sent to the server is: {2,3;4,6} Key_AB , userid_A, Cer_A.

步骤S103:接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息。Step S103: receiving second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server.

通过步骤S102,已将所述第一动态交互验证信息发送至服务端,接下来,接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息。Through step S102, the first dynamic interaction verification information has been sent to the server. Next, the second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server is received.

服务端在接收到所述第一动态交互验证信息后,根据所述第一动态交互验证信息生成第二动态交互验证信息,并将所述第二动态交互验证信息发送给客户端进行验证。After receiving the first dynamic interaction verification information, the server generates second dynamic interaction verification information according to the first dynamic interaction verification information, and sends the second dynamic interaction verification information to the client for verification.

考虑到数据传输的安全性,在本申请提供的一个实施例中,所述服务端需要将所述动态交互验证信息进行加密后再行发送,同时可以采用https加密传输协议传输。Taking into account the security of data transmission, in one embodiment provided in the present application, the server needs to encrypt the dynamic interaction verification information before sending it, and can use the https encrypted transmission protocol for transmission.

在本申请提供的一个优选实施例中,所述客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识;所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端,所述客户端采用相同的量子态制备基接收所述第一量子比特串。In a preferred embodiment provided in the present application, the client and the server both pre-store the same quantum state library containing a quantum state preparation base, the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, each of the quantum state preparation bases has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier; the second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base on the server according to the quantum state preparation base identifier, and generating a first quantum bit string through the quantum state preparation base, the first quantum bit string is sent to the client through the quantum state preparation base, and the client uses the same quantum state preparation base to receive the first quantum bit string.

在本申请提供的一个实施例中,所述第一动态交互验证信息还包括第一量子比特串长度;所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并根据所述第一量子比特串长度通过所述量子态制备基生成的第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。In one embodiment provided in the present application, the first dynamic interactive verification information also includes the length of the first quantum bit string; the second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base on the server according to the quantum state preparation base identifier, and generating a first quantum bit string through the quantum state preparation base according to the length of the first quantum bit string, and the first quantum bit string is sent to the client through the quantum state preparation base.

在本申请提供的一个实施例中,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。In one embodiment provided in the present application, the client and the server both pre-store the same quantum string length database, and the first dynamic interactive verification information also includes a first quantum bit string length code; the second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating a first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and the first quantum bit string is sent to the client through the quantum state preparation base.

在本申请提供的一个实施例中,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串。所述服务端在生成所述第一量子比特串后,还采用十进制转换方法将所述第一量子比特串转换为十进制第一量子比特串,并采用对称量子密钥加密后传输至所述客户端。所述接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息,还包括:接收所述服务端发送的根据所述第一动态交互验证信息生成的十进制第一量子比特串。In one embodiment provided in the present application, the second dynamic interactive verification information also includes a decimal first quantum bit string obtained by performing a decimal conversion on the first quantum bit string. After generating the first quantum bit string, the server also converts the first quantum bit string into a decimal first quantum bit string using a decimal conversion method, and encrypts it using a symmetric quantum key before transmitting it to the client. The receiving of the second dynamic interactive verification information generated by the server based on the first dynamic interactive verification information further includes: receiving the decimal first quantum bit string generated by the server based on the first dynamic interactive verification information.

在本申请提供的一个实施例中,所述第二动态交互验证信息是经过加密后发送的,因此,所述接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息的步骤,包括:In one embodiment provided in the present application, the second dynamic interaction verification information is sent after being encrypted. Therefore, the step of receiving the second dynamic interaction verification information generated by the server based on the first dynamic interaction verification information includes:

接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;receiving second dynamic interaction verification information sent by the server and generated based on the first dynamic interaction verification information, at least part of which is encrypted;

采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted portion of information is decrypted using a decryption key corresponding to the key used for encryption on the server side.

其中,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。The decryption key and the key used for encryption on the server are symmetric quantum keys of each other, or public-private keys of each other.

仍以上述具体的优选实施例为例,服务端在通过对所述客户端的初步认证后,根据所述用户标识查找相应的对称量子密钥Key_AB,对{2,3;4,6}Key_AB进行解密获得{2,3;4,6},查询量子态制备基标识2代表的量子态制备基a,利用所述量子态制备基a生成长度为3的比特串q1;以及查询量子态制备基标识4代表的量子态制备基b,利用所述量子态制备基b生成长度为6的比特串q2;由q1和q2共同组成第一量子比特串,由于所述第一量子比特串为量子态,因此,采用相应的量子态制备基发送至客户端。此外,服务端采用十进制转换方法将每个所述比特串转换成十进制比特串,比如将q1转换成十进制Q1,将q2转换成Q2,由Q1和Q2共同组成十进制第一量子比特串,然后采用对称量子密钥Key_AB加密后,将{Q1,Q2}Key_AB传输至客户端,所述客户端在接收到所述{Q1,Q2}Key_AB后,对其进行解密,获得十进制第一量子比特串Q1、Q2。Still taking the above-mentioned specific preferred embodiment as an example, after the server passes the preliminary authentication of the client, it searches for the corresponding symmetric quantum key Key_AB according to the user identifier, decrypts {2,3;4,6} Key_AB to obtain {2,3;4,6}, queries the quantum state preparation basis a represented by the quantum state preparation basis identifier 2, and uses the quantum state preparation basis a to generate a bit string q1 with a length of 3; and queries the quantum state preparation basis b represented by the quantum state preparation basis identifier 4, and uses the quantum state preparation basis b to generate a bit string q2 with a length of 6; q1 and q2 together constitute the first quantum bit string. Since the first quantum bit string is a quantum state, the corresponding quantum state preparation basis is used to send it to the client. In addition, the server uses a decimal conversion method to convert each of the bit strings into a decimal bit string, for example, converting q1 into decimal Q1 and converting q2 into Q2, and Q1 and Q2 together constitute the decimal first quantum bit string, and then encrypting it with the symmetric quantum key Key_AB, and transmitting {Q1, Q2} Key_AB to the client. After receiving the {Q1, Q2} Key_AB , the client decrypts it to obtain the decimal first quantum bit string Q1, Q2.

步骤S104:根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息。Step S104: judging whether the server is legitimate according to the second dynamic interaction verification information, and generating third dynamic interaction verification information according to the second dynamic interaction verification information.

通过步骤S103,已接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息,接下来,需要根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息。Through step S103, the second dynamic interaction verification information generated according to the first dynamic interaction verification information sent by the server has been received. Next, it is necessary to determine whether the server is legal according to the second dynamic interaction verification information, and generate third dynamic interaction verification information according to the second dynamic interaction verification information.

在本申请提供的一个实施例中,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的。基于上述设置,客户端生成第一动态交互验证信息后发送给服务端,由所述服务端根据所述第一动态交互验证信息按照预定的信息处理方法处理后生成第二动态交互验证信息,所述客户端在收到所述第二动态交互验证信息后,可采用相应的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期或根据处理结果与所述第一动态交互验证信息的相关性判断所述服务端是否合法;也可以采用相应或相同的信息处理方法对所述第一动态交互验证信息进行处理,根据处理结果是否符合预期或根据处理结果与所述第二动态交互验证信息的相关性判断所述服务端是否合法。In one embodiment provided by the present application, the client and the server both pre-store corresponding or identical information processing methods, and the processing result of the dynamic interaction verification information by the client according to the information processing method is corresponding or identical to the processing result of the dynamic interaction verification information by the server. Based on the above setting, the client generates the first dynamic interaction verification information and sends it to the server. The server generates the second dynamic interaction verification information after processing the first dynamic interaction verification information according to the predetermined information processing method. After receiving the second dynamic interaction verification information, the client can use the corresponding information processing method to process the second dynamic interaction verification information, and judge whether the server is legal based on whether the processing result meets expectations or based on the correlation between the processing result and the first dynamic interaction verification information; or it can use the corresponding or identical information processing method to process the first dynamic interaction verification information, and judge whether the server is legal based on whether the processing result meets expectations or based on the correlation between the processing result and the second dynamic interaction verification information.

容易理解的是,上述实施例的本质在于,所述客户端将指定信息发送给所述服务端,所述服务端根据所述指定信息按照预定的处理方法处理生成验证信息后发送给所述客户端,所述客户端根据处理结果是否符合预期或根据所述验证信息与所述指定信息的关联性判断所述服务端的合法性。本申请并不限定所述指定信息、所述验证信息以及所述处理方法的具体形式,只要通过上述本质方法实现客户端对服务端的认证,均在本申请的保护范围之内,此处不再赘述。It is easy to understand that the essence of the above embodiment is that the client sends designated information to the server, and the server processes the designated information according to a predetermined processing method to generate verification information and sends it to the client. The client judges the legitimacy of the server based on whether the processing result meets expectations or based on the correlation between the verification information and the designated information. This application does not limit the specific form of the designated information, the verification information, and the processing method. As long as the client authenticates the server through the above essential method, it is within the scope of protection of this application and will not be repeated here.

在本申请提供的一个实施例中,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;In one embodiment provided in the present application, the client and the server both pre-store multiple groups of corresponding or identical information processing methods, and each group of the information processing methods has a corresponding or identical information processing method identifier on the client and the server;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法的步骤,包括:The step of processing the second dynamic interactive verification information according to a pre-stored information processing method and determining whether the server is legitimate based on the processing result includes:

根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;querying a corresponding pre-stored information processing method according to the information processing method identifier in the first dynamic interactive verification information;

根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期判断所述服务端是否合法。The second dynamic interaction verification information is processed according to the information processing method, and whether the server is legitimate is determined based on whether the processing result meets expectations.

在本申请提供的一个优选实施例中,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识;In a preferred embodiment provided in the present application, the client and the server both pre-store the same quantum state library containing a quantum state preparation base, wherein the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并通过所述量子态制备基生成第一量子比特串;The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation basis on the server according to the quantum state preparation basis identifier, and generating a first quantum bit string through the quantum state preparation basis;

所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate according to the second dynamic interaction verification information includes:

采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;Measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

根据所述比特值测量结果是否符合预期判断所述服务端是否合法。Whether the server is legitimate is determined based on whether the bit value measurement result meets expectations.

容易理解的是,其中,所述量子态制备基标识对应的量子态制备基,对客户端来说是测量服务端发过来的第一量子比特串的测量基,对服务端来说,是发给客户端的第一量子比特串的量子态制备基。It is easy to understand that the quantum state preparation basis corresponding to the quantum state preparation basis identifier is, for the client, the measurement basis of the first quantum bit string sent by the server, and for the server, it is the quantum state preparation basis of the first quantum bit string sent to the client.

根据本申请提供的上述方法,所述第一量子比特串是基于所述客户端发送的量子态制备基标识生成的,鉴于量子比特串具有不可克隆性和测试塌缩性,通过对所述第一量子比特串进行测量,根据所述比特值测量结果是否符合预期可以有效判断所述服务端是否合法,实现客户端对服务端的认证,同时,采用量子比特串作为动态验证信息,可以有效避免动态验证信息泄露,进而抵御中间人的攻击和伪造服务器发起的欺骗行为。According to the above method provided in the present application, the first quantum bit string is generated based on the quantum state preparation base identifier sent by the client. In view of the non-cloning and test collapse properties of the quantum bit string, by measuring the first quantum bit string, whether the server is legal can be effectively judged based on whether the bit value measurement result meets the expectation, thereby realizing the authentication of the server by the client. At the same time, using the quantum bit string as dynamic verification information can effectively avoid the leakage of dynamic verification information, thereby resisting the attacks of middlemen and the deception initiated by forged servers.

考虑到对量子态本身具备的不确定性,对所述第一量子比特串的测量是基于概率判断所述比特值测量结果是否符合预期,为了进一步增加对所述服务端认证的准确性,在本申请提供的一个实施例中,所述第一动态交互验证信息还包括第一量子比特串长度;所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;Taking into account the uncertainty of the quantum state itself, the measurement of the first quantum bit string is based on the probability of determining whether the bit value measurement result meets the expectation. In order to further increase the accuracy of the server authentication, in one embodiment provided in the present application, the first dynamic interactive verification information also includes the length of the first quantum bit string; the second dynamic interactive verification information also includes the decimal first quantum bit string obtained by decimal conversion of the first quantum bit string;

所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate according to the second dynamic interaction verification information includes:

采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;Measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;Converting the decimal first quantum bit string into a converted first quantum bit string according to a decimal conversion method;

测量所述第一量子比特串的长度,获得比特串长度测量结果;Measuring the length of the first quantum bit string to obtain a bit string length measurement result;

根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。Whether the server is legitimate is determined based on whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations.

其中,针对对所述第一量子比特串的测量,在本申请提供的一个实施例中,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码,此种情况下,所述采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量的步骤,包括:Among them, with respect to the measurement of the first quantum bit string, in one embodiment provided in the present application, the client and the server both pre-store the same quantum string length database, and the first dynamic interactive verification information also includes a first quantum bit string length code. In this case, the step of measuring the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier includes:

在量子态库中查找与所述量子态制备基标识对应的量子态制备基;Searching for a quantum state preparation base corresponding to the quantum state preparation base identifier in a quantum state library;

随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The quantum state of the quantum state preparation basis is randomly selected to measure the bit value of the first quantum bit string.

在上述实施例中,考虑到量子比特串在传输过程中由于光衰减会导致一定的误码率,判断所述比特值测量结果是否符合预期,可以是通过所述第一量子比特串的误码率是否符合预期进行判定,比如判断所述第一量子比特串的误码率是否低于预设的误码率阈值,例如预设的误码率阈值为6%,检测到的所述第一量子比特串的误码率为5%,则判断所述第一量子比特串的误码率符合预期,即所述比特值测量结果符合预期;此外,还可以通过正确率以及其他多个维度的判断方式判断所述比特值测量结果是否符合预期,此处不再赘述,其均在本申请的保护范围之内。In the above embodiment, taking into account that the quantum bit string will cause a certain bit error rate due to light attenuation during the transmission process, whether the bit value measurement result meets expectations can be judged by whether the bit error rate of the first quantum bit string meets expectations. For example, it is judged whether the bit error rate of the first quantum bit string is lower than the preset bit error rate threshold. For example, the preset bit error rate threshold is 6%, and the detected bit error rate of the first quantum bit string is 5%, then it is judged that the bit error rate of the first quantum bit string meets expectations, that is, the bit value measurement result meets expectations; in addition, the accuracy rate and other multiple dimensions can also be used to judge whether the bit value measurement result meets expectations, which will not be repeated here, and they are all within the scope of protection of this application.

在本申请提供的一个实施例中,判断所述比特串长度测量结果是否符合预期,可以是通过将所述比特串长度测量结果与所述第一量子比特串长度进行比较,因为所述第一量子比特串是根据所述第一量子比特串长度生成的,因此所述比特串长度测量结果不应大于所述第一量子比特串长度,同时考虑到光衰减的影响,所述比特串长度测量结果与所述第一量子比特串长度的差应该不超过预定的阈值,若不符合上述判定条件,则认为所述比特串长度测量结果不符合预期。In one embodiment provided in the present application, whether the bit string length measurement result meets expectations can be determined by comparing the bit string length measurement result with the first quantum bit string length. Because the first quantum bit string is generated based on the first quantum bit string length, the bit string length measurement result should not be greater than the first quantum bit string length. At the same time, considering the influence of light attenuation, the difference between the bit string length measurement result and the first quantum bit string length should not exceed a predetermined threshold. If the above judgment conditions are not met, it is considered that the bit string length measurement result does not meet expectations.

在本申请提供的一个实施例中,所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,包括:In one embodiment provided in the present application, the step of generating third dynamic interaction verification information according to the second dynamic interaction verification information includes:

将所述比特值测量结果及测量时使用的量子态的量子位标识作为第三动态交互验证信息。The bit value measurement result and the quantum bit identifier of the quantum state used in the measurement are used as third dynamic interactive verification information.

这样,所述服务端可以采用所述量子位标识对应的量子态制备基的量子态对所述第一量子比特串进行测量,将服务端的比特值测量结果与客户端发送的比特值测量结果进行比对,若符合预设的判断条件,则可判断所述客户端合法,认证通过。In this way, the server can use the quantum state of the quantum state preparation basis corresponding to the quantum bit identifier to measure the first quantum bit string, and compare the bit value measurement result of the server with the bit value measurement result sent by the client. If it meets the preset judgment conditions, the client can be judged to be legal and the authentication is passed.

仍以上述优选的具体实施例为例,客户端获得所述服务端利用量子态制备基发送的量子比特串q1、q2,以及利用对称量子密钥发送的十进制第一量子比特串Q1、Q2后,分别随机选择所述量子态制备基标识2、4对应的量子态制备基中的量子态对所述量子比特串q1、q2进行测量(此随机表示同一组正交态的两个量子态随机选其中一个,比如,对于量子态制备基标识为2的量子态制备基:{|0>,|1>},在随机选择制备基过程中,随机选择的量子态可能是|0>,也可能是|1>,为了进行区分,可以对量子态做量子位标识,比如量子态|0>的量子位标识为2.1,量子态|1>的量子位标识为2.2,),例如随机选择量子位标识为2.1的量子态和量子位标识为4.2的量子态分别对q1和q2进行测量,可以获得比特值测量结果为m,根据所述比特值测量结果m是符合预设的阈值条件判断所述比特值测量结果是否符合预期;同时,将所述十进制第一量子比特串Q1、Q2按照十进制转换方法转换为第一量子比特串q1、q2,通过测量获得所述第一量子比特串q1、q2的比特串长度测量结果,根据q1、q2的长度与所述第一动态交互验证信息中的第一量子比特串长度3、6的差异判断所述比特串长度测量结果是否符合预期;最后,根据所述比特值测量结果m是否符合预期和所述比特串长度测量结果是否符合预期即可判断所述服务端是否合法。之后,再将所述比特值测量结果m和测量时使用的量子态的量子位标识2.1、4.2发送给服务端,服务端即可利用所述量子位标识2.1、4.2对应的量子态对服务端的第一量子比特串q1、q2进行测量,获得第二量子比特值测量结果n,将服务端的所述第二量子比特值测量结果n和客户端的比特值测量结果m进行比对,根据其差异是否符合预期即可判断所述客户端是否通过认证。Still taking the above preferred specific embodiment as an example, after the client obtains the quantum bit strings q1 and q2 sent by the server using the quantum state preparation base, and the decimal first quantum bit strings Q1 and Q2 sent using the symmetric quantum key, the client randomly selects the quantum states in the quantum state preparation base corresponding to the quantum state preparation base identifiers 2 and 4 to measure the quantum bit strings q1 and q2 (this randomness means randomly selecting one of the two quantum states of the same group of orthogonal states. For example, for the quantum state preparation base with the quantum state preparation base identifier 2: {|0>,|1>}, in the process of randomly selecting the preparation base, the randomly selected quantum state may be |0> or |1>. In order to distinguish, the quantum state can be marked with a quantum bit, such as the quantum bit identifier of the quantum state |0> is 2.1, and the quantum bit identifier of the quantum state |1> is 2.2). For example, randomly selecting Select the quantum state with quantum bit identification 2.1 and the quantum state with quantum bit identification 4.2 to measure q1 and q2 respectively, and obtain a bit value measurement result of m. According to whether the bit value measurement result m meets the preset threshold condition, it is judged whether the bit value measurement result meets expectations; at the same time, the decimal first quantum bit strings Q1 and Q2 are converted into first quantum bit strings q1 and q2 according to the decimal conversion method, and the bit string length measurement results of the first quantum bit strings q1 and q2 are obtained by measurement. According to the difference between the length of q1 and q2 and the first quantum bit string length 3 and 6 in the first dynamic interactive verification information, it is judged whether the bit string length measurement result meets expectations; finally, according to whether the bit value measurement result m meets expectations and whether the bit string length measurement result meets expectations, it can be judged whether the server is legal. Afterwards, the bit value measurement result m and the quantum bit identifiers 2.1 and 4.2 of the quantum state used in the measurement are sent to the server. The server can then use the quantum states corresponding to the quantum bit identifiers 2.1 and 4.2 to measure the first quantum bit strings q1 and q2 of the server to obtain the second quantum bit value measurement result n. The second quantum bit value measurement result n of the server is compared with the bit value measurement result m of the client. Whether the client has passed the authentication can be determined based on whether the difference is as expected.

需要说明的是,上述实施例中仅以q1、q2进行举例说明,本申请并不限制所述量子比特串的数量和长度,以及具体的测量方法、长度判断方法和比对方法,任何能够实现本发明构思的具体实施方式,均在本申请的保护范围之内。It should be noted that the above embodiments only use q1 and q2 as examples. This application does not limit the number and length of the quantum bit strings, as well as the specific measurement method, length judgment method and comparison method. Any specific implementation method that can realize the concept of the present invention is within the scope of protection of this application.

在上述实施例中,采用所述比特值测量结果及测量时使用的量子态的量子位标识作为第三动态交互验证信息,供所述服务端进行测量、比对,完成对所述客户端的认证,除上述方式以外,服务端对客户端的认证,也可以采用上述客户端对服务端认证的方式,例如,在本申请提供的一个实施例中,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的代码及第二量子比特串长度;In the above embodiment, the bit value measurement result and the quantum bit identifier of the quantum state used in the measurement are used as the third dynamic interactive verification information for the server to perform measurement and comparison to complete the authentication of the client. In addition to the above method, the server's authentication of the client can also adopt the above-mentioned client-server authentication method. For example, in one embodiment provided in this application, the second dynamic interactive verification information also includes the code of the quantum state preparation basis selected by the server and the length of the second quantum bit string;

所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,包括:The step of generating third dynamic interaction verification information according to the second dynamic interaction verification information includes:

在量子态库中查询与所述服务端选择的量子态制备基的代码相对应的量子态制备基;Querying the quantum state preparation base corresponding to the code of the quantum state preparation base selected by the server in the quantum state library;

根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;generating a second qubit string using the quantum state preparation basis according to the length of the second qubit string;

生成包含所述第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information including the second quantum bit string.

其中,所述第二量子比特串采用所述量子态制备基发送至服务端。The second quantum bit string is sent to the server using the quantum state preparation basis.

这样,服务端再采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果,根据所述比特值测量结果是否符合预期即可判断所述客户端是否通过认证。In this way, the server uses the quantum state preparation basis selected by the server to measure the bit value of the second quantum bit string to obtain the second quantum bit value measurement result. Based on whether the bit value measurement result meets expectations, it can be determined whether the client has passed the authentication.

在本申请提供的一个实施例中,所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,还包括:将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;In one embodiment provided in the present application, the step of generating third dynamic interactive verification information according to the second dynamic interactive verification information further includes: converting the second quantum bit string according to a decimal conversion method to obtain a decimal second quantum bit string;

所述生成包含所述第二量子比特串的第三动态交互验证信息的步骤,包括:The step of generating third dynamic interactive verification information including the second quantum bit string comprises:

生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information including the second quantum bit string and the decimal second quantum bit string.

其中,所述第二量子比特串采用所述量子态制备基发送至服务端,所述十进制第二量子比特串采用对称量子密钥加密后发送至服务端。The second quantum bit string is sent to the server end using the quantum state preparation basis, and the decimal second quantum bit string is encrypted using a symmetric quantum key and then sent to the server end.

这样,服务端再采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果,根据所述第二量子比特值测量结果是否符合预设的阈值条件判断所述第二量子比特值测量结果是否符合预期,以及测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果,根据所述第二量子比特串长度测量结果与所述第二量子比特串长度的差值是否符合预设的条件判断所述第二量子比特串长度测量结果是否符合预期,根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期即可判断所述客户端是否通过认证。In this way, the server then uses the quantum state preparation basis selected by the server to measure the bit value of the second quantum bit string to obtain a second quantum bit value measurement result, and judges whether the second quantum bit value measurement result meets expectations based on whether the second quantum bit value measurement result meets the preset threshold condition, and measures the length of the second quantum bit string to obtain a second quantum bit string length measurement result, and judges whether the second quantum bit string length measurement result meets expectations based on whether the difference between the second quantum bit string length measurement result and the length of the second quantum bit string meets the preset condition. Whether the client has passed the authentication can be determined based on whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations.

由于上述服务端对客户端的认证方法与前述客户端对服务端的认证方法类似,相关之处请参照前文所述,此处不再赘述。需要说明的是,本申请并不限制所述认证的具体方式,只要符合本申请发明构思的实施方式,均在本申请的保护范围之内。Since the above-mentioned server-to-client authentication method is similar to the aforementioned client-to-server authentication method, please refer to the above description for the relevant details and will not be repeated here. It should be noted that this application does not limit the specific method of authentication. As long as the implementation method conforms to the inventive concept of this application, it is within the scope of protection of this application.

步骤S104:若合法,则将所述第三动态交互验证信息发送至服务端,以由所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。Step S104: If it is legal, the third dynamic interaction verification information is sent to the server, so that the server determines whether the client has passed the authentication based on the third dynamic interaction verification information.

通过步骤S105,已根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息,若合法,则将所述第三动态交互验证信息发送至服务端,以由所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。Through step S105, whether the server is legal is determined based on the second dynamic interaction verification information, and third dynamic interaction verification information is generated based on the second dynamic interaction verification information. If it is legal, the third dynamic interaction verification information is sent to the server, so that the server can determine whether the client has passed the authentication based on the third dynamic interaction verification information.

考虑到数据传输的安全性,在本申请提供的一个实施例中,所述客户端需要将所述第三动态交互验证信息的部分或全部进行加密后再行发送,同时可以采用https加密传输协议传输。所述若合法,则将所述第三动态交互验证信息发送至服务端的步骤,包括:Considering the security of data transmission, in one embodiment provided in this application, the client needs to encrypt part or all of the third dynamic interaction verification information before sending it, and can use the https encrypted transmission protocol for transmission. If the third dynamic interaction verification information is legal, the step of sending the third dynamic interaction verification information to the server includes:

若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。If it is legal, all or part of the third dynamic interactive verification information is encrypted with a key and sent to the server.

仍以上述优选的具体实施例为例,所述客户端在认证所述服务端合法后,将所述比特值测量结果m和测量时使用的量子态的量子位标识2.1、4.2一起采用对称量子密钥Key_AB加密后发送给服务端,例如发送信息为:{比特值测量结果m,量子位标识2.1、量子位标识4.2}Key_ABStill taking the above preferred specific embodiment as an example, after the client authenticates the legitimacy of the server, it encrypts the bit value measurement result m and the quantum bit identifiers 2.1 and 4.2 of the quantum state used in the measurement with the symmetric quantum key Key_AB and sends them to the server. For example, the information sent is: {bit value measurement result m, quantum bit identifier 2.1, quantum bit identifier 4.2} Key_AB .

至此,通过步骤S101至步骤S105,完成了用于客户端的认证流程。服务端即可根据所述第三动态交互验证信息判断所述客户端是否通过认证。相较于传统的动态口令认证,本方法通过客户端与服务端的交互通信,实现了客户端与服务端的交互认证,可以防范假冒的服务器欺骗合法用户,同时,由于客户端和服务端均动态的利用对方的验证信息制作本方验证信息,再发给对方进行验证,因此,可以抵御中间人攻击,且可防御小数攻击,将所述验证信息采用量子态处理后,可以进一步提高验证信息传输及存储的安全性。At this point, through steps S101 to S105, the authentication process for the client is completed. The server can then determine whether the client has passed the authentication based on the third dynamic interactive verification information. Compared to traditional dynamic password authentication, this method realizes interactive authentication between the client and the server through interactive communication between the client and the server, which can prevent fake servers from deceiving legitimate users. At the same time, since both the client and the server dynamically use the other party's verification information to produce their own verification information and then send it to the other party for verification, it can resist man-in-the-middle attacks and decimal attacks. After the verification information is processed in a quantum state, the security of the verification information transmission and storage can be further improved.

在上述的实施例中,提供了一种用于客户端的认证方法,与之相对应的,本申请还提供一种用于客户端的认证装置。请参看图2,其为本申请提供的一种用于客户端的认证装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiment, a client authentication method is provided. Accordingly, this application also provides a client authentication device. Please refer to Figure 2, which is a schematic diagram of an embodiment of a client authentication device provided by this application. Since the device embodiment is substantially similar to the method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The device embodiment described below is merely illustrative.

本实施例提供的一种用于客户端的认证装置,包括:第一动态交互验证信息生成单元101,用于生成第一动态交互验证信息;第一动态交互验证信息发送单元102,用于将所述第一动态交互验证信息发送至服务端;第二动态交互验证信息接收单元103,用于接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息;第二动态交互验证信息验证单元104,用于根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息;第三动态交互验证信息发送单元105,用于若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。This embodiment provides an authentication device for a client, including: a first dynamic interaction verification information generating unit 101, configured to generate first dynamic interaction verification information; a first dynamic interaction verification information sending unit 102, configured to send the first dynamic interaction verification information to a server; a second dynamic interaction verification information receiving unit 103, configured to receive second dynamic interaction verification information generated according to the first dynamic interaction verification information and sent by the server; a second dynamic interaction verification information verifying unit 104, configured to determine whether the server is legitimate according to the second dynamic interaction verification information, and to generate third dynamic interaction verification information according to the second dynamic interaction verification information; and a third dynamic interaction verification information sending unit 105, configured to send the third dynamic interaction verification information to the server if the server is legitimate, so that the server can determine whether the client has passed the authentication according to the third dynamic interaction verification information.

可选的,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the client and the server both pre-store corresponding or identical information processing methods, and a result of the client processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the server processing the dynamic interactive verification information;

所述第二动态交互验证信息验证单元104包括:The second dynamic interaction verification information verification unit 104 includes:

处理判断子单元,用于根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing and judging subunit is used to process the second dynamic interactive verification information according to a pre-stored information processing method, and judge whether the server is legal according to the processing result.

可选的,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;Optionally, the client and the server both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the client and the server;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述处理判断子单元,包括:The processing and judging subunit includes:

处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;a processing method query subunit, configured to query a corresponding pre-stored information processing method according to the information processing method identifier in the first dynamic interactive verification information;

处理方法处理子单元,用于根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing method processing subunit is used to process the second dynamic interactive verification information according to the information processing method, and determine whether the server is legal based on the processing result.

可选的,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the client and the server and is changed periodically.

可选的,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,所述第一动态交互验证信息包括所述量子态制备基标识;Optionally, both the client and the server pre-store the same quantum state library containing a quantum state preparation base, the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, each quantum state preparation base has a corresponding quantum state preparation base identifier, and the first dynamic interactive verification information includes the quantum state preparation base identifier;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并通过所述量子态制备基生成第一量子比特串;The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation basis on the server according to the quantum state preparation basis identifier, and generating a first quantum bit string through the quantum state preparation basis;

所述第二动态交互验证信息验证单元104包括:The second dynamic interaction verification information verification unit 104 includes:

第一量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;a first quantum measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

第一量子判断子单元,用于根据所述比特值测量结果是否符合预期判断所述服务端是否合法。The first quantum judgment subunit is used to judge whether the server is legal according to whether the bit value measurement result meets expectations.

可选的,所述第一动态交互验证信息生成单元101包括:Optionally, the first dynamic interaction verification information generating unit 101 includes:

第一制备基选择子单元,用于从量子态库中选择至少一种量子态制备基;A first preparation base selection subunit, configured to select at least one quantum state preparation base from a quantum state library;

第一标识提取子单元,用于提取所述量子态制备基的量子态制备基标识;A first identifier extraction subunit, configured to extract a quantum state preparation base identifier of the quantum state preparation base;

第一验证信息生成子单元,用于生成包含所述量子态制备基标识的第一动态交互验证信息。The first verification information generating subunit is used to generate first dynamic interactive verification information including the quantum state preparation base identifier.

可选的,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,每一次认证选择的量子态制备基均不相同。Optionally, the at least one quantum state preparation base is selected from the quantum state library in a random selection manner, and the quantum state preparation base selected for each authentication is different.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在服务端查询相应的量子态制备基,并根据所述第一量子比特串长度通过所述量子态制备基生成的第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base on the server according to the quantum state preparation base identifier, and generating a first quantum bit string through the quantum state preparation base according to the length of the first quantum bit string, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;Optionally, the second dynamic interactive verification information further includes a decimal first quantum bit string obtained by performing decimal conversion on the first quantum bit string;

所述第二动态交互验证信息验证单元104包括:The second dynamic interaction verification information verification unit 104 includes:

第二量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;a second quantum measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state preparation basis corresponding to the quantum state preparation basis identifier to obtain a bit value measurement result;

第二转换子单元,用于将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;A second conversion subunit, configured to convert the decimal first quantum bit string into a converted first quantum bit string according to a decimal conversion method;

第二长度测量子单元,用于测量所述第一量子比特串的长度,获得比特串长度测量结果;A second length measurement subunit is used to measure the length of the first quantum bit string and obtain a bit string length measurement result;

第二判断子单元,用于根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。The second judgment subunit is configured to judge whether the server is legal according to whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations.

可选的,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the client and the server both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating a first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and the first quantum bit string is sent to the client through the quantum state preparation base.

可选的,所述第一量子测量子单元包括:Optionally, the first quantum measurement subunit includes:

第一量子查询子单元,用于在量子态库中查找与所述量子态制备基标识对应的量子态制备基;A first quantum query subunit is configured to search a quantum state preparation base corresponding to the quantum state preparation base identifier in a quantum state library;

第一随机测量子单元,用于随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The first random measurement subunit is used to randomly select the quantum state of the quantum state preparation basis to measure the bit value of the first quantum bit string.

可选的,所述第二动态交互验证信息验证单元104包括:Optionally, the second dynamic interaction verification information verification unit 104 includes:

第三动态验证信息生成子单元,用于将所述比特值测量结果及测量时使用的量子态的量子位标识作为第三动态交互验证信息。The third dynamic verification information generating subunit is configured to use the bit value measurement result and the quantum bit identifier of the quantum state used in the measurement as the third dynamic interactive verification information.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation basis identifier and a second quantum bit string length selected by the server;

所述第二动态交互验证信息验证单元104包括:The second dynamic interaction verification information verification unit 104 includes:

第二量子查询子单元,用于在量子态库中查询与所述服务端选择的量子态制备基标识相对应的量子态制备基;A second quantum query subunit is used to query the quantum state preparation base corresponding to the quantum state preparation base identifier selected by the server in the quantum state library;

第二量子制备子单元,用于根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;A second quantum preparation subunit, configured to generate a second quantum bit string using the quantum state preparation basis according to the length of the second quantum bit string;

第三信息生成子单元,用于生成包含所述第二量子比特串的第三动态交互验证信息。The third information generation subunit is used to generate third dynamic interactive verification information containing the second quantum bit string.

可选的,所述第二动态交互验证信息验证单元104还包括:Optionally, the second dynamic interaction verification information verification unit 104 further includes:

十进制转换子单元,用于将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;a decimal conversion subunit, configured to convert the second quantum bit string according to a decimal conversion method to obtain a decimal second quantum bit string;

所述第三信息生成子单元包括:The third information generating subunit includes:

十进制第三信息生成子单元,用于生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。The decimal third information generation subunit is used to generate third dynamic interactive verification information including the second quantum bit string and the decimal second quantum bit string.

可选的,所述第三动态交互验证信息发送单元105包括:Optionally, the third dynamic interaction verification information sending unit 105 includes:

第三动态交互验证信息量子发送子单元,用于若合法,则将所述第二量子比特串采用所述量子态制备基发送至服务端。The third dynamic interactive verification information quantum sending subunit is used to send the second quantum bit string to the server using the quantum state preparation basis if it is legal.

可选的,所述客户端的量子态库与所述服务端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the client is synchronized with the quantum state library of the server and is changed regularly according to predetermined rules.

可选的,所述第一动态交互验证信息包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证。Optionally, the first dynamic interaction verification information includes an identity identifier of the client, and the identity identifier is used by the server to perform preliminary authentication on the client.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述第一动态交互验证信息发送单元102包括:Optionally, the first dynamic interaction verification information sending unit 102 includes:

第一动态交互验证信息加密子单元,用于将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;A first dynamic interaction verification information encryption subunit is configured to encrypt all or part of the first dynamic interaction verification information using a key and then send the encrypted information to the server;

所述第三动态交互验证信息发送单元105包括:The third dynamic interaction verification information sending unit 105 includes:

第三动态交互验证信息加密子单元,用于若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。The third dynamic interaction verification information encryption subunit is configured to encrypt all or part of the third dynamic interaction verification information with a key and then send the encrypted information to the server if the information is legitimate.

可选的,所述密钥与所述服务端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述第二动态交互验证信息接收单元103包括:Optionally, the second dynamic interaction verification information receiving unit 103 includes:

加密第二动态交互验证信息接收子单元,用于接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;an encrypted second dynamic interaction verification information receiving subunit, configured to receive second dynamic interaction verification information generated based on the first dynamic interaction verification information and at least part of which is encrypted and sent by the server;

第二动态交互验证信息解密子单元,用于采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The second dynamic interactive verification information decryption subunit is used to decrypt the encrypted part of the information using a decryption key corresponding to the key used for encryption by the server.

可选的,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the server are symmetric quantum keys of each other, or are public-private keys of each other.

以上,为本申请提供的一种用于客户端的认证装置的实施例。The above is an embodiment of an authentication device for a client provided by this application.

本申请还提供一种用于服务端的认证方法,请参考图3,其为本申请提供的一种用于服务端的认证方法实施例的流程图,本方法的执行主体为服务端,该方法是与前述用于客户端的认证方法配合实施的,部分内容不再赘述,请参照上述用于客户端的认证方法实施例进行理解,所述方法包括如下步骤:The present application also provides an authentication method for a server. Please refer to FIG3 , which is a flow chart of an embodiment of an authentication method for a server provided by the present application. The execution subject of this method is the server. This method is implemented in conjunction with the aforementioned authentication method for a client. Some contents will not be repeated here. Please refer to the aforementioned embodiment of the authentication method for a client for understanding. The method includes the following steps:

步骤S201:接收客户端发送的第一动态交互验证信息。Step S201: receiving first dynamic interaction verification information sent by a client.

本步骤,首先,接收客户端发送的第一动态交互验证信息。In this step, first, first dynamic interaction verification information sent by the client is received.

其中,所述第一动态交互验证信息由客户端生成,用于服务端在接收到所述第一动态交互验证信息后,根据所述第一动态交互验证信息生成第二动态交互验证信息,如此,客户端在接收到所述服务端发送的第二动态交互验证信息后,根据所述第二动态交互验证信息与所述第一动态交互验证信息的关联性,即可识别所述服务端是否合法,实现客户端对服务端的认证,有效抵御假冒服务器和中间人攻击。Among them, the first dynamic interaction verification information is generated by the client, and is used by the server to generate second dynamic interaction verification information based on the first dynamic interaction verification information after receiving the first dynamic interaction verification information. In this way, after receiving the second dynamic interaction verification information sent by the server, the client can identify whether the server is legitimate based on the correlation between the second dynamic interaction verification information and the first dynamic interaction verification information, thereby realizing the client's authentication of the server and effectively resisting fake servers and man-in-the-middle attacks.

为了提高信息传输的安全性,在本申请提供的一个实施例中,所述接收客户端发送的第一动态交互验证信息的步骤,包括:To improve the security of information transmission, in one embodiment provided in the present application, the step of receiving the first dynamic interaction verification information sent by the client includes:

接收客户端发送的至少部分信息已加密的第一动态交互验证信息;Receiving first dynamic interaction verification information sent by a client, at least part of which is encrypted;

采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted portion of information is decrypted using a decryption key corresponding to the key used for encryption on the client.

其中,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。The decryption key and the key used for encryption on the client are symmetric quantum keys of each other, or public-private keys of each other.

考虑到为了避免虚假客户端恶意攻击服务端,或伪造客户端进行认证,或非法用户访问,在本申请提供的一个实施例中,在接收客户端发送的第一动态交互验证信息的同时,还需要接收所述客户端的身份标识以进行初步认证,所述客户端的身份标识包括客户端的用户识别码和身份证书,若判断所述客户端的身份标识非法,则终止认证过程。In order to avoid fake clients maliciously attacking the server, or forging clients for authentication, or illegal users accessing, in one embodiment provided in the present application, while receiving the first dynamic interactive verification information sent by the client, it is also necessary to receive the client's identity for preliminary authentication. The client's identity includes the client's user identification code and identity certificate. If it is determined that the client's identity is illegal, the authentication process is terminated.

步骤S202:根据所述第一动态交互验证信息生成第二动态交互验证信息。Step S202: Generate second dynamic interaction verification information according to the first dynamic interaction verification information.

通过步骤S201,已接收客户端发送的第一动态交互验证信息,接下来根据所述第一动态交互验证信息生成第二动态交互验证信息。Through step S201 , the first dynamic interaction verification information sent by the client has been received, and then the second dynamic interaction verification information is generated according to the first dynamic interaction verification information.

在本申请提供的一个实施例中,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;In one embodiment provided in the present application, the server and the client both pre-store corresponding or identical information processing methods, and the result of the server processing the dynamic interactive verification information according to the information processing method is corresponding or identical to the result of the client processing the dynamic interactive verification information;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first dynamic interaction verification information is processed using the information processing method to generate second dynamic interaction verification information.

在本申请提供的一个实施例中,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;In one embodiment provided in the present application, the server and the client both pre-store multiple groups of corresponding or identical information processing methods, and each group of the information processing methods has a corresponding or identical information processing method identifier on the server and the client;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;searching for a corresponding information processing method according to the information processing method identifier in the first dynamic interactive verification information;

采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first dynamic interaction verification information is processed using the information processing method to generate second dynamic interaction verification information.

在本申请提供的一个实施例中,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。In one embodiment provided in the present application, the information processing method identifier is synchronized and periodically changed between the server and the client.

在本申请提供的一个优选的实施例中,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;In a preferred embodiment provided in the present application, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, wherein the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each of the quantum state preparation bases has a corresponding quantum state preparation base identifier;

所述第一动态交互验证信息包括所述客户端选择的至少一种量子态制备基的量子态制备基标识;The first dynamic interactive verification information includes a quantum state preparation base identifier of at least one quantum state preparation base selected by the client;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier;

采用所述量子态制备基生成第一量子比特串;Generating a first quantum bit string using the quantum state preparation basis;

生成包含所述第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string is generated.

在本申请提供的一个优选的实施例中,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;所述第一动态交互验证信息还包括第一量子比特串长度;In a preferred embodiment provided in the present application, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, wherein the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier; the first dynamic interactive verification information also includes the length of the first quantum bit string;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier;

根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;Generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;Converting the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string is generated.

作为上述实施方式的变更,在本申请提供的一个的实施例中,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;As a variation of the above embodiment, in one embodiment provided in the present application, the server and the client both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;以及Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier; and

根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;searching the quantum string length database for a corresponding first quantum bit string length according to the first quantum bit string length code;

根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;Generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;Converting the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string is generated.

在本申请提供的一个的实施例中,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。In one embodiment provided in the present application, the quantum state library of the server is synchronized with the quantum state library of the client and is changed regularly according to a predetermined rule.

步骤S203:将所述第二动态交互验证信息发送至所述客户端。Step S203: Send the second dynamic interaction verification information to the client.

通过步骤S202,已根据所述第一动态交互验证信息生成第二动态交互验证信息,接下来,将所述第二动态交互验证信息发送至所述客户端,Through step S202, second dynamic interaction verification information is generated according to the first dynamic interaction verification information. Next, the second dynamic interaction verification information is sent to the client.

为了保证信息传输的安全性,在本申请提供的一个实施例中,所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:To ensure the security of information transmission, in one embodiment provided in this application, the step of sending the second dynamic interaction verification information to the client includes:

将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。All or part of the second dynamic interaction verification information is encrypted with a key and sent to the server.

其中,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。The key and the key used for decryption by the client are symmetric quantum keys of each other, or public-private keys of each other.

在本申请提供的一个实施例中,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;In one embodiment provided in the present application, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, wherein the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier;

所述第一动态交互验证信息包括所述客户端选择的至少一种量子态制备基的量子态制备基标识;The first dynamic interactive verification information includes a quantum state preparation base identifier of at least one quantum state preparation base selected by the client;

所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information according to the first dynamic interaction verification information includes:

根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;Searching for a corresponding quantum state preparation base in a quantum state library according to the quantum state preparation base identifier;

采用所述量子态制备基生成第一量子比特串;Generating a first quantum bit string using the quantum state preparation basis;

生成包含所述第一量子比特串的第二动态交互验证信息;generating second dynamic interactive verification information including the first quantum bit string;

所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:The step of sending the second dynamic interaction verification information to the client includes:

将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first quantum bit string is sent to the client using the quantum state preparation basis.

步骤S204:接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息。Step S204: receiving third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client.

通过步骤S203,将所述第二动态交互验证信息发送至所述客户端,接下来,接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息。In step S203 , the second dynamic interaction verification information is sent to the client. Next, third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client is received.

客户端在接收到所述第二动态交互验证信息后,会根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息。在判断所述服务端为合法时,将所述第三动态交互验证信息发送给服务端进行认证,由所述服务端判断所述客户端是否通过认证。After receiving the second dynamic interaction verification information, the client determines whether the server is legitimate based on the second dynamic interaction verification information and generates third dynamic interaction verification information based on the second dynamic interaction verification information. If the server is determined to be legitimate, the client sends the third dynamic interaction verification information to the server for authentication, and the server determines whether the client has passed the authentication.

在本申请提供的一个实施例中,所述第三动态交互验证信息包括所述客户端测量所述第二动态交互验证信息时采用的量子态的量子位标识以及比特值测量结果。In one embodiment provided in the present application, the third dynamic interactive verification information includes a quantum bit identifier and a bit value measurement result of the quantum state used by the client when measuring the second dynamic interactive verification information.

在本申请提供的一个实施例中,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;In one embodiment provided in the present application, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串。The third dynamic interactive verification information includes the second quantum bit string generated by the client according to the quantum state preparation basis identifier and the second quantum bit string length selected by the server.

为了提高信息传输的安全性,在本申请提供的一个实施例中,所述接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息的步骤,包括:To improve the security of information transmission, in one embodiment provided in the present application, the step of receiving third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client includes:

接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;receiving third dynamic interaction verification information sent by the client, at least part of which is encrypted and generated based on the second dynamic interaction verification information;

采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted portion of information is decrypted using a decryption key corresponding to the key used for encryption on the client.

其中,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。The decryption key and the key used for encryption on the client are symmetric quantum keys of each other, or public-private keys of each other.

步骤S205:根据所述第三动态交互验证信息判断所述客户端是否通过认证。Step S205: Determine whether the client has passed the authentication according to the third dynamic interaction verification information.

通过步骤S204,已接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息,接下来,根据所述第三动态交互验证信息判断所述客户端是否通过认证。Through step S204, the third dynamic interaction verification information generated according to the second dynamic interaction verification information and sent by the client has been received. Next, it is determined whether the client has passed the authentication according to the third dynamic interaction verification information.

在本申请提供的一个实施例中,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;In one embodiment provided in the present application, the server and the client both pre-store corresponding or identical information processing methods, and the result of the server processing the dynamic interactive verification information according to the information processing method is corresponding or identical to the result of the client processing the dynamic interactive verification information;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interaction verification information is processed using an information processing method corresponding to or the same as that of the client, and whether the client has passed the authentication is determined based on whether the processing result meets expectations.

在本申请提供的一个实施例中,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。In one embodiment provided in the present application, the information processing method identifier is synchronized and periodically changed between the server and the client.

在本申请提供的一个实施例中,所述第三动态交互验证信息包括所述客户端测量所述第二动态交互验证信息时采用的量子态的量子位标识以及比特值测量结果;In one embodiment provided in the present application, the third dynamic interactive verification information includes a quantum bit identifier and a bit value measurement result of a quantum state used by the client when measuring the second dynamic interactive verification information;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;Measuring the bit value of the first qubit string using the quantum state corresponding to the qubit identifier to obtain a server-side bit value measurement result;

比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The bit value measurement result is compared with the bit value measurement result of the server, and whether the client passes the authentication is determined based on whether the comparison result meets a preset judgment condition.

在本申请提供的一个实施例中,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;In one embodiment provided in the present application, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client according to the quantum state preparation base identifier and the second quantum bit string length selected by the server;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;Measuring the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。Whether the client has passed the authentication is determined based on whether the second quantum bit value measurement result meets expectations.

在本申请提供的一个实施例中,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;In one embodiment provided in the present application, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes a second quantum bit string generated by the client according to the quantum state preparation basis identifier and the length of the second quantum bit string selected by the server, and a decimal second quantum bit string obtained by performing decimal conversion on the second quantum bit string;

所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication according to the third dynamic interaction verification information includes:

采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;Measuring the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;Converting the decimal second quantum bit string into a converted second quantum bit string according to a decimal conversion method;

测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;Measuring the length of the second quantum bit string to obtain a second quantum bit string length measurement result;

根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。Whether the server has passed the authentication is determined based on whether the second quantum bit value measurement result meets expectations and whether the second quantum bit string length measurement result meets expectations.

在本申请提供的一个实施例中,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。In one embodiment provided in the present application, the quantum state library of the server is synchronized with the quantum state library of the client and is changed regularly according to a predetermined rule.

至此,通过步骤S201至步骤S205,完成了用于服务端的认证流程。At this point, through step S201 to step S205, the authentication process for the server is completed.

在上述的实施例中,提供了一种用于服务端的认证方法,与之相对应的,本申请还提供一种用于服务端的认证装置。请参看图4,其为本申请提供的一种用于服务端的认证装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。In the above-mentioned embodiment, a server-side authentication method is provided. Accordingly, the present application also provides a server-side authentication device. Please refer to Figure 4, which is a schematic diagram of an embodiment of a server-side authentication device provided by the present application. Because the device embodiment is substantially similar to the method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The device embodiment described below is merely illustrative.

本实施例的一种用于客户端的认证装置,包括:第一动态交互验证信息接收单元201,用于接收客户端发送的第一动态交互验证信息;第二动态交互验证信息生成单元202,用于根据所述第一动态交互验证信息生成第二动态交互验证信息;第二动态交互验证信息发送单元203,用于将所述第二动态交互验证信息发送至所述客户端;第二动态交互验证信息发送单元204,用于接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息;第三动态交互验证信息判断单元205,用于根据所述第三动态交互验证信息判断所述客户端是否通过认证。An authentication device for a client in this embodiment includes: a first dynamic interaction verification information receiving unit 201, configured to receive first dynamic interaction verification information sent by a client; a second dynamic interaction verification information generating unit 202, configured to generate second dynamic interaction verification information based on the first dynamic interaction verification information; a second dynamic interaction verification information sending unit 203, configured to send the second dynamic interaction verification information to the client; a second dynamic interaction verification information sending unit 204, configured to receive third dynamic interaction verification information sent by the client and generated based on the second dynamic interaction verification information; and a third dynamic interaction verification information judging unit 205, configured to judge whether the client has passed authentication based on the third dynamic interaction verification information.

可选的,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;Optionally, the server and the client both pre-store corresponding or identical information processing methods, and a result of the server processing the dynamic interactive verification information according to the information processing method is corresponding or identical to a result of the client processing the dynamic interactive verification information;

所述第三动态交互验证信息判断单元205包括:The third dynamic interaction verification information judgment unit 205 includes:

第三动态交互验证信息处理子单元,用于采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interactive verification information processing subunit is configured to process the third dynamic interactive verification information using an information processing method corresponding to or the same as that of the client, and determine whether the client has passed the authentication based on whether the processing result meets expectations.

可选的,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;Optionally, the server and the client both pre-store multiple groups of corresponding or identical information processing methods, and each group of information processing methods has a corresponding or identical information processing method identifier on the server and the client;

所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier;

所述第二动态交互验证信息生成单元202包括:The second dynamic interaction verification information generating unit 202 includes:

处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;a processing method query subunit, configured to search for a corresponding information processing method according to the information processing method identifier in the first dynamic interactive verification information;

第一信息处理子单元,用于采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first information processing sub-unit is configured to process the first dynamic interaction verification information using the information processing method to generate second dynamic interaction verification information.

可选的,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。Optionally, the information processing method identifier is synchronized between the server and the client and is changed periodically.

可选的,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识;Optionally, the server and the client both pre-store the same quantum state library containing a quantum state preparation base, where the quantum state preparation base is used to prepare a quantum bit string or measure a quantum bit string, and each quantum state preparation base has a corresponding quantum state preparation base identifier;

所述第一动态交互验证信息包括所述客户端选择的至少一种量子态制备基的量子态制备基标识;The first dynamic interactive verification information includes a quantum state preparation base identifier of at least one quantum state preparation base selected by the client;

所述第二动态交互验证信息生成单元202包括:The second dynamic interaction verification information generating unit 202 includes:

第一服务端量子查询子单元,用于根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A first server-side quantum query subunit is configured to search for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第一服务端比特串生成子单元,用于采用所述量子态制备基生成第一量子比特串;A first server-side bit string generation subunit, configured to generate a first quantum bit string using the quantum state preparation basis;

第一服务端验证信息生成子单元,用于生成包含所述第一量子比特串的第二动态交互验证信息。The first server-side verification information generation subunit is used to generate second dynamic interactive verification information containing the first quantum bit string.

可选的,所述第二动态交互验证信息发送单元203包括:Optionally, the second dynamic interaction verification information sending unit 203 includes:

第一量子比特串发送子单元,用于将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first quantum bit string sending subunit is used to send the first quantum bit string to the client using the quantum state preparation basis.

可选的,所述第一动态交互验证信息还包括第一量子比特串长度;Optionally, the first dynamic interactive verification information further includes the length of the first quantum bit string;

所述第二动态交互验证信息生成单元202包括:The second dynamic interaction verification information generating unit 202 includes:

第二服务端量子查询子单元,用于根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A second server-side quantum query subunit is configured to search for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第二服务端比特串生成子单元,用于根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;A second server-side bit string generation subunit is configured to generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

第二十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;A second decimal conversion subunit, configured to convert the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

第二服务端验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The second server-side verification information generation subunit is used to generate second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string.

可选的,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;Optionally, the server and the client both pre-store the same quantum string length database, and the first dynamic interactive verification information further includes a first quantum bit string length code;

所述第二动态交互验证信息生成单元202包括:The second dynamic interaction verification information generating unit 202 includes:

第三服务端量子查询子单元,根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;A third server-side quantum query subunit searches for a corresponding quantum state preparation basis in a quantum state library according to the quantum state preparation basis identifier;

第三服务端长度查询子单元,根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;a third server-side length query subunit, searching the quantum string length database for a corresponding first quantum bit string length according to the first quantum bit string length code;

第三服务端比特串生成子单元,用于根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;A third server-side bit string generation subunit is configured to generate a first quantum bit string using the quantum state preparation basis according to the length of the first quantum bit string;

第三十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;A third decimal conversion subunit, configured to convert the first quantum bit string into a decimal first quantum bit string according to a decimal conversion method;

第三服务端验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The third server-side verification information generation subunit is used to generate second dynamic interactive verification information including the first quantum bit string and the decimal first quantum bit string.

可选的,所述第三动态交互验证信息包括所述客户端测量所述第二动态交互验证信息时采用的量子态的量子位标识以及比特值测量结果;Optionally, the third dynamic interactive verification information includes a quantum bit identifier and a bit value measurement result of the quantum state used by the client when measuring the second dynamic interactive verification information;

所述第三动态交互验证信息判断单元205包括:The third dynamic interaction verification information judgment unit 205 includes:

服务端第一量子串测量子单元,用于采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;A server-side first quantum string measurement subunit, configured to measure the bit value of the first quantum bit string using the quantum state corresponding to the quantum bit identifier to obtain a server-side bit value measurement result;

服务端测量比较子单元,用于比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The server-side measurement comparison subunit is configured to compare the bit value measurement result with the server-side bit value measurement result, and determine whether the client has passed the authentication based on whether the comparison result meets a preset judgment condition.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client according to the quantum state preparation base identifier and the second quantum bit string length selected by the server;

所述第三动态交互验证信息判断单元205包括:The third dynamic interaction verification information judgment unit 205 includes:

第一服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;A first server-side bit string measurement subunit is configured to measure the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

第一服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。The first server-side measurement and judgment subunit is used to determine whether the client has passed the authentication based on whether the second quantum bit value measurement result meets expectations.

可选的,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;Optionally, the second dynamic interactive verification information further includes a quantum state preparation base identifier of the quantum state preparation base selected by the server and a length of the second quantum bit string;

所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes a second quantum bit string generated by the client according to the quantum state preparation basis identifier and the length of the second quantum bit string selected by the server, and a decimal second quantum bit string obtained by performing decimal conversion on the second quantum bit string;

所述第三动态交互验证信息判断单元205包括:The third dynamic interaction verification information judgment unit 205 includes:

第二服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;A second server-side bit string measurement subunit is configured to measure the bit value of the second quantum bit string using the quantum state preparation basis selected by the server to obtain a second quantum bit value measurement result;

第二服务端十进制转换子单元,用于将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;A second server-side decimal conversion subunit is configured to convert the decimal second quantum bit string into a converted second quantum bit string according to a decimal conversion method;

第二服务端长度判断子单元,用于测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;The second server-side length determination subunit is configured to measure the length of the second quantum bit string and obtain a second quantum bit string length measurement result;

第二服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。The second server-side measurement and judgment subunit is used to judge whether the server has passed the authentication based on whether the second quantum bit value measurement result meets expectations and whether the second quantum bit string length measurement result meets expectations.

可选的,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。Optionally, the quantum state library of the server is synchronized with the quantum state library of the client and is changed regularly according to a predetermined rule.

可选的,所述第一动态交互验证信息包括客户端的身份标识;Optionally, the first dynamic interaction verification information includes an identity identifier of the client;

所述第二动态交互验证信息生成单元202包括:The second dynamic interaction verification information generating unit 202 includes:

初步认证子单元,用于根据所述客户端的身份标识对所述客户端进行初步认证;A preliminary authentication subunit, configured to perform preliminary authentication on the client according to the identity identifier of the client;

第二动态交互验证信息生成子单元,用于若初步认证通过,则根据所述第一动态交互验证信息生成第二动态交互验证信息。The second dynamic interaction verification information generating subunit is configured to generate second dynamic interaction verification information according to the first dynamic interaction verification information if the preliminary authentication is passed.

可选的,所述客户端的身份标识包括客户端的用户识别码和身份证书。Optionally, the client's identity includes a user identification code and an identity certificate of the client.

可选的,所述第二动态交互验证信息发送单元203包括:Optionally, the second dynamic interaction verification information sending unit 203 includes:

加密第二动态交互验证信息发送子单元,用于将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。The encrypted second dynamic interaction verification information sending subunit is configured to encrypt all or part of the second dynamic interaction verification information with a key and then send the encrypted information to the server.

可选的,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the key and the key used for decryption by the client are symmetric quantum keys of each other, or are public-private keys of each other.

可选的,所述第一动态交互验证信息接收单元201包括:Optionally, the first dynamic interaction verification information receiving unit 201 includes:

加密第一动态交互验证信息接收子单元,用于接收客户端发送的至少部分信息已加密的第一动态交互验证信息;The encrypted first dynamic interaction verification information receiving subunit is configured to receive the first dynamic interaction verification information sent by the client, at least part of which is encrypted;

第一动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密;A first dynamic interactive authentication information decryption subunit, configured to decrypt the encrypted portion of information using a decryption key corresponding to the key used for encryption by the client;

所述第二动态交互验证信息发送单元204包括:The second dynamic interaction verification information sending unit 204 includes:

加密第三动态交互验证信息接收子单元,用于接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;an encrypted third dynamic interaction verification information receiving subunit, configured to receive third dynamic interaction verification information generated based on the second dynamic interaction verification information, at least part of which is encrypted and sent by the client;

第三动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The third dynamic interactive verification information decryption subunit is used to decrypt the encrypted part of the information using a decryption key corresponding to the key used for encryption by the client.

可选的,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。Optionally, the decryption key and the key used for encryption on the client are symmetric quantum keys of each other, or are public-private keys of each other.

以上,为本申请提供的一种用于服务端的认证装置的实施例。The above is an embodiment of an authentication device for a server provided by this application.

本申请还提供一种用于客户端的认证终端设备,包括:This application also provides an authentication terminal device for a client, including:

中央处理器;CPU;

输入输出单元;Input and output units;

存储器;Memory;

所述存储器中存储有本申请提供的用于客户端的认证方法;并在启动后能够根据上述方法运行。The memory stores the authentication method for the client provided in this application; and can run according to the above method after startup.

由于本用于客户端的认证终端设备使用上述用于客户端的认证方法,相关之处请参见上述用于客户端的认证方法的实施例说明,此处不再赘述。Since the authentication terminal device for the client uses the above-mentioned authentication method for the client, relevant details can be found in the description of the embodiment of the above-mentioned authentication method for the client, which will not be repeated here.

本申请还提供一种用于服务端的认证终端设备,包括:This application also provides an authentication terminal device for a server, including:

中央处理器;CPU;

输入输出单元;Input and output units;

存储器;Memory;

所述存储器中存储有本申请提供的用于服务端的认证方法;并在启动后能够根据上述方法运行。The memory stores the authentication method for the server provided in this application; and can run according to the above method after startup.

由于本用于服务端的认证终端设备使用上述用于服务端的认证方法,相关之处请参见上述用于服务端的认证方法的实施例说明,此处不再赘述。Since the authentication terminal device for the server uses the above-mentioned authentication method for the server, please refer to the embodiment description of the above-mentioned authentication method for the server for related matters, which will not be repeated here.

本申请还提供了一种用于用户认证的系统,包括客户端和服务端,所述客户端配置有本申请提供的用于客户端的认证装置,所述服务端配置有本申请提供的用于服务端的认证装置。The present application also provides a system for user authentication, including a client and a server, wherein the client is configured with the authentication device for the client provided in the present application, and the server is configured with the authentication device for the server provided in the present application.

由于本系统的客户端配置有本申请提供的用于客户端的认证装置,服务端配置有本申请提供的用于服务端的认证装置,因此相关之处请参见上述用于客户端的认证装置的实施例说明以及用于服务端的认证装置的实施例说明,此处不再赘述。Since the client of this system is configured with the authentication device for the client provided in this application, and the server is configured with the authentication device for the server provided in this application, for relevant matters, please refer to the above-mentioned embodiment description of the authentication device for the client and the embodiment description of the authentication device for the server, which will not be repeated here.

本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims (81)

1.一种用于客户端的认证方法,其特征在于,包括:1. An authentication method for a client, characterized in that it includes: 生成第一动态交互验证信息;Generate the first dynamic interactive verification information; 将所述第一动态交互验证信息发送至服务端;Send the first dynamic interactive verification information to the server; 接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息;Receive the second dynamic interaction verification information generated by the server based on the first dynamic interaction verification information; 根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息;The server is judged to be legitimate based on the second dynamic interaction verification information, and a third dynamic interaction verification information is generated based on the second dynamic interaction verification information. 若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证;If valid, the third dynamic interaction verification information is sent to the server so that the server can determine whether the client has passed authentication based on the third dynamic interaction verification information. 其中,所述第一动态交互验证信息、第二动态交互验证信息和第三动态交互验证信息采用量子态处理,所述第一动态交互验证信息包括:量子制备基标识和第一量子比特串长度;所述第二动态交互验证信息包括:根据所述第一量子比特串长度,通过所述量子态制备基标识在量子态库中查询的量子态制备基,生成的第一量子比特串;所述第三动态交互验证信息包括:随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量获得的比特值测量结果。The first, second, and third dynamic interactive verification information are processed using quantum state methods. The first dynamic interactive verification information includes a quantum preparation base identifier and a first qubit string length. The second dynamic interactive verification information includes a first qubit string generated by querying a quantum state preparation base in a quantum state library based on the first qubit string length and the quantum state preparation base identifier. The third dynamic interactive verification information includes a bit value measurement result obtained by randomly selecting a quantum state of the quantum state preparation base to measure the bit value of the first qubit string. 2.根据权利要求1所述的用于客户端的认证方法,其特征在于,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的;2. The authentication method for a client according to claim 1, characterized in that both the client and the server pre-store corresponding or identical information processing methods, and the processing result of the client on the dynamic interactive verification information according to the information processing method is corresponding or identical to the processing result of the server on the dynamic interactive verification information; 所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate based on the second dynamic interactive verification information includes: 根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期判断所述服务端是否合法。The second dynamic interactive verification information is processed according to a pre-stored information processing method, and the legitimacy of the server is determined based on whether the processing result meets expectations. 3.根据权利要求2所述的用于客户端的认证方法,其特征在于,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;3. The authentication method for a client according to claim 2, characterized in that multiple sets of corresponding or identical information processing methods are pre-stored on both the client and the server, and each set of information processing methods has a corresponding or identical information processing method identifier on both the client and the server; 所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier; 所述根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法的步骤,包括:The step of processing the second dynamic interactive verification information according to a pre-stored information processing method and determining whether the server is legitimate based on the processing result includes: 根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;Query the corresponding pre-stored information processing method based on the information processing method identifier in the first dynamic interactive verification information; 根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果是否符合预期判断所述服务端是否合法。The second dynamic interactive verification information is processed according to the information processing method, and the legitimacy of the server is determined based on whether the processing result meets expectations. 4.根据权利要求3所述的用于客户端的认证方法,其特征在于,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更。4. The authentication method for a client according to claim 3, wherein the information processing method identifier is synchronized between the client and the server and is changed periodically. 5.根据权利要求1所述的用于客户端的认证方法,其特征在于,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,5. The authentication method for a client according to claim 1, characterized in that both the client and the server pre-store the same quantum state library containing quantum state preparation bases, wherein the quantum state preparation bases are used to prepare or measure quantum bit strings, and each quantum state preparation base has a corresponding quantum state preparation base identifier. 所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate based on the second dynamic interactive verification information includes: 采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;根据所述比特值测量结果是否符合预期判断所述服务端是否合法。The bit values of the first qubit string are measured using the quantum state preparation base corresponding to the quantum state preparation base identifier to obtain the bit value measurement results; the legitimacy of the server is determined based on whether the bit value measurement results meet expectations. 6.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述生成第一动态交互验证信息的步骤,包括:6. The authentication method for a client according to claim 5, wherein the step of generating the first dynamic interactive verification information includes: 从量子态库中选择至少一种量子态制备基;Prepare a basis by selecting at least one quantum state from the quantum state library; 提取所述量子态制备基的量子态制备基标识;Extract the quantum state preparation basis identifier of the quantum state preparation basis; 生成包含所述量子态制备基标识的第一动态交互验证信息。Generate first dynamic interactive verification information containing the quantum state preparation basis identifier. 7.根据权利要求6所述的用于客户端的认证方法,其特征在于,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,每一次认证选择的量子态制备基均不相同。7. The authentication method for a client according to claim 6, wherein the selection of at least one quantum state preparation basis from the quantum state library is carried out in a random manner, and the quantum state preparation basis selected for each authentication is different. 8.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述第一量子比特串通过所述量子态制备基发送至客户端。8. The authentication method for a client according to claim 5, wherein the first quantum bit string is sent to the client via the quantum state preparation basis. 9.根据权利要求7所述的用于客户端的认证方法,其特征在于,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;9. The authentication method for a client according to claim 7, wherein the second dynamic interactive verification information further includes a decimal first qubit string obtained by converting the first qubit string into decimal; 所述根据所述第二动态交互验证信息判断所述服务端是否合法的步骤,包括:The step of determining whether the server is legitimate based on the second dynamic interactive verification information includes: 采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;The bit value of the first qubit string is measured using the quantum state preparation base corresponding to the quantum state preparation base identifier to obtain the bit value measurement result; 将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;The decimal first quantum bit string is converted into a converted first quantum bit string using a decimal conversion method; 测量所述第一量子比特串的长度,获得比特串长度测量结果,其中所述第一量子比特串的长度是根据所述第一量子比特串长度生成的;The length of the first qubit string is measured to obtain the bit string length measurement result, wherein the length of the first qubit string is generated based on the length of the first qubit string. 根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。The legitimacy of the server is determined based on whether the bit value measurement result and the bit string length measurement result meet expectations. 10.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息10. The authentication method for a client according to claim 5, characterized in that both the client and the server pre-store the same quantum string length database, and the first dynamic interactive verification information... 还包括第一量子比特串长度代码;It also includes the code for the length of the first quantum bit string; 所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating the first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and sending the first quantum bit string to the client through the quantum state preparation base. 11.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量的步骤,包括:11. The authentication method for a client according to claim 5, characterized in that the step of measuring the bit value of the first qubit string using a quantum state preparation basis corresponding to the quantum state preparation basis identifier includes: 在量子态库中查找与所述量子态制备基标识对应的量子态制备基;Search the quantum state preparation base in the quantum state library for the quantum state preparation base identifier; 随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The bit value of the first qubit string is measured by randomly selecting a quantum state of the quantum state preparation basis. 12.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的代码及第二量子比特串长度;12. The authentication method for a client according to claim 5, wherein the second dynamic interactive verification information further includes the code of the quantum state preparation basis selected by the server and the length of the second quantum bit string; 所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,包括:The step of generating third dynamic interaction verification information based on the second dynamic interaction verification information includes: 在量子态库中查询与所述服务端选择的量子态制备基的代码相对应的量子态制备基;Search the quantum state library for the quantum state preparation base corresponding to the code of the quantum state preparation base selected by the server; 根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;Based on the length of the second qubit string, a second qubit string is generated using the quantum state preparation basis; 生成包含所述第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information containing the second qubit string. 13.根据权利要求12所述的用于客户端的认证方法,其特征在于,所述根据所述第二动态交互验证信息生成第三动态交互验证信息的步骤,还包括:将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;13. The authentication method for a client according to claim 12, wherein the step of generating third dynamic interactive verification information based on the second dynamic interactive verification information further includes: converting the second quantum bit string according to a decimal conversion method to obtain a decimal second quantum bit string; 所述生成包含所述第二量子比特串的第三动态交互验证信息的步骤,包括:The step of generating third dynamic interactive verification information containing the second qubit string includes: 生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。Generate third dynamic interactive verification information containing the second qubit string and the decimal second qubit string. 14.根据权利要求12或13所述的用于客户端的认证方法,其特征在于,所述若合法,则将所述第三动态交互验证信息发送至服务端的步骤,包括:14. The authentication method for a client according to claim 12 or 13, characterized in that the step of sending the third dynamic interactive verification information to the server if valid includes: 若合法,则将所述第二量子比特串采用所述量子态制备基发送至服务端。If valid, the second qubit string is sent to the server using the quantum state preparation basis. 15.根据权利要求5所述的用于客户端的认证方法,其特征在于,所述客户端的量子态库与所述服务端的量子态库同步且按照预定的规则定时变更。15. The authentication method for a client according to claim 5, wherein the quantum state library of the client is synchronized with the quantum state library of the server and is changed periodically according to a predetermined rule. 16.根据权利要求1所述的用于客户端的认证方法,其特征在于,所述第一动态交互验证信息包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证。16. The authentication method for a client according to claim 1, wherein the first dynamic interactive verification information includes the client's identity identifier, and the identity identifier is used by the server to perform preliminary authentication of the client. 17.根据权利要求16所述的用于客户端的认证方法,其特征在于,所述客户端的身份标识包括客户端的用户识别码和身份证书。17. The authentication method for a client according to claim 16, wherein the client's identity identifier includes the client's user identification code and identity certificate. 18.根据权利要求1所述的用于客户端的认证方法,其特征在于,所述将所述第一动态交互验证信息发送至服务端的步骤,包括:18. The authentication method for a client according to claim 1, wherein the step of sending the first dynamic interactive verification information to the server includes: 将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;All or part of the first dynamic interactive verification information is encrypted with a key and then sent to the server. 所述若合法,则将所述第三动态交互验证信息发送至服务端的步骤,包括:If the verification is valid, the step of sending the third dynamic interactive verification information to the server includes: 若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。If valid, all or part of the third dynamic interactive verification information will be encrypted with a key and sent to the server. 19.根据权利要求18所述的用于客户端的认证方法,其特征在于,所述密钥与所述服务端解密使用的密钥互为对称量子密钥,或互为公私密钥。19. The authentication method for a client according to claim 18, wherein the key and the key used for decryption by the server are symmetric quantum keys or public-private keys. 20.根据权利要求1所述的用于客户端的认证方法,其特征在于,所述接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息的步骤,包括:20. The authentication method for a client according to claim 1, wherein the step of receiving the second dynamic interaction verification information generated based on the first dynamic interaction verification information sent by the server includes: 接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;Receive at least partially encrypted second dynamic interaction verification information generated based on the first dynamic interaction verification information sent by the server; 采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted information is decrypted using a decryption key corresponding to the key used for encryption on the server. 21.根据权利要求20所述的用于客户端的认证方法,其特征在于,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。21. The authentication method for a client according to claim 20, wherein the decryption key and the encryption key used by the server are symmetric quantum keys or public-private keys. 22.一种用于客户端的认证装置,其特征在于,包括:22. An authentication device for a client, characterized in that it comprises: 第一动态交互验证信息生成单元,用于生成第一动态交互验证信息,所述第一动态交互验证信息包括:量子制备基标识和第一量子比特串长度;The first dynamic interactive verification information generation unit is used to generate first dynamic interactive verification information, which includes: quantum preparation base identifier and first quantum bit string length; 第一动态交互验证信息发送单元,用于将所述第一动态交互验证信息发送至服务端;The first dynamic interactive verification information sending unit is used to send the first dynamic interactive verification information to the server. 第二动态交互验证信息接收单元,用于接收所述服务端发送的根据所述第一动态交互验证信息生成的第二动态交互验证信息,所述第二动态交互验证信息包括:根据所述第一量子比特串长度,通过所述量子态制备基标识在量子态库中查询的量子态制备基,生成的第一量子比特串;The second dynamic interactive verification information receiving unit is used to receive the second dynamic interactive verification information generated by the server based on the first dynamic interactive verification information. The second dynamic interactive verification information includes: the first quantum bit string generated by querying the quantum state preparation base in the quantum state library according to the length of the first quantum bit string through the quantum state preparation base identifier. 第二动态交互验证信息验证单元,用于根据所述第二动态交互验证信息判断所述服务端是否合法,以及根据所述第二动态交互验证信息生成第三动态交互验证信息,所述第三动态交互验证信息包括:随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量获得的比特值测量结果;The second dynamic interactive verification information verification unit is used to determine whether the server is legitimate based on the second dynamic interactive verification information, and to generate third dynamic interactive verification information based on the second dynamic interactive verification information. The third dynamic interactive verification information includes: bit value measurement results obtained by randomly selecting the quantum state of the quantum state preparation basis to measure the bit value of the first quantum bit string. 第三动态交互验证信息发送单元,用于若合法,则将所述第三动态交互验证信息发送至服务端,以供所述服务端根据所述第三动态交互验证信息判断所述客户端是否通过认证。The third dynamic interaction verification information sending unit is used to send the third dynamic interaction verification information to the server if it is valid, so that the server can determine whether the client has passed the authentication based on the third dynamic interaction verification information. 23.根据权利要求22所述的用于客户端的认证装置,其特征在于,客户端和所述服务端上均预先存储有相应的或相同的信息处理方法,所述客户端根据所述信息处理方法对动态交互验证信息的处理结果与所述服务端对所述动态交互验证信息的处理结果是相应的或相同的;23. The authentication device for a client according to claim 22, wherein both the client and the server pre-store corresponding or identical information processing methods, and the processing result of the client on the dynamic interactive verification information according to the information processing method is corresponding or identical to the processing result of the server on the dynamic interactive verification information; 所述第二动态交互验证信息验证单元包括:The second dynamic interactive verification information verification unit includes: 处理判断子单元,用于根据预先存储的信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing and judgment subunit is used to process the second dynamic interactive verification information according to the pre-stored information processing method, and to determine whether the server is legitimate based on the processing result. 24.根据权利要求23所述的用于客户端的认证装置,其特征在于,所述客户端和所述服务端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述客户端和所述服务端上均具有相应或相同的信息处理方法标识;24. The authentication device for a client according to claim 23, wherein both the client and the server pre-store multiple sets of corresponding or identical information processing methods, and each set of information processing methods has a corresponding or identical information processing method identifier on both the client and the server; 所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier; 所述处理判断子单元,包括:The processing and judgment subunit includes: 处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查询对应的预先存储的信息处理方法;The processing method query subunit is used to query the corresponding pre-stored information processing method based on the information processing method identifier in the first dynamic interactive verification information. 处理方法处理子单元,用于根据所述信息处理方法对所述第二动态交互验证信息进行处理,根据处理结果判断所述服务端是否合法。The processing method processing subunit is used to process the second dynamic interactive verification information according to the information processing method, and to determine whether the server is legitimate based on the processing result. 25.根据权利要求24所述的用于客户端的认证装置,其特征在于,所述信息处理方法标识在所述客户端与所述服务端之间同步且定时变更。25. The authentication device for a client according to claim 24, wherein the information processing method identifier is synchronized between the client and the server and is changed periodically. 26.根据权利要求22所述的用于客户端的认证装置,其特征在于,客户端和所述服务端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识,26. The authentication device for a client according to claim 22, characterized in that both the client and the server pre-store the same quantum state library containing quantum state preparation bases, the quantum state preparation bases being used to prepare or measure quantum bit strings, and each quantum state preparation base having a corresponding quantum state preparation base identifier. 所述第二动态交互验证信息验证单元包括:The second dynamic interactive verification information verification unit includes: 第一量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;The first quantum measurement subunit is used to measure the bit value of the first quantum bit string using a quantum state preparation base corresponding to the quantum state preparation base identifier, and obtain the bit value measurement result; 第一量子判断子单元,用于根据所述比特值测量结果是否符合预期判断所述服务端是否合法。The first quantum judgment subunit is used to determine whether the server is legitimate based on whether the bit value measurement result meets expectations. 27.根据权利要求26所述的用于客户端的认证装置,其特征在于,所述第一动态交互验证信息生成单元包括:27. The authentication device for a client according to claim 26, wherein the first dynamic interactive verification information generation unit comprises: 第一制备基选择子单元,用于从量子态库中选择至少一种量子态制备基;The first preparation basis selector is used to select at least one quantum state preparation basis from the quantum state library; 第一标识提取子单元,用于提取所述量子态制备基的量子态制备基标识;The first identifier extraction subunit is used to extract the quantum state preparation base identifier of the quantum state preparation base; 第一动态交互验证信息生成子单元,用于生成包含所述量子态制备基标识的第一动态交互验证信息。The first dynamic interactive verification information generation subunit is used to generate first dynamic interactive verification information containing the quantum state preparation base identifier. 28.根据权利要求27所述的用于客户端的认证装置,其特征在于,所述从量子态库中选择至少一种量子态制备基采用随机选择的方式,每一次认证选择的量子态制备基均不相同。28. The authentication device for a client according to claim 27, wherein the selection of at least one quantum state preparation base from the quantum state library is carried out in a random manner, and the quantum state preparation base selected for each authentication is different. 29.根据权利要求26所述的用于客户端的认证装置,其特征在于,29. The authentication device for a client according to claim 26, characterized in that, 所述第一量子比特串通过所述量子态制备基发送至客户端。The first qubit string is sent to the client via the quantum state preparation basis. 30.根据权利要求29所述的用于客户端的认证装置,其特征在于,所述第二动态交互验证信息还包括将所述第一量子比特串进行十进制转换后获得的十进制第一量子比特串;30. The authentication device for a client according to claim 29, wherein the second dynamic interactive verification information further includes a decimal first qubit string obtained by converting the first qubit string into decimal; 所述第二动态交互验证信息验证单元包括:The second dynamic interactive verification information verification unit includes: 第二量子测量子单元,用于采用与所述量子态制备基标识对应的量子态制备基对所述第一量子比特串的比特值进行测量,获得比特值测量结果;The second quantum measurement subunit is used to measure the bit value of the first quantum bit string using a quantum state preparation base corresponding to the quantum state preparation base identifier, and obtain the bit value measurement result; 第二转换子单元,用于将所述十进制第一量子比特串按照十进制转换方法转换为转换后的第一量子比特串;The second conversion subunit is used to convert the decimal first quantum bit string into a converted first quantum bit string according to the decimal conversion method; 第二长度测量子单元,用于测量所述第一量子比特串的长度,获得比特串长度测量结果,其中所述第一量子比特串的长度是根据所述第一量子比特串长度生成的;The second length measurement subunit is used to measure the length of the first qubit string and obtain the bit string length measurement result, wherein the length of the first qubit string is generated based on the length of the first qubit string. 第二判断子单元,用于根据所述比特值测量结果是否符合预期和所述比特串长度测量结果是否符合预期判断所述服务端是否合法。The second judgment subunit is used to determine whether the server is legitimate based on whether the bit value measurement result meets expectations and whether the bit string length measurement result meets expectations. 31.根据权利要求26所述的用于客户端的认证装置,其特征在于,所述客户端与所述服务端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;31. The authentication device for a client according to claim 26, wherein the client and the server both have the same quantum string length database pre-stored, and the first dynamic interactive verification information further includes a first quantum bit string length code; 所述第二动态交互验证信息包括所述服务端根据所述量子态制备基标识在量子态库中查询相应的量子态制备基、根据所述第一量子比特串长度代码在量子串长度数据库中查询相应的第一量子比特串长度,然后根据所述第一量子比特串长度通过所述量子态制备基生成第一量子比特串,所述第一量子比特串通过所述量子态制备基发送至客户端。The second dynamic interactive verification information includes the server querying the corresponding quantum state preparation base in the quantum state library according to the quantum state preparation base identifier, querying the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code, and then generating the first quantum bit string through the quantum state preparation base according to the first quantum bit string length, and sending the first quantum bit string to the client through the quantum state preparation base. 32.根据权利要求26所述的用于客户端的认证装置,其特征在于,所述第一量子测量子单元包括:32. The authentication device for a client according to claim 26, wherein the first quantum measurement subunit comprises: 第一量子查询子单元,用于在量子态库中查找与所述量子态制备基标识对应的量子态制备基;The first quantum query subunit is used to search for the quantum state preparation base corresponding to the quantum state preparation base identifier in the quantum state library; 第一随机测量子单元,用于随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量。The first random measurement subunit is used to randomly select the quantum state of the quantum state preparation basis to measure the bit value of the first quantum bit string. 33.根据权利要求26所述的用于客户端的认证装置,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基标识及第二量子比特串长度;33. The authentication device for a client according to claim 26, wherein the second dynamic interactive verification information further includes the quantum state preparation base identifier selected by the server and the second quantum bit string length; 所述第二动态交互验证信息验证单元包括:The second dynamic interactive verification information verification unit includes: 第二量子查询子单元,用于在量子态库中查询与所述服务端选择的量子态制备基标识相对应的量子态制备基;The second quantum query subunit is used to query the quantum state library for a quantum state preparation base corresponding to the quantum state preparation base identifier selected by the server. 第二量子制备子单元,用于根据所述第二量子比特串长度,通过所述量子态制备基生成第二量子比特串;The second quantum preparation subunit is used to generate the second quantum bit string according to the length of the second quantum bit string through the quantum state preparation basis; 第三信息生成子单元,用于生成包含所述第二量子比特串的第三动态交互验证信息。The third information generation subunit is used to generate third dynamic interactive verification information containing the second qubit string. 34.根据权利要求33所述的用于客户端的认证装置,其特征在于,所述第二动态交互验证信息验证单元还包括:34. The authentication device for a client according to claim 33, wherein the second dynamic interactive verification information verification unit further comprises: 十进制转换子单元,用于将所述第二量子比特串按照十进制转换方法进行转换,获得十进制第二量子比特串;The decimal conversion subunit is used to convert the second quantum bit string according to the decimal conversion method to obtain the decimal second quantum bit string; 所述第三信息生成子单元包括:The third information generation subunit includes: 十进制第三信息生成子单元,用于生成包含所述第二量子比特串和所述十进制第二量子比特串的第三动态交互验证信息。The decimal third information generation subunit is used to generate third dynamic interactive verification information containing the second qubit string and the decimal second qubit string. 35.根据权利要求33或34所述的用于客户端的认证装置,其特征在于,所述第三动态交互验证信息发送单元包括:35. The authentication device for a client according to claim 33 or 34, characterized in that the third dynamic interactive verification information sending unit comprises: 第三动态交互验证信息量子发送子单元,用于若合法,则将所述第二量子比特串采用所述量子态制备基发送至服务端。The third dynamic interactive verification information quantum transmission subunit is used to send the second quantum bit string to the server using the quantum state preparation basis if it is valid. 36.根据权利要求26所述的用于客户端的认证装置,其特征在于,所述客户端的量子态库与所述服务端的量子态库同步且按照预定的规则定时变更。36. The authentication device for a client according to claim 26, wherein the quantum state library of the client is synchronized with the quantum state library of the server and is changed periodically according to a predetermined rule. 37.根据权利要求22所述的用于客户端的认证装置,其特征在于,所述第一动态交互验证信息包括客户端的身份标识,所述身份标识用于服务端对所述客户端进行初步认证。37. The authentication device for a client according to claim 22, wherein the first dynamic interactive verification information includes the client's identity identifier, the identity identifier being used by the server to perform preliminary authentication of the client. 38.根据权利要求37所述的用于客户端的认证装置,其特征在于,所述客户端的身份标识包括客户端的用户识别码和身份证书。38. The authentication device for a client according to claim 37, wherein the client's identity identifier includes the client's user identification code and identity certificate. 39.根据权利要求22所述的用于客户端的认证装置,其特征在于,所述第一动态交互验证信息发送单元包括:39. The authentication device for a client according to claim 22, wherein the first dynamic interactive verification information sending unit comprises: 第一动态交互验证信息加密子单元,用于将全部或部分所述第一动态交互验证信息采用密钥加密后发送至服务端;The first dynamic interactive verification information encryption subunit is used to encrypt all or part of the first dynamic interactive verification information with a key and then send it to the server. 所述第三动态交互验证信息发送单元包括:The third dynamic interactive verification information sending unit includes: 第三动态交互验证信息加密子单元,用于若合法,则将全部或部分所述第三动态交互验证信息采用密钥加密后发送至服务端。The third dynamic interactive verification information encryption subunit is used to send all or part of the third dynamic interactive verification information to the server after encryption with a key if it is valid. 40.根据权利要求39所述的用于客户端的认证装置,其特征在于,所述密钥与所述服务端解密使用的密钥互为对称量子密钥,或互为公私密钥。40. The authentication device for a client according to claim 39, wherein the key and the key used for decryption by the server are symmetric quantum keys or public-private keys. 41.根据权利要求22所述的用于客户端的认证装置,其特征在于,所述第二动态交互验证信息接收单元包括:41. The authentication device for a client according to claim 22, wherein the second dynamic interactive verification information receiving unit comprises: 加密第二动态交互验证信息接收子单元,用于接收所述服务端发送的至少部分信息已加密的根据所述第一动态交互验证信息生成的第二动态交互验证信息;An encrypted second dynamic interaction verification information receiving subunit is used to receive second dynamic interaction verification information generated based on the first dynamic interaction verification information, which is at least partially encrypted by the server. 第二动态交互验证信息解密子单元,用于采用与所述服务端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The second dynamic interactive verification information decryption subunit is used to decrypt the encrypted information using a decryption key corresponding to the key used for encryption by the server. 42.根据权利要求41所述的用于客户端的认证装置,其特征在于,所述解密密钥与所述服务端加密使用的密钥互为对称量子密钥,或互为公私密钥。42. The authentication device for a client according to claim 41, wherein the decryption key and the key used for encryption by the server are symmetric quantum keys or public-private keys. 43.一种用于服务端的认证方法,其特征在于,包括:43. An authentication method for a server, characterized in that it includes: 接收客户端发送的第一动态交互验证信息;Receive the first dynamic interactive verification information sent by the client; 根据所述第一动态交互验证信息生成第二动态交互验证信息;Generate second dynamic interaction verification information based on the first dynamic interaction verification information; 将所述第二动态交互验证信息发送至所述客户端;Send the second dynamic interactive verification information to the client; 接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息;Receive the third dynamic interaction verification information generated based on the second dynamic interaction verification information sent by the client; 根据所述第三动态交互验证信息判断所述客户端是否通过认证;The client is determined to be authenticated based on the third dynamic interactive verification information. 其中,所述第一动态交互验证信息、第二动态交互验证信息和第三动态交互验证信息采用量子态处理,所述第一动态交互验证信息包括:量子制备基标识和第一量子比特串长度;所述第二动态交互验证信息包括:根据所述第一量子比特串长度,通过所述量子态制备基标识在量子态库中查询的量子态制备基,生成的第一量子比特串;所述第三动态交互验证信息包括:随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量获得的比特值测量结果。The first, second, and third dynamic interactive verification information are processed using quantum state methods. The first dynamic interactive verification information includes a quantum preparation base identifier and a first qubit string length. The second dynamic interactive verification information includes a first qubit string generated by querying a quantum state preparation base in a quantum state library based on the first qubit string length and the quantum state preparation base identifier. The third dynamic interactive verification information includes a bit value measurement result obtained by randomly selecting a quantum state of the quantum state preparation base to measure the bit value of the first qubit string. 44.根据权利要求43所述的用于服务端的认证方法,其特征在于,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;44. The authentication method for a server according to claim 43, characterized in that both the server and the client pre-store corresponding or identical information processing methods, and the processing result of the dynamic interactive verification information by the server according to the information processing method is corresponding or identical to the processing result of the dynamic interactive verification information by the client. 所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication based on the third dynamic interactive verification information includes: 采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interactive verification information is processed using an information processing method corresponding to or the same as that used for the client, and the client is judged to have passed authentication based on whether the processing result meets expectations. 45.根据权利要求44所述的用于服务端的认证方法,其特征在于,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;45. The authentication method for a server according to claim 44, wherein both the server and the client pre-store multiple sets of corresponding or identical information processing methods, and each set of information processing methods has a corresponding or identical information processing method identifier on both the server and the client; 所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier; 所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information based on the first dynamic interaction verification information includes: 根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;Find the corresponding information processing method based on the information processing method identifier in the first dynamic interactive verification information; 采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first dynamic interactive verification information is processed using the aforementioned information processing method to generate the second dynamic interactive verification information. 46.根据权利要求45所述的用于服务端的认证方法,其特征在于,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。46. The authentication method for a server according to claim 45, wherein the information processing method identifier is synchronized between the server and the client and is changed periodically. 47.根据权利要求43所述的用于服务端的认证方法,其特征在于,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识。47. The authentication method for a server according to claim 43, characterized in that both the server and the client pre-store the same quantum state library containing quantum state preparation bases, wherein the quantum state preparation bases are used to prepare qubit strings or measure qubit strings, and each quantum state preparation base has a corresponding quantum state preparation base identifier. 48.根据权利要求47所述的用于服务端的认证方法,其特征在于,所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:48. The authentication method for a server according to claim 47, wherein the step of sending the second dynamic interactive verification information to the client includes: 将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first qubit string is prepared using the quantum state and sent to the client. 49.根据权利要求47所述的用于服务端的认证方法,其特征在于,将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;49. The authentication method for a server according to claim 47, characterized in that the first quantum bit string is converted into a decimal first quantum bit string according to a decimal conversion method; 生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Generate second dynamic interactive verification information containing the first qubit string and the decimal first qubit string. 50.根据权利要求47所述的用于服务端的认证方法,其特征在于,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;50. The authentication method for a server according to claim 47, wherein the server and the client both have the same quantum string length database pre-stored, and the first dynamic interactive verification information further includes a first quantum bit string length code; 所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information based on the first dynamic interaction verification information includes: 根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;以及Search for the corresponding quantum state preparation base in the quantum state library based on the quantum state preparation base identifier; and 根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;The corresponding first qubit string length is searched in the quantum string length database according to the first qubit string length code; 根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;The first qubit string is generated using the quantum state preparation basis according to the length of the first qubit string; 将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;Convert the first qubit string into a decimal first qubit string using a decimal conversion method; 生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。Generate second dynamic interactive verification information containing the first qubit string and the decimal first qubit string. 51.根据权利要求47所述的用于服务端的认证方法,其特征在于,51. The authentication method for a server according to claim 47, characterized in that, 所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication based on the third dynamic interactive verification information includes: 采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;The bit value of the first qubit string is measured using the quantum state corresponding to the qubit identifier to obtain the server bit value measurement result; 比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The bit value measurement result is compared with the server bit value measurement result, and the client is judged to be authenticated based on whether the comparison result meets the preset judgment conditions. 52.根据权利要求47所述的用于服务端的认证方法,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;52. The authentication method for a server according to claim 47, wherein the second dynamic interactive verification information further includes the quantum state preparation base identifier of the quantum state preparation base selected by the server and the second quantum bit string length; 所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client based on the quantum state preparation base identifier and the second quantum bit string length selected by the server; 所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication based on the third dynamic interactive verification information includes: 采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;The bit value of the second qubit string is measured using the quantum state preparation basis selected by the server to obtain the measurement result of the second qubit value; 根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。The client's authentication is determined based on whether the measurement result of the second quantum bit value matches the expectation. 53.根据权利要求47所述的用于服务端的认证方法,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;53. The authentication method for a server according to claim 47, wherein the second dynamic interactive verification information further includes the quantum state preparation base identifier of the quantum state preparation base selected by the server and the length of the second quantum bit string; 所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client based on the quantum state preparation base identifier and the length of the second quantum bit string selected by the server, and the decimal second quantum bit string obtained by converting the second quantum bit string into decimal. 所述根据所述第三动态交互验证信息判断所述客户端是否通过认证的步骤,包括:The step of determining whether the client has passed authentication based on the third dynamic interactive verification information includes: 采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;The bit value of the second qubit string is measured using the quantum state preparation basis selected by the server to obtain the measurement result of the second qubit value; 将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;The decimal second qubit string is converted into a converted second qubit string using a decimal conversion method; 测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;Measure the length of the second qubit string to obtain the measurement result of the second qubit string length; 根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。The server is deemed to have passed authentication based on whether the measurement results of the second qubit value and the second qubit string length meet expectations. 54.根据权利要求47所述的用于服务端的认证方法,其特征在于,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。54. The authentication method for a server according to claim 47, wherein the quantum state library of the server is synchronized with the quantum state library of the client and is changed periodically according to a predetermined rule. 55.根据权利要求43所述的用于服务端的认证方法,其特征在于,所述第一动态交互验证信息包括客户端的身份标识;55. The authentication method for a server according to claim 43, wherein the first dynamic interactive verification information includes the client's identity identifier; 所述根据所述第一动态交互验证信息生成第二动态交互验证信息的步骤,包括:The step of generating second dynamic interaction verification information based on the first dynamic interaction verification information includes: 根据所述客户端的身份标识对所述客户端进行初步认证;The client is initially authenticated based on its identity identifier; 若初步认证通过,则根据所述第一动态交互验证信息生成第二动态交互验证信息。If the initial authentication is successful, then the second dynamic interaction verification information is generated based on the first dynamic interaction verification information. 56.根据权利要求55所述的用于服务端的认证方法,其特征在于,所述客户端的身份标识包括客户端的用户识别码和身份证书。56. The authentication method for a server according to claim 55, wherein the client's identity identifier includes the client's user identification code and identity certificate. 57.根据权利要求43所述的用于服务端的认证方法,其特征在于,所述将所述第二动态交互验证信息发送至所述客户端的步骤,包括:57. The authentication method for a server according to claim 43, wherein the step of sending the second dynamic interactive verification information to the client includes: 将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。All or part of the second dynamic interactive verification information is encrypted with a key and then sent to the server. 58.根据权利要求57所述的用于服务端的认证方法,其特征在于,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。58. The authentication method for a server according to claim 57, wherein the key and the key used by the client for decryption are symmetric quantum keys or public-private keys. 59.根据权利要求43所述的用于服务端的认证方法,其特征在于,所述接收客户端发送的第一动态交互验证信息的步骤,包括:59. The authentication method for a server according to claim 43, wherein the step of receiving the first dynamic interactive verification information sent by the client includes: 接收客户端发送的至少部分信息已加密的第一动态交互验证信息;Receive first dynamic interactive verification information sent by the client, at least part of which is encrypted; 采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密;The encrypted information is decrypted using a decryption key corresponding to the key used for encryption by the client. 所述接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息的步骤,包括:The step of receiving the third dynamic interaction verification information generated based on the second dynamic interaction verification information sent by the client includes: 接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;Receive at least partially encrypted third dynamic interaction verification information generated based on the second dynamic interaction verification information sent by the client; 采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The encrypted information is decrypted using a decryption key corresponding to the key used for encryption by the client. 60.根据权利要求59所述的用于服务端的认证方法,其特征在于,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。60. The authentication method for a server according to claim 59, wherein the decryption key and the key used for encryption by the client are symmetric quantum keys or public-private keys. 61.一种用于服务端的认证装置,其特征在于,包括:61. An authentication device for a server, characterized in that it comprises: 第一动态交互验证信息接收单元,用于接收客户端发送的第一动态交互验证信息,所述第一动态交互验证信息包括:量子制备基标识和第一量子比特串长度;The first dynamic interactive verification information receiving unit is used to receive the first dynamic interactive verification information sent by the client. The first dynamic interactive verification information includes: quantum preparation base identifier and first quantum bit string length. 第二动态交互验证信息生成单元,用于根据所述第一动态交互验证信息生成第二动态交互验证信息,所述第二动态交互验证信息包括:根据所述第一量子比特串长度,通过所述量子态制备基标识在量子态库中查询的量子态制备基,生成的第一量子比特串;The second dynamic interactive verification information generation unit is used to generate second dynamic interactive verification information based on the first dynamic interactive verification information. The second dynamic interactive verification information includes: a first quantum bit string generated based on the length of the first quantum bit string and a quantum state preparation base queried in the quantum state library through the quantum state preparation base identifier. 第二动态交互验证信息发送单元,用于将所述第二动态交互验证信息发送至所述客户端;The second dynamic interactive verification information sending unit is used to send the second dynamic interactive verification information to the client; 第三动态交互验证信息接收单元,用于接收所述客户端发送的根据所述第二动态交互验证信息生成的第三动态交互验证信息,所述第三动态交互验证信息包括:随机选择所述量子态制备基的量子态对所述第一量子比特串的比特值进行测量获得的比特值测量结果;The third dynamic interactive verification information receiving unit is used to receive the third dynamic interactive verification information generated based on the second dynamic interactive verification information sent by the client. The third dynamic interactive verification information includes: the bit value measurement result obtained by randomly selecting the quantum state of the quantum state preparation base to measure the bit value of the first quantum bit string. 第三动态交互验证信息判断单元,用于根据所述第三动态交互验证信息判断所述客户端是否通过认证。The third dynamic interaction verification information judgment unit is used to determine whether the client has passed authentication based on the third dynamic interaction verification information. 62.根据权利要求61所述的用于服务端的认证装置,其特征在于,服务端和所述客户端上均预先存储有相应的或相同的信息处理方法,所述服务端根据所述信息处理方法对动态交互验证信息的处理结果与所述客户端对所述动态交互验证信息的处理结果是相应的或相同的;62. The authentication device for a server according to claim 61, characterized in that both the server and the client have pre-stored corresponding or identical information processing methods, and the processing result of the dynamic interactive verification information by the server according to the information processing method is corresponding or identical to the processing result of the dynamic interactive verification information by the client. 所述第三动态交互验证信息判断单元包括:The third dynamic interactive verification information judgment unit includes: 第三动态交互验证信息处理子单元,用于采用与所述客户端相应的或相同的信息处理方法对所述第三动态交互验证信息进行处理,根据处理结果是否符合预期判断所述客户端是否通过认证。The third dynamic interactive verification information processing subunit is used to process the third dynamic interactive verification information using the same or corresponding information processing method as the client, and to determine whether the client has passed authentication based on whether the processing result meets expectations. 63.根据权利要求62所述的用于服务端的认证装置,其特征在于,所述服务端和所述客户端上均预先存储有多组相应的或相同的信息处理方法,且每组所述信息处理方法在所述服务端和所述客户端上均具有相应或相同的信息处理方法标识;63. The authentication device for a server according to claim 62, wherein both the server and the client pre-store multiple sets of corresponding or identical information processing methods, and each set of information processing methods has a corresponding or identical information processing method identifier on both the server and the client; 所述动态交互验证信息中包含有信息处理方法标识;The dynamic interactive verification information includes an information processing method identifier; 所述第二动态交互验证信息生成单元包括:The second dynamic interactive verification information generation unit includes: 处理方法查询子单元,用于根据所述第一动态交互验证信息中的信息处理方法标识查找对应的信息处理方法;The processing method query subunit is used to find the corresponding information processing method based on the information processing method identifier in the first dynamic interactive verification information. 第一信息处理子单元,用于采用所述信息处理方法对所述第一动态交互验证信息进行处理,生成第二动态交互验证信息。The first information processing subunit is used to process the first dynamic interactive verification information using the information processing method to generate the second dynamic interactive verification information. 64.根据权利要求63所述的用于服务端的认证装置,其特征在于,所述信息处理方法标识在所述服务端与所述客户端之间同步且定时变更。64. The authentication device for a server according to claim 63, wherein the information processing method identifier is synchronized between the server and the client and is changed periodically. 65.根据权利要求61所述的用于服务端的认证装置,其特征在于,服务端和所述客户端上均预先存储有相同的含有量子态制备基的量子态库,所述量子态制备基用于制备量子比特串或测量量子比特串,每个所述量子态制备基均有对应的量子态制备基标识。65. The authentication device for a server according to claim 61, characterized in that both the server and the client pre-store the same quantum state library containing quantum state preparation bases, the quantum state preparation bases being used to prepare qubit strings or measure qubit strings, and each quantum state preparation base having a corresponding quantum state preparation base identifier. 66.根据权利要求65所述的用于服务端的认证装置,其特征在于,所述第二动态交互验证信息发送单元包括:66. The authentication device for a server according to claim 65, wherein the second dynamic interactive verification information sending unit comprises: 第一量子比特串发送子单元,用于将所述第一量子比特串采用所述量子态制备基发送至所述客户端。The first quantum bit string transmitting subunit is used to transmit the first quantum bit string to the client using the quantum state preparation basis. 67.根据权利要求65所述的用于服务端的认证装置,其特征在于,67. The authentication device for a server according to claim 65, characterized in that, 所述第二动态交互验证信息生成单元包括:The second dynamic interactive verification information generation unit includes: 第二十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;The 20th decimal conversion subunit is used to convert the first quantum bit string into a decimal first quantum bit string according to the decimal conversion method; 第二服务端动态交互验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The second server-side dynamic interactive verification information generation subunit is used to generate second dynamic interactive verification information containing the first qubit string and the decimal first qubit string. 68.根据权利要求65所述的用于服务端的认证装置,其特征在于,所述服务端与所述客户端上均预先存储有相同的量子串长度数据库,所述第一动态交互验证信息还包括第一量子比特串长度代码;68. The authentication device for a server according to claim 65, wherein the server and the client both have the same quantum string length database pre-stored, and the first dynamic interactive verification information further includes a first quantum bit string length code; 所述第二动态交互验证信息生成单元包括:The second dynamic interactive verification information generation unit includes: 第三服务端量子查询子单元,根据所述量子态制备基标识在量子态库中查找相应的量子态制备基;The third server-side quantum query subunit searches for the corresponding quantum state preparation base in the quantum state library based on the quantum state preparation base identifier. 第三服务端长度查询子单元,根据所述第一量子比特串长度代码在所述量子串长度数据库中查找相应的第一量子比特串长度;The third server-side length query subunit searches for the corresponding first quantum bit string length in the quantum string length database according to the first quantum bit string length code. 第三服务端比特串生成子单元,用于根据所述第一量子比特串长度采用所述量子态制备基生成第一量子比特串;The third server bit string generation subunit is used to generate the first bit string using the quantum state preparation basis according to the length of the first bit string; 第三十进制转换子单元,用于将所述第一量子比特串按照十进制转换方法转换为十进制第一量子比特串;The 30th decimal conversion subunit is used to convert the first quantum bit string into a decimal first quantum bit string according to the decimal conversion method; 第三服务端动态交互验证信息生成子单元,用于生成包含所述第一量子比特串和所述十进制第一量子比特串的第二动态交互验证信息。The third server-side dynamic interactive verification information generation subunit is used to generate second dynamic interactive verification information containing the first qubit string and the decimal first qubit string. 69.根据权利要求65所述的用于服务端的认证装置,其特征在于,69. The authentication device for a server according to claim 65, characterized in that, 所述第三动态交互验证信息判断单元包括:The third dynamic interactive verification information judgment unit includes: 服务端第一量子串测量子单元,用于采用所述量子位标识对应的量子态测量所述第一量子比特串的比特值,获得服务端比特值测量结果;The server-side first quantum string measurement subunit is used to measure the bit value of the first quantum bit string using the quantum state corresponding to the quantum bit identifier, and obtain the server-side bit value measurement result; 服务端测量比较子单元,用于比较所述比特值测量结果与所述服务端比特值测量结果,根据比较结果是否符合预设的判断条件判断所述客户端是否通过认证。The server-side measurement comparison subunit is used to compare the bit value measurement result with the server-side bit value measurement result, and determine whether the client has passed authentication based on whether the comparison result meets the preset judgment conditions. 70.根据权利要求65所述的用于服务端的认证装置,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;70. The authentication device for a server according to claim 65, wherein the second dynamic interactive verification information further includes the quantum state preparation base identifier of the quantum state preparation base selected by the server and the second quantum bit string length; 所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client based on the quantum state preparation base identifier and the second quantum bit string length selected by the server; 所述第三动态交互验证信息判断单元包括:The third dynamic interactive verification information judgment unit includes: 第一服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;第一服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期判断所述客户端是否通过认证。The first server-side bit string measurement subunit is used to measure the bit value of the second qubit string using the quantum state preparation basis selected by the server, and obtain the second qubit value measurement result; the first server-side measurement judgment subunit is used to judge whether the client has passed authentication based on whether the second qubit value measurement result meets expectations. 71.根据权利要求65所述的用于服务端的认证装置,其特征在于,所述第二动态交互验证信息还包括所述服务端选择的量子态制备基的量子态制备基标识及第二量子比特串长度;71. The authentication device for a server according to claim 65, wherein the second dynamic interactive verification information further includes the quantum state preparation base identifier of the quantum state preparation base selected by the server and the second quantum bit string length; 所述第三动态交互验证信息包括所述客户端根据所述服务端选择的量子态制备基标识及第二量子比特串长度生成的第二量子比特串,以及将所述第二量子比特串进行十进制转换获得的十进制第二量子比特串;The third dynamic interactive verification information includes the second quantum bit string generated by the client based on the quantum state preparation base identifier and the length of the second quantum bit string selected by the server, and the decimal second quantum bit string obtained by converting the second quantum bit string into decimal. 所述第三动态交互验证信息判断单元包括:The third dynamic interactive verification information judgment unit includes: 第二服务端比特串测量子单元,用于采用所述服务端选择的量子态制备基对所述第二量子比特串的比特值进行测量,获得第二量子比特值测量结果;The second server bit string measurement subunit is used to measure the bit value of the second qubit string using the quantum state preparation basis selected by the server, and obtain the measurement result of the second qubit value; 第二服务端十进制转换子单元,用于将所述十进制第二量子比特串按照十进制转换方法转换为转换后的第二量子比特串;The second server-side decimal conversion subunit is used to convert the decimal second quantum bit string into a converted second quantum bit string according to the decimal conversion method; 第二服务端长度判断子单元,用于测量所述第二量子比特串的长度,获得第二量子比特串长度测量结果;The second server length determination subunit is used to measure the length of the second quantum bit string and obtain the length measurement result of the second quantum bit string. 第二服务端测量判断子单元,用于根据所述第二量子比特值测量结果是否符合预期和所述第二量子比特串长度测量结果是否符合预期判断所述服务端是否通过认证。The second server measurement and judgment subunit is used to determine whether the server has passed authentication based on whether the measurement result of the second qubit value meets expectations and whether the measurement result of the second qubit string length meets expectations. 72.根据权利要求65所述的用于服务端的认证装置,其特征在于,所述服务端的量子态库与所述客户端的量子态库同步且按照预定的规则定时变更。72. The authentication device for a server according to claim 65, wherein the quantum state library of the server is synchronized with the quantum state library of the client and is changed periodically according to a predetermined rule. 73.根据权利要求61所述的用于服务端的认证装置,其特征在于,所述第一动态交互验证信息包括客户端的身份标识;73. The authentication device for a server according to claim 61, wherein the first dynamic interactive verification information includes the client's identity identifier; 所述第二动态交互验证信息生成单元包括:The second dynamic interactive verification information generation unit includes: 初步认证子单元,用于根据所述客户端的身份标识对所述客户端进行初步认证;The preliminary authentication subunit is used to perform preliminary authentication on the client based on the client's identity identifier; 第二动态交互验证信息生成子单元,用于若初步认证通过,则根据所述第一动态交互验证信息生成第二动态交互验证信息。The second dynamic interactive verification information generation subunit is used to generate second dynamic interactive verification information based on the first dynamic interactive verification information if the initial authentication is successful. 74.根据权利要求73所述的用于服务端的认证装置,其特征在于,所述客户端的身份标识包括客户端的用户识别码和身份证书。74. The authentication device for a server according to claim 73, wherein the client's identity identifier includes the client's user identification code and identity certificate. 75.根据权利要求61所述的用于服务端的认证装置,其特征在于,所述第二动态交互验证信息发送单元包括:75. The authentication device for a server according to claim 61, wherein the second dynamic interactive verification information sending unit comprises: 加密第二动态交互验证信息发送子单元,用于将全部或部分所述第二动态交互验证信息采用密钥加密后发送至服务端。The encrypted second dynamic interaction verification information sending subunit is used to encrypt all or part of the second dynamic interaction verification information with a key and then send it to the server. 76.根据权利要求75所述的用于服务端的认证装置,其特征在于,所述密钥与所述客户端解密使用的密钥互为对称量子密钥,或互为公私密钥。76. The authentication device for a server according to claim 75, wherein the key and the key used by the client for decryption are symmetric quantum keys or public-private keys. 77.根据权利要求61所述的用于服务端的认证装置,其特征在于,所述第一动态交互验证信息接收单元包括:77. The authentication device for a server according to claim 61, wherein the first dynamic interactive verification information receiving unit comprises: 加密第一动态交互验证信息接收子单元,用于接收客户端发送的至少部分信息已加密的第一动态交互验证信息;The encrypted first dynamic interaction verification information receiving subunit is used to receive first dynamic interaction verification information sent by the client, in which at least part of the information is encrypted. 第一动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密;The first dynamic interactive verification information decryption subunit is used to decrypt the encrypted information using a decryption key corresponding to the key used by the client for encryption. 所述第三动态交互验证信息接收单元包括:The third dynamic interactive verification information receiving unit includes: 加密第三动态交互验证信息接收子单元,用于接收所述客户端发送的至少部分信息已加密的根据所述第二动态交互验证信息生成的第三动态交互验证信息;The encrypted third dynamic interaction verification information receiving subunit is used to receive the third dynamic interaction verification information generated based on the second dynamic interaction verification information, which is at least partially encrypted by the information sent by the client. 第三动态交互验证信息解密子单元,用于采用与所述客户端加密使用的密钥相对应的解密密钥对加密部分信息进行解密。The third dynamic interactive verification information decryption subunit is used to decrypt the encrypted information using a decryption key corresponding to the key used by the client for encryption. 78.根据权利要求77所述的用于服务端的认证装置,其特征在于,所述解密密钥与所述客户端加密使用的密钥互为对称量子密钥,或互为公私密钥。78. The authentication device for a server according to claim 77, wherein the decryption key and the key used for encryption by the client are symmetric quantum keys or public-private keys. 79.一种用于客户端的认证终端设备,其特征在于,包括:79. An authentication terminal device for a client, characterized in that it comprises: 中央处理器;CPU; 输入输出单元;Input/output unit; 存储器;Memory; 所述存储器中存储有权利要求1至权利要求21所述的任一用于客户端的认证方法的程序;并在启动后能够根据上述方法的程序运行。The memory stores a program for any of the authentication methods for clients as described in claims 1 to 21; and is able to run according to the program of the above method after startup. 80.一种用于服务端的认证终端设备,其特征在于,包括:80. An authentication terminal device for a server, characterized in that it comprises: 中央处理器;CPU; 输入输出单元;Input/output unit; 存储器;Memory; 所述存储器中存储有权利要求43至权利要求60所述的任一用于服务端的认证方法的程序;并在启动后能够根据上述方法的程序运行。The memory stores a program for any of the authentication methods for a server as described in claims 43 to 60; and is able to run according to the program of the above method after startup. 81.一种用于用户认证的系统,包括客户端和服务端,其特征在于,所述客户端配置有权利要求22至权利要求42所述的任一用于客户端的认证装置,所述服务端配置有权利要求61至权利要求78所述的任一用于服务端的认证装置。81. A system for user authentication, comprising a client and a server, characterized in that the client is configured with any of the authentication devices for the client as described in claims 22 to 42, and the server is configured with any of the authentication devices for the server as described in claims 61 to 78.
HK17111024.8A 2017-10-30 Authentication method, apparatus, terminal device and system HK1237156B (en)

Publications (3)

Publication Number Publication Date
HK1237156A1 HK1237156A1 (en) 2018-04-06
HK1237156A HK1237156A (en) 2018-04-06
HK1237156B true HK1237156B (en) 2021-08-13

Family

ID=

Similar Documents

Publication Publication Date Title
TWI690824B (en) Method, device, terminal equipment and system for authentication
US10389525B2 (en) Method, apparatus, and system for quantum key distribution, privacy amplification, and data transmission
US11477039B2 (en) Response-based cryptography using physical unclonable functions
CN105991285B (en) Identity authentication method, device and system for quantum key distribution process
KR102493744B1 (en) Security Verification Method Based on Biometric Characteristics, Client Terminal, and Server
US9736147B1 (en) Artificial intelligence encryption model (AIEM) with device authorization and attack detection (DAAAD)
US8132020B2 (en) System and method for user authentication with exposed and hidden keys
CN113691502B (en) Communication method, device, gateway server, client and storage medium
CN105187382B (en) Prevent from hitting the multiple-factor identity identifying method of storehouse attack
US12278901B2 (en) Systems and methods for registering or authenticating a user with a relying party
Giri et al. Efficient biometric and password based mutual authentication for consumer USB mass storage devices
Giri et al. A novel and efficient session spanning biometric and password based three-factor authentication protocol for consumer usb mass storage devices
CN106576047B (en) Method and apparatus for protecting cryptographic operations from malicious modification
WO2017074953A1 (en) Method and system for dynamic password authentication based on quantum states
CN112398657B (en) A PUF authentication method and device based on wireless multipath fading channel
Xu et al. A secure user anonymity-preserving biometrics and puf-based multiserver authentication scheme with key agreement in 5g networks
Sun et al. DNA-X: Dynamic network authentication using SGX
CN115426171A (en) Login password processing method and device, storage medium and electronic equipment
Murdoch et al. A Forward-secure Efficient Two-factor Authentication Protocol
KR102021956B1 (en) Smart card based authentication system, device and method
HK1237156A (en) Authentication method, apparatus, terminal device and system
HK1237156A1 (en) Authentication method, apparatus, terminal device and system
Guo et al. 2FA Communication Protocol to Secure Metro Control Devices
JP2019068392A (en) Certificate issuance and authentication system
Das et al. A simple and secure authentication and key establishment protocol