Systems and methods for securely using blockchains