Login verification method and device, electronic equipment and computer readable storage medium

Through the two-way verification method and the blockchain distributed identity management system, combined with the trusted credential issuing agency, the security risk of single verification direction when the client logs in is solved, and high-reliability account verification and secure login are achieved.

CN119071007APending Publication Date: 2024-12-03THE PEOPLES BANK OF CHINA DIGITAL CURRENCY INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310652289.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-02
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Under the CS architecture, when the client logs in to the server, the verification direction is single and there are security risks. The existing technology has failed to effectively improve security.

Method used

Using a two-way verification method based on cryptography technology, the server signature identity identification and the target account signature identity identification are signed and validated, combined with the blockchain distributed identity management system and trusted credential issuing agency, to achieve the goal account and the server Two-factor verification.

Benefits of technology

Enhanced the security of client login to the server, ensure the credibility of the target account through multi-layer verification, reduce the risks of token credential hijacking and privacy information leakage, and improve the reliability of the overall verification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071007A_ABST
    Figure CN119071007A_ABST
Patent Text Reader

Abstract

The invention discloses a login verification method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: sending a login request based on a target account to a server; a server signature identity label sent by the server is received, and the server signature identity label is a signature identity label obtained when the server uses the server private key to sign the server identity label; verifying the server signature identity label according to the server public key to obtain a first verification result; under the condition that the first verification result is that the verification is passed, sending the target account signature identity identifier and the target account signature identity certificate to a server; and receiving a second verification result sent by the server, and logging in the server under the condition that the second verification result is that the verification is passed. According to the method and the device, the technical problems of single verification direction and potential safety hazards when the user logs in the server at the client in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a login verification method, device, electronic device and computer-readable storage medium. Background Art

[0002] Under the CS (Client-Server) architecture, there are many ways for the client to log in to the server, such as password, SMS, or token. These methods still have risks such as privacy information leakage and token credential hijacking. They are all traditional "what you know", "what you have", and "what you own". Moreover, the solutions are not based on cryptographic technology verification, so the security of related solutions still needs to be improved.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a login verification method, device, electronic device and computer-readable storage medium to at least solve the technical problem in the related art that when a user logs in to a server from a client, the verification direction is single and there are security risks.

[0005] According to one aspect of an embodiment of the present invention, a login verification method is provided, comprising: sending a login request based on a target account to a server; receiving a server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server using a server private key to sign the server identity; verifying the server signature identity according to a server public key to obtain a first verification result; if the first verification result is that the verification is passed, sending a target account signature identity and a target account signature identity credential to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using a target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using a private key of a trusted credential issuing institution; receiving a second verification result sent by the server, and if the second verification result is that the verification is passed, logging in to the server, wherein the second verification result is obtained by the server verifying the target account signature identity and the target account signature identity credential according to the target account public key and the trusted credential issuing institution public key.

[0006] Optionally, before sending the target account signature identity identifier and the target account signature identity credential to the server, it also includes: sending an authentication request based on the target account to a trusted credential issuing agency, so that the trusted credential issuing agency generates the target account identity credential corresponding to the target account, wherein the authentication request includes the identity information of the target account; and receiving the target account signature identity credential sent by the trusted credential issuing agency.

[0007] Optionally, before sending the target account-based login request to the server, it also includes: determining the target account public key and the target account private key of the target account; sending the target account public key to the blockchain distributed identity management system to generate the target account identity corresponding to the target account public key; and receiving the target account identity sent by the blockchain distributed identity management system.

[0008] Optionally, the method of obtaining the server public key includes at least one of the following: receiving the server public key sent by the server, receiving the server public key sent by the blockchain distributed identity management system.

[0009] According to one aspect of an embodiment of the present invention, a login verification method is provided, comprising: receiving a login request sent by a target client; in response to the login request, sending a server signature identity to the target client, so that the target client verifies the server signature identity based on a server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; when the first verification result is that the verification is passed, receiving a target account signature identity and a target account signature identity credential sent by the target client, wherein the target account signature identity is a signature identity obtained by signing the target account identity using a target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using a private key of a trusted credential issuing agency; verifying the target account signature identity based on the target account public key and the target account signature identity credential based on the public key of the trusted credential issuing agency to obtain a second verification result; and sending the second verification result to the target client.

[0010] Optionally, before receiving the login request sent by the target client, it also includes: determining the server public key and server private key of the server; inputting the server public key into the blockchain distributed identity management system to generate the server identity corresponding to the server public key; and receiving the server identity sent by the blockchain distributed identity management system.

[0011] Optionally, the method of obtaining the target account public key includes at least one of the following: receiving the target account public key sent by the target client, and receiving the target account public key sent by the blockchain distributed identity management system.

[0012] According to one aspect of an embodiment of the present invention, a login verification method is provided, comprising: a target client sends a login request based on a target account to a server; the server receives and responds to the login request sent by the target client, and sends a server signed identity to the target client, wherein the server signed identity is a signed identity obtained by signing the server identity using a server private key; the target client receives the server signed identity sent by the server, and verifies the server signed identity according to a server public key to obtain a first verification result; when the first verification result is that the verification is passed, the target client sends the target account signed identity and the target account signed identity credential to the server, wherein the target account signed identity is a signed identity obtained by signing the server identity using a server private key; The target account signature identifier is a signature identifier obtained by signing the target account identity identifier using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing agency; the server receives the target account signature identifier and the target account signature identity credential sent by the target client, and verifies the target account signature identifier and the target account signature identity credential according to the target account public key and the trusted credential issuing agency public key to obtain a second verification result; the server sends the second verification result to the target client; the target client receives the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0013] According to one aspect of an embodiment of the present invention, a login verification method is provided, comprising: receiving a target account public key, a server public key and a public key of a trusted certificate issuing agency; generating a target account identity identifier corresponding to the target account public key based on the target account public key, and generating a server identity identifier corresponding to the server public key based on the server public key, and generating a target account identity credential corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency; sending the target account identity identifier to a target client, and sending the server identity identifier to a server, and sending the target account identity credential to a trusted certificate issuing agency, so that the target client uses a target client private key to encrypt the target account identity identifier to obtain a target account signature identity identifier, so that the server uses a server private key to sign the server identity identifier to obtain a server signature identity identifier, and so that the trusted certificate issuing agency uses a trusted certificate issuing agency private key to sign the target account identity identifier to obtain a target account signature identity credential.

[0014] Optionally, it also includes: determining a first key-value correspondence, a second key-value correspondence, and a third key-value correspondence, wherein the first Key-Value correspondence stores the correspondence between the target account public key and the target account identity identifier corresponding to the target account public key, the second Key-Value correspondence stores the correspondence between the server public key and the server identity identifier corresponding to the server public key, and the third Key-Value correspondence stores the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency.

[0015] Optionally, determining a third Key-Value correspondence relationship includes: obtaining the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency; determining the third Key-Value correspondence relationship based on the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency, and the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency.

[0016] According to one aspect of an embodiment of the present invention, a login verification device is provided, comprising: a first sending module, configured to send a login request based on a target account to a server; a first receiving module, configured to receive a server signature identity identifier sent by the server, wherein the server signature identity identifier is a signature identity identifier obtained by the server using a server private key to sign the server identity identifier; a first verification module, configured to verify the server signature identity identifier according to a server public key to obtain a first verification result; a second sending module, configured to send a target account signature identity identifier and a target account signature identity credential to the server if the first verification result is a verification pass, wherein the target account signature identity identifier is a signature identity identifier obtained by using a target account private key to sign the target account identity identifier, and the target account signature identity credential is a signature identity credential obtained by using a private key of a trusted certificate issuing institution to sign the target account identity credential; a first login module, configured to receive a second verification result sent by the server, and if the second verification result is a verification pass, log in to the server, wherein the second verification result is obtained by the server verifying the target account signature identity identifier and the target account signature identity credential according to the target account public key and the trusted certificate issuing institution public key.

[0017] According to one aspect of an embodiment of the present invention, a login verification device is provided, comprising: a second receiving module, configured to receive a login request sent by a target client; a third sending module, configured to send a server signature identity to the target client in response to the login request, so that the target client verifies the server signature identity according to a server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; the third receiving module, configured to receive a target account signature identity and a target account signature identity credential sent by the target client when the first verification result is a verification pass, wherein the target account signature identity is a signature identity obtained by signing the target account identity using a target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using a private key of a trusted credential issuing institution; the second verification module, configured to verify the target account signature identity according to a target account public key and the target account signature identity credential according to a public key of a trusted credential issuing institution to obtain a second verification result; and the fourth sending module, configured to send the second verification result to the target client.

