A method of resisting chain downlink transmission path lock based on a homomorphic one-way function

CN116781322BActive Publication Date: 2026-08-07HANGZHOU POST QUANTUM CRYPTOGRAPHY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU POST QUANTUM CRYPTOGRAPHY TECH CO LTD
Filing Date
2023-05-10
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

虽然这种想法是借助Hub每次只能传输固定单位大小的数据的特性,提高实施攻击的时间成本,但不能完全阻止富有的攻击者A进行攻击

Benefits of technology

(1)、在本发明中,提出了基于同态单向函数的抵抗链下传输路径被锁定的方法,以此来抵抗LockDown这类攻击并实现链下传输路径的安全性。本发明利用同态单向函数的同态属性保护路径上用户信息的机密性和路径上节点的安全性。这样可以有效避免攻击者根据公开的节点信息发起攻击锁定链下传输路的问题,同时,可以减少交易费用和交易时间,提高交易效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781322B_ABST
    Figure CN116781322B_ABST
Patent Text Reader

Abstract

The application discloses a method for resisting chain transmission path locking based on a homomorphic one-way function, comprising natural number n hinge nodes and a plurality of user nodes, and comprising the following steps: S1, setting the total transmission times; S2, randomly selecting a manager node from the hinge nodes, and ensuring that the manager node does not serve every time of transmission; S3, selecting the shortest path as a payment channel; S4, encrypting the shortest path through a homomorphic one-way function; and S5, the manager node performing data transmission. The application proposes a method for resisting chain transmission path locking based on a homomorphic one-way function, so as to resist LockDown type attacks and realize the security of the chain transmission path. The application utilizes the homomorphic property of the homomorphic one-way function to protect the confidentiality of user information on the path and the security of the nodes. In this way, the problem that an attacker initiates an attack to lock the chain transmission path according to the public node information can be effectively avoided, meanwhile, the transaction cost and the transaction time can be reduced, and the transaction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and in particular to a method for locking transmission paths under a resistance chain based on homomorphic one-way functions. Background Technology

[0002] Blockchain differs from traditional networks in two main ways: data tamper-proofing and decentralization. Based on these characteristics, the data recorded on the blockchain is more reliable, helping to solve the problem of mutual distrust. Subsequently, blockchain was used as the underlying technology for cryptocurrencies such as Bitcoin and Ethereum, but its data transmission throughput is far from meeting user needs. Therefore, blockchain scalability has become the most pressing issue. Three different layer-2 scalability solutions have been proposed in the industry. In the Layer 2 off-chain scaling solution, researchers transfer the transmission of high-frequency, small-volume data packets to a bidirectional channel between two off-chain nodes, thereby reducing the verification burden on the blockchain, reducing transmission time, and improving the efficiency of high-frequency, small-volume data transmission between users.

[0003] However, off-chain channels have some problems in use, such as the channel transmission path being locked. Transmission in a network composed of off-chain channels requires packaging information such as the names of all intermediary nodes on the path and the channel transmission capacity to the sending node. The sending node can then launch a Lockdown attack against a specific intermediary node based on this information. A Lockdown attack primarily involves attacker A targeting a node B in the path, initiating a cyclic transmission based on the sum of the transmission capacity of all incoming (or outgoing) channels of node B (the transmission value is the sum of the transmission capacity in the incoming direction). This allows attacker A to exhaust node B's transmission capacity in that direction (making it zero), compromising the security and effectiveness of the path, and ultimately causing partial paralysis of the off-chain network. The above describes an attack scenario involving multiple intermediary nodes. For off-chain payment channel networks with only one intermediary, transfers can be made through a specific Hub node. While this method ensures that the Hub node is unaware of the correspondence between multiple senders and receivers—relationship anonymity—it cannot guarantee that its intermediary node is immune to Lockdown attacks.

[0004] Serial transmission of small data packets via a hub significantly increases the economic cost of attacks and suppresses their occurrence, but it does not completely solve the security problem. For details on the problems with the serial method, please refer to [link to relevant documentation]. Figure 2 Attacker A can initiate cyclic transmissions through the same Hub node. While this idea leverages the fact that a Hub can only transmit a fixed unit of data at a time to increase the time cost of launching an attack, it cannot completely prevent a wealthy attacker A from launching an attack. Therefore, existing off-chain transmission schemes cannot guarantee the security and confidentiality of the transmission path through intermediary nodes.

