Using mathematically rigorous proofs to ensure certain properties of cryptographic algorithms and blockchain mechanisms