Ethernaut Vault

Blockchain and Secrets

One of the important properties of Blockchain technology is Transparency.

Transparency means that the blockchain ledger is public. That anyone can access and view the transactions on the network. This makes it a highly transparent system that is resistant to fraud and corruption.

However, sometimes it is necessary to store secrets for a given use case. The fact that this property exist makes it very dangerous to store any sensitive data on the blockchain, as anyone can access it and read it.

In the following challenge we will see how a developer tried to program a Smart Contract Vault that is secured or locked by a password stored on the Smart Contract’s storage:

A Word on Visibility and Storage

In Solidity, state variables can be declared as public, private, or internal. One might assume that the private visibility defines some kind of confidentiality property to the state variable it refers to.

--

--

Diogo Pereira | diogo-pereira.com

I help organisations build cyber-resilient applications, bring security awareness and mindset growth tips to interested individuals