[0005] To address this issue, the present invention proposes a method for resisting the locking of transmission paths under a homomorphic one-way function to solve the aforementioned technical problem. Summary of the Invention

[0006] The purpose of this invention is to provide a method for resisting the locking of transmission paths under the resistance chain based on homomorphic one-way functions, so as to overcome the shortcomings of the prior art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: This application discloses a method for locking the transmission path under the resistance chain based on a homomorphic one-way function, including n hub nodes and several user nodes, where n is a natural number, and includes the following steps: S1: Set the total number of transmissions; S2: During each transmission, a hub node is randomly selected from all hub nodes as the manager node, and a verification algorithm is used to ensure that the manager node is not involved in every transmission. S3: Arrange all hub nodes and user nodes in sequence and select the shortest path as the payment channel; S4: The manager node encrypts the shortest path using a homomorphic one-way function; S5: The manager node obtains a set time and begins data transmission after all hub nodes have completed transmission preparation.

[0008] As a preferred option, the total number of transmissions is set, with a maximum of n*(n-1) transmissions.

[0009] Preferably, the verification algorithm in S2 includes the following sub-steps: S21: Set the election count for all hub nodes to 0; S22: Randomly select a hub node; S23: Check the number of elections for the hub node. If the number of elections is less than n-1, then the hub node is the manager node, and record the number of elections for the hub node +1; otherwise, return to S22.

[0010] Preferably, step S3 includes the following sub-steps: S31: Starting from the sender user node, all hub nodes and user nodes are arranged sequentially, with a hub node connecting any two adjacent user nodes. S32: Find the shortest path by considering factors such as the capacity and cost of the payment channel; S33: Determine the payment path based on the shortest path.

[0011] Preferably, step S4 includes the following sub-steps: S41: The manager node acquires a homomorphic one-way function; S42: The manager node encrypts user information using a homomorphic one-way function and obtains the output information; S43: The usernames of each node are anonymous to complete the construction of the topology network, and the output of the algorithm is the encrypted path information; S44: The administrator node obtains a verification message as a verification of the encrypted message; S45: The administrator node transmits the output information and corresponding verification information to the receiving user node.

[0012] Preferably, the verification information in S44 includes a proof π of a zero-knowledge proof obtained by the administrator node, and the receiving user node can verify the correctness of the encrypted information based on the proof π.

[0013] Preferably, step S5 includes the following sub-steps: S51: The manager node obtains a set time; S52: Within a set time, each hub node, after completing the transmission preparation, returns an acknowledgment message to the manager node to indicate that the hub node has participated in this parallel transmission. S53: After the set time is received, if the manager node receives all confirmation messages, it returns a reply message to each hub node and proceeds to S54; otherwise, it stops. S54: Start data transmission; S55: After the transmission is completed, each hub node sends the remaining data transmission capacity to the manager node; S56: The management node verifies the data transmission capacity of each hub node. If the verification is correct, each hub node uploads the data transmission capacity, thus completing the final transmission; otherwise, the transmission is aborted.

[0014] This application also discloses a solution to the problem of transmission path locking under a resistance chain based on homomorphic one-way functions, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned method for transmission path locking under a resistance chain based on homomorphic one-way functions.

[0015] This application also discloses a computer-readable storage medium storing a program that, when executed by a processor, implements the above-described method for locking the transmission path under a resistance chain based on a homomorphic one-way function.

[0016] The beneficial effects of this invention are: (1) This invention proposes a method based on homomorphic one-way functions to resist the locking of off-chain transmission paths, thereby resisting LockDown attacks and ensuring the security of off-chain transmission paths. This invention utilizes the homomorphic property of homomorphic one-way functions to protect the confidentiality of user information on the path and the security of nodes on the path. This effectively avoids the problem of attackers locking off-chain transmission paths by launching attacks based on publicly available node information. Simultaneously, it reduces transaction fees and transaction time, improving transaction efficiency.

[0017] The features and advantages of the present invention will be described in detail through embodiments and in conjunction with the accompanying drawings. Attached Figure Description

