A trusted protection method for smart contracts based on alliance chain

By building a flat fan network system with trusted computing on the alliance chain, using the metric verification of subject and environmental information, the security problem of the smart contract calling process is solved, the entire process security control of the contract text is realized, and the area is enhanced Security of blockchain systems.

CN114462006BActive Publication Date: 2024-12-24BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210144614.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2024-12-24
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

The existing technology cannot effectively protect the security of the smart contract calling process in the blockchain system, resulting in a large number of security incidents in the blockchain ecosystem, especially when nodes call smart contracts, lack of sufficient security guarantees.

Method used

Using a trusted computing method, a flat fan-shaped secondary network system centered on the alliance chain is built on the alliance chain to realize dynamic security control of the contract text throughout the process, and the measurement of subject identity information and environmental information is used. Values ​​are validated to prevent illegal intrusions and overprivileged access.

Benefits of technology

The full-time and space-time process security control of smart contracts is realized, the credibility of the contract calling process is enhanced, illegal theft and illegal calls are prevented, and the overall security of the blockchain system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462006B_ABST
    Figure CN114462006B_ABST
Patent Text Reader

Abstract

A trusted protection method for smart contracts based on alliance chain belongs to the field of information security technology. The implementation steps are as follows: (1) construct a smart contract based on the alliance chain main controller CPU s The node controller CPU for the center and related contracts on the chain n The fan-shaped secondary network system is a leaf node. The former is called the central control subsystem, and the latter is called the contract node distributed system. (2) CPU s Define the measurement values ​​of the subject and object, the subject sample library, and the object access permission value, and publish them to the entire network. (3) Based on the contract text, the former establishes a sample database including the subject identity and subject environment, and the latter establishes a sample trusted object database including the contract access permission as the object, and publishes it to the relevant contract nodes. (4) The access control modules in the front and back subsystems review the trusted subject and object permissions of the visiting customers respectively, and file them with the former to ensure that non-legal personnel of this node cannot call the contract text and ensure the security of the contract file data. (5) Each contract node can report to the CPU s Upload new subject samples and add them to the sample database after confirmation by the entire network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a trusted protection method for smart contracts based on alliance chain, which belongs to the field of the reinforcement method of each related contract node of the same contract file in the alliance chain. Background Art

[0002] Liu Mingda et al. proposed a trusted extension scheme from terminal to network in the article "Distributed Trusted Network Connection Architecture Based on Blockchain". The scheme requires that the terminal joining the trusted network environment must be installed with a trusted root TPM / TCM. On the one hand, the trusted root can provide identity authentication for the node, and on the other hand, it can provide trusted support for node security. The scheme uses a trusted third party to implement attribute-based remote attestation or direct anonymous authentication. The two communicating parties confirm the trustworthiness of the node by providing integrity evidence before transmitting data. However, the scheme does not elaborate on the remote attestation part, and lacks the specific content required for the node to prove its trustworthiness. In general, the remote attestation only provides the data verification results of the node's basic environment, and unverified data cannot prove its trustworthiness. Therefore, the scheme can only ensure that the basic environment of the node where the smart contract is located is trustworthy, and lacks trusted verification for the use of the smart contract.

[0003] Wang Xiaoping et al. designed a node trust transfer chain based on blockchain in the patent number CN 112287350 A, entitled "A static measurement method for an active immune trusted computing platform for blockchain master nodes". The scheme builds an active immune system by creating parallel computing components and protection components, taking the active immune chip in the protection component as the trust root, and measuring the computing component step by step through the chip agent. In addition to the transfer from the chip to the operating system, the trust chain also includes the trust transfer process extended to the blockchain system. In the process of extending to the blockchain system, the startup code of the consensus module, distributed communication module, transaction generation module, etc. in the computing component is first intercepted and then measured and finally started to ensure the credibility of the blockchain system. Compared with the previous scheme, the process of extending from the operating system to the blockchain application is added, but the trusted protection process is also limited to the blockchain system startup process, ignoring the security protection of the smart contract deployment and calling process.

