Identity authentication method and device, computer program product, and electronic device
By calculating shared session keys in the blockchain network, two-way identity authentication is decentralized in the cloud environment, solving the security risks of the key distribution process in traditional two-way authentication, and improving the security and efficiency of authentication.
Patent Information
- Application Number
- CN202410725404.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The traditional two-way authentication method has security risks in the session key distribution process in the cloud environment, resulting in low authentication security and poor reliability.
The shared session key is calculated through the public key in the blockchain network, and both parties calculate and verify the key separately, avoiding the key distribution process and achieving decentralized two-way identity authentication.
It improves the security and reliability of two-way identity authentication, simplifies the authentication process, enhances the efficiency of identity authentication, and avoids the risk of key leakage.
Smart Images

Figure CN118300902B
Abstract
Description
Background Art
[0002] Faced with the complex application environment in the cloud platform, the traditional authentication method based on username and password can no longer meet the security requirements of various authentication scenarios in the cloud environment. Bidirectional authentication is an important mechanism for conducting secure communication through two authentication fields. In bidirectional authentication, both parties need to authenticate their identities and determine their mutual trustworthiness.
[0003] When two-way authentication is performed in the related technology, the user and the authentication server first perform two-way authentication, and then a session key is generated for the session between the user and the registration node. During the entire process, there is a risk of the authentication server's key distribution process being attacked and a security risk of key leakage, so the security is low and the reliability is poor. Summary of the invention
[0004] The purpose of the present disclosure is to provide an identity authentication method, an identity authentication device, a computer program product and an electronic device, thereby overcoming the problem of low security of two-way identity authentication caused by the limitations and defects of related technologies at least to a certain extent.
[0005] According to one aspect of the present disclosure, there is provided an identity authentication method, including: determining a first shared session key between a user node and a cloud service node based on a public key of a cloud service node stored in a blockchain network, and obtaining user verification information based on the first shared session key and a first random number corresponding to the user node; receiving first decrypted data sent by the cloud service node obtained by decrypting the user verification information, and performing cloud service node verification based on the first decrypted data to obtain a cloud service verification result; when the cloud service verification result is a passed verification, determining second decrypted data based on the first shared session key of the user node and sending the data to the cloud service node, so that the cloud service node determines a two-way identity authentication result based on the second decrypted data and a second random number corresponding to the cloud service node.
[0006] In an exemplary embodiment of the present disclosure, determining a first shared session key between a user node and a cloud service node based on a public key of the cloud service node stored in a blockchain network includes: searching for the public key of the cloud service node in the blockchain network; and determining the first shared session key with the cloud service node based on a product of a private key of the user node and the public key of the cloud service node.
[0007] In an exemplary embodiment of the present disclosure, obtaining user verification information based on the first shared session key and a first random number corresponding to the user node includes: encrypting the first random number of the user node according to the first shared session key to generate the user verification information.
[0008] In an exemplary embodiment of the present disclosure, searching for the public key of the cloud service node in the blockchain network includes: obtaining the public key of the cloud service node from the blockchain network according to the identity information of the cloud service node, and obtaining the public key of the user node according to the identity information of the user node; wherein the public key is determined according to the private key of the cloud service node or the user node and a large prime number; the private key is determined according to a random number, a hash value, and a coordinate value of a point on a secure elliptic curve, and the hash value is obtained by processing the identity information of the cloud service node or the user node and the coordinate value of a point on the secure elliptic curve on the horizontal axis through a hash function.
[0009] In an exemplary embodiment of the present disclosure, the cloud service node verification is performed based on the first decrypted data to obtain a cloud service verification result, including: comparing the first decrypted data with a first random number to determine a first comparison result; if the first comparison result is that the first decrypted data is equal to the first random number, determining that the cloud service verification result is a passed verification; if the first comparison result is that the first decrypted data is not equal to the first random number, determining that the cloud service verification result is a failed verification.
[0010] In an exemplary embodiment of the present disclosure, determining the second decrypted data based on the first shared session key of the user node includes: encrypting a second random number based on the second shared session key of the cloud service node to generate cloud service verification information; and decrypting the cloud service verification information based on the first shared session key of the user node to obtain the second decrypted data.
[0011] In an exemplary embodiment of the present disclosure, the determining of the two-way identity authentication result based on the second decrypted data and the second random number corresponding to the cloud service node includes: comparing the second decrypted data with the second random number of the cloud service node to determine the second comparison result; if the second comparison result is that the second decrypted data and the second random number are equal, determining that the user verification result is verification passed, and the two-way identity authentication result is authentication passed; if the second comparison result is that the second decrypted data and the second random number are not equal, determining that the user verification result is verification failed, and the two-way identity authentication result is authentication failed.
[0012] According to one aspect of the present disclosure, there is provided an identity authentication device, including: a session key determination module, for determining a first shared session key between a user node and the cloud service node according to a public key of the cloud service node stored in a blockchain network, and obtaining user verification information based on the first shared session key and a first random number corresponding to the user node; a cloud service verification module, for receiving first decrypted data sent by the cloud service node obtained by decrypting the user verification information, and performing cloud service node verification according to the first decrypted data to obtain a cloud service verification result; a user verification module, for determining second decrypted data according to the first shared session key of the user node and sending the data to the cloud service node when the cloud service verification result is a passed verification, so that the cloud service node determines a two-way identity authentication result based on the second decrypted data and a second random number corresponding to the cloud service node.
[0013] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the identity authentication method described in any one of the above items is implemented.
[0014] According to one aspect of the present disclosure, there is provided an electronic device, including: a processor; and
[0015] A memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above-mentioned identity authentication methods by executing the executable instructions.
[0016] In the technical solution provided in the embodiments of the present disclosure, on the one hand, the first shared session key and user verification information can be determined by the public key of the cloud service node stored in the blockchain network, and then the first decrypted data for cloud service node verification can be determined according to the user verification information, and when the cloud service verification result is a passed verification, the second decrypted data can be determined according to the first shared session key of the user node, thereby realizing user node verification. Since the relevant parameters can be directly calculated according to the public key stored in the blockchain network to realize the two-way authentication of the user node and the cloud service node, there is no need to distribute the session key, which improves the security and reliability of the two-way authentication process. On the other hand, the two-way authentication is directly performed between the user node and the cloud service node, and the session key is calculated by the two parties of the authentication respectively, and there is no need to distribute the session key, which ensures the security of the authentication process, simplifies the process of the authentication operation, and improves the efficiency of the authentication.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0019] Figure 1 The system architecture diagram for implementing the identity authentication method in an embodiment of the present disclosure is schematically shown.
[0020] Figure 2 A flowchart of an identity authentication method in an embodiment of the present disclosure is schematically shown.
[0021] Figure 3 The flowchart of cloud service node verification and user node verification in the embodiment of the present disclosure is schematically shown.
[0022] Figure 4 The specific process flow diagram of two-way identity authentication in the embodiment of the present disclosure is schematically shown.
[0023] Figure 5 The block diagram of the identity authentication device in the embodiment of the present disclosure is schematically shown.
[0024] Figure 6 The block diagram of the electronic device according to the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0026] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0027] In some embodiments, two-way identity authentication can ensure the authenticity of the identities of both parties in communication. However, in the traditional two-way identity authentication process, certificates are required. The validity of the certificates needs to be verified by a trusted third party (CA). As a trusted third party, CA is also vulnerable to attacks. If CA is controlled by an attacker, it can issue certificates to any malicious website or user. Users cannot verify the identity of these malicious websites and users by verifying the CA signature, causing users to be deceived by phishing websites, etc., causing users to suffer economic losses and personal privacy information to be leaked. Therefore, there is a risk of session key leakage.
[0028] In other embodiments, when identity authentication is performed, the user and the authentication server first perform two-way authentication, and then a session key for the session between the user and the registration node is generated. There may be a security risk that the key distribution process of the authentication server may be attacked and the key may be leaked.
[0029] In order to solve the above technical problems, a system architecture capable of implementing the above identity authentication is provided in an embodiment of the present disclosure. Figure 1 The structure diagram of the system architecture is schematically shown in Figure 2. The decentralized blockchain network provides the key infrastructure (PKI) function, and uses the decentralized and traceable characteristics of the blockchain to achieve the decentralization of the two-way identity authentication process. The session key is obtained by the two parties through calculation to ensure the security of the authentication process. Figure 1 As shown in , the system architecture may include user nodes, blockchain networks, and cloud service nodes. Among them, the blockchain network can provide PKI (Public Key Infrastructure) and data integrity verification functions. The key infrastructure is mainly responsible for realizing the key distribution initialization function of user nodes and service nodes in the cloud environment. After completing the key distribution, the transaction information (identity information, address, public key, certificate) is submitted to the consensus service node to execute the consensus process and generate the authentication chain block. During the identity authentication process of the user and the cloud service node, the user node and the cloud service node will complete it through their own private key and the other party’s public key stored in the authentication chain block. There is no need for the participation of a trusted third party, and there is no need to distribute session keys, thus avoiding the security risk of key leakage that may exist in the process of distributing session keys.
[0030] Next, refer to Figure 2 The identity authentication method in the embodiment of the present disclosure is specifically described as shown in FIG.
[0031] In step S210, a first shared session key between the user node and the cloud service node is determined according to the public key of the cloud service node stored in the blockchain network, and user verification information is obtained based on the first shared session key and a first random number corresponding to the user node.
[0032] In the disclosed embodiment, the user node is first used as an example to illustrate. The user node can be a terminal device used by the user, and the terminal device can be any type of device as long as it can interact with the cloud service node. The cloud service node can be a service node that needs to be authenticated with the user node, for example, it can be a server or a node in other forms. The number of cloud service nodes can be one or more, which is determined according to actual needs. In order to ensure the security of the interaction, the user node needs to perform a two-way authentication process with the cloud service node. In the two-way authentication process, both parties need to perform identity authentication and determine their mutual trustworthiness. This authentication process ensures the true identity of both parties in the information transmission, and allows both parties to protect and control each other, so that communication can be carried out safely. Both parties can confirm the identity of the other party and protect the information exchanged between the two parties from man-in-the-middle attacks. Two-way authentication is more likely to occur between public network communications because the validity of the link between the client and the server may be attacked.
[0033] In some embodiments, two-way authentication can be performed between user nodes and cloud service nodes based on a blockchain network. Blockchain is a distributed ledger technology built by a series of network nodes. Blockchain data is stored in blocks in the form of transactions through a consensus mechanism, and then a chain structure composed of blocks. It has the characteristics of being tamper-proof, credible traceability, decentralization, de-trust, cryptographic algorithm security, and non-repudiation. Exemplarily, the blockchain network can be a decentralized blockchain network. The decentralized blockchain network provides a key infrastructure (PKI) function, which uses the decentralized and traceable characteristics of blockchain to achieve the decentralization of the two-way identity authentication process. The session key is obtained by the authentication parties through calculation to ensure the security of the authentication process.
[0034] In the disclosed embodiment, before the user node and the cloud service node perform two-way identity authentication, the blockchain network can perform a key distribution initialization function on the user node and the cloud service node. After the key distribution, the transaction information is submitted to the consensus service node to execute the consensus process and generate a blockchain block to store the public keys of the user node and the cloud service node in the blockchain network. The transaction information may include one or more of identity information, address, public key and certificate. Based on this, during the two-way identity authentication process, the user node and the cloud service node can jointly complete the two-way identity authentication through the private key they hold and the public key of the node that needs to be authenticated stored in the blockchain network. The two-way authentication can be performed directly between the user node and the cloud service node, avoiding the process of requiring the participation of a trusted third party and the distribution of session keys in the related technology, thereby improving the security of the authentication process.
[0035] During the initial key distribution process, the blockchain network can select a node as the key infrastructure through a consensus mechanism, and select a secure elliptic curve on the finite field Fq while ensuring that the discrete logarithm problem of the elliptic curve is difficult to solve. The consensus mechanism refers to the technical means and mechanism used to determine which participating node to record and ensure the completion of transactions. The consensus mechanism can effectively balance the relationship between efficiency and security in the application of blockchain technology.
[0036] After determining the secure elliptic curve, you can A base point P is selected from the above, and the order of the base point P is guaranteed to be a large prime number (i.e. a large prime number). The key infrastructure PKI generates a random number in a finite field. As the private key of the node, the public key of the node is obtained based on the product of the private key and the large prime number. , and submit the public key to the consensus service node to execute the consensus process, and generate blocks based on the consensus process and store them in the blockchain network. In addition, the blockchain network can also be responsible for generating ID information for user nodes and cloud service nodes, and distribute corresponding identity information IDs to each user node and cloud service node. .
[0037] On this basis, the blockchain network can distribute private keys to newly added user nodes U, and the identity of the newly added user node U is ID U The key infrastructure PKI in the blockchain network can first calculate the signature parameters about the user node U, which may include the private key of the user node and the new coordinates of the point on the secure elliptic curve .
[0038] In some embodiments, The new coordinates of the points on the secure elliptic curve can be represented by referring to formula (1) for calculation:
[0039] Formula (1)
[0040] in, Refers to the coordinates of a point on a secure elliptic curve, and P is used to represent a large prime number.
[0041] Used to represent the private key of a user node, the private key of the user node can be obtained by combining the product between a random number and a hash value and the coordinates of a point on a secure elliptic curve, and the private key of the user node can be stored locally. The hash value can be obtained by processing the identity information of the user node and the coordinate value of the point on the secure elliptic curve on the horizontal axis through a hash function. Specifically, the identity information of the user node can be connected with the coordinate axis of the point on the secure elliptic curve on the horizontal axis, and the characters obtained by the connection can be converted into an output value of a fixed length based on the hash function to obtain a hash value. Further, the random number and the hash value can be multiplied to obtain a product, and the product can be added to the coordinates of the point on the secure elliptic curve to obtain the private key of the user node. The hash function is used to compress the input data represented by the characters obtained by the connection into a summary, and its output is usually represented by a string of short random letters and numbers. Based on this, the private key of the user node can be calculated by formula (2):
[0042] Formula (2)
[0043] in, is the hash function, is the coordinate value of a point on the secure elliptic curve on the horizontal axis (x-axis), and || is a character connector. is the identity information. s is a random number. are the coordinates of a point on the secure elliptic curve.
[0044] The public key of the user node can be calculated by multiplying the private key of the user node by a large prime number, which can be specifically expressed as formula (3):
[0045] Formula (3)
[0046] After obtaining the public key and identity information of the user node, the transaction information such as the public key and identity information of the user node can be submitted to the consensus service node to execute the consensus process, and generate blocks to store the blocks in the blockchain network, thereby storing the public key of the user node in the blockchain network.
[0047] For the newly added cloud service node N, its initialization key distribution process and transaction information storage process are the same as those of the user node U. Exemplarily, the private key of the cloud service node can be obtained and stored locally, wherein the private key of the cloud service node can be obtained by logical processing based on the product of the random number and the hash value and the coordinates of the point on the security ellipse. Specifically, the identity information of the cloud service node can be connected with the coordinate point of the point on the security elliptic curve on the horizontal axis, and the connected characters are converted into a fixed-length output value based on the hash function to obtain the hash value. The specific calculation formula of the private key of the cloud service node can be shown in formula (2).
[0048] After obtaining the private key of the cloud service node, the public key of the cloud service node can be determined according to the product of the private key and a large prime number, as shown in formula (3). Furthermore, after obtaining the public key and identity information of the cloud service node, the public key and identity information, address, certificate and other transaction information of the cloud service node can be submitted to the consensus service node to execute the consensus process, and generate blocks to store the blocks in the blockchain network, thereby storing the public key of the cloud service node in the blockchain network.
[0049] For the blocks in the blockchain network, they can be chain-generated blocks. The newly generated blocks will be linked to the blocks generated last time through the consensus process. Each block can store transaction information, which is not specifically limited here.
[0050] After determining the private key and public key of the user node and the cloud service node, a two-way identity authentication process can be performed between the user node and the cloud service node. For the user node, firstly, a first random number corresponding to the user node can be generated according to a random number generation function. The first random number can be a random number associated with a timestamp and can change according to the change of the timestamp. The timestamp can be used to indicate the time node when the user performs an operation. The first random number can be, for example, a random number bound to a timestamp. The first random number can be, for example, a character obtained by connecting a random number and a timestamp, which can be expressed as For different user nodes, their first random numbers may be different. For the same user node, the first random numbers generated by different timestamps may also be different.
[0051] Furthermore, the user node can determine the first shared session key between the user node U and the cloud service node N by searching the public key of the cloud service node N stored in the blockchain network. Specifically, the public key corresponding to the cloud service node N can be searched from the blockchain network according to the identity information of the cloud service node N, and the first shared session key can be determined according to the product of the public key of the cloud service node and the private key of the user node. The first shared session key refers to the shared session key between the user node and the cloud service node calculated by the user node itself, which can be expressed as .in, is the private key of the user node, The public key used to represent the cloud service node. After calculating the first shared session key, user verification information can also be generated based on the first shared session key and the first random number of the user node. Specifically, the first random number of the user node can be encrypted based on the first shared session key to obtain the user verification information. The user verification information refers to the encrypted information generated by the user node for authenticating the cloud service node. The user verification information can be represented as When performing encryption, any suitable encryption algorithm may be used, and the encryption algorithm may be, for example, a symmetric encryption algorithm or other types of encryption algorithms. For example, the encryption algorithm may be 3DES (Triple Data Encryption Algorithm) or AES (Advanced Encryption Standard), etc., which are not specifically limited here.
[0052] After obtaining the first shared session key and user verification information, the user node can send an authentication request Request and user verification information to the cloud service node N that needs to perform a two-way authentication request. .
[0053] Next, in step S220, first decrypted data obtained by decrypting the user verification information and sent by the cloud service node is received, and cloud service node verification is performed according to the first decrypted data to obtain a cloud service verification result.
[0054] In the embodiment of the present disclosure, the user node sends the authentication request Request and the user verification information After sending it to the cloud service node, the cloud service node can respond to the authentication request, generate cloud service verification information and first decrypted data, and send the cloud service verification information and the first decrypted data to the user node, so that the user node can perform cloud service node verification based on the first decrypted data sent by the cloud service node to obtain a cloud service verification result.
[0055] In some embodiments, after receiving the authentication request, the cloud service node generates cloud service verification information and first decrypted data, including:
[0056] Cloud service node N generates a random number bound to the timestamp, which is the second random number The timestamp in the second random number refers to the time node when the cloud service node performs the operation, so the second random number is different from the first random number.
[0057] The cloud service node searches for the public key of the user node U in the blockchain network through the identity information of the user node. The cloud service node further determines the second shared session key with the user node U based on the product of the public key of the user node and the private key of the cloud service node. The second shared session key refers to the shared session key between the cloud service node and the user node calculated by the cloud service node, which can be expressed as .in, is the private key of the cloud service node, Used to represent the public key of the user's node.
[0058] After calculating the second shared session key, the cloud service node can determine the cloud service verification information based on the second shared session key and the second random number it has. Exemplarily, the second random number of the cloud service node can be encrypted according to the second shared session key to obtain encrypted data as the cloud service verification information. Specifically, the calculated cloud service verification information can be expressed as .
[0059] Furthermore, the cloud service node may calculate the first decrypted data according to the user verification information sent by the user node. Specifically, the cloud service node may decrypt the user verification information sent by the user node based on the second shared session key it has, and obtain the first decrypted data r. The first decrypted data may be expressed as After obtaining the cloud service verification information and the first decrypted data r, the cloud service node may send the cloud service verification information and the first decrypted data r to the user node, so that the user node performs cloud service node verification on the cloud service node.
[0060] After the user node receives the cloud service verification information and the first decrypted data sent by the cloud service node, the user node can perform cloud service node verification. When the user node performs cloud service node verification, the first decrypted data r can be compared with the first random number of the user node to obtain a first comparison result, and the cloud service verification result can be determined based on the first comparison result. Exemplarily, if the first comparison result is that the first decrypted data r is equal to the first random number, it can be determined that the cloud service verification result is verification passed, that is, the cloud service node verification is passed. If the first comparison result is that the first decrypted data r is not equal to the first random number, for example, r is greater than or less than the first random number, it can be considered that the cloud service verification result is verification failure, that is, the cloud service node verification failed.
[0061] In the disclosed embodiment, a first shared session key and a first decrypted data are calculated based on a public key of a cloud service node and a private key of a user node stored in a blockchain network, and the first decrypted data is then compared with a first random number corresponding to the user node. The cloud service verification result is directly determined based on the first comparison result. Since the cloud service node can be verified by parameters calculated by the user node and the cloud service node, the process of distributing session keys in related technologies is avoided, thereby improving the security and reliability of the cloud service node verification process.
[0062] Next, continue to refer to Figure 2 As shown in, in step S230, when the cloud service verification result is verification passed, the second decrypted data is determined according to the first shared session key of the user node and sent to the cloud service node, so that the cloud service node determines the two-way identity authentication result based on the second decrypted data and the second random number corresponding to the cloud service node.
[0063] In the embodiment of the present disclosure, when the cloud service verification result is verification passed, the user node can determine the second decrypted data based on the first shared session key it has. The second decrypted data can be used to verify the user node, and the second decrypted data can be determined based on the cloud service verification information, wherein the cloud service verification information used to determine the second decrypted data can be determined based on the second shared session key of the cloud service node. Exemplarily, the second random number of the cloud service node can be encrypted based on the second shared session key of the cloud service node to obtain the cloud service verification information, and the cloud service verification information can be decrypted based on the first shared session key of the user node to obtain the second decrypted data. The second decrypted data here can be expressed as Furthermore, the second decrypted data may be sent to the cloud service node as verification information of the user node, so that the cloud service node can verify the user node.
[0064] Based on this, after receiving the verification information of the user node sent by the user node, the cloud service node can determine the second comparison result between the second decrypted data and the second random number of the cloud service node, and determine the user verification result for the user node according to the second comparison result between the second decrypted data and the second random number. If the second comparison result is that the second decrypted data and the second random number are equal, the user verification result can be considered to be a passed verification; if the second comparison result is that the second decrypted data and the second random number are not equal, the user verification result can be considered to be a failed verification.
[0065] Furthermore, the result of the two-way identity authentication may be determined based on the cloud service verification result and the user verification result. Exemplarily, if the cloud service verification result is that the cloud service node has passed the verification, and the user verification result of the user node is that the verification has passed, then the result of the two-way identity authentication may be considered to be that the authentication has passed. If the cloud service verification result is that the cloud service node has passed the verification, then the verification process of the user node may continue to be performed, and when the user verification result of the user node is that the verification has failed, then the result of the two-way identity authentication may be considered to be that the authentication has failed. If the cloud service verification result is that the cloud service node has failed the verification, then there is no need to continue to perform the verification process of the user node, and at this time the result of the two-way identity authentication may be considered to be that the authentication has failed.
[0066] It should be noted that, when the cloud service verification result is a verification failure, the result of the two-way identity authentication can be directly determined as an authentication failure, without the need to decrypt the cloud service verification information of the cloud service node through the first shared session key of the user node to obtain the second decrypted data, nor is it necessary for the cloud service node to perform user node verification based on the second decrypted data and the second random number. In addition, the public key of the cloud service node can be re-acquired at intervals of a preset length, and the first shared session key of the cloud service node can be determined based on the private key of the user node and the public key, and then the first random number can be regenerated, and the user verification information can be obtained based on the first shared session key and the first random number corresponding to the user node, and the cloud service verification result can be determined based on the first decrypted data and the first random number obtained by decryption of the cloud service node. When the cloud service verification result is a verification pass, the user node verification process continues, which will not be repeated here.
[0067] When the cloud service verification result is a verification failure, the cloud service node can be replaced to perform cloud service node verification on the replaced cloud service node, and then perform user node verification to achieve a two-way identity authentication process between the user node and other cloud service nodes.
[0068] When the result of the two-way identity authentication between the user node and the cloud service node is authentication passed, it can be determined that both the cloud service node and the user node are trustworthy. After the identity authentication of both parties is completed, both the cloud service node and the user node can obtain the corresponding shared session key, that is, the cloud service node can obtain the first shared session key of the user node, and the user node can obtain the second shared session key of the cloud service node, and continue to perform encrypted communication between the user node and the cloud service node through the symmetric encryption algorithm, so as to realize secure communication between the user node and the cloud service node, and improve the communication security and reliability.
[0069] In the disclosed embodiment, when the cloud service verification result is verification passed, the cloud service verification information calculated based on the second shared session key and the second random number of the cloud service node is decrypted according to the first shared session key of the user node to obtain second decrypted data, and the calculated second decrypted data and the second random number of the cloud service node are compared to achieve user node verification. Two-way identity authentication can be achieved through parameters calculated by the user node and the communicating parties represented by the cloud service themselves and the public key stored in the blockchain network. Only the calculated verification information is transmitted instead of the session key, which avoids the process of distributing keys during two-way authentication in the related technology, avoids the risk of key leakage during the key distribution process, and improves the security of user node verification.
[0070] Figure 3 The flowchart of cloud service node verification and user node verification is schematically shown, refer to Figure 3 As shown in , it mainly includes the following steps:
[0071] In step S302, the first decrypted data sent by the cloud service node is obtained, and the first random number of the user node is obtained.
[0072] In step S304, it is determined whether the first decrypted data and the first random number are equal. If yes, the process goes to step S306; if no, the process ends.
[0073] In step S306, the user node decrypts the cloud service verification information according to its own first shared session key to determine the second decrypted data.
[0074] In step S308, the cloud service node determines whether the second decrypted data calculated by the user node and the second random number of the cloud service node are equal. If so, the process proceeds to step S310; if not, the process proceeds to step S312.
[0075] In step S310, it is determined that the result of the two-way identity authentication is authentication passed.
[0076] In step S312, it is determined that the result of the two-way identity authentication is authentication failure.
[0077] In the disclosed embodiment, when the cloud service verification result is that the cloud service node verification is passed, user node verification is performed, which can improve the reliability of two-way identity authentication.
[0078] Figure 4 The specific flow chart of two-way identity authentication is schematically shown in Figure 4As shown in , it includes a blockchain network, user nodes and cloud service nodes. The blockchain network may include multiple blocks, such as block i-1, block i and block i+1, etc. Each block can store transaction information such as identity information, address, public key and certificate. The two-way identity authentication between user nodes and cloud service nodes based on the blockchain network mainly includes the following steps:
[0079] In step S402, the transaction information of the user node and the cloud service node is stored in the blockchain network. The transaction information includes one or more of a public key, identity information, address, and certificate.
[0080] In step S404, the user node generates a first random number bound to a timestamp.
[0081] In step S406, the user node searches for the public key of the cloud service node in the blockchain network to calculate the first shared session key, and then encrypts the first random number according to the first shared session key to obtain user verification information.
[0082] In step S408, the user node sends the authentication request and user verification information to the cloud service node.
[0083] In step S410, the cloud service node generates a second random number, searches for the public key of the user node in the blockchain network to determine the second shared session key, encrypts the second random number based on the second shared session key to determine the cloud service verification information, and decrypts the user verification information to determine the first decrypted data.
[0084] In step S412, the cloud service verification information and the first decrypted data are sent to the user node.
[0085] In step S414, the user node determines whether the first decrypted data is equal to the first random number. If the first decrypted data is equal to the first random number, the cloud service verification information is decrypted according to the first shared session key it has to determine the second decrypted data.
[0086] In step S416, the second decrypted data is sent to the cloud service node.
[0087] In step S418, the cloud service node determines whether the second decrypted data is equal to the second random number. When the second decrypted data is equal to the second random number, the result of the two-way identity authentication is determined to be authentication passed.
[0088] The technical solution in the disclosed embodiment utilizes the decentralized and traceable characteristics of blockchain to achieve the decentralization of the two-way authentication process. The two-way authentication is directly performed between the user node and the cloud service node. The session key is calculated by the two parties to the authentication respectively. There is no need to distribute the session key, which avoids the security risks in the key distribution process and improves the security and reliability of the two-way authentication process. Blockchain technology is introduced into the traditional two-way authentication process, and a two-way authentication process based on the blockchain cloud environment is constructed. Through the blockchain consensus mechanism, elliptic curve technology, identity authentication and privacy protection, encryption and other technologies, the two parties to the authentication complete the two-way authentication and generate the transmission key, which simplifies the process of two-way authentication and improves the efficiency, feasibility and security of two-way authentication.
[0089] The present disclosure also provides an identity authentication device. Figure 5 As shown, the identity authentication device 500 mainly includes the following modules:
[0090] The session key determination module 501 is used to determine a first shared session key between the user node and the cloud service node according to the public key of the cloud service node stored in the blockchain network, and obtain user verification information based on the first shared session key and a first random number corresponding to the user node;
[0091] The cloud service verification module 502 is used to receive the first decrypted data sent by the cloud service node and obtained by decrypting the user verification information, and perform cloud service node verification according to the first decrypted data to obtain a cloud service verification result;
[0092] The user verification module 503 is used to determine the second decrypted data according to the first shared session key of the user node and send it to the cloud service node when the cloud service verification result is passed, so that the cloud service node determines the two-way identity authentication result based on the second decrypted data and the second random number corresponding to the cloud service node.
[0093] In an exemplary embodiment of the present disclosure, determining a first shared session key between a user node and a cloud service node based on a public key of the cloud service node stored in a blockchain network includes: searching for the public key of the cloud service node in the blockchain network; and determining the first shared session key with the cloud service node based on a product of a private key of the user node and the public key of the cloud service node.
[0094] In an exemplary embodiment of the present disclosure, obtaining user verification information based on the first shared session key and a first random number corresponding to the user node includes: encrypting the first random number of the user node according to the first shared session key to generate the user verification information.
[0095] In an exemplary embodiment of the present disclosure, searching for the public key of the cloud service node in the blockchain network includes: obtaining the public key of the cloud service node from the blockchain network according to the identity information of the cloud service node, and obtaining the public key of the user node according to the identity information of the user node; wherein the public key is determined according to the private key of the cloud service node or the user node and a large prime number; the private key is determined according to a random number, a hash value, and a coordinate value of a point on a secure elliptic curve, and the hash value is obtained by processing the identity information of the cloud service node or the user node and the coordinate value of a point on the secure elliptic curve on the horizontal axis through a hash function.
[0096] In an exemplary embodiment of the present disclosure, the cloud service node verification is performed based on the first decrypted data to obtain a cloud service verification result, including: comparing the first decrypted data with a first random number to determine a first comparison result; if the first comparison result is that the first decrypted data is equal to the first random number, determining that the cloud service verification result is a passed verification; if the first comparison result is that the first decrypted data is not equal to the first random number, determining that the cloud service verification result is a failed verification.
[0097] In an exemplary embodiment of the present disclosure, determining the second decrypted data based on the first shared session key of the user node includes: encrypting a second random number based on the second shared session key of the cloud service node to generate cloud service verification information; and decrypting the cloud service verification information based on the first shared session key of the user node to obtain the second decrypted data.
[0098] In an exemplary embodiment of the present disclosure, the determining of the two-way identity authentication result based on the second decrypted data and the second random number corresponding to the cloud service node includes: comparing the second decrypted data with the second random number of the cloud service node to determine the second comparison result; if the second comparison result is that the second decrypted data and the second random number are equal, determining that the user verification result is verification passed, and the two-way identity authentication result is authentication passed; if the second comparison result is that the second decrypted data and the second random number are not equal, determining that the user verification result is verification failed, and the two-way identity authentication result is authentication failed.
[0099] It should be noted that the specific details of each module in the above-mentioned identity authentication device have been described in detail in the corresponding identity authentication method, so they will not be repeated here.
[0100] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0101] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0102] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0103] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0104] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0105] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0106] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 610 can perform the following steps: Figure 2 Follow the steps shown in .
[0107] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0108] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0109] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0110] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface 650. In addition, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 through a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0111] It should be noted that, in some embodiments of the present disclosure, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the above method is implemented.
[0112] In one embodiment, a computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, and other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid state drive (SSD), and the like. Exemplarily, a computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory (Nand Flash), and the like. In one embodiment, a computer program product may be an intangible product containing a computer program. Exemplarily, a computer program product may be implemented as a virtual digital product, such as a digital file such as an executable file, an installation package, etc. storing a computer program.
[0113] The code of the computer program can be written in one or more programming languages. Programming languages such as C language, Java, C++, etc. The program code can be executed completely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (for example, through an Internet connection provided by an operator).
[0114] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program runs on the electronic device, its code is used to enable the electronic device to execute (more specifically, enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure.
[0115] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0116] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0117] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0118] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0119] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An identity authentication method, characterized in that: include: Searching for a public key of a cloud service node in a blockchain network, determining a first shared session key of the cloud service node according to a product of a private key of a user node and a public key of the cloud service node, and obtaining user verification information based on the first shared session key and a first random number corresponding to the user node; Receiving first decrypted data sent by the cloud service node obtained by decrypting the user verification information, and performing cloud service node verification according to the first decrypted data to obtain a cloud service verification result; When the cloud service verification result is that the verification is passed, second decrypted data is determined according to the first shared session key of the user node and sent to the cloud service node, so that the cloud service node compares the second decrypted data with the second random number of the cloud service node to determine a second comparison result; If the second comparison result is that the second decrypted data is equal to the second random number, it is determined that the user verification result is verification passed, and the two-way identity authentication result is authentication passed; If the second comparison result is that the second decrypted data is not equal to the second random number, it is determined that the user verification result is a verification failure, and the two-way identity authentication result is an authentication failure; The step of determining the second decrypted data according to the first shared session key of the user node includes: Encrypting the second random number according to the second shared session key of the cloud service node to generate cloud service verification information; The cloud service verification information is decrypted based on the first shared session key of the user node to obtain the second decrypted data.
2. The identity authentication method according to claim 1, characterized in that: The obtaining user verification information based on the first shared session key and a first random number corresponding to the user node includes: The first random number of the user node is encrypted according to the first shared session key to generate the user verification information.
3. The identity authentication method according to claim 1, characterized in that: The searching for the public key of the cloud service node in the blockchain network includes: Obtaining a public key of the cloud service node from the blockchain network according to the identity information of the cloud service node; Among them, the public key is determined according to the private key of the cloud service node and a large prime number; the private key is determined according to a random number, a hash value and the coordinate value of a point on a secure elliptic curve, and the hash value is obtained by processing the identity information of the cloud service node and the coordinate value of a point on the secure elliptic curve on the horizontal axis through a hash function.
4. The identity authentication method according to claim 1, characterized in that: The performing cloud service node verification according to the first decrypted data to obtain a cloud service verification result includes: Comparing the first decrypted data with the first random number to determine a first comparison result; If the first comparison result is that the first decrypted data is equal to the first random number, determining that the cloud service verification result is verification passed; If the first comparison result is that the first decrypted data is not equal to the first random number, it is determined that the cloud service verification result is a verification failure.
5. An identity authentication device according to any one of claims 1 to 4, characterized in that: include: A session key determination module, configured to search for a public key of a cloud service node in a blockchain network, determine a first shared session key of the cloud service node according to a product of a private key of a user node and the public key of the cloud service node, and obtain user verification information based on the first shared session key and a first random number corresponding to the user node; A cloud service verification module, configured to receive first decrypted data sent by the cloud service node obtained by decrypting the user verification information, and perform cloud service node verification according to the first decrypted data to obtain a cloud service verification result; A user verification module, configured to determine, when the cloud service verification result is a passed verification, second decrypted data according to a first shared session key possessed by the user node and send the second decrypted data to a cloud service node, so that the cloud service node compares the second decrypted data with a second random number of the cloud service node to determine a second comparison result; If the second comparison result is that the second decrypted data is equal to the second random number, it is determined that the user verification result is verification passed, and the two-way identity authentication result is authentication passed; If the second comparison result is that the second decrypted data is not equal to the second random number, it is determined that the user verification result is a verification failure, and the two-way identity authentication result is an authentication failure; The step of determining the second decrypted data according to the first shared session key possessed by the user node comprises: Encrypting the second random number according to the second shared session key of the cloud service node to generate cloud service verification information; The cloud service verification information is decrypted based on the first shared session key of the user node to obtain the second decrypted data.
6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the identity authentication method described in any one of claims 1 to 4 is implemented.
7. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the identity authentication method according to any one of claims 1 to 4 by executing the executable instructions.