[0018] Figure 1 This is a schematic diagram illustrating the steps of a method for locking the transmission path under a resistance chain based on a homomorphic one-way function according to the present invention. Figure 2 This is a schematic diagram of the path for serial transmission through the same hub, which is the background technology of this invention; Figure 3 This is a schematic diagram of the algorithm for the manager node election phase of this invention; Figure 4 This is a schematic diagram of the path information encryption algorithm of the present invention; Figure 5 This is a flowchart illustrating a method for locking the transmission path under a resistance chain based on a homomorphic one-way function according to the present invention. Figure 6 This is a hardware structure diagram of a method for locking the transmission path under a resistance chain based on a homomorphic one-way function according to the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0020] See Figure 1 , Figure 5 This invention provides a method for locking transmission paths under a resistance chain based on homomorphic one-way functions, including n hub nodes and several user nodes, where n is a natural number, and includes the following steps: S1: Set the total number of transmissions; S2: During each transmission, a hub node is randomly selected from all hub nodes as the manager node, and a verification algorithm is used to ensure that the manager node is not involved in every transmission. S3: Arrange all hub nodes and user nodes in sequence and select the shortest path as the payment channel; S4: The manager node encrypts the shortest path using a homomorphic one-way function; S5: The manager node obtains a set time and begins data transmission after all hub nodes have completed transmission preparation.

[0021] Set the total number of transmissions, with a maximum of n*(n-1) transmissions.

[0022] See Figure 3 The verification algorithm in S2 includes the following sub-steps: S21: Set the election count for all hub nodes to 0; S22: Randomly select a hub node; S23: Check the number of elections for the hub node. If the number of elections is less than n-1, then the hub node is the manager node, and record the number of elections for the hub node +1; otherwise, return to S22. See Figure 4 S3 includes the following sub-steps: S31: Starting from the sender user node, all hub nodes and user nodes are arranged sequentially, with a hub node connecting any two adjacent user nodes. S32: Find the shortest path by considering factors such as the capacity and cost of the payment channel; S33: Determine the payment path based on the shortest path.

[0023] S4 includes the following sub-steps: S41: The manager node acquires a homomorphic one-way function; S42: The manager node encrypts user information using a homomorphic one-way function and obtains the output information; S43: The usernames of each node are anonymous to complete the construction of the topology network, and the output of the algorithm is the encrypted path information.

[0024] S44: The administrator node obtains a verification message as a verification of the encrypted message; S45: The administrator node transmits the output information and corresponding verification information to the receiving user node.

[0025] The verification information in S44 includes a proof π of a zero-knowledge proof obtained by the administrator node, and the receiving user node can verify the correctness of the encrypted information based on the proof π.

[0026] S5 includes the following sub-steps: S51: The manager node obtains a set time; S52: Within a set time, each hub node, after completing the transmission preparation, returns an acknowledgment message to the manager node to indicate that the hub node has participated in this parallel transmission. S53: After the set time is received, if the manager node receives all confirmation messages, it returns a reply message to each hub node and proceeds to S54; otherwise, it stops. S54: Start data transmission; S55: After the transmission is completed, each hub node sends the remaining data transmission capacity to the manager node; S56: The management node verifies the data transmission capacity of each hub node. If the verification is correct, each hub node uploads the data transmission capacity, thus completing the final transmission; otherwise, the transmission is aborted.

[0027] This invention can be applied to any device with data processing capabilities, such as a computer or other similar device. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 6 The diagram shown is a hardware structure diagram of any data processing-capable device, which is the solution to the problem of locked transmission path under the resistance chain based on homomorphic one-way functions according to the present invention. Except for... Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of that data processing device, which will not be elaborated further. The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0028] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0029] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the solution to the problem of locked transmission path under the resistance chain based on homomorphic one-way functions in the above embodiments.

[0030] The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card (SMART / Media Card, MC), SD card, flash memory card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0031] A method for locking the transmission path under the resistance chain based on homomorphic one-way functions includes the following steps: S1: The upper limit of the number of transmissions is determined according to the number of hub nodes set. In this embodiment, there are 4 hub nodes set, and the number of consecutive times of each hub node cannot exceed n times (i.e., 4 times). Therefore, the total number of transmissions is 4*(4-1), which is 12 times. When the number of transmissions reaches 12 times, the current round of transmission ends.

