Method and system for securing smart contracts in blockchains
AssigneeNEC Corporation
InventorsWenting Li, Ghassan Karame, Lucas Davi
Life of this patent
Estimating the term…
Abstract
A method for securing smart contracts in a blockchain includes receiving in the blockchain a contract creation transaction having a control flow graph (CFG) and contract code for a smart contract to be created. The contract creation transaction is verified by checking a signature of a creator of the smart contract and determining that the CFG is correct based on the contract code. The verified contract creation transaction is included as a block in a distributed ledger of the blockchain.
Claims20
A computer-implemented method for securing a blockchain, maintained by a blockchain network, against software exploits, the method comprising:
- automatically receiving, by a blockchain node of the blockchain network, blockchain data comprising:
- (i) a control flow graph (CFG) and (ii) a machine-executable application code, the CFG defining a set of pre-defined execution flows of the machine-executable application code;
- deriving, at run-time, valid execution flows from the machine-executable application code;
- automatically verifying, at run-time, the blockchain data by verifying a digital signature of a creator of the machine-executable application code and verifying that the CFG itself is correct by confirming that the set of pre-defined execution flows defined by the CFG corresponds to the valid execution flows derived from the machine-executable application code;
- and
- based on verifying the blockchain data, automatically including the verified blockchain data in a block of the blockchain.
A system for securing a blockchain, maintained by a blockchain network, against software exploits, the system comprising one or more processors which, alone or in combination, are configured to provide for execution of the following steps:
- automatically receiving, by a blockchain node of the blockchain network, blockchain data comprising (i) a control flow graph (CFG) and (ii) a machine-executable application code, the CFG defining a set of pre-defined execution flows of the machine-executable application code;
- deriving, at run-time, valid execution flows from the machine-executable application code;
- automatically verifying, at run-time, the blockchain data by verifying a digital signature of a creator of the machine-executable application code and verifying that the CFG itself is correct by confirming that the set of pre-defined execution flows defined by the CFG corresponds to the valid execution flows derived from the machine-executable application code;
- and
- based on verifying the blockchain data, automatically including the blockchain data in a block of the blockchain.
The system according to 9, being further configured to provide for execution of the step of updating the state after execution of the quasi-Turing complete program upon validating the blockchain transaction.
A tangible, non-transitory computer-readable medium having instructions thereon which, when executed by one or more processors, cause execution of a method for blockchain, maintained by a blockchain network, against software exploits, the method comprising:
- automatically receiving, by a blockchain node of the blockchain network, blockchain data comprising:
- (i) a control flow graph (CFG) and (ii) machine-executable application code, the CFG defining a set of pre-defined execution flows of the machine-executable application code;
- deriving, at run-time, valid execution flows from the machine-executable application code;
- automatically verifying, at run-time, the blockchain data by verifying a digital signature of a creator of the machine-executable application code and verifying that the CFG itself is correct by confirming that the set of pre-defined execution flows defined by the CFG corresponds to the valid execution flows derived from the machine-executable application code;
- and
- based on verifying the blockchain data, automatically including the verified blockchain data in a block of the blockchain.
Dependencies are inferred from the claim text.