A two-factor authentication method, device, equipment and medium based on blockchain

By introducing blockchain technology into two-factor authentication, the problems of centralization and data tampering in traditional two-factor authentication methods are solved, higher authentication security and reliability are achieved, and authentication efficiency and system flexibility are optimized. .

CN118573410BActive Publication Date: 2025-02-14PARK DO CREDIT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410542568.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-02-14
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

The traditional two-factor authentication method has problems such as centralization, easy data tampering, and single point of failure, which has led to challenges in the security and reliability of the authentication process.

Method used

Using a two-factor authentication method based on blockchain, the authenticated data is stored in multiple nodes through blockchain technology, and data synchronization is performed through point-to-point communication protocols, thereby improving data security and tamper resistance. At the same time, the target node is determined based on the node operation status and authentication efficiency to ensure the efficient progress of the authentication process.

Benefits of technology

It improves the security and reliability of the authentication process, optimizes authentication efficiency and resource utilization, enhances the flexibility and scalability of the system, and realizes the transparency and traceability of the authentication records through on-chain storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573410B_ABST
    Figure CN118573410B_ABST
Patent Text Reader

Abstract

The present application provides a two-factor authentication method, device, equipment and medium based on blockchain, the method comprising: through multiple nodes in the blockchain network, each node corresponds to an authentication server, to achieve safe and efficient two-factor authentication. After receiving the two-factor authentication request, the system will screen out at least two target nodes from a large number of nodes according to conditions such as the operation status of the node and the authentication efficiency. Then, the first target node and the second target node are determined from the two target nodes respectively, and are used to authenticate the first factor and the second factor respectively. The present application can improve the security and reliability of the authentication process while ensuring the authentication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based two-factor authentication method, device, equipment and medium. Background Art

[0002] With the rapid development of information technology, network security issues have become increasingly prominent, and traditional single-factor authentication methods can no longer meet the needs of modern information security.

[0003] As a more secure and reliable authentication method, two-factor authentication is gradually becoming a research hotspot in the field of information security. However, traditional two-factor authentication methods often have problems such as centralization, easy data tampering, and single point failure, which challenges the security and reliability of the authentication process. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a blockchain-based two-factor authentication method, device, equipment and medium, which can improve the security and reliability of the authentication process while ensuring authentication efficiency.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a two-factor authentication method based on blockchain, comprising the following steps:

[0007] In response to a two-factor authentication request, determining at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation condition and an authentication efficiency;

[0008] A first target node and a second target node are determined from the at least two target nodes, and the first factor is authenticated through the first target node and the second factor is authenticated through the second target node.

[0009] In a second aspect, an embodiment of the present application further provides a two-factor authentication device based on blockchain, the device comprising:

[0010] a determination module, configured to determine, in response to a two-factor authentication request, at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation condition and an authentication efficiency;

[0011] The authentication module is used to determine a first target node and a second target node from the at least two target nodes, and to authenticate the first factor through the first target node and to authenticate the second factor through the second target node.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the blockchain-based two-factor authentication method as described in any one of the first aspects.

[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the blockchain-based two-factor authentication method described in any one of the first aspects is executed.

[0014] The embodiments of the present application have the following beneficial effects:

[0015] (1) Improve the security and reliability of authentication: By introducing blockchain technology, authentication data is stored in multiple nodes. Each node stores a copy of the data and synchronizes the data through a peer-to-peer communication protocol, which greatly enhances the security and tamper-proof ability of the data. Even if some nodes are attacked or fail, other nodes can still ensure the integrity and consistency of the data. The two-factor authentication mechanism itself can provide higher security than a single factor, and the introduction of blockchain further ensures the transparency and traceability of the authentication process, thereby improving the reliability of authentication.

[0016] (2) Optimizing authentication efficiency and resource utilization: The strategy proposed in the method to determine the target node based on the node operation status and authentication efficiency can ensure that the node with the best performance and highest efficiency is selected during the authentication process. This can not only speed up the authentication process and improve the user experience, but also effectively reduce unnecessary resource consumption. The introduction of smart contracts makes the execution and verification of authentication rules and conditions more automated and efficient, reducing the possibility of human intervention and errors, thereby improving the overall authentication efficiency.

[0017] (3) Flexibility and scalability: This method allows nodes in the blockchain to be dynamically added or deleted according to actual needs, which makes the system highly flexible and scalable. As the business develops or the network environment changes, the number and configuration of nodes can be easily adjusted to meet different authentication needs. The rewritability of smart contracts allows authentication rules and conditions to be adjusted and optimized according to actual conditions, thereby meeting changing authentication needs.

[0018] (4) Enhanced transparency and traceability: By packaging the certification records into blocks and linking them to the blockchain, the certification records can be stored on the chain. This not only makes the certification process more transparent, but also facilitates the subsequent tracing and auditing of the certification records. The immutability of the blockchain ensures the authenticity and integrity of the certification records, providing strong evidence support for possible disputes or conflicts.

[0019] In summary, the blockchain-based two-factor authentication method combines the characteristics of blockchain technology and the advantages of two-factor authentication, and has shown significant beneficial effects in terms of security, reliability, efficiency, flexibility, transparency and traceability. This is of great significance for improving the overall performance and user experience of the authentication system, especially in application scenarios that require high security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 It is a flowchart of steps S101-S102 provided in an embodiment of the present application;

[0022] Figure 2 It is a flowchart of steps S201-S202 provided in an embodiment of the present application;

[0023] Figure 3 It is a flowchart of steps S301-S302 provided in an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of the structure of a two-factor authentication device based on blockchain provided in an embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0026] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0028] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0029] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0032] See also Figure 1 , Figure 1This is a flowchart of steps S101-S102 of the two-factor authentication method based on blockchain provided in the embodiment of the present application, which will be combined with Figure 1 Steps S101-S102 are shown for explanation.

