I have understood that I can access EVM Storage slot by using web3.eth.getStorageAt(addr, index). If this can be applied to the password, then it seems like I can access to any state variables. How can I prevent user to access to EVM Storage slot?
Blockchain is a public and transparent system by design, and any data stored on-chain can potentially be accessed by anyone. However, some considerations may help you protect sensitive information and prevent unauthorized access, such as store sensitive information in encrypted form within the contract state; Use visibility modifiers like
private for state variables that don't need to be accessed externally; store data in a hashed form in the storage slots, this can obscure the actual data and require additional steps to recover the original information...While the above measures can help mitigate risks, it's not absolute.