[0004] In order to build a "distributed trusted network connection architecture based on blockchain", Liu Mingda and others required the organizer and the invited party to confirm the credibility of the nodes to each other by providing integrity evidence before transmitting data, and thus proposed a trusted extension method from the terminal to the network.

[0005] Wang Xiaoping and others used the active immune chip in the defense component as the root of trust to solve the reliability of the blockchain system startup process, but were unable to solve the security of the smart contract during the calling process.

[0006] However, according to statistics from SlowMist Hacked, from 2012 to December 2021, there were 550 public blockchain security incidents in the blockchain ecosystem, with a total loss of approximately $20,931,597,104.74. Most of these attacks occurred during the process of nodes calling smart contracts, and the smart contract calling process requires higher security protection. Trusted computing technology can verify the credibility of the node environment, and at the same time, it can also perform trusted verification of key links in the contract calling process to enhance the credibility of the contract calling process.

[0007] In order to prevent non-alliance chain personnel, non-contract node personnel in the alliance chain, or other unauthorized personnel in the contract node from stealing or illegally calling contract files from the beginning of the event process, the present invention uses the legal representative of the contracting party as the subject identity information, the blockchain where the alliance chain is located, the IP address of the contracting party as the subject environment information, the contract text as the object identity information, the access right as the object importance information, and the trusted measurement values ​​obtained through trusted calculation as trusted samples, forming a centered alliance chain main controller and each contract node CPU n It is a central radiating network of leaf nodes, and uses it as a trusted hardware platform. Starting from the time when the event occurs and the source of the event, it prevents the above three types of external intruders from disrupting the entire transaction process in the name of inquiries.

[0008] The applicant declares that the subject identity information characteristic values ​​involved in the technical solution of the present invention, including but not limited to privacy information such as the subject's name, the subject's professional identity certificate number, etc., have been authorized by the subject's identity information holder, and the relevant operations comply with the "Personal Information Protection Law of the People's Republic of China", "Cybersecurity Law" and other relevant laws and regulations. Summary of the invention

[0009] The purpose of the present invention is to dynamically and securely control the contract text throughout the entire process, starting from the moment the transaction is initiated and the contract text is first called.

[0010] The present invention is characterized in that it is composed of a flattened fan-shaped secondary network system based on a trusted computing submodule, with a consortium chain main controller located at any node of the consortium chain as the center, and with each contract-related node on the consortium chain as a leaf node, hereinafter referred to as the system, and the system is implemented in the following steps in sequence:

[0011] Step (1), the system construction includes a main controller CPU based on the alliance chain s The central control subsystem is mainly composed of a node controller CPU on N contract nodes. nThe central-radiated distributed control subsystem is constructed in parallel. In addition to unified coordination of the entire network, the former is also responsible for the identity information measurement of visitors, while the latter is mainly responsible for the data security of the contract text on each contract node, including:

[0012] The central controller subsystem has a main controller CPU s In addition, it is also equipped with: an identity information measurement value calculation module of the contract method person representative as the subject, a subject environment information measurement value calculation module, a contract access module, a central access control module and a subject information input terminal, among which:

[0013] Subject identity information measurement value calculation module: a trusted computing TPCM module is built in. The input information is the subject identity information hash value, which is formed by the concatenation of the subject identity information feature value and the subject social information feature value. The subject identity information feature value is formed by the concatenation of the subject's name and the subject's professional identity certificate number. The subject social information feature value is formed by the concatenation of the subject's current work unit and work department. The output information is the subject identity information measurement value.

[0014] The subject environment information measurement value calculation module has a trusted computing TPCM module. The input information is the hash value of the blockchain name where the subject is located and the address of the subject in the alliance chain. The output information is the subject environment information measurement value.

[0015] Contract access module, which is used by the contract to access the CPU m , a measurement value information cache module and a measurement value information database of a sample contract are interconnected in sequence, and the object information measurement value in the measurement value information database is temporarily defaulted;

[0016] Central access control module is a central access control CPU c , used to prevent nodes outside the alliance chain, nodes within the alliance chain other than the contract node, and unauthorized personnel within each contract node from illegally calling the contract node and contract text;