[0033] Step S101: In response to a two-factor authentication request, determining at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation status and an authentication efficiency;

[0034] Step S102: determine a first target node and a second target node from the at least two target nodes, and authenticate the first factor through the first target node and authenticate the second factor through the second target node.

[0035] The above exemplary steps of the embodiments of the present application are described below respectively.

[0036] In step S101, in response to a two-factor authentication request, at least two target nodes that meet the authentication condition are determined from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation status and an authentication efficiency.

[0037] In step S102, a first target node and a second target node are determined from the at least two target nodes, and the first factor is authenticated through the first target node and the second factor is authenticated through the second target node.

[0038] Here, the blockchain consists of at least one node, and each node corresponds to an authentication server. When a two-factor authentication request is received, the system will filter out at least two target nodes from the nodes based on a series of authentication conditions, and then authenticate the two-factor through these target nodes respectively.

[0039] Specifically, the blockchain consists of multiple nodes, each of which corresponds to an authentication server. These authentication servers are responsible for performing authentication operations to ensure the security and accuracy of user identities. When the system receives a two-factor authentication request, the request will contain two factors: the first factor and the second factor. These two factors can be any combination that meets the requirements of two-factor authentication, such as passwords, fingerprints, dynamic SMS verification codes, etc. The system will screen at least two target nodes from all nodes based on a series of authentication conditions. These authentication conditions can be determined based on the operation of the nodes (such as the stability and load of the nodes) and the authentication efficiency (such as the historical authentication speed and accuracy of the nodes). In this way, it can be ensured that the selected target nodes can both operate stably and provide efficient authentication services. After determining at least two target nodes, the system will further determine the first target node and the second target node. These two nodes will be responsible for authenticating the two factors respectively. Specifically, the first target node will authenticate the first factor, while the second target node will authenticate the second factor. This division of labor can ensure that each factor is independently verified, thereby enhancing the security of authentication.

[0040] In the above-mentioned way, the blockchain-based authentication method realizes a decentralized authentication process, avoiding the risk of single point failure and data tampering; by selecting the target node according to the node operation status and authentication efficiency, the efficient authentication process can be ensured. The two factors are authenticated by different target nodes respectively, which enhances the security of authentication and reduces the risk of being attacked or cracked.

[0041] In some embodiments, database data used for authentication is stored in a dispersed manner in the at least one node, each of the at least one node stores a data copy corresponding to the database data, and each node synchronizes data with other nodes through a point-to-point communication protocol.

[0042] Here, in order to ensure the security and reliability of data, the database data required for authentication is stored in a decentralized manner and stored in at least one node in the blockchain network. Each node stores a copy of the database data and synchronizes data with other nodes through a peer-to-peer communication protocol.

[0043] In a blockchain network, database data is stored in various nodes in a decentralized manner. Each node stores a complete copy of the entire database, which means that each node contains the same data content. This decentralized storage method can improve data reliability and fault tolerance, because even if some nodes fail or are attacked, other nodes can still provide complete data services.

[0044] Through decentralized storage, data security is enhanced. Since data copies are distributed in multiple nodes, no single node can tamper with the contents of the entire database. At the same time, in order to protect the privacy of data, encryption technology can be used to process the data to ensure that only authorized nodes can access and use the data.