[0018] According to one aspect of an embodiment of the present invention, a login verification device is provided, comprising: a fifth sending module, for a target client to send a login request based on a target account to a server; a sixth sending module, for the server to receive and respond to the login request sent by the target client, and send a server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; a third verification module, for the target client to receive the server signature identity sent by the server, and verify the server signature identity according to the server public key to obtain a first verification result; a seventh sending module, for, when the first verification result is verification passed, the target client to send the target account signature identity and the target account signature identity credential to the server, wherein the target client The target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing agency; a fourth verification module, used for the server to receive the target account signature identity and the target account signature identity credential sent by the target client, and verify the target account signature identity according to the target account public key and the target account signature identity credential according to the public key of the trusted credential issuing agency to obtain a second verification result; an eighth sending module, used for the server to send the second verification result to the target client; a second login module, used for the target client to receive the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0019] According to one aspect of an embodiment of the present invention, a login verification device is provided, including: a fourth receiving module, used to receive a target account public key, a server public key and a public key of a trusted certificate issuing agency; a generating module, used to generate a target account identity corresponding to the target account public key based on the target account public key, and to generate a server identity corresponding to the server public key based on the server public key, and to generate a target account identity credential corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency; a ninth sending module, used to send the target account identity to a target client, and to send the server identity to a server, and to send the target account identity credential to a trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity to obtain a target account signature identity, so that the server uses the server private key to sign the server identity to obtain a server signature identity, and so that the trusted certificate issuing agency uses the private key of the trusted certificate issuing agency to sign the target account identity to obtain a target account signature identity credential.

[0020] According to one aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any of the above-mentioned login verification methods.

[0021] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned login verification methods.

[0022] In an embodiment of the present invention, a login request based on a target account is sent to a server through a target client, a server signature identity identifier sent back by the server is received, and then the server signature identity identifier is verified with the server public key in the target client to obtain a first verification result, thereby realizing the verification of the server by the target client. When the first verification result is a verification pass, that is, when the target client successfully verifies the server, the target account signature identity identifier and the target account signature identity certificate are sent to the server, and a second verification result sent by the server is received, that is, the server verifies the target account of the target client and also verifies the identity of the target account. When the second verification result is a verification pass, the target account on the target client is able to log in to the server, thereby solving the technical problem in the related technology that when the user logs in to the server from the client, the verification direction is single and there are security risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0024] Figure 1 is a flowchart of a login verification method 1 according to an embodiment of the present invention;

[0025] Figure 2 is a flowchart of a second login verification method according to an embodiment of the present invention;

[0026] Figure 3 is a flowchart of a third login verification method according to an embodiment of the present invention;

[0027] Figure 4 is a flowchart of a login verification method 4 according to an embodiment of the present invention;

[0028] Figure 5 is a timing diagram of a login verification method according to an embodiment of the present invention;

[0029] Figure 6 is a role diagram of a login verification method provided in an optional embodiment of the present invention;

[0030] Figure 7 is a structural block diagram of a login verification device 1 according to an embodiment of the present invention;

[0031] Figure 8 is a structural block diagram of a second login verification device according to an embodiment of the present invention;

[0032] Fig. 9 is a structural block diagram of a login verification device 3 according to an embodiment of the present invention;

[0033] Fig.10 2 is a structural block diagram of a login verification device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0037] Blockchain is a chain of blocks. Each block stores certain information, and they are connected into a chain in the order of their generation. This chain is stored in all servers. As long as there is one server in the entire system that can work, the entire blockchain is safe. These servers are called nodes in the blockchain system, and they provide storage space and computing power support for the entire blockchain system. If you want to modify the information in the blockchain, you must obtain the consent of more than half of the nodes and modify the information in all nodes. These nodes are usually in the hands of different entities, so it is extremely difficult to tamper with the information in the blockchain. Compared with traditional networks, blockchain has two core characteristics: one is that data is difficult to tamper with, and the other is decentralization. Based on these two characteristics, the information recorded in the blockchain is more authentic and reliable.

[0038] Digital wallets: There are two types of digital wallets: client-side and server-side (digital wallets), which refers to a collection of information and software - the software provides security for transaction processing, and the information includes payment information (for example, credit card number and expiration date) and delivery information.

[0039] Signature: Data encryption uses the recipient's key pair. Anyone who knows the recipient's public key can send a message to the recipient, but only those with the private key can decrypt it. The public key and private key are uniquely corresponding. Content signed with a public key can only be decrypted and verified with the corresponding private key.

[0040] Example

[0041] According to an embodiment of the present invention, an embodiment of a login verification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] Figure 1 is a flow chart of a login verification method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0043] Step S102, sending a login request based on the target account to the server;

[0044] Step S104, receiving a server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server using a server private key to sign the server identity;

[0045] Step S106, verifying the server signature identity according to the server public key to obtain a first verification result;

[0046] Step S108, when the first verification result is that the verification is passed, the target account signature identity and the target account signature identity certificate are sent to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution;

[0047] Step S110, receiving the second verification result sent by the server, and logging in to the server if the second verification result is passed, wherein the second verification result is obtained by the server verifying the target account signature identity based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency.

[0048] Through the above steps, for the target client side, the target client sends a login request based on the target account to the server, receives the server signature identity sent back by the server, and then verifies the server signature identity with the server public key in the target client to obtain the first verification result, thereby realizing the verification of the server by the target client. When the first verification result is that the verification is passed, that is, when the target client successfully verifies the server, the target account signature identity and the target account signature identity certificate are sent to the server, and the second verification result sent by the server is received, that is, the server verifies the target account of the target client and also verifies the identity of the target account. When the second verification result is that the verification is passed, the target account on the target client is able to log in to the server, thereby solving the technical problem in the related technology that when the user logs in to the server from the client, the verification direction is single and there are security risks.

[0049] As an optional embodiment, before sending a login request based on the target account to the server, it also includes the step of obtaining the target account identity. There are many ways to obtain the target account identity, for example: determine the target account public key and the target account private key of the target account, one target account corresponds to a target key pair, and the target key pair includes the above-mentioned target account public key and target account private key. The target account public key is input into the blockchain distributed identity management system to generate a target account identity corresponding to the target account public key, and the target account identity sent by the blockchain distributed identity management system is received. By using a distributed system of blockchain technology, the method of this optional embodiment has the advantages of high stability, high ease of use, low cost, and high privacy protection for data encryption.

[0050] As an optional embodiment, the target client sends a login request based on the target account to the server to implement the operation of the user using the target account to log in to the server from the target client. The target client receives the server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server using the server private key to sign the server identity. The target client obtains the server public key, verifies the server signature identity based on the server public key, and obtains a first verification result. The target client verifies the server.

[0051] It should be noted that the target client needs to obtain the server public key first. The target client can obtain the server public key in a variety of ways, for example, it can receive the server public key sent by the server, or it can receive the server public key sent by the blockchain distributed identity management system. It can be selected adaptively according to the actual application and scenario.

[0052] Optionally, after obtaining the first verification result, it can be set that if the first verification result is verification failure, it means that the target client fails to verify the server and cannot log in. If the first verification result is verification success, the verification on the other side is performed, that is, the server verifies the target client, and the target client sends the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is the signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is the signature identity certificate obtained by signing the target account identity certificate with the private key of the trusted certificate issuing agency, and the target client receives the second verification result sent by the server, wherein the second verification result is obtained by the server verifying the target account signature identity and the target account signature identity certificate based on the target account public key and the trusted certificate issuing agency public key. The server verifies the target client and the server verifies the target account identity. Through multi-layer verification, it is ensured that the target account on the target client is credible, thereby ensuring the security of the target account logging in to the server from the target client, and increasing the reliability of the entire process.

[0053] It should be noted that the second verification result is obtained by the server verifying the target account signature identity identifier based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency. That is, in this process, two verification steps are performed. One is the server's verification of the target client. The server verifies the target account signature identity identifier based on the target account public key, realizing the server's verification of the target client. At this point, the target client completes the two-way verification of the server and the server completes the target client. The other is to verify the credibility of the target account. The server verifies the target account signature identity certificate based on the public key of the trusted certificate issuing agency. On the basis of the two-way verification, an additional layer of target account identity credibility verification is added to ensure that the target account on the target client is credible, thereby ensuring the security of the target account logging in from the target client to the server, and increasing the reliability of the entire process. In this two-fold verification, it can be verified successively or synchronously, which is not limited here. If one verification fails in the two-fold verification, the second verification result of verification failure is obtained.

[0054] It should also be noted that the server needs to obtain the target account public key first. The server can obtain the target account public key in a variety of ways, such as receiving the target account public key sent by the target client or receiving the target account public key sent by the blockchain distributed identity management system. An adaptive selection can be made based on actual applications and scenarios.

[0055] As an optional embodiment, before sending the target account signature identity identifier and the target account signature identity certificate to the server, it also includes the step of obtaining the target account signature identity certificate. There are many ways to obtain the target account signature identity certificate, for example: sending an authentication request including the identity information of the target account to a trusted certificate issuing agency, wherein the authentication request can be an authentication request including the identity card information of the target account, to authenticate the target account, so that the trusted certificate issuing agency generates a target account identity certificate corresponding to the target account, and the trusted certificate issuing agency signs the target account identity certificate according to the private key of the trusted certificate issuing agency to obtain the target account signature identity certificate, and sends the target account signature identity certificate to the target client. The target client receives the target account identity certificate sent by the trusted certificate issuing agency. Among them, the trusted certificate issuing agency can be a generalized identity certificate issuing agency, or a third-party agency, and the target account identity certificate is the identity certificate issued by the broad identity certificate issuing agency to the target account to authenticate the identity of the target account or the identity attribute of the target account. Among them, the target account identity certificate can be set with a validity period and can be flexibly revoked to avoid the phenomenon that the target account can still be verified even if it has bad behavior such as breach of trust. Authentication of the target account by a trusted certificate issuing agency not only ensures the security of the target account, but also ensures the reliability of the target account logging into the server from the target client.

