Smart Contract Secrets via Oracle Threshold Encryption
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Smart contracts face challenges in securing sensitive data, as storing such data within the contract itself can expose it to unauthorized access if the contract is malicious or compromised, especially when execution relies on data from multiple contract oracles.
Innovation Solution
Implementing a threshold cryptosystem, such as Shamir's Secret Sharing, to encrypt sensitive data using multiple symmetric cryptographic keys, where a subset of these keys is required for decryption, and encrypting these keys into wrappers using public cryptographic keys of a contract executor and oracles, ensuring secure deployment within the smart contract.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If sensitive data is stored within the smart contract itself, then the contract can access and execute operations using this data, but the data becomes vulnerable to unauthorized access if the contract is malicious or compromised
Solution Approach 1:
The sensitive data is segmented into multiple shares using secret sharing schemes (e.g., Shamir's Secret Sharing). Each share is stored in a separate smart contract or distributed across multiple contracts, so that no single contract contains the complete sensitive data. This segmentation ensures that even if one contract is compromised, the attacker cannot retrieve the full sensitive data without combining multiple shares.
Solution Approach 2:
An intermediary trusted execution environment or secure enclive is introduced between the smart contract and the sensitive data storage. The intermediary holds the actual sensitive data in encrypted form and only decrypts/provides it when specific conditions are met and verified by multiple contracts, thereby preventing direct access by potentially malicious contracts.
2Reliability
If multiple contract oracles are used to verify conditions for smart contract execution, then the reliability and security of execution is improved, but the complexity of the system increases
Solution Approach 1:
Multiple oracle verification mechanisms are merged into a unified threshold cryptography system. Instead of implementing separate verification logic in each contract, the system uses a combined threshold signature scheme where multiple oracles collectively sign off on contract execution conditions. This reduces individual contract complexity while maintaining the security benefits of multiple oracles.
Solution Approach 2:
The smart contract system is designed with universal, standardized interfaces and protocols for oracle interaction that can be reused across different contracts and scenarios. This multi-functional framework allows the same threshold verification mechanism to serve multiple purposes (different oracles, different contract types, different verification conditions), reducing overall system complexity through reuse rather than custom implementations.
Data Source
AI summary
Providing smart contracts including secrets encrypted with oracle-provided encryption keys using thresholding cryptosystems is disclosed. In one example, a contract creator encrypts sensitive data necessary for executing a smart contract into ciphertext with multiple symmetric cryptographic keys using a threshold cryptosystem, such that a subset of at least size R of the symmetric cryptographic keys are required to decrypt the ciphertext. The symmetric cryptographic keys are encrypted into wrappers using a public cryptographic key of a contract executor. Envelopes are generated using public cryptographic keys of corresponding contract oracles, where the envelopes include the wrappers encrypted using the public cryptographic keys, and policies that specify condition(s) precedent and are authenticated using the public cryptographic keys. The smart contract, including the envelopes, the ciphertext, and R, is then deployed to the contract executor. In this manner, the sensitive data is protected from unauthorized access within the smart contract.


