Referring to this post, the value stored in variables of smart contract, can someone (not authorized) read it. Say I store "secret code" for each user on a map. Contract needs this value for whatever reason, though don't want anyone else to see it. Since this data is stored in level db, do you think anyone will be able to see this value. I have not read the ethereum yellow paper, not sure whether this data is encrypted? Appreciate any help.

1 Answer 1


All data stored inside a smart contract (in the blockchain) is always publicly accessible.

All the data that the code of the smart contract can access, can be accessed by everyone.

The data is not encrypted by default.

If you want to store some private data in the blockchain, some sort of key, password or salt must be stored outside of the blockchain.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.