What is the best way to encrypt and decrypt a variable in Solidity so only the msg.sender and contract can see that variable?
Asked
Active
Viewed 1,469 times
1 Answers
3
Practical answer: You can't. If the contract can see it when it executes, everyone who has the blockchain can see it.
Theoretical answer that won't help you: Homomorphic encryption. See Can smart contracts compute on encrypted data?
Edmund Edgar
- 16,897
- 1
- 29
- 58