3 ms·
I did something less extreme than the piano test but still risky. I implemented the Bitcoin cryptography stack from scratch - prime field, elliptic curve additi
by nayuki 5y ago
I did something less extreme than the piano test but still risky. I implemented the Bitcoin cryptography stack from scratch - prime field, elliptic curve addition, elliptic curve multiplication, Base58Check, ECDSA, RIPEMD-160, SHA-256. I added hundreds upon hundreds of test cases, and some parts were mathematically proven. Then I computed private keys, public addresses, and outgoing transactions using my own code, and processed a handful of transactions. If I made a mistake in the math or algorithms, I could have sent money to unspendable addresses, which would have resulted in thousands of dollars in losses - and remember that transactions are irreversible on the blockchain. That was the degree to which I trusted my code to do the right thing.