[0032] S2: Management Election Phase. In this phase, Hub nodes along the path participate in an election to ultimately elect a management node for this data transmission. The management node M is elected randomly and cannot be re-elected for n-1 times (n is the total number of participants). Its pseudocode is as follows: Figure 3 As shown. The purpose of this stage is to select a manager node M to process the originally serial transmission in parallel, thereby improving transmission efficiency. At the same time, the elected Hub node can determine whether the same node has initiated a circular transmission based on the message reply in S3.

[0033] First, we define a function to randomly select a manager node. Since each node has an equal probability of being selected, we can use Python's `rando manager node M.choice()` function to randomly select an element. We store the names of the four nodes in separate lists, and then use this function to randomly select an element.

[0034] Next, we will simulate the entire election process. We define a counter to record the number of consecutive terms each person serves, and then use a while loop to simulate multiple rounds of continuous elections. In each round, we first randomly select a manager, and then check if that node has already been re-elected three times (the maximum is n-1 times). If so, we randomly select a new manager, continuing until a person who has not yet served three consecutive terms is elected. Finally, we return the manager's name and their number of consecutive terms. For the specific implementation of the election algorithm, see [link to implementation details]. Figure 3 .

[0035] S3: Determine the shortest path.

[0036] (1) Represent all payment channel hubs and nodes and their payment channel connections as a graph, where nodes and hubs are nodes of the graph and payment channels are lines in the graph.

[0037] (2) Finding the shortest path. Using node A as the starting point and node F as the ending point, find the shortest path in the payment channel network graph. In this process, factors such as the capacity and cost of the payment channels need to be considered. Based on the shortest path obtained by the algorithm, determine the payment path. On the payment path, check in turn whether the capacity of each payment channel is sufficient; if not, select another payment channel.

[0038] S4: Path information encryption stage. For example... Figure 4 As shown, this invention utilizes the properties of homomorphic one-way functions to encrypt user information along a path. The encryption is implemented through an algorithm. After encryption, attacker A cannot obtain information such as usernames and transmission margins of all intermediate nodes along the path, thus preventing cyclic transmission and successfully resisting a Lockdown attack. Specifically, the range D → domain R of the (linear) homomorphic one-way function g is one-way. Given a random element x ∈ R, it is difficult to compute a y ∈ D such that g(y) = x. If D and R define two abelian groups, and for any pair (a, b) ∈ D², g(a ° b) = g(a) ° g(b), where ° represents group operations, this invention states that the function g is homomorphic.

[0039] like Figure 4As shown, this invention utilizes the property of homomorphic one-way functions to encrypt user information along the path, and packages the encrypted information for the receiving node A. The encryption process is implemented by the manager node M, generated by S2, in the form of an algorithm. Each time the manager node M executes the algorithm for this stage, the usernames of each node are anonymously used to construct the topology network, and the algorithm's output is the encrypted path information. Subsequently, the manager node M sends the output and a zero-knowledge proof π to the receiving node. The receiving node can then use the proof π and the manager node M to perform a zero-knowledge proof, thus verifying the correctness of its encrypted message without decryption.

[0040] To protect privacy, homomorphic one-way function encryption is used when the algorithm outputs its results. A homomorphic one-way function is an encryption technique that allows computation without exposing the data. Specifically, a homomorphic encryption algorithm can be used to encrypt the shortest path, and the encrypted result is then sent to the recipient. The recipient can then use a homomorphic decryption algorithm to decrypt the result without needing to know the original data.

[0041] On the one hand, if attacker A acts as sender A in this encryption attack, they cannot obtain information such as the usernames and transmission capacity of all intermediary nodes along the path. Therefore, they cannot know whether node B is in the path, and thus cannot initiate a loop transmission targeting node B. On the other hand, because the attacker cannot see the channels owned by node B at this stage, they cannot determine the amount of transmission required to attack node B or the specific channels that node B possesses. In conclusion, this successfully defends against a Lockdown attack.