[0056] It should be noted that when obtaining the target account identity credentials, the target account identity credentials corresponding to the corresponding third-party agency can be obtained according to the specific application and scenario. Since different third-party agencies may authenticate the target account in different applications and scenarios, it is necessary to obtain the authentication of the corresponding third-party agency. Optionally, in businesses with stricter requirements and rigor, it is also possible to require the acquisition of identity credentials of multiple third-party agencies, that is, multiple trusted credential issuing agencies can be requested for identity authentication of the target account. Only when multiple identity credentials are authenticated can the target account log in to the server from the target client. Through the above steps, the scope of application of this application is expanded, and according to the actual application scenario and the importance of the business performed in the scenario, the authentication of a predetermined number of third-party agencies can be obtained to enhance the security of the target account logging in to the server from the target client.

[0057] Optionally, after obtaining the second verification result, it can be set that if the second verification result is verification failure, it means that the server fails to verify the target client and cannot log in. If the second verification result is verification success, the target account can log in to the server from the target client.

[0058] It should be noted that the server needs to obtain the public key of the trusted credential issuing agency first. The server can obtain the public key of the trusted credential issuing agency in a variety of ways, such as receiving the public key of the trusted credential issuing agency sent by the trusted credential issuing agency, and receiving the public key of the trusted credential issuing agency sent by the blockchain distributed identity management system. An adaptive selection can be made according to the actual application and scenario.

[0059] Figure 2 is a flow chart of a second login verification method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0060] Step S202, receiving a login request sent by a target client;

[0061] Step S204, in response to the login request, sending the server signature identity to the target client, so that the target client verifies the server signature identity according to the server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key;

[0062] Step S206, when the first verification result is that the verification is passed, receiving the target account signature identity and the target account signature identity certificate sent by the target client, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution;

[0063] Step S208, verifying the target account signature identity identifier and the target account signature identity certificate according to the target account public key and the public key of the trusted certificate issuing agency to obtain a second verification result;

[0064] Step S210, sending the second verification result to the target client.

[0065] Through the above steps, for the server side, by receiving the login request sent by the target client, in response to the login request, the server signature identity is sent to the target client, so that the target client verifies the server signature identity according to the server public key, obtains the first verification result, and realizes the verification of the server by the target client. When the first verification result is that the verification is passed, the target account signature identity and the target account signature identity certificate sent by the target client are received, the target account signature identity is verified according to the target account public key, and the target account signature identity certificate is verified according to the public key of the trusted certificate issuing agency, and the second verification result is obtained, that is, the server verifies the target client, and then sends the second verification result to the target client, so that when the second verification result is that the target client is verified, the target account on the target client logs in to the server, thereby solving the technical problem in the related technology that when the user logs in to the server from the client, the verification direction is single and there are security risks.

[0066] As an optional embodiment, before the server receives the login request sent by the target client, it also includes the step of receiving the server identity. There are many ways to obtain the server identity, for example: determine the server public key and server private key of the server, one server corresponds to a target key pair, and the target key pair includes the above-mentioned server public key and server private key. The server public key is input into the blockchain distributed identity management system to generate a server identity corresponding to the server public key, and the server identity sent by the blockchain distributed identity management system is received. By using the blockchain technology distributed system, the method of this optional embodiment has the advantages of high stability, high ease of use, low cost, and high privacy protection for data encryption.

[0067] As an optional embodiment, the server receives a login request sent by a target client to implement an operation in which a user uses a target account to log in to the server from the target client. In response to the login request, the server sends a server signature identifier to the target client, so that the target client verifies the server signature identifier based on the server public key to obtain a first verification result, wherein the server signature identifier is a signature identifier obtained by signing the server identifier using the server private key. The target client verifies the server.

[0068] It should be noted that the target client needs to obtain the server public key first. The target client can obtain the server public key in a variety of ways, for example, it can receive the server public key sent by the server, or it can receive the server public key sent by the blockchain distributed identity management system. It can be selected adaptively according to the actual application and scenario.

[0069] Optionally, after obtaining the first verification result, it can be set that if the first verification result is verification failure, it means that the target client fails to verify the server and cannot log in. If the first verification result is verification passing, the verification on the other side is performed, that is, the server verifies the target client, and the server receives the target account signature identity and target account signature identity certificate sent by the target client, wherein the target account signature identity is the signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is the signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing agency. The server obtains the target account public key, verifies the target account signature identity according to the target account public key, and verifies the target account signature identity certificate with the public key of the trusted certificate issuing agency to obtain the second verification result, and sends the second verification result to the target client. The server verifies the target client and the server verifies the target account identity. Among them, the target account identity certificate can be set with a validity period and can be flexibly revoked to avoid the phenomenon that the target account can still pass the verification even if there is bad behavior such as breach of trust. Therefore, on the basis of two-way verification, an additional layer of verification is added. Through multi-layer verification, it is ensured that the target account on the target client is trustworthy, thereby ensuring the security of the target account logging in from the target client to the server and increasing the reliability of the entire process.

[0070] It should be noted that the second verification result is obtained by the server verifying the target account signature identity identifier based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency. That is, in this process, two verification steps are performed. One is the server's verification of the target client. The server verifies the target account signature identity identifier based on the target account public key, realizing the server's verification of the target client. At this point, the target client completes the two-way verification of the server and the server completes the target client. The other is to verify the credibility of the target account. The server verifies the target account signature identity certificate based on the public key of the trusted certificate issuing agency. On the basis of the two-way verification, an additional layer of target account identity credibility verification is added to ensure that the target account on the target client is credible, thereby ensuring the security of the target account logging in from the target client to the server, and increasing the reliability of the entire process. In this two-fold verification, it can be verified successively or synchronously, which is not limited here. If one verification fails in the two-fold verification, the second verification result of verification failure is obtained.

[0071] It should also be noted that the server needs to obtain the target account public key first. The server can obtain the target account public key in a variety of ways, such as receiving the target account public key sent by the target client or receiving the target account public key sent by the blockchain distributed identity management system. An adaptive selection can be made based on actual applications and scenarios.

[0072] It should also be noted that the server needs to obtain the public key of the trusted credential issuing agency first. The server can obtain the public key of the trusted credential issuing agency in a variety of ways, such as receiving the public key of the trusted credential issuing agency sent by the trusted credential issuing agency, and receiving the public key of the trusted credential issuing agency sent by the blockchain distributed identity management system. An adaptive selection can be made according to the actual application and scenario.

[0073] Optionally, after obtaining the second verification result, it can be set that if the second verification result is verification failure, it means that the server fails to verify the target client and cannot log in. If the second verification result is verification success, the target account can log in to the server from the target client.

[0074] Figure 3 is a flowchart of a third login verification method according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0075] Step S302, the target client sends a login request based on the target account to the server;

[0076] Step S304: the server receives and responds to the login request sent by the target client, and sends a server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key;

[0077] Step S306, the target client receives the server signature identity sent by the server, and verifies the server signature identity according to the server public key to obtain a first verification result;

[0078] Step S308: When the first verification result is that the verification is passed, the target client sends the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution;

[0079] Step S310, the server receives the target account signature identity and the target account signature identity certificate sent by the target client, and verifies the target account signature identity and the target account signature identity certificate according to the target account public key and the public key of the trusted certificate issuing agency to obtain a second verification result;

[0080] Step S312, the server sends a second verification result to the target client;

[0081] Step S314: the target client receives the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0082] Through the above steps, for a system including a target client and a server, a login request based on a target account is sent to the server through the target client, the server receives and responds to the login request sent by the target client, sends a server signature identity to the target client, the target client receives the server signature identity sent by the server, and verifies the server signature identity according to the server public key, obtains a first verification result, and realizes the verification of the server by the target client. In the case where the first verification result is verification passed, the target client sends the target account signature identity to the server, the server receives the target account signature identity and the target account signature identity certificate sent by the target client, and verifies the target account signature identity according to the target account public key, and verifies the target account signature identity certificate with the public key of the trusted certificate issuing agency, and obtains a second verification result, that is, the server verifies the target account of the target client and the reliability of the user identity, the server sends the second verification result to the target client, the target client receives the second verification result sent by the server, and in the case where the second verification result is verification passed, the target client logs in to the server, which solves the technical problem of a single verification direction and potential security risks when the user logs in to the server from the client in the related technology.

[0083] As an optional embodiment, before the target client sends a login request based on the target account to the server, it also includes the step of obtaining the target account identity. There are many ways to obtain the target account identity, for example: determine the target account public key and the target account private key of the target account, one target account corresponds to a target key pair, and the target key pair includes the above-mentioned target account public key and target account private key. The target account public key is input into the blockchain distributed identity management system to generate a target account identity corresponding to the target account public key, and the target account identity sent by the blockchain distributed identity management system is received. By using a distributed system of blockchain technology, the method of this optional embodiment has the advantages of high stability, high ease of use, low cost, and high privacy protection for data encryption.

[0084] As an optional embodiment, the target client sends a login request based on the target account to the server to implement the operation of the user using the target account to log in to the server from the target client. The target client receives the server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server using the server private key to sign the server identity. The target client obtains the server public key, verifies the server signature identity based on the server public key, and obtains a first verification result. The target client verifies the server.