[0017] The central-radiation distributed control subsystem consists of the sub-controller CPUs on each contract node. n Each contract node controlled by the system is constructed in parallel, except for the sub-controller CPU. n In addition, it also includes: a measurement value calculation module for the contract text as the object, an access right measurement value calculation module for the identity importance feature of the object equivalently replaced by a two-choice data selection module, an object measurement value access module, and an object information measurement value access control module CPU c.n ;

[0018] The contract text measurement value calculation module has a built-in trusted computing TPCM module. The input information is at least the serial number of the contract text in the measurement value information database of this node, the hash value of the contract name, version number, and signing date, and the output information is the measurement value of the contract file as the object;

[0019] A data selection module that selects one from two. The input information is '1', which means access is allowed. The input information is '0', which means access is denied. The output information is the same as the input information.

[0020] Object measurement value access module, access CPU by object information m.n , the object measurement value information cache module, and the object measurement value information database are interconnected in sequence, and the CPU m.n Represents the object information access module m of the nth contract node;

[0021] The object information measurement access control module is a CPU that controls the access control of the contract node where it is located. c.n , which is used to prevent users who have passed the subject identity information verification but do not meet the access permission level in this contract node from calling the contract text beyond their authority;

[0022] In the fan-shaped two-level network system, the main controller CPU s And own the CPU of each contract node controller in the same contract n N wireless communication networks are established within the system to be used for:

[0023] (a) For main controller CPU s From any contract node CPU when necessary n It can retrieve various required information including the measurement information of new customers or send relevant information, including providing special access control rights to the legal representative of a contract node, or reducing the access control rights of certain objects.

[0024] (b) After the contract is signed, the relevant nodes of the contract report the changes in the subject identity in the contract text to the main controller CPU s Recorded and approved by the CPU s Send it to the other contracting parties, and after reaching a consensus, revise the original contract text and submit it to the CPU s Record keeping;

[0025] (c) Similarly, a wireless communication network is established by interconnecting the contract nodes under the same contract in sequence;

[0026] Step (2) System initialization: After the system is established, each contract node of the same contract text sends a message to the main controller CPU. sSending the object information measurement value to the measurement value information database in the contract access module in the central control subsystem to make up for the lack of its object information measurement value,

[0027] Step (3) the main controller CPU s Follow the steps below to implement the smart contract trusted protection method based on the alliance chain:

[0028] Step (3.1) The subject information measurement value access control module uses the subject identity information measurement value of the contract text in the sample database to measure the subject identity information measurement value of the visiting customer; the contract subject environment information measurement value is used to measure the environment information measurement value of the visiting customer:

[0029] If both are not equal or only one is not equal, it means that the visiting client is not a member of the alliance chain or a non-contract node member in the alliance chain, and access is denied. If both are equal, it means that the visitor is a member of the contract node of this alliance chain, and step (3.2) is executed;

[0030] Step (3.2) Alliance chain main controller CPU s According to the pre-made contract text-node IP list, find the node IP corresponding to the node sub-controller CPU n Verify the object information of visiting customers

[0031] Step (3.3) The customer information metric control module CPU on the node n c.n , controller CPU according to node n The instruction verifies the customer information measurement value of the visiting customer with the customer information measurement value in the sample database: if the two are not equal, it indicates that the sample database does not have the contract text required by the visiting customer, and the access is denied. Otherwise, execute step (3.4);

[0032] Step (3.4) In response to the requirements of the object information measurement value access control module of the contract node: the alliance chain main controller CPU s Send the corresponding finite positive integer represented by the access permission data measurement value to the object information measurement value access control module CPU on node n c.n On the top, measure the corresponding measurement value of the visiting customer: if the two are not equal, it means that the visiting customer is an unauthorized visitor to this node and the access is denied; if the two are equal, it means that the visiting customer is a staff member authorized to access this node and the access is granted, and the program terminates.

[0033] The advantages of the present invention are:

[0034] (1) The contract text as the object on each contract node implements security control over the entire time and space process.

[0035] (2) The system adopts a hub-and-spoke distributed computing architecture, and the contract nodes use cloud storage, which facilitates the expansion of the alliance chain in terms of the number of members. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Design idea diagram of the present invention.