[0045] In order to achieve data synchronization between nodes, a peer-to-peer (P2P) communication protocol is adopted. This protocol allows nodes to communicate and exchange data directly without going through a centralized server or intermediary. Each node can act as the initiator and receiver of communication, establish connections with other nodes and transmit data.

[0046] When the data on a node changes (such as adding, modifying or deleting records), the node will broadcast these changes to the entire network. After receiving these changes, other nodes will verify and update them based on their own copies of the data to ensure that their data is consistent with other nodes. This data synchronization mechanism can ensure that the data in the entire blockchain network always maintains consistency and integrity.

[0047] The above method, through decentralized storage and data synchronization mechanism, can ensure the integrity and availability of data even if some nodes fail or are attacked. Since data is decentralized and stored in multiple nodes, and each node stores a complete copy of the data, no single node can tamper with the content of the entire database, thereby improving data security. Data synchronization through peer-to-peer communication protocols can reduce the burden on centralized servers and improve the scalability and performance of the system.

[0048] In some embodiments, see Figure 2 , Figure 2 It is a flow chart of steps S201-S202 provided in an embodiment of the present application. The node operation status includes stability, online rate, failure rate, response time and communication quality with other nodes, and the authentication efficiency includes speed, accuracy and resource consumption. The determination of at least two target nodes that meet the authentication conditions from the at least one node can be achieved through steps S201-S202, which will be explained in combination with each step.

[0049] In step S201, a node score of each node in the at least one node is determined based on at least one of the stability, the online rate, the failure rate, the response time, the communication quality with other nodes, the speed, the accuracy, and the resource consumption.

[0050] In step S202, the top two nodes in the node score are taken as target nodes.

[0051] Here, the node screening and target node determination mechanism are key links to ensure the efficiency and security of the authentication process. Node operation status and authentication efficiency are important indicators for evaluating node performance, and they jointly determine which nodes will be selected as target nodes for performing authentication operations. Node operation status covers multiple aspects to comprehensively evaluate the performance and stability of nodes, including:

[0052] Stability: A measure of a node's ability to maintain normal operation over a long period of time.

[0053] Online rate: reflects the ratio of the available time of a node to the total time in the network.

[0054] Failure rate: Indicates the frequency of node failure or abnormal conditions.

[0055] Response time: A measure of how long it takes a node to process a request or perform an action.

[0056] Communication quality with other nodes: Evaluates the efficiency and reliability of a node when exchanging data or communicating with other nodes.

[0057] Authentication efficiency also includes multiple dimensions to evaluate the performance of nodes during the authentication process, including:

[0058] Speed: reflects how fast a node processes authentication requests.

[0059] Accuracy: Measures the accuracy of a node in determining the user's identity during the authentication process.

[0060] Resource consumption: evaluates the computing resources, storage resources, etc. consumed by the node when performing authentication operations.

[0061] When at least two target nodes that meet the authentication criteria are identified, follow these steps:

[0062] A comprehensive score is calculated for each node based on operational indicators such as node stability and online rate, as well as authentication efficiency indicators such as speed and accuracy. This score can be calculated based on predetermined weights and formulas to reflect the overall performance of the node during the authentication process. Based on the node scores, the top two nodes are selected as target nodes. These two nodes will be responsible for performing the specific operations of two-factor authentication. In this way, it can be ensured that the selected nodes have both good operational stability and efficient authentication capabilities.

[0063] The above method can improve the efficiency of the entire authentication process by selecting nodes with superior performance to perform authentication operations. Multiple nodes participating in the authentication process can reduce the risk of single point failure and improve the security of authentication. The evaluation indicators can be adjusted and optimized according to actual needs to meet the authentication requirements in different scenarios.

[0064] In some embodiments, the method further comprises:

[0065] For each authentication record, the authentication record is packaged into a block, and, after verification through a consensus mechanism, is linked to the end of the blockchain to achieve on-chain storage of the authentication record.

[0066] Here, the on-chain storage of authentication records is a key link to ensure the transparency and traceability of the authentication process. By packaging the authentication records into blocks and linking them to the end of the blockchain after verification by the consensus mechanism, the authentication records can be stored securely, reliably and immutably.