[0085] It should be noted that the target client needs to obtain the server public key first. The target client can obtain the server public key in a variety of ways, for example, it can receive the server public key sent by the server, or it can receive the server public key sent by the blockchain distributed identity management system. It can be selected adaptively according to the actual application and scenario.

[0086] Optionally, after obtaining the first verification result, it can be set that if the first verification result is verification failure, it means that the target client fails to verify the server and cannot log in. If the first verification result is verification success, the verification on the other side is performed, that is, the server verifies the target client, and the target client sends the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is the signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is the signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing agency, and the target client receives the second verification result sent by the server, wherein the second verification result is obtained by the server verifying the target account signature identity and the target account signature identity certificate based on the target account public key and the trusted certificate issuing agency public key. The server verifies the target client and the server verifies the target account identity. Through multi-layer verification, it is ensured that the target account on the target client is credible, thereby ensuring the security of the target account logging in to the server from the target client, and increasing the reliability of the entire process.

[0087] It should be noted that the second verification result is obtained by the server verifying the target account signature identity identifier based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency. That is, in this process, two verification steps are performed. One is the server's verification of the target client. The server verifies the target account signature identity identifier based on the target account public key, realizing the server's verification of the target client. At this point, the target client completes the two-way verification of the server and the server completes the target client. The other is to verify the credibility of the target account. The server verifies the target account signature identity certificate based on the public key of the trusted certificate issuing agency. On the basis of the two-way verification, an additional layer of target account identity credibility verification is added to ensure that the target account on the target client is credible, thereby ensuring the security of the target account logging in from the target client to the server, and increasing the reliability of the entire process. In this two-fold verification, it can be verified successively or synchronously, which is not limited here. If one verification fails in the two-fold verification, the second verification result of verification failure is obtained.

[0088] It should also be noted that the server needs to obtain the target account public key first. The server can obtain the target account public key in a variety of ways, such as receiving the target account public key sent by the target client or receiving the target account public key sent by the blockchain distributed identity management system. An adaptive selection can be made based on actual applications and scenarios.

[0089] As an optional embodiment, before the target client sends the target account signature identity identifier and the target account signature identity certificate to the server, it also includes the step of obtaining the target account signature identity certificate. There are many ways to obtain the target account signature identity certificate, for example: sending an authentication request including the identity information of the target account to a trusted certificate issuing agency, wherein the authentication request can be an authentication request including the identity card information of the target account, to authenticate the target account, so that the trusted certificate issuing agency generates a target account identity certificate corresponding to the target account, and the trusted certificate issuing agency signs the target account identity certificate according to the private key of the trusted certificate issuing agency to obtain the target account signature identity certificate, and sends the target account signature identity certificate to the target client. The target client receives the target account signature identity certificate sent by the trusted certificate issuing agency. Among them, the trusted certificate issuing agency can be a generalized identity certificate issuing agency, or a third-party agency, and the target account identity certificate is the identity certificate issued by the broad identity certificate issuing agency to the target account to authenticate the identity of the target account or the identity attribute of the target account. Among them, the target account identity certificate can be set with a validity period and can be flexibly revoked to avoid the phenomenon that the target account can still be verified even if it has bad behavior such as breach of trust. Authentication of the target account by a trusted certificate issuing agency not only ensures the security of the target account, but also ensures the reliability of the target account logging into the server from the target client.

[0090] It should be noted that when obtaining the target account identity credentials, the target account identity credentials corresponding to the corresponding third-party agency can be obtained according to the specific application and scenario. Since different third-party agencies may authenticate the target account in different applications and scenarios, it is necessary to obtain the authentication of the corresponding third-party agency. Optionally, in businesses with stricter requirements and rigor, it is also possible to require the acquisition of identity credentials of multiple third-party agencies, that is, multiple trusted credential issuing agencies can be requested for identity authentication of the target account. Only when multiple identity credentials are authenticated can the target account log in to the server from the target client. Through the above steps, the scope of application of this application is expanded, and according to the actual application scenario and the importance of the business performed in the scenario, the authentication of a predetermined number of third-party agencies can be obtained to enhance the security of the target account logging in to the server from the target client.

[0091] Optionally, after obtaining the second verification result, it can be set that if the second verification result is verification failure, it means that the server fails to verify the target client and cannot log in. If the second verification result is verification success, the target account can log in to the server from the target client.

[0092] It should also be noted that the server needs to obtain the public key of the trusted credential issuing agency first. The server can obtain the public key of the trusted credential issuing agency in a variety of ways, such as: the server receives the public key of the trusted credential issuing agency sent by the trusted credential issuing agency, and receives the public key of the trusted credential issuing agency sent by the blockchain distributed identity management system. Adaptive selection can be made according to actual applications and scenarios.

[0093] Figure 4 is a flowchart of a login verification method 4 according to an embodiment of the present invention. Figure 4 As shown, the method comprises the following steps:

[0094] Step S402, receiving the target account public key, the server public key and the public key of the trusted certificate issuing authority;

[0095] Step S404: Generate a target account identity corresponding to the target account public key based on the target account public key, generate a server identity corresponding to the server public key based on the server public key, and generate a target account identity certificate corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency;

[0096] Step S406, sending the target account identity to the target client, sending the server identity to the server, and sending the target account identity certificate to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity to obtain the target account signature identity, and the trusted certificate issuing agency uses the trusted certificate issuing agency private key to sign the target account identity to obtain the target account signature identity certificate, and the server uses the server private key to sign the server identity to obtain the server signature identity.

[0097] Through the above steps, for the blockchain distributed identity management system, by receiving the target account public key, the server public key and the public key of the trusted certificate issuing agency, and generating a target account identity corresponding to the target account public key based on the target account public key, and generating a server identity corresponding to the server public key based on the server public key, and generating a target account identity certificate corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency, and then sending the target account identity to the target client, and sending the server identity to the server, and sending the target account identity certificate to the trusted certificate issuing agency, so that the target client uses the target client private key The target account identity is encrypted to obtain the target account signature identity, the private key of the trusted certificate issuing agency signs the target account identity to obtain the target account signature identity certificate, and the server uses the server private key to sign the server identity to obtain the server signature identity, so as to help realize the target client's verification of the server, the server's verification of the target client, and the verification of the user's identity reliability. Since the blockchain system has the characteristics of synchronous guarantee and cannot be tampered with, it strongly guarantees the security of the implementation process of this application, and solves the technical problem in the related technology that when the user logs in to the server from the client, the verification direction is single and there are security risks.

[0098] It should be noted that the system implemented based on blockchain technology can store the target account public key, server public key and trusted credential issuing agency public key, as well as the corresponding target account identity, server identity, and target account identity credential in the form of distributed identity documents, further improving security, reliability and orderliness. Optionally, for example, the following method can be used: determine the first key-value correspondence, the second key-value correspondence, and the third key-value correspondence, wherein the first Key-Value correspondence stores the correspondence between the target account public key and the target account identity corresponding to the target account public key, the second Key-Value correspondence stores the correspondence between the server public key and the server identity corresponding to the server public key, and the third Key-Value correspondence stores the correspondence between the trusted credential issuing agency public key and the target account identity credential corresponding to the trusted credential issuing agency public key. Among them, the correspondence can be embodied in a variety of forms, such as a comparison table, etc. Data synchronization is guaranteed through the blockchain distributed identity management system, and it cannot be tampered with. The method of this optional embodiment has the advantages of high stability, high ease of use, low cost, and high privacy protection for data encryption.

[0099] Optionally, determining the third Key-Value correspondence includes: obtaining the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency; determining the third Key-Value correspondence based on the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency, and the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency. By setting a validity period for the target account identity credential, it is possible to avoid the phenomenon that the target account can still be verified even if it has bad behaviors such as breach of trust. It can not only ensure the security of the target account, but also ensure the reliability of the target account logging in to the server from the target client in this application.

[0100] Figure 5 is a timing diagram of a login verification method according to an embodiment of the present invention, such as Figure 5 As shown, the entire timing process of this application is basically introduced, and the following is an introduction to it:

[0101] (I) Pre-operations before the target account logs in:

[0102] 1) The target client obtains the target account signature identity:

[0103] S1.1, the target client sends the target account public key to the blockchain distributed identity management system;

[0104] S1.2, the blockchain distributed identity management system receives the target account public key, generates a target account identity corresponding to the target account public key based on the target account public key, and then sends the target account identity to the target client;

[0105] S1.3, the target client signs the target account identity according to the target account private key to obtain the target account signature identity.

[0106] 2) The server obtains the server signature identity:

[0107] S2.1, the server sends the server public key to the blockchain distributed identity management system;

[0108] S2.2, the blockchain distributed identity management system receives the server public key, generates a server identity corresponding to the server public key based on the server public key, and then sends the server identity to the target client;

[0109] S2.3, the server signs the server identity according to the server private key to obtain the server signature identity.

[0110] 3) The trusted certificate issuing agency obtains the target identity signature certificate:

[0111] S3.1, the trusted credential issuing authority sends the public key of the trusted credential issuing authority to the blockchain distributed identity management system;

[0112] S3.2, the blockchain distributed identity management system receives the public key of the trusted credential issuing agency, generates a target identity credential corresponding to the public key of the trusted credential issuing agency based on the public key of the trusted credential issuing agency, and then sends the target identity credential to the target client;