[0037] Figure 2 Main program flow chart of the present invention.

[0038] Figure 3 System structure block diagram.

[0039] Figure 4 A diagram of a hub-and-spoke network. DETAILED DESCRIPTION

[0040] The technical solution adopted by the present invention is a trusted protection method for smart contracts based on alliance chain, and the implementation steps of the method are as follows:

[0041] Step (1), the system construction includes a main controller CPU based on the alliance chain s The central control subsystem is mainly composed of a node controller CPU on N contract nodes. n The central-radiated distributed control subsystem is constructed in parallel. In addition to unified coordination of the entire network, the former is also responsible for the identity information measurement of visitors, while the latter is mainly responsible for the data security of the contract text on each contract node, including:

[0042] The central controller subsystem has a main controller CPU s In addition, it is also equipped with: an identity information measurement value calculation module of the contract method person representative as the subject, a subject environment information measurement value calculation module, a contract access module, a central access control module and a subject information input terminal, among which:

[0043] Subject identity information measurement value calculation module: a trusted computing TPCM module is built in. The input information is the subject identity information hash value, which is formed by the concatenation of the subject identity information feature value and the subject social information feature value. The subject identity information feature value is formed by the concatenation of the subject's name and the subject's professional identity certificate number. The subject social information feature value is formed by the concatenation of the subject's current work unit and work department. The output information is the subject identity information measurement value.

[0044] The subject environment information measurement value calculation module has a trusted computing TPCM module. The input information is the hash value of the blockchain name where the subject is located and the address of the subject in the alliance chain. The output information is the subject environment information measurement value.

[0045] Contract access module, which is used by the contract to access the CPU m, a measurement value information cache module and a measurement value information database of a sample contract are interconnected in sequence, and the object information measurement value in the measurement value information database is temporarily defaulted;

[0046] Central access control module is a central access control CPU c , used to prevent nodes outside the alliance chain, nodes within the alliance chain other than the contract node, and unauthorized personnel within each contract node from illegally calling the contract node and contract text;

[0047] The central-radiation distributed control subsystem consists of the sub-controller CPUs on each contract node. n Each contract node controlled by the system is constructed in parallel, except for the sub-controller CPU. n In addition, it also includes: a measurement value calculation module for the contract text as the object, an access right measurement value calculation module for the identity importance feature of the object equivalently replaced by a two-choice data selection module, an object measurement value access module, and an object information measurement value access control module CPU c.n ;

[0048] The contract text measurement value calculation module has a built-in trusted computing TPCM module. The input information is at least the serial number of the contract text in the measurement value information database of this node, the hash value of the contract name, version number, and signing date, and the output information is the measurement value of the contract file as the object;

[0049] A data selection module that selects one from two. The input information is '1', which means access is allowed. The input information is '0', which means access is denied. The output information is the same as the input information.

[0050] Object measurement value access module, access CPU by object information m.n , the object measurement value information cache module, and the object measurement value information database are interconnected in sequence, and the CPU m.n Represents the object information access module m of the nth contract node;

[0051] The object information measurement access control module is a CPU that controls the access control of the contract node where it is located. c.n , which is used to prevent users who have passed the subject identity information verification but do not meet the access permission level in this contract node from calling the contract text beyond their authority;

[0052] In the fan-shaped two-level network system, the main controller CPU s And own the CPU of each contract node controller in the same contract n N wireless communication networks are established within the system to be used for:

[0053] (a) For main controller CPUs From any contract node CPU when necessary n It can retrieve various required information including the measurement information of new customers or send relevant information, including providing special access control rights to the legal representative of a contract node, or reducing the access control rights of certain objects.

[0054] (b) After the contract is signed, the relevant nodes of the contract report the changes in the subject identity in the contract text to the main controller CPU s Recorded and approved by the CPU s Send it to the other contracting parties, and after reaching a consensus, revise the original contract text and submit it to the CPU s Record keeping;

[0055] (c) Similarly, a wireless communication network is established by interconnecting the contract nodes under the same contract in sequence;