[0067] After each two-factor authentication operation is completed, the system will generate corresponding authentication records. These records contain key information such as the time of authentication, information about the nodes involved in authentication, and the results of authentication. The system will package a certain number of authentication records into a block. This process is similar to the process of packaging multiple transactions into a block, which helps to reduce the processing cost of a single record and improve storage efficiency. The packaged blocks need to be verified by the consensus mechanism. In the blockchain network, the consensus mechanism is used to ensure the recognition and consistency of the block content by all nodes. Common consensus mechanisms include proof of work (PoW), proof of stake (PoS), etc. In this process, nodes compete to solve a mathematical problem, or decide who has the right to add a new block to the blockchain based on the number and duration of coins held. Once the block is verified by the consensus mechanism, it will be linked to the end of the blockchain. This process is achieved by including the hash value of the previous block in the block header, ensuring the integrity and immutability of the blockchain.

[0068] The above method, by putting the authentication records on the chain, allows all parties to view and verify the history of the authentication process, thus enhancing transparency. The distributed nature and consensus mechanism of the blockchain ensure that the authentication records cannot be tampered with once they are on the chain, thus ensuring the security and reliability of the data. On-chain storage allows the authentication records to be preserved and traced for a long time, which helps to conduct audits and verifications when necessary.

[0069] In some embodiments, during the authentication process, the first target node and the second target node exchange authentication information in real time to make the logical association between the first factor and the second factor consistent.

[0070] Here, in order to ensure the consistency of the logical association between the first factor and the second factor and improve the security and accuracy of the authentication, the first target node and the second target node will exchange authentication information in real time during the authentication process. This real-time interaction mechanism can ensure the coordination and consistency of the two factors during the authentication process, thereby enhancing the reliability and security of the entire authentication process.

[0071] An encrypted communication channel can be established between the first target node and the second target node to ensure that the transmitted authentication information is not leaked or tampered with. This encrypted communication channel can be implemented using a secure communication protocol and encryption algorithm.

[0072] During the authentication process, the first target node and the second target node will transmit authentication data related to the first factor and the second factor in real time. For example, the first target node may require the user to enter the first factor (such as a password), while the second target node receives the input of the second factor associated with the first factor (such as a dynamic verification code). The two nodes will exchange these authentication data in real time to ensure the logical association between them.

[0073] The first target node and the second target node will also synchronize the verification status in real time to ensure that both parties are in step with each other during the authentication process. For example, when the first target node completes the verification of the first factor, it will pass the verification result to the second target node in real time so that the second target node can perform corresponding operations based on this result.

[0074] In the above method, since the authentication data is transmitted in real time between the two nodes, they can ensure that the received information is the latest and synchronized, thus avoiding the problem of information lag or inconsistency. The two nodes maintain coordination during the verification process and perform corresponding operations based on the verification status and results of the other party. This coordination can ensure the logical relevance and consistency of the two factors. If any errors or inconsistencies occur during the interaction, the two nodes can correct the errors through real-time communication to ensure the smooth progress of the entire authentication process.

[0075] In some embodiments, the method further comprises:

[0076] In response to a node addition / deletion operation on the blockchain, a node is added / deleted from the blockchain.

[0077] Here, as system requirements change or the network environment is adjusted, it may be necessary to add or delete nodes in the blockchain network. In order to ensure the stability and security of the blockchain network, a mechanism is needed to respond to these operations and update the node list in the blockchain network in real time.

[0078] When a new node needs to be added to a blockchain network, the system first verifies the identity and qualifications of the new node. This usually includes checking the node's hardware configuration, software environment, security and other factors to ensure that the new node can meet the operational requirements of the blockchain network. Once the new node passes the verification, the system will add it to the node list of the blockchain network and notify other nodes to synchronize and update. The new node can then begin to participate in authentication operations and data synchronization in the blockchain network.

[0079] When a node needs to be deleted from the blockchain network, the system also needs to perform a series of verifications and operations. First, the system will check the source and permissions of the deletion request to ensure that only legitimate requesters can initiate the deletion operation. Then, the system will verify the identity and status of the node to be deleted to confirm whether it can be safely removed. Once the verification is passed, the system will delete the node from the node list and notify other nodes to synchronize and update. The deleted node will no longer participate in any operations in the blockchain network, and its stored data copies will be processed or destroyed accordingly.

[0080] In the above way, by dynamically adding or deleting nodes, the system can adjust the scale and capacity of the blockchain network according to actual needs to adapt to different application scenarios and load changes. When potential security risks or performance issues are found, the problematic nodes can be deleted in time to avoid affecting the entire blockchain network. At the same time, the robustness and fault tolerance of the network can be enhanced by adding new nodes. The dynamic management mechanism makes it easier to maintain and upgrade nodes. When it is necessary to update the software version or fix security vulnerabilities, a smooth transition can be achieved by adding new nodes and gradually replacing old nodes.