[0113] S3.3, the trusted certificate issuing agency signs the target identity certificate according to the private key of the trusted certificate issuing agency to obtain the target identity signed identity certificate.

[0114] 4) The target client obtains the target identity signature certificate:

[0115] S4.1, the target client sends an authentication request based on the target account to the trusted credential issuing authority, wherein the authentication request includes the identity information of the target account;

[0116] S4.2, the trusted certificate issuing authority receives the authentication request, retrieves the target account signature identity certificate according to the authentication request, and sends the target account signature identity certificate to the target client;

[0117] S4.3, receiving the target account signed identity certificate sent by the trusted certificate issuing agency.

[0118] (II) Log in to the server from the target client:

[0119] S5.1, the target client receives a login operation of the target account;

[0120] S5.2, the target client sends a login request based on the target account to the server,

[0121] S5.3, the server receives and responds to the login request sent by the target client, and sends the server signed identity to the target client;

[0122] S5.4, the target client receives the server signature identity sent by the server, and verifies the server signature identity according to the server public key to obtain a first verification result;

[0123] S5.5, when the first verification result is verification passed, the target client sends the target account signing identity identifier and the target account signing identity certificate to the server;

[0124] S5.6, the server receives the target account signature identity and the target account signature identity certificate sent by the target client, and verifies the target account signature identity and the target account signature identity certificate according to the target account public key and the public key of the trusted certificate issuing authority, to obtain a second verification result;

[0125] S5.7, the server sends a second verification result to the target client;

[0126] S5.8, the target client receives the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0127] Through the above steps, for the system, the target client sends a login request based on the target account to the server, the server receives and responds to the login request sent by the target client, sends the server signature identity to the target client, the target client receives the server signature identity sent by the server, and verifies the server signature identity according to the server public key, obtains the first verification result, and realizes the verification of the server by the target client. In the case where the first verification result is verification passed, the target client sends the target account signature identity to the server, the server receives the target account signature identity and the target account signature identity certificate sent by the target client, and verifies the target account signature identity according to the target account public key, and verifies the target account signature identity certificate with the public key of the trusted certificate issuing agency, and obtains the second verification result, that is, the server verifies the target account of the target client and the reliability of the user identity, the server sends the second verification result to the target client, the target client receives the second verification result sent by the server, and in the case where the second verification result is verification passed, the target client logs in to the server, which solves the technical problem of single verification direction and security risks when the user logs in to the server from the client in the related technology.

[0128] Based on the above embodiments and optional embodiments, an optional implementation is provided, which is described in detail below.

[0129] In an optional implementation of the present invention, a login verification method is provided, which is based on the scenario of a digital wallet, and uses asymmetric cryptography technology and distributed identity technology to realize verifiable credentials of various generalized identities of users, helping users to perform login verification through verifiable identity credentials based on cryptography technology, and further distributed verification by multiple parties, thereby realizing two-way authentication of the client and the server, and multiple authentication of the client, thereby further improving security and reliability. The optional implementation of the present invention is specifically described below:

[0130] Figure 6 is a role diagram of a login verification method provided according to an optional embodiment of the present invention, such as Figure 6As shown, the roles and systems included in the optional implementation of the present invention include: digital wallet App user (same as the target client), digital wallet server (same as the server), trusted credential issuing authority (same as the trusted credential issuing authority), and blockchain distributed identity management system. The following introduces the above multiple roles:

[0131] 1) Digital wallet app users: consumers who use digital wallet apps for transaction payments.

[0132] 2) Digital wallet server: After verifying the user's identity, provide digital wallet services to the user.

[0133] 3) Trusted Certificate Issuing Agency: An agency that provides various trusted certificates to users (individual users or corporate users). In this solution, it mainly verifies users online and issues verifiable electronic certificates corresponding to the trusted certificates.

[0134] 4) Blockchain distributed identity management system: A system implemented based on blockchain technology that issues distributed identity identification for relevant parties and generates and manages distributed identity documents.

[0135] Before introducing the method steps provided by the optional implementation mode of the present invention, the relevant parameters are first introduced. In the optional implementation mode of the present invention, the following parameters are defined:

[0136] 1) TID: User distributed identity, which is an identity ID issued by a distributed identity management system. TID_wallet_a represents the ID of digital wallet user a (same as the target account identity above), TID_A represents the server, i.e. the identity ID of institution A (same as the server identity above), and TID_issuer represents the ID of the trusted issuing institution of the identity certificate (same as the target account identity certificate above).

[0137] 2) Pk_user / Sk_user: refers to the public and private keys of the digital wallet user, which are generated locally in the digital wallet. In this solution, the public and private keys of user a are Pk_user_a (same as the target account public key) / Sk_user_a (same as the target account private key). The key pair of digital wallet user a is mainly used to declare to the digital wallet server that the TID submitted by it belongs to the user through signing. In order to enhance security, the public keys in this solution are all public key certificates.

[0138] 3) Pk_Regi / Sk_Regi: In this solution, Pk_Regi / Sk_Regi is mainly used by each organization to apply for TID from the blockchain distributed identity management system. In this solution, the public and private keys of organization A are Pk_Regi_A (same as the server public key) / Sk_Regi_A (same as the server private key). The public key of the public and private keys of organization A is used to apply for TID, and the private key can be used for self-signature to prove to other parties that the TID belongs to the organization. In order to enhance security, the public keys in this solution are all public key certificates.

[0139] 4) Pk_issuer / Sk_issuer: public and private keys of the identity credential issuing agency. When there are n generalized identity credential issuing agencies, the public and private key pairs are Pk_issuer_1 / Sk_issuer_1, Pk_issuer_2 / Sk_issuer_2…, Pk_issuer_n / Sk_issuer_n. In this scheme, taking a generalized identity credential issuing agency as an example, the public and private key pairs are Pk_issuer_1 (the same as the public key of the trusted credential issuing agency mentioned above) / Sk_issuer_1 (the same as the private key of the trusted credential issuing agency mentioned above). In order to enhance security, the public keys in this scheme are all public key certificates. The generalized identity credential issuing agency can issue a trusted credential Credential_V1_a (the same as the target account identity credential mentioned above) to the digital wallet user a.

[0140] 5) TID-DOC identity document initialization: In the blockchain distributed identity management system, each TID-DOC is a table in the Key-Value database. The corresponding TID-DOC can be found through the TID. When digital wallet users, digital wallet servers, and generalized identity certificate issuing agencies apply for TID, the distributed identity management system will write information such as the corresponding binding relationship between their TID and their public key in the document, such as the corresponding relationship between Pk_user_a and TID_wallet_a. TID-DOC is synchronized with the blockchain account book to ensure that it cannot be tampered with.

[0141] 6) TID-DOC Update: When a digital wallet user adds a new credential issued by a new generalized identity credential issuing agency, the blockchain distributed identity management system will update the user's TID-DOC identity document. For example, if the trusted agency Veri1 issues a trusted credential Credential_V1_a (the same as the target account identity credential mentioned above) to digital wallet user a, TID-DOC will add the validity period of Credential_V1_a, the verification relationship between Credential_V1_a and the Pk_Veri1_veri public key, etc. After the TID-DOC identity document is updated, it is synchronized with the blockchain account book to ensure that it cannot be tampered with.

[0142] 7) Credential verifiable identity credential: refers to an identity credential signed by a generalized identity credential issuing agency. For example, after a digital wallet user a submits relevant information to an agency that grants him a certain identity attribute (physical certificate) and conducts relevant verification (password / face / ID card verification, etc.), the generalized identity credential issuing agency electronically signs the credential to indicate that the user has these identity attributes. In this solution, the Credential identity credential includes identity attribute information and a signature on the identity attribute information.

[0143] 8) Blockchain Distributed Identity Management System: A blockchain platform that is responsible for issuing DIDs to various roles, creating and maintaining DID documents. Various operating agencies and generalized identity credential issuing agencies interact securely with the blockchain distributed system through APIs.

[0144] The following is an example of the TID-DOC document in the blockchain:

[0145] Table 1 is the Key-Value document corresponding to the target account, as shown in Table 1:

[0146] Table 1

[0147]

[0148] Table 2 is the Key-Value document corresponding to the feasible certificate issuing agency, as shown in Table 2:

[0149] Table 2

[0150]

[0151] Table 3 is the Key-Value document corresponding to the server, as shown in Table 3:

[0152] Table 3

[0153]

[0154] The method for implementing the optional implementation of the present invention is divided into the following three stages: 1. The distributed identity identification and identity document of the digital wallet user a and the institution are generated; 2. The digital wallet user a obtains a verifiable identity credential for login; 3. The digital wallet user a logs in to the digital wallet server from the digital wallet client. The following is a detailed description of the above three stages:

[0155] 1. Generation of distributed identity and identity documents for digital wallet user a and institution:

[0156] S6.1, the user and the organization generate a key pair for registering TID, where: digital wallet user a generates a key pair Pk_user_a (same as the target account public key) / Sk_user_a (same as the target account private key); organization A generates Pk_Regi_A (same as the server public key) / Sk_Regi_A (same as the server private key).

