Smart Contract Secret Encryption via Oracle Keys
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Smart contracts face challenges in securing sensitive data, as storing cryptographic keys within the contract itself can expose them if the contract is compromised or malicious, leading to unauthorized access and potential security breaches.
Innovation Solution
The implementation of a mechanism where sensitive data is encrypted into ciphertext using a symmetric cryptographic key, which is then encrypted into a wrapper using a public key of a contract executor, and further included in an envelope encrypted with a public key of a contract oracle, ensuring that only authorized parties can decrypt and access the data for execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If sensitive data is stored directly in the smart contract, then execution efficiency is improved, but security is worsened due to potential compromise or malicious access
Solution Approach 1:
The patent extracts sensitive data from the smart contract itself and stores it externally in encrypted form. The contract contains only encrypted data and decryption logic, while the actual sensitive information resides in external storage, preventing direct exposure to contract compromise
Solution Approach 2:
The patent implements nested encryption layers where the sensitive data is encrypted with a symmetric key, which is then encrypted with the executor's public key, and the symmetric key is further encrypted with the oracle's public key. This multi-layer nesting ensures that no single compromised component can access the underlying data
2Ease of operation
If cryptographic keys are embedded in the smart contract, then ease of operation is improved, but vulnerability to unauthorized access increases
Solution Approach 1:
The patent introduces an oracle as an intermediary that holds and manages the symmetric cryptographic key. The oracle acts as a trusted mediator that can decrypt the data when needed, eliminating the need to embed keys directly in the contract while maintaining operational ease
Solution Approach 2:
The patent performs preliminary encryption of sensitive data before contract deployment, and preliminary encryption of the symmetric key with the oracle's public key. This advance preparation ensures that keys never need to be exposed during contract execution, preventing unauthorized access while maintaining ease of operation
Data Source
AI summary
Providing smart contracts including secrets encrypted with oracle-provided encryption keys is disclosed. In one example, a contract creator encrypts sensitive data necessary for executing a smart contract into ciphertext using a symmetric cryptographic key K, and also encrypts the symmetric cryptographic key K into a wrapper using a public cryptographic key e of a contract executor. The contract creator then generates an envelope using a public cryptographic key o of a contract oracle, where the envelope includes the wrapper encrypted using the public cryptographic key o and a policy that includes condition(s) precedent and is digitally authenticated. The smart contract, including the envelope and the ciphertext, is deployed to the contract executor. The sensitive data thus may be provided within the smart contract itself, while being protected from unauthorized access in the event the smart contract is malicious or is compromised.