[0081] In some embodiments, see Figure 3 , Figure 3 It is a flow chart of steps S301-S302 provided in an embodiment of the present application. The blockchain also includes a smart contract, which is used to execute and verify the authentication rules and authentication conditions in the two-factor authentication process. The method also includes steps S301-S302, which will be explained in combination with each step.

[0082] In step S301, in response to a first rewrite operation on the smart contract, the modified authentication rules and the modified authentication conditions are determined.

[0083] In step S302, in response to a second rewrite operation on the smart contract, an applicable node of the authentication rule and the authentication condition is determined, and the applicable node is any node among the at least one node.

[0084] Here, a smart contract is a piece of automatically executed code that contains a series of predefined authentication rules and authentication conditions, which are used to execute and verify various operations in the two-factor authentication process. By rewriting the smart contract, you can flexibly adjust the authentication rules and conditions, and determine the nodes to which these rules and conditions apply, so as to meet the authentication needs in different scenarios.

[0085] When the authentication rules and authentication conditions need to be modified, this can be achieved by performing the first rewrite operation on the smart contract. This operation is usually initiated by a user or administrator with corresponding permissions. During the rewrite process, users can adjust the authentication rules according to actual needs, such as modifying password complexity requirements, the validity period of dynamic verification codes, etc. At the same time, they can also adjust the authentication conditions, such as adding new authentication factors, adjusting the logical relationship between factors, etc. After the rewrite is completed, the smart contract will be updated to a version containing the new authentication rules and authentication conditions, and will be broadcast and verified in the blockchain network.

[0086] In addition to modifying authentication rules and conditions, smart contracts can also determine the nodes to which these rules and conditions apply through a second rewrite operation. This means that administrators can select specific nodes to execute specific authentication rules and conditions as needed. This flexibility allows the system to be customized for different scenarios and needs. For example, in some cases, it may be desirable for only specific nodes to enforce stricter authentication rules, while in other cases, it may be desirable for all nodes to follow the same authentication standards. These configuration adjustments can be easily implemented by rewriting smart contracts.

[0087] After the smart contract is rewritten, the new authentication rules and authentication conditions will take effect immediately and be applied to the designated applicable nodes. These nodes will follow the new rules and conditions when performing the two-factor authentication process. At the same time, due to the immutability and transparency of the blockchain, all rewrite operations will be recorded on the blockchain, ensuring the traceability and credibility of the operation.

[0088] In summary, the embodiments of the present application have the following beneficial effects:

[0089] (1) Improve the security and reliability of authentication: By introducing blockchain technology, authentication data is stored in multiple nodes. Each node stores a copy of the data and synchronizes the data through a peer-to-peer communication protocol, which greatly enhances the security and tamper-proof ability of the data. Even if some nodes are attacked or fail, other nodes can still ensure the integrity and consistency of the data. The two-factor authentication mechanism itself can provide higher security than a single factor, and the introduction of blockchain further ensures the transparency and traceability of the authentication process, thereby improving the reliability of authentication.

[0090] (2) Optimizing authentication efficiency and resource utilization: The strategy proposed in the method to determine the target node based on the node operation status and authentication efficiency can ensure that the node with the best performance and highest efficiency is selected during the authentication process. This can not only speed up the authentication process and improve the user experience, but also effectively reduce unnecessary resource consumption. The introduction of smart contracts makes the execution and verification of authentication rules and conditions more automated and efficient, reducing the possibility of human intervention and errors, thereby improving the overall authentication efficiency.

[0091] (3) Flexibility and scalability: This method allows nodes in the blockchain to be dynamically added or deleted according to actual needs, which makes the system highly flexible and scalable. As the business develops or the network environment changes, the number and configuration of nodes can be easily adjusted to meet different authentication needs. The rewritability of smart contracts allows authentication rules and conditions to be adjusted and optimized according to actual conditions, thereby meeting changing authentication needs.

[0092] (4) Enhanced transparency and traceability: By packaging the certification records into blocks and linking them to the blockchain, the certification records can be stored on the chain. This not only makes the certification process more transparent, but also facilitates the subsequent tracing and auditing of the certification records. The immutability of the blockchain ensures the authenticity and integrity of the certification records, providing strong evidence support for possible disputes or conflicts.

[0093] In summary, the blockchain-based two-factor authentication method combines the characteristics of blockchain technology and the advantages of two-factor authentication, and has shown significant beneficial effects in terms of security, reliability, efficiency, flexibility, transparency and traceability. This is of great significance for improving the overall performance and user experience of the authentication system, especially in application scenarios that require high security and reliability.