[0157] S6.2, the feasible credential issuing agency generates a credential that can verify the credential issuance public and private keys, where: the n identity credential issuing agencies that can issue credentials for users generate public and private keys, respectively using Pk_issuer_1 / Sk_issuer_1, Pk_issuer_2 / Sk_issuer_2…, Pk_issuer_n / Sk_issuer_n; taking an identity authentication as an example, it is represented by Pk_issuer_1 (the same as the above-mentioned trusted credential issuing agency public key) / Sk_issuer_1 (the same as the above-mentioned trusted credential issuing agency private key).

[0158] S6.3, digital wallet user a and institution A submit public keys Pk_user_a and Pk_Regi_A to the blockchain distributed identity management system respectively.

[0159] S6.4, the blockchain distributed identity management system generates the identity identifiers TID_wallet_a (same as the target account identity identifier) ​​and TID_A (same as the server identity identifier) ​​of each system.

[0160] S6.5, the blockchain distributed identity management system generates identity documents, digital wallet user a identity document: TID-Doc_Wallet_a;, operating institution A identity document: TID-Doc_A, each identity document records the binding relationship between each ID and its public key and other attributes, that is, records the corresponding binding relationship between wallet user a identity TID TID_wallet_a and wallet user a public key Pk_user_a, records the corresponding binding relationship between institution A's identity document and its public key. It should be noted that the identity document is a key-value database table.

[0161] S6.6, the blockchain distributed identity management system issues respective identity identifiers TID to digital wallet user a and institution A, that is, TID_wallet_a is issued to digital wallet user a and TID_A is issued to institution A; identity documents are automatically synchronized through the blockchain to prevent tampering.

[0162] 2. Digital wallet user a obtains verifiable identity credentials for login:

[0163] S7.1. Digital wallet user a initiates an application for a verifiable electronic identity credential to n generalized identity credential issuing agencies based on the identity document (physical document) issued to him by the generalized identity credential issuing agency. The user submits relevant information to the generalized identity credential issuing agency, executes relevant verification measures, and conducts identity verification.

[0164] S7.2, the generalized identity credential issuing authority generates the identity credential Credential_V1_a of digital wallet user a based on the verifiable identity credential template, and signs it with its private key Sk_issuer_1. (The credential can be set with a validity period and can be flexibly revoked).

[0165] S7.3, the generalized identity credential issuing authority issues a verifiable identity credential to the digital wallet user a and stores it securely locally.

[0166] 3. Digital wallet user a logs in to the digital wallet server from the digital wallet client:

[0167] S8.1, digital wallet user a applies to log in to the server through the App client, that is, logs in to institution A. Institution A uses its private key Sk_Regi_A to sign its distributed identity TID_A, obtains the signed distributed identity TID_A (the same as the above-mentioned server signed identity), and sends the signed distributed identity TID_A and public key Pk_Regi_A to user a.

[0168] It should be noted that, because the public key Pk_Regi_A already exists in the blockchain system, this public key does not need to be issued, and user a can obtain it on his own in the blockchain system.

[0169] S8.2, digital wallet user a receives the signed distributed identity TID_A sent by institution A, and uses institution A's public key Pk_Regi_A to verify its signature on TID_A, thereby completing the authentication of the server and obtaining the first verification result.

[0170] S8.3, when the first verification result is verification passed, the digital wallet user a uses the private key Sk_user_a to sign TID_wallet_a, obtains the signed distributed identity TID_wallet_a (the same as the above-mentioned target account signature identity), and sends it to institution A together with the public key Pk_user_a and the verifiable certificate Credential_V1_a issued by the generalized identity certificate issuing agency (the same as the above-mentioned target account signature identity certificate).

[0171] It should be noted that because the public key Pk_Regi_A and the public key Pk_issuer_1 already exist in the blockchain system, these two public keys do not need to be issued, and institution A can obtain them on its own from the blockchain system.

[0172] S8.4, institution A verifies the signature of TID_wallet_a through public key Pk_user_a, confirming that TID_wallet_a belongs to the client user; verifies Credential_V1_a through public key Pk_issuer_1, verifies the validity, and plays the role of the server verifying the client for the second time using multi-factor authentication.

[0173] S8.5, after the verification is completed, the digital wallet user a logs in to the digital wallet server from the digital wallet client.

[0174] A login verification method provided in an optional implementation mode of the present invention realizes verifiable credentials of various generalized identities of users by means of asymmetric cryptographic technology and distributed identity technology, helps users to perform login verification through verifiable identity credentials based on cryptographic technology, and further distributes verification by multiple parties, thereby realizing two-way authentication of the client and the server, and multiple authentication of the client, thereby further improving security and credibility.

[0175] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0176] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0177] According to an embodiment of the present invention, a device for implementing the above-mentioned login verification method 1 is also provided. Figure 7 is a structural block diagram of a login verification device according to an embodiment of the present invention. Figure 7As shown, the device includes: a first sending module 702, a first receiving module 704, a first verification module 706, a second sending module 708 and a first login module 710. The device is described in detail below.

[0178] The first sending module 702 is used to send a login request based on the target account to the server; the first receiving module 704 is connected to the above-mentioned first sending module 702, and is used to receive the server signature identity identifier sent by the server, wherein the server signature identity identifier is a signature identity identifier obtained by the server using the server private key to sign the server identity identifier; the first verification module 706 is connected to the above-mentioned first receiving module 704, and is used to verify the server signature identity identifier according to the server public key to obtain a first verification result; the second sending module 708 is connected to the above-mentioned first verification module 706, and is used to send the target account signature identity identifier and the server public key to the server public key when the first verification result is that the verification is passed. The target account signed identity credential is sent to the server, wherein the target account signed identity identifier is a signed identity identifier obtained by signing the target account identity identifier using the target account private key, and the target account signed identity credential is a signed identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing agency; the first login module 710 is connected to the above-mentioned second sending module 708, and is used to receive the second verification result sent by the server, and log in to the server when the second verification result is verification passed, wherein the second verification result is obtained by the server verifying the target account signed identity identifier based on the target account public key and the trusted credential issuing agency public key to verify the target account signed identity credential.

[0179] It should be noted here that the above-mentioned first sending module 702, first receiving module 704, first verification module 706, second sending module 708 and first login module 710 correspond to steps S102 to S110 in implementing the login verification method, and the instances and application scenarios implemented by the multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiments.

[0180] According to an embodiment of the present invention, a device for implementing the above-mentioned login verification method 2 is also provided. Figure 8 is a structural block diagram of a second login verification device according to an embodiment of the present invention. Figure 8 As shown, the device includes: a second receiving module 802, a third sending module 804, a third receiving module 806, a second verification module 808 and a fourth sending module 810. The device is described in detail below.

[0181] The second receiving module 802 is used to receive a login request sent by a target client; the third sending module 804 is connected to the above-mentioned second receiving module 802, and is used to respond to the login request and send the server signature identity to the target client, so that the target client verifies the server signature identity according to the server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; the third receiving module 806 is connected to the above-mentioned third sending module 804, and is used to receive the target account signature identity sent by the target client and verify the target account signature identity according to the server public key when the first verification result is that the verification is passed. The target account signature identity certificate, wherein the target account signature identity is the signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is the signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing agency; the second verification module 808 is connected to the above-mentioned third receiving module 806, and is used to verify the target account signature identity according to the target account public key and the trusted certificate issuing agency public key to verify the target account signature identity certificate to obtain a second verification result; the fourth sending module 810 second verification module 808 is connected to the above-mentioned, and is used to send the second verification result to the target client.

[0182] It should be noted here that the above-mentioned second receiving module 802, third sending module 804, third receiving module 806, second verification module 808 and fourth sending module 810 correspond to steps S202 to S210 in implementing the login verification method, and the instances and application scenarios implemented by the multiple modules are the same as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.

[0183] According to an embodiment of the present invention, a device for implementing the above login verification method three is also provided. Fig. 9 is a structural block diagram of a login verification device 3 according to an embodiment of the present invention, such as Fig. 9 As shown, the device includes: a fifth sending module 902, a sixth sending module 904, a third verification module 906, a seventh sending module 908, a fourth verification module 910, an eighth sending module 912 and a second login module 914. The device is described in detail below.

[0184] The fifth sending module 902 is used for the target client to send a login request based on the target account to the server; the sixth sending module 904 is connected to the fifth sending module 902, and is used for the server to receive and respond to the login request sent by the target client, and send the server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; the third verification module 906 is connected to the sixth sending module 904, and is used for the target client to receive the server signature identity sent by the server, and verify the server signature identity according to the server public key to obtain a first verification result; the seventh sending module 908 is connected to the third verification module 906, and is used for the target client to send the target account signature identity and the target account signature identity certificate to the server when the first verification result is verification passed, wherein the target account signature identity is a signature identity obtained by using the server private key. The target account signature identifier is obtained by signing the target account identity identifier with the target account private key, and the target account signature identity credential is the signature identity credential obtained by signing the target account identity credential with the private key of the trusted credential issuing agency; the fourth verification module 910 is connected to the seventh sending module 908, and is used for the server to receive the target account signature identifier and the target account signature identity credential sent by the target client, and verify the target account signature identifier and the target account signature identity credential according to the target account public key and the trusted credential issuing agency public key to obtain a second verification result; the eighth sending module 912 is connected to the fourth verification module 910, and is used for the server to send the second verification result to the target client; the second login module 914 is connected to the eighth sending module 912, and is used for the target client to receive the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0185] It should be noted here that the above-mentioned fifth sending module 902, sixth sending module 904, third verification module 906, seventh sending module 908, fourth verification module 910, eighth sending module 912 and second login module 914 correspond to steps S302 to S314 in implementing the login verification method, and the instances and application scenarios implemented by the multiple modules are the same as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.

