Say I have a smart contract the preforms a specific function and is used in a decryption process off-chain. Would it be possible for Molly to download the entire contract and run it on their own local node, thereby brute-forcing the decryption element of the smart contract. She would do this as she is not limited by the slower block times of the public chain.

  • 1
    Yes. Molly can perform an offline attack.
    – lungj
    Commented Aug 29, 2017 at 23:39

1 Answer 1


Nope, you'll be good. Assuming they know the address, they'll just be able to run the public functions and see the public variables. If you don't even want them to be able to see the functions, you can even make that private as documented here: http://solidity.readthedocs.io/en/develop/contracts.html#visibility-and-getters

If someone brute force breaks the ethereum encryption mechanisms then the whole system is fubar, so just keep your variables private and use keys to store data and you'll be good to go.

  • You can still read the contents of private functions and variables so it does not solve the problem. From your link: Everything that is inside a contract is visible to all external observers. Making something private only prevents other contracts from accessing and modifying the information, but it will still be visible to the whole world outside of the blockchain.. The question is not about brute forcing the Ethereum encryption mechanism but rather about the ability to duplicate a smart contract in its entirety and run on ones own private chain. Commented Aug 30, 2017 at 9:20
  • @thefett to echo @ChristopherMaree's comment, the private modifier is about inheritance. Its purpose is to create abstraction in the code, not about security or privacy. Also, modern cryptographic systems rely on keeping the private keys secret, not the encryption mechanism.
    – lungj
    Commented Aug 30, 2017 at 16:28
  • @lungj exactly my point. Commented Aug 30, 2017 at 17:31

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.