[0056] Step (2) System initialization: After the system is established, each contract node of the same contract text sends a message to the main controller CPU. s Sending the object information measurement value to the measurement value information database in the contract access module in the central control subsystem to make up for the lack of its object information measurement value,

[0057] Step (3) Main controller CPU s Follow the steps below to implement the smart contract trusted protection method based on the alliance chain:

[0058] Step (3.1) The subject information measurement value access control module uses the subject identity information measurement value of the contract text in the sample database to measure the subject identity information measurement value of the visiting customer; the contract subject environment information measurement value is used to measure the environment information measurement value of the visiting customer:

[0059] If both are not equal or only one is not equal, it means that the visiting client is not a member of the alliance chain or a non-contract node member in the alliance chain, and access is denied. If both are equal, it means that the visitor is a member of the contract node of this alliance chain, and step (3.2) is executed;

[0060] Step (3.2) Alliance chain main controller CPU s According to the pre-made contract text-node IP list, find the node IP corresponding to the node sub-controller CPU n Verify the object information of visiting customers

[0061] Step (3.3) The customer information metric control module CPU on the node n c.n , controller CPU according to node nThe instruction is to verify the customer information measurement value of the visiting customer with the customer information measurement value in the sample database: if the two are not equal, it means that there is no contract text required by the visiting customer in the sample database, and the access is denied. Otherwise, execute step (3.4);

[0062] Step (3.4) In response to the requirements of the object information measurement value access control module of the contract node: the alliance chain main controller CPU s Send the corresponding finite positive integer represented by the access permission data measurement value to the object information measurement value access control module CPU on node n c.n On the top, measure the corresponding measurement value of the visiting customer: if the two are not equal, it means that the visiting customer is an unauthorized visitor to this node and the access is denied; if the two are equal, it means that the visiting customer is a staff member authorized to access this node and the access is granted, and the program terminates.

[0063] The present invention takes the following measures in implementation.

[0064] 1. For groups that attempt to invade the alliance chain to illegally steal or call contract texts, including non-alliance chain personnel, intruders who take advantage of the opportunity to invade non-contract nodes in the alliance chain, and unauthorized intruders in this node, a total of three types of illegal intruders, access is implemented from the source of the accident, from the beginning of the invasion, the entire process, and the entire time range.

[0065] 2. Using the original contract text or its derived revised versions as samples, trusted calculations are performed on various access requirements, which has the advantages of being objective, fast, and accurate.

[0066] In order to use a consortium chain for contract nodes that sign different contracts, multiple different centrally-radiated fan-shaped flat networks are designed, so that the same contract node that has signed different contracts can establish its own contract library through the consortium network to store all the contracts it has signed.

Claims