[0186] According to an embodiment of the present invention, a device for implementing the above-mentioned login verification method 4 is also provided. Fig.10 is a structural block diagram of a login verification device 4 according to an embodiment of the present invention. Fig.10 As shown, the device includes: a fourth receiving module 1002, a generating module 1004 and a ninth sending module 1006. The device is described in detail below.

[0187] The fourth receiving module 1002 is used to receive the target account public key, the server public key and the public key of the trusted certificate issuing agency; the generating module 1004 is connected to the above-mentioned fourth receiving module 1002, and is used to generate a target account identity corresponding to the target account public key based on the target account public key, and to generate a server identity corresponding to the server public key based on the server public key, and to generate a target account identity certificate corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency; the ninth sending module 1006 is used to send the target account identity to the target client, and to send the server identity to the server, and to send the target account identity certificate to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity to obtain the target account signature identity, so that the server uses the server private key to sign the server identity to obtain the server signature identity, and the trusted certificate issuing agency uses the private key of the trusted certificate issuing agency to sign the target account identity to obtain the target account signature identity certificate.

[0188] It should be noted here that the above-mentioned fourth receiving module 1002, generating module 1004 and ninth sending module 1006 correspond to steps S402 to S406 in implementing the login verification method, and the instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiments.

[0189] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the above-mentioned login verification methods.

[0190] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the login verification method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned login verification method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0191] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: sending a login request based on the target account to the server; receiving the server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server using the server private key to sign the server identity; verifying the server signature identity based on the server public key to obtain a first verification result; if the first verification result is that the verification is passed, sending the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing agency; receiving the second verification result sent by the server, and if the second verification result is that the verification is passed, logging in to the server, wherein the second verification result is obtained by the server verifying the target account signature identity based on the target account public key and the trusted certificate issuing agency public key to verify the target account signature identity certificate.

[0192] Optionally, the processor may also execute the program code of the following steps: before sending the target account signature identity identifier and the target account signature identity credential to the server, it also includes: sending an authentication request based on the target account to a trusted credential issuing agency, so that the trusted credential issuing agency generates a target account identity credential corresponding to the target account, wherein the authentication request includes the identity information of the target account; and receiving the target account signature identity credential sent by the trusted credential issuing agency.

[0193] Optionally, the processor may also execute the program code of the following steps: before sending a login request based on the target account to the server, it also includes: determining the target account public key and the target account private key of the target account; sending the target account public key to the blockchain distributed identity management system to generate a target account identity corresponding to the target account public key; and receiving the target account identity sent by the blockchain distributed identity management system.

[0194] Optionally, the processor may also execute program code of the following steps: the method of obtaining the server public key includes at least one of the following: receiving the server public key sent by the server, and receiving the server public key sent by the blockchain distributed identity management system.

[0195] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a login request sent by the target client; in response to the login request, send the server signature identity to the target client, so that the target client verifies the server signature identity based on the server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; when the first verification result is that the verification is passed, receive the target account signature identity and the target account signature identity certificate sent by the target client, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing agency; verify the target account signature identity based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency to obtain a second verification result; send the second verification result to the target client.

[0196] Optionally, the processor may also execute the program code of the following steps: before receiving the login request sent by the target client, it also includes: determining the server public key and server private key of the server; inputting the server public key into the blockchain distributed identity management system to generate a server identity corresponding to the server public key; and receiving the server identity sent by the blockchain distributed identity management system.

[0197] Optionally, the processor may also execute the program code of the following steps: the method of obtaining the target account public key includes at least one of the following: receiving the target account public key sent by the target client, and receiving the target account public key sent by the blockchain distributed identity management system.

[0198] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: the target client sends a login request based on the target account to the server; the server receives and responds to the login request sent by the target client, and sends the server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; the target client receives the server signature identity sent by the server, and verifies the server signature identity according to the server public key to obtain a first verification result; when the first verification result is that the verification is passed, the target client sends the target account signature identity and the target account signature identity credential to the server, wherein, The target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing agency; the server receives the target account signature identity and the target account signature identity credential sent by the target client, and verifies the target account signature identity and the target account signature identity credential based on the target account public key and the trusted credential issuing agency public key to obtain a second verification result; the server sends the second verification result to the target client; the target client receives the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0199] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive the target account public key, the server public key and the public key of the trusted certificate issuing agency; generate a target account identity corresponding to the target account public key based on the target account public key, and generate a server identity corresponding to the server public key based on the server public key, and generate a target account identity certificate corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency; send the target account identity to the target client, and send the server identity to the server, and send the target account identity certificate to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity to obtain the target account signature identity, and the server uses the server private key to sign the server identity to obtain the server signature identity, and the trusted certificate issuing agency uses the private key of the trusted certificate issuing agency to sign the target account identity to obtain the target account signature identity certificate.

[0200] Optionally, the processor may also execute the program code of the following steps: determining a first key-value correspondence, a second key-value correspondence, and a third key-value correspondence, wherein the first Key-Value correspondence stores the correspondence between the target account public key and the target account identity identifier corresponding to the target account public key, the second Key-Value correspondence stores the correspondence between the server public key and the server identity identifier corresponding to the server public key, and the third Key-Value correspondence stores the correspondence between the public key of a trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency.

[0201] Optionally, the processor may also execute the program code of the following steps: determining a third Key-Value correspondence, including: obtaining the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency; determining the third Key-Value correspondence based on the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency, and the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency.

[0202] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above login verification methods.

[0203] Alternatively, the computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0204] Optionally, in this embodiment, the computer-readable storage medium may be used to store program codes executed by the login verification method provided in the above embodiment.

[0205] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: sending a login request based on the target account to the server; receiving a server signature identity sent by the server, wherein the server signature identity is a signature identity obtained by the server signing the server identity using the server private key; verifying the server signature identity based on the server public key to obtain a first verification result; if the first verification result is a passed verification, sending the target account signature identity and the target account signature identity credential to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of a trusted credential issuing agency; receiving a second verification result sent by the server, and if the second verification result is a passed verification, logging in to the server, wherein the second verification result is obtained by the server verifying the target account signature identity and the target account signature identity credential based on the target account public key and the trusted credential issuing agency public key.

[0206] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: before sending the target account signature identity identifier and the target account signature identity credential to the server, it also includes: sending an authentication request based on the target account to a trusted credential issuing agency, so that the trusted credential issuing agency generates a target account identity credential corresponding to the target account, wherein the authentication request includes the identity information of the target account; receiving the target account signature identity credential sent by the trusted credential issuing agency.

[0207] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: before sending a login request based on the target account to the server, it also includes: determining the target account public key and the target account private key of the target account; sending the target account public key to the blockchain distributed identity management system to generate a target account identity corresponding to the target account public key; and receiving the target account identity sent by the blockchain distributed identity management system.

[0208] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: the method of obtaining the server public key includes at least one of the following: receiving the server public key sent by the server, receiving the server public key sent by the blockchain distributed identity management system.

[0209] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: receiving a login request sent by a target client; in response to the login request, sending a server signature identity to the target client, so that the target client verifies the server signature identity based on a server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; when the first verification result is that the verification is passed, receiving a target account signature identity and a target account signature identity credential sent by the target client, wherein the target account signature identity is a signature identity obtained by signing the target account identity using a target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using a private key of a trusted credential issuing agency; verifying the target account signature identity based on the target account public key and the target account signature identity credential based on the public key of the trusted credential issuing agency to obtain a second verification result; and sending the second verification result to the target client.

[0210] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: before receiving the login request sent by the target client, it also includes: determining the server public key and server private key of the server; inputting the server public key into the blockchain distributed identity management system to generate a server identity corresponding to the server public key; and receiving the server identity sent by the blockchain distributed identity management system.

[0211] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: the method of obtaining the target account public key includes at least one of the following: receiving the target account public key sent by the target client, receiving the target account public key sent by the blockchain distributed identity management system.

[0212] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: the target client sends a login request based on the target account to the server; the server receives and responds to the login request sent by the target client, and sends a server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; the target client receives the server signature identity sent by the server, and verifies the server signature identity based on the server public key to obtain a first verification result; if the first verification result is that the verification is passed, the target client sends the target account signature identity and the target account signature identity credential to the server, wherein In the method, the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing agency; the server receives the target account signature identity and the target account signature identity credential sent by the target client, and verifies the target account signature identity and the target account signature identity credential according to the target account public key and the trusted credential issuing agency public key to obtain a second verification result; the server sends the second verification result to the target client; the target client receives the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

[0213] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: receiving a target account public key, a server public key and a public key of a trusted certificate issuing agency; generating a target account identity corresponding to the target account public key based on the target account public key, and generating a server identity corresponding to the server public key based on the server public key, and generating a target account identity credential corresponding to the public key of the trusted certificate issuing agency based on the public key of the trusted certificate issuing agency; sending the target account identity to the target client, and sending the server identity to the server, and sending the target account identity credential to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity to obtain the target account signature identity, and the server uses the server private key to sign the server identity to obtain the server signature identity, and the trusted certificate issuing agency uses the private key of the trusted certificate issuing agency to sign the target account identity to obtain the target account signature identity credential.