[0042] S5: Data packet transmission phase. See also Figure 5 After the first two stages, the correctness and reliability of the data transmission path can be guaranteed. Then, the traditional Hub transmission rules can be followed. Specifically, within the specified time t1, each Hub generates a puzzle z and returns a message mes1 to the selected manager node M in S1. After receiving the prepared messages mes1 from all Hubs, manager node M returns a confirm1 to each Hub to begin parallel data transmission (the process uses hash time locks and other technologies, similar to traditional off-chain transmission). Manager node M completes the data transmission and verifies the encrypted channel transmission capacity in the replies from other Hub nodes. Finally, manager node M returns a confirm2 to each Hub, agreeing that each node in the group will broadcast its latest transmission capacity to the blockchain, thus completing the transmission of this small share of data packets.

[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for locking the transmission path under a resistance chain based on a homomorphic one-way function, characterized in that: It includes n hub nodes and several user nodes, where n is a natural number, and includes the following steps: S1: Set the total number of transmissions; S2: During each transmission, a hub node is randomly selected from all hub nodes as the manager node. A verification algorithm ensures that the manager node is not re-elected for every transmission. The verification algorithm in S2 includes the following sub-steps: S21: Set the election count of all hub nodes to 0; S22: Randomly select a hub node; S23: Check the election count of the hub node. If the election count is less than n-1, the hub node is the manager node, and the election count of the hub node is recorded as +1; otherwise, return to S22. S3: Arrange all hub nodes and user nodes in sequence and select the shortest path as the payment channel; S4: The manager node encrypts the shortest path using a homomorphic one-way function; S4 includes the following sub-steps: S41: The manager node obtains a homomorphic one-way function; S42: The manager node encrypts user information using the homomorphic one-way function and obtains output information; S43: The usernames of each node are anonymous to complete the construction of the topology network, and the output of the homomorphic one-way function algorithm is the encrypted path information; S44: The manager node obtains verification information as verification of the encrypted information; S45: The manager node transmits the output information and the corresponding verification information to the receiving user node; S5: The manager node obtains a set time and begins data transmission after all hub nodes have completed transmission preparation.

2. The method for locking the transmission path under the resistance chain based on homomorphic one-way functions as described in claim 1, characterized in that: Set the total number of transmissions, with a maximum of n. (n-1) items.

3. The method for locking the transmission path under the resistance chain based on homomorphic one-way functions as described in claim 1, characterized in that: S3 includes the following sub-steps: S31: Starting from the sender user node, all hub nodes and user nodes are arranged sequentially, with a hub node connecting any two adjacent user nodes. S32: Find the shortest path by considering the capacity and cost factors of the payment channel; S33: Determine the payment path based on the shortest path.

4. The method for locking the transmission path under the resistance chain based on homomorphic one-way functions as described in claim 1, characterized in that: The verification information in S44 includes a proof π of a zero-knowledge proof obtained by the administrator node, and the receiving user node can verify the correctness of the encrypted information based on the proof π.

5. The method for locking the transmission path under the resistance chain based on homomorphic one-way functions as described in claim 1, characterized in that: S5 includes the following sub-steps: S51: The manager node obtains a set time; S52: Within a set time, each hub node, after completing the transmission preparation, returns an acknowledgment message to the manager node to indicate that the hub node has participated in this parallel transmission. S53: After the set time is received, if the manager node receives all confirmation messages, it returns a reply message to each hub node and proceeds to S54; otherwise, it stops. S54: Start data transmission; S55: After the transmission is completed, each hub node sends the remaining data transmission capacity to the manager node; S56: The management node verifies the data transmission capacity of each hub node. If the verification is correct, each hub node uploads the data transmission capacity, thus completing the final transmission; otherwise, the transmission is aborted.

6. A solution to the problem of transmission path locking under a resistance chain based on homomorphic one-way functions, characterized in that: The device includes a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement the method for locking the transmission path under the resistance chain based on a homomorphic one-way function as described in any one of claims 1-5.

7. A computer-readable storage medium, characterized in that: It stores a program that, when executed by a processor, implements the method for locking the transmission path under the resistance chain based on a homomorphic one-way function as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method and system for processing transactions in a blockchain network

    EP3846062A1

  • HASH function attacks

    US20220321360A1