1. A trusted protection method for smart contracts based on alliance chains, characterized by: It consists of a flattened fan-shaped secondary network system based on a trusted computing submodule, with the alliance chain main controller located on a node of the alliance chain as the center, and the contract-related nodes on the alliance chain as leaf nodes, hereinafter referred to as the system. The system is implemented in the following steps: Step (1), the system construction includes a main controller CPU based on the alliance chain s The central control subsystem is mainly composed of a node controller CPU on N contract nodes. n The central-radiated distributed control subsystem is constructed in parallel. In addition to unified coordination of the entire network, the former is also responsible for the identity information measurement of visitors, while the latter is mainly responsible for the data security of the contract text on each contract node, including: The central controller subsystem has a main controller CPU s In addition, it is also equipped with: an identity information measurement value calculation module of the contract method person representative as the subject, a subject environment information measurement value calculation module, a contract access module, a central access control module and a subject information input terminal, among which: Subject identity information measurement value calculation module: a trusted computing TPCM module is built in. The input information is the subject identity information hash value, which is formed by the concatenation of the subject identity information feature value and the subject social information feature value. The subject identity information feature value is formed by the concatenation of the subject's name and the subject's professional identity certificate number. The subject social information feature value is formed by the concatenation of the subject's current work unit and work department. The output information is the subject identity information measurement value. The subject environment information measurement value calculation module has a trusted computing TPCM module. The input information is the hash value of the blockchain name where the subject is located and the address of the subject in the alliance chain. The output information is the subject environment information measurement value. Contract access module, composed of contract access controller CPU m , a measurement value information cache module and a measurement value information database of a sample contract are interconnected in sequence, and the object information measurement value in the measurement value information database is temporarily defaulted; Central access control module is a central access control CPU c , used to prevent nodes outside the alliance chain, nodes within the alliance chain other than the contract node, and unauthorized personnel within each contract node from illegally calling the contract node and contract text; The central-radiation distributed control subsystem consists of the sub-controller CPUs on each contract node. n Each contract node controlled by the system is constructed in parallel, except for the sub-controller CPU. n In addition, it also includes: a measurement value calculation module for the contract text as the object, an access right measurement value calculation module for the identity importance feature of the object equivalently replaced by a two-choice data selection module, an object measurement value access module, and an object information measurement value access control module CPU c.n ; The contract text measurement value calculation module has a built-in trusted computing TPCM module. The input information is at least the serial number of the contract text in the measurement value information database of this node, the hash value of the contract name, version number, and signing date, and the output information is the measurement value of the contract file as the object; A data selection module that selects one from two. The input information is '1', which means access is allowed. The input information is '0', which means access is denied. The output information is the same as the input information. Object measurement value access module, by CPU m.n , the object measurement value information cache module, and the object measurement value information database are interconnected in sequence, and the CPU m.n Represents the object information access controller of the nth contract node; The object information measurement access control module is a CPU that controls the access control of the contract node where it is located. c.n , which is used to prevent users who have passed the subject identity information verification but do not meet the access permission level in this contract node from calling the contract text beyond their authority. In the fan-shaped two-level network system, the main controller CPU s And own the CPU of each contract node controller in the same contract n N wireless communication networks are established within the system to be used for: (a) For main controller CPU s From any contract node CPU when necessary n Retrieving various required information including the measurement information of new customers or sending relevant information, including providing special access control rights to the legal representative of a contract node, or reducing the access control rights of certain objects; (b) After the contract is signed, the relevant nodes of the contract report the changes in the subject identity in the contract text to the main controller CPU s Recorded and approved by the CPU s Send it to the other contracting parties, and after reaching a consensus, revise the original contract text and submit it to the CPU s Record keeping; (c) Similarly, a wireless communication network is established by interconnecting the contract nodes under the same contract in sequence; Step (2), system initialization; After the system is established, each contract node of the same contract text sends a s Sending the object information measurement value to the measurement value information database in the contract access module in the central control subsystem to make up for the lack of its object information measurement value; Step (3), the main controller CPU s Follow the steps below to implement the smart contract trusted protection method based on the alliance chain: Step (3.1): The subject information measurement value access control module uses the subject identity information measurement value of the contract text in the sample database to measure the subject identity information measurement value of the visiting customer, and uses the contract subject environment information measurement value to measure the environment information measurement value of the visiting customer: If both are not equal or only one is not equal, it means that the visiting client is not a member of the alliance chain or a non-contract node member in the alliance chain, and access is denied. If both are equal, it means that the visitor is a member of the contract node of this alliance chain, and step (3.2) is executed; Step (3.2): The alliance chain main controller CPU s According to the pre-made contract text-node IP list, find the node IP corresponding to the node sub-controller CPU n Verify the object information of visiting customers; Step (3.3): The customer information measurement value control module CPU on node n c.n , controller CPU according to node n The instruction verifies the customer information measurement value of the visiting customer with the customer information measurement value in the sample database: if the two are not equal, it indicates that the sample database does not have the contract text required by the visiting customer, and the access is denied. Otherwise, execute step (3.4); Step (3.4): In response to the requirements of the object information measurement value access control module of the contract node: the alliance chain main controller CPU s Send the corresponding finite positive integer represented by the access rights data measurement value to the customer information measurement value control module CPU on node n c.n On the top, measure the corresponding measurement value of the visiting customer: if the two are not equal, it means that the visiting customer is an unauthorized visitor to this node and the access is denied; if the two are equal, it means that the visiting customer is a staff member authorized to access this node and the access is granted, and the program terminates.