[0094] Based on the same inventive concept, the embodiments of the present application also provide a blockchain-based two-factor authentication device corresponding to the blockchain-based two-factor authentication method in the first embodiment. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the above-mentioned blockchain-based two-factor authentication method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0095] like Figure 4 As shown, Figure 4 : is a schematic diagram of the structure of a two-factor authentication device 400 based on blockchain provided in an embodiment of the present application. The two-factor authentication device 400 based on blockchain includes:

[0096] A determination module 401 is configured to determine, in response to a two-factor authentication request, at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation status and an authentication efficiency;

[0097] The authentication module 402 is configured to determine a first target node and a second target node from the at least two target nodes, and authenticate the first factor through the first target node and authenticate the second factor through the second target node.

[0098] Those skilled in the art should understand that Figure 4 The implementation functions of each unit in the blockchain-based two-factor authentication device 400 shown can be understood by referring to the relevant description of the aforementioned blockchain-based two-factor authentication method. Figure 4 The functions of each unit in the blockchain-based two-factor authentication device 400 shown can be implemented by a program running on a processor, or by a specific logic circuit.

[0099] In a possible implementation, the database data used for authentication is stored in the at least one node in a distributed manner, each of the at least one node stores a data copy corresponding to the database data, and each node synchronizes data with other nodes through a point-to-point communication protocol.

[0100] In a possible implementation, the node operation status includes stability, online rate, failure rate, response time and communication quality with other nodes, and the authentication efficiency includes speed, accuracy and resource consumption; the authentication module 402 determines at least two target nodes that meet the authentication conditions in the at least one node, including:

[0101] Determine a node score of each of the at least one node based on at least one of the stability, the online rate, the failure rate, the response time, the quality of communication with other nodes, the speed, the accuracy, and the resource consumption;

[0102] The top two nodes in terms of node scores are selected as target nodes.

[0103] In a possible implementation, the authentication module 402 further includes:

[0104] For each authentication record, the authentication record is packaged into a block, and, after verification through a consensus mechanism, is linked to the end of the blockchain to achieve on-chain storage of the authentication record.

[0105] In a possible implementation, during the authentication process, the first target node and the second target node exchange authentication information in real time to make the logical association between the first factor and the second factor consistent.

[0106] In a possible implementation, the determining module 401 further includes:

[0107] In response to a node addition / deletion operation on the blockchain, a node is added / deleted from the blockchain.

[0108] In a possible implementation, the blockchain further includes a smart contract, which is used to execute and verify the authentication rules and authentication conditions in the two-factor authentication process, and the determination module 401 further includes:

[0109] In response to a first rewrite operation on the smart contract, determining the modified authentication rule and the modified authentication condition; and,

[0110] In response to a second rewrite operation on the smart contract, an applicable node of the authentication rule and the authentication condition is determined, and the applicable node is any node among the at least one node.

[0111] The above-mentioned two-factor authentication device based on blockchain has the following beneficial effects:

[0112] (1) Improve the security and reliability of authentication: By introducing blockchain technology, authentication data is stored in multiple nodes. Each node stores a copy of the data and synchronizes the data through a peer-to-peer communication protocol, which greatly enhances the security and tamper-proof ability of the data. Even if some nodes are attacked or fail, other nodes can still ensure the integrity and consistency of the data. The two-factor authentication mechanism itself can provide higher security than a single factor, and the introduction of blockchain further ensures the transparency and traceability of the authentication process, thereby improving the reliability of authentication.

[0113] (2) Optimizing authentication efficiency and resource utilization: The strategy proposed in the method to determine the target node based on the node operation status and authentication efficiency can ensure that the node with the best performance and highest efficiency is selected during the authentication process. This can not only speed up the authentication process and improve the user experience, but also effectively reduce unnecessary resource consumption. The introduction of smart contracts makes the execution and verification of authentication rules and conditions more automated and efficient, reducing the possibility of human intervention and errors, thereby improving the overall authentication efficiency.

[0114] (3) Flexibility and scalability: This method allows nodes in the blockchain to be dynamically added or deleted according to actual needs, which makes the system highly flexible and scalable. As the business develops or the network environment changes, the number and configuration of nodes can be easily adjusted to meet different authentication needs. The rewritability of smart contracts allows authentication rules and conditions to be adjusted and optimized according to actual conditions, thereby meeting changing authentication needs.

[0115] (4) Enhanced transparency and traceability: By packaging the certification records into blocks and linking them to the blockchain, the certification records can be stored on the chain. This not only makes the certification process more transparent, but also facilitates the subsequent tracing and auditing of the certification records. The immutability of the blockchain ensures the authenticity and integrity of the certification records, providing strong evidence support for possible disputes or conflicts.