[0214] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a first key-value correspondence, a second key-value correspondence, and a third key-value correspondence, wherein the first Key-Value correspondence stores a correspondence between a target account public key and a target account identity identifier corresponding to the target account public key, the second Key-Value correspondence stores a correspondence between a server public key and a server identity identifier corresponding to the server public key, and the third Key-Value correspondence stores a correspondence between a trusted credential issuing agency public key and a target account identity credential corresponding to the trusted credential issuing agency public key.

[0215] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: determining a third Key-Value correspondence, including: obtaining the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency; determining the third Key-Value correspondence based on the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency, and the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency.

[0216] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0217] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0218] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0219] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0220] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0221] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0222] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A login verification method, characterized in that: include: Send a login request based on the target account to the server; Receiving a server signature identity identifier sent by the server, wherein the server signature identity identifier is a signature identity identifier obtained by the server using a server private key to sign the server identity identifier; Verifying the server signature identity according to the server public key to obtain a first verification result; If the first verification result is that the verification is passed, sending the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution; Receive a second verification result sent by the server, and log in to the server if the second verification result is verification passed, wherein the second verification result is obtained by the server verifying the target account signature identity based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency.

2. The method according to claim 1, characterized in that: Before sending the target account signature identity identifier and the target account signature identity certificate to the server, the method further includes: Sending an authentication request based on the target account to a trusted credential issuing authority, so that the trusted credential issuing authority generates the target account identity credential corresponding to the target account, wherein the authentication request includes identity information of the target account; Receive the target account signed identity credential sent by the trusted credential issuing authority.

3. The method according to claim 1, characterized in that Before sending the login request based on the target account to the server, the method further includes: Determine a target account public key and a target account private key of the target account; Sending the target account public key to the blockchain distributed identity management system to generate the target account identity corresponding to the target account public key; Receive the target account identity sent by the blockchain distributed identity management system.

4. The method according to claim 3, characterized in that The method of obtaining the server public key includes at least one of the following: receiving the server public key sent by the server, and receiving the server public key sent by the blockchain distributed identity management system.

5. A login verification method, characterized in that: include: Receive the login request sent by the target client; In response to the login request, sending the server signature identity to the target client, so that the target client verifies the server signature identity according to the server public key to obtain a first verification result, wherein the server signature identity is a signature identity obtained by signing the server identity using the server private key; If the first verification result is that the verification is passed, receiving the target account signature identity and the target account signature identity credential sent by the target client, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of the trusted credential issuing institution; Verifying the target account signature identity identifier according to the target account public key and the target account signature identity certificate according to the public key of the trusted certificate issuing agency to obtain a second verification result; Send the second verification result to the target client.

6. The method according to claim 5, characterized in that Before receiving the login request sent by the target client, the method further includes: Determining a server public key and a server private key of the server; Input the server public key into the blockchain distributed identity management system to generate the server identity corresponding to the server public key; Receive the server identity sent by the blockchain distributed identity management system.

7. The method according to claim 6, characterized in that The method of obtaining the target account public key includes at least one of the following: receiving the target account public key sent by the target client, and receiving the target account public key sent by the blockchain distributed identity management system.

8. A login verification method, characterized in that: include: The target client sends a login request based on the target account to the server; The server receives and responds to the login request sent by the target client, and sends a server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; The target client receives the server signature identity identifier sent by the server, and verifies the server signature identity identifier according to the server public key to obtain a first verification result; If the first verification result is that the verification is passed, the target client sends the target account signature identity and the target account signature identity certificate to the server, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution; The server receives the target account signature identity and the target account signature identity certificate sent by the target client, and verifies the target account signature identity and the target account signature identity certificate according to the target account public key and the public key of the trusted certificate issuing authority to obtain a second verification result; The server sends the second verification result to the target client; The target client receives a second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

9. A login verification method, characterized in that: include: Receive the target account public key, server public key and trusted certificate issuing authority public key; Generate a target account identity corresponding to the target account public key based on the target account public key, generate a server identity corresponding to the server public key based on the server public key, and generate a target account identity credential corresponding to the trusted credential issuing authority public key based on the trusted credential issuing authority public key; The target account identity identifier is sent to the target client, and the server identity identifier is sent to the server, and the target account identity certificate is sent to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity identifier to obtain the target account signature identity identifier, and the trusted certificate issuing agency uses the trusted certificate issuing agency private key to sign the target account identity identifier to obtain the target account signature identity certificate, and the server uses the server private key to sign the server identity identifier to obtain the server signature identity identifier.

10. The method according to claim 9, characterized in that Also includes: Determine a first key-value correspondence, a second key-value correspondence, and a third key-value correspondence, wherein the first Key-Value correspondence stores a correspondence between the target account public key and the target account identity identifier corresponding to the target account public key, the second Key-Value correspondence stores a correspondence between the server public key and the server identity identifier corresponding to the server public key, and the third Key-Value correspondence stores a correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency.

11. The method according to claim 10, characterized in that Determine the third Key-Value correspondence, including: Obtain the validity period of the target account identity certificate corresponding to the public key of the trusted certificate issuing institution; The third Key-Value correspondence is determined based on the correspondence between the public key of the trusted credential issuing agency and the target account identity credential corresponding to the public key of the trusted credential issuing agency, and the validity period of the target account identity credential corresponding to the public key of the trusted credential issuing agency.

12. A login verification device, characterized in that: include: A first sending module, used for sending a login request based on a target account to a server; A first receiving module is used to receive a server signature identity identifier sent by the server, wherein the server signature identity identifier is a signature identity identifier obtained by the server using a server private key to sign the server identity identifier; A first verification module, used to verify the server signature identity according to the server public key to obtain a first verification result; A second sending module is used to send the target account signature identity and the target account signature identity certificate to the server when the first verification result is that the verification is passed, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution; The first login module is used to receive a second verification result sent by the server, and log in to the server if the second verification result is verification passed, wherein the second verification result is obtained by the server verifying the target account signature identity identifier based on the target account public key and the target account signature identity certificate based on the public key of the trusted certificate issuing agency.

13. A login verification device, characterized in that: include: A second receiving module is used to receive a login request sent by a target client; A third sending module is used to send the server signature identity identifier to the target client in response to the login request, so that the target client verifies the server signature identity identifier according to the server public key to obtain a first verification result, wherein the server signature identity identifier is a signature identity identifier obtained by signing the server identity identifier using the server private key; A third receiving module is used to receive the target account signature identity and the target account signature identity certificate sent by the target client when the first verification result is that the verification is passed, wherein the target account signature identity is a signature identity obtained by signing the target account identity using the target account private key, and the target account signature identity certificate is a signature identity certificate obtained by signing the target account identity certificate using the private key of the trusted certificate issuing institution; A second verification module is used to verify the target account signature identity identifier according to the target account public key and the target account signature identity certificate according to the public key of the trusted certificate issuing agency to obtain a second verification result; A fourth sending module is used to send the second verification result to the target client.

14. A login verification device, characterized in that: include: A fifth sending module, used for the target client to send a login request based on the target account to the server; A sixth sending module, configured for the server to receive and respond to the login request sent by the target client, and to send a server signature identity to the target client, wherein the server signature identity is a signature identity obtained by signing the server identity using a server private key; A third verification module is used for the target client to receive the server signature identity sent by the server, and verify the server signature identity according to the server public key to obtain a first verification result; a seventh sending module, configured to, when the first verification result is that the verification is passed, cause the target client to send a target account signature identity identifier and a target account signature identity credential to the server, wherein the target account signature identity identifier is a signature identity identifier obtained by signing the target account identity identifier using the target account private key, and the target account signature identity credential is a signature identity credential obtained by signing the target account identity credential using the private key of a trusted credential issuing institution; A fourth verification module is used for the server to receive the target account signature identity and the target account signature identity certificate sent by the target client, and verify the target account signature identity according to the target account public key and the public key of the trusted certificate issuing agency to verify the target account signature identity certificate, to obtain a second verification result; An eighth sending module, configured for the server to send the second verification result to the target client; The second login module is used for the target client to receive the second verification result sent by the server, and when the second verification result is verification passed, the target client logs in to the server.

15. A login verification device, characterized in that: include: A fourth receiving module, used to receive the target account public key, the server public key and the public key of the trusted certificate issuing agency; A generating module, configured to generate a target account identity corresponding to the target account public key based on the target account public key, generate a server identity corresponding to the server public key based on the server public key, and generate a target account identity certificate corresponding to the trusted certificate issuing authority public key based on the trusted certificate issuing authority public key; The ninth sending module is used to send the target account identity identifier to the target client, send the server identity identifier to the server, and send the target account identity certificate to the trusted certificate issuing agency, so that the target client uses the target client private key to encrypt the target account identity identifier to obtain the target account signature identity identifier, so that the trusted certificate issuing agency uses the trusted certificate issuing agency private key to sign the target account identity identifier to obtain the target account signature identity certificate, and so that the server uses the server private key to sign the server identity identifier to obtain the server signature identity identifier.

16. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the login verification method as described in any one of claims 1 to 11.

17. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the login verification method as described in any one of claims 1 to 11.