How to Protect On-Chain Data on Public Blockchains