[0116] In summary, the blockchain-based two-factor authentication method combines the characteristics of blockchain technology and the advantages of two-factor authentication, and has shown significant beneficial effects in terms of security, reliability, efficiency, flexibility, transparency and traceability. This is of great significance for improving the overall performance and user experience of the authentication system, especially in application scenarios that require high security and reliability.

[0117] like Figure 5 As shown, Figure 5 The present invention provides a schematic diagram of the structure of an electronic device 500, wherein the electronic device 500 includes:

[0118] A processor 501, a storage medium 502 and a bus 503, wherein the storage medium 502 stores machine-readable instructions executable by the processor 501. When the electronic device 500 is running, the processor 501 communicates with the storage medium 502 via the bus 503, and the processor 501 executes the machine-readable instructions to perform the steps of the blockchain-based two-factor authentication method described in the embodiment of the present application.

[0119] In actual application, the components in the electronic device 500 are coupled together via the bus 503. It is understood that the bus 503 is used to realize the connection and communication between these components. In addition to the data bus, the bus 503 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus 503.

[0120] The above electronic device has the following beneficial effects:

[0121] (1) Improve the security and reliability of authentication: By introducing blockchain technology, authentication data is stored in multiple nodes. Each node stores a copy of the data and synchronizes the data through a peer-to-peer communication protocol, which greatly enhances the security and tamper-proof ability of the data. Even if some nodes are attacked or fail, other nodes can still ensure the integrity and consistency of the data. The two-factor authentication mechanism itself can provide higher security than a single factor, and the introduction of blockchain further ensures the transparency and traceability of the authentication process, thereby improving the reliability of authentication.

[0122] (2) Optimizing authentication efficiency and resource utilization: The strategy proposed in the method to determine the target node based on the node operation status and authentication efficiency can ensure that the node with the best performance and highest efficiency is selected during the authentication process. This can not only speed up the authentication process and improve the user experience, but also effectively reduce unnecessary resource consumption. The introduction of smart contracts makes the execution and verification of authentication rules and conditions more automated and efficient, reducing the possibility of human intervention and errors, thereby improving the overall authentication efficiency.

[0123] (3) Flexibility and scalability: This method allows nodes in the blockchain to be dynamically added or deleted according to actual needs, which makes the system highly flexible and scalable. As the business develops or the network environment changes, the number and configuration of nodes can be easily adjusted to meet different authentication needs. The rewritability of smart contracts allows authentication rules and conditions to be adjusted and optimized according to actual conditions, thereby meeting changing authentication needs.

[0124] (4) Enhanced transparency and traceability: By packaging the certification records into blocks and linking them to the blockchain, the certification records can be stored on the chain. This not only makes the certification process more transparent, but also facilitates the subsequent tracing and auditing of the certification records. The immutability of the blockchain ensures the authenticity and integrity of the certification records, providing strong evidence support for possible disputes or conflicts.

[0125] In summary, the blockchain-based two-factor authentication method combines the characteristics of blockchain technology and the advantages of two-factor authentication, and has shown significant beneficial effects in terms of security, reliability, efficiency, flexibility, transparency and traceability. This is of great significance for improving the overall performance and user experience of the authentication system, especially in application scenarios that require high security and reliability.

[0126] The embodiment of the present application also provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 501, the blockchain-based two-factor authentication method described in the embodiment of the present application is implemented.

[0127] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CD ROM); it can also be various devices including one or any combination of the above memories.

[0128] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0129] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).

[0130] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0131] The computer-readable storage medium has the following advantages:

[0132] (1) Improve the security and reliability of authentication: By introducing blockchain technology, authentication data is stored in multiple nodes. Each node stores a copy of the data and synchronizes the data through a peer-to-peer communication protocol, which greatly enhances the security and tamper-proof ability of the data. Even if some nodes are attacked or fail, other nodes can still ensure the integrity and consistency of the data. The two-factor authentication mechanism itself can provide higher security than a single factor, and the introduction of blockchain further ensures the transparency and traceability of the authentication process, thereby improving the reliability of authentication.

[0133] (2) Optimizing authentication efficiency and resource utilization: The strategy proposed in the method to determine the target node based on the node operation status and authentication efficiency can ensure that the node with the best performance and highest efficiency is selected during the authentication process. This can not only speed up the authentication process and improve the user experience, but also effectively reduce unnecessary resource consumption. The introduction of smart contracts makes the execution and verification of authentication rules and conditions more automated and efficient, reducing the possibility of human intervention and errors, thereby improving the overall authentication efficiency.

[0134] (3) Flexibility and scalability: This method allows nodes in the blockchain to be dynamically added or deleted according to actual needs, which makes the system highly flexible and scalable. As the business develops or the network environment changes, the number and configuration of nodes can be easily adjusted to meet different authentication needs. The rewritability of smart contracts allows authentication rules and conditions to be adjusted and optimized according to actual conditions, thereby meeting changing authentication needs.

[0135] (4) Enhanced transparency and traceability: By packaging the certification records into blocks and linking them to the blockchain, the certification records can be stored on the chain. This not only makes the certification process more transparent, but also facilitates the subsequent tracing and auditing of the certification records. The immutability of the blockchain ensures the authenticity and integrity of the certification records, providing strong evidence support for possible disputes or conflicts.

[0136] In summary, the blockchain-based two-factor authentication method combines the characteristics of blockchain technology and the advantages of two-factor authentication, and has shown significant beneficial effects in terms of security, reliability, efficiency, flexibility, transparency and traceability. This is of great significance for improving the overall performance and user experience of the authentication system, especially in application scenarios that require high security and reliability.

[0137] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

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

[0139] In addition, each functional unit in each embodiment of the present application 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.

[0140] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0141] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A two-factor authentication method based on blockchain, characterized in that: The blockchain includes at least one node, each of the at least one node corresponds to an authentication server, and the method includes: In response to a two-factor authentication request, determining at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation condition and an authentication efficiency; Determine a first target node and a second target node from the at least two target nodes, and authenticate the first factor through the first target node and authenticate the second factor through the second target node; During the authentication process, the first target node and the second target node exchange authentication information in real time, so that the logical association between the first factor and the second factor is consistent; The blockchain also includes a smart contract, which is used to execute and verify the authentication rules and authentication conditions in the two-factor authentication process. The method also includes: In response to a first rewrite operation on the smart contract, determining the modified authentication rule and the modified authentication condition; and, In response to a second rewrite operation on the smart contract, an applicable node of the authentication rule and the authentication condition is determined, and the applicable node is any node among the at least one node.

2. The blockchain-based two-factor authentication method according to claim 1, characterized in that: The database data used for authentication is stored in the at least one node in a dispersed manner, each of the at least one node stores a data copy corresponding to the database data, and each node synchronizes data with other nodes through a point-to-point communication protocol.

3. The method according to claim 1, characterized in that The node operation status includes stability, online rate, failure rate, response time and communication quality with other nodes, and the authentication efficiency includes speed, accuracy and resource consumption; The determining at least two target nodes that meet the authentication condition from the at least one node includes: Determine a node score of each of the at least one node based on at least one of the stability, the online rate, the failure rate, the response time, the quality of communication with other nodes, the speed, the accuracy, and the resource consumption; The top two nodes in terms of node scores are selected as target nodes.

4. The method according to claim 1, characterized in that: The method further comprises: For each authentication record, the authentication record is packaged into a block, and, after verification through a consensus mechanism, is linked to the end of the blockchain to achieve on-chain storage of the authentication record.

5. The method according to claim 1, characterized in that The method further comprises: In response to a node addition / deletion operation on the blockchain, a node is added / deleted from the blockchain.

6. A two-factor authentication device based on blockchain, characterized in that: The blockchain includes at least one node, each of the at least one node corresponds to an authentication server, and the device includes: a determination module, configured to determine, in response to a two-factor authentication request, at least two target nodes that meet an authentication condition from the at least one node, wherein the two-factor authentication request includes a first factor and a second factor, and the authentication condition is determined based on at least one of a node operation condition and an authentication efficiency; An authentication module is used to determine a first target node and a second target node from the at least two target nodes, and to authenticate the first factor through the first target node and to authenticate the second factor through the second target node; during the authentication process, the first target node and the second target node exchange authentication information in real time to make the logical association between the first factor and the second factor consistent; the blockchain also includes a smart contract, which is used to execute and verify the authentication rules and authentication conditions in the two-factor authentication process, and the authentication module is also used to respond to a first rewrite operation on the smart contract to determine the modified authentication rules and authentication conditions; and, in response to a second rewrite operation on the smart contract, determine the applicable nodes of the authentication rules and the authentication conditions, and the applicable nodes are any nodes among the at least one node.

7. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the blockchain-based two-factor authentication method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the blockchain-based two-factor authentication method according to any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Distributed identity authentication system based on WEB3 technology

    CN116827520A

  • Digital identity authentication method based on block chain technology

    CN117216740A