Last time: Block chain Intended to focus on hash functions We talked a lot about why it's worth anything Good question... Ended up talking about it later, too Did I remember to turn on my miner? (no) If so, we can log into slushpool and see it working If not, we can't (sorry) Maybe I brought it with me. I intend to, one of these days RSA/public key review trapdoor SHA256: xor, and how xor works again Remember: It's easy to undo A hash function results in a fixed size number Regardless of input size What we want from a good hash function: A chance in the input must produce an unrelated output Not just different. Unrelated! Not just big chances. Any change! This includes adding on to the end Also includes changes that might seem to cancel Evaluation of hash functions: Collision Resistance: Can't find two values that hash to the same thing Chosen Prefix Collision Attack: Can't find related values given a prefix Preimage resistance: Can't find a message with a specific hash value Length Extension: Can't calculate a hash value for an extended version of the message Sha256 is good on all of these Let's look at how it works! Start by reviewing Wikipedia entry Diagram of an iteration Alright, so if we change one little thing, it'll change the hash a lot? Let's try it! So now, to sign something: Calculate the SHA256 hash Encrypt the hash with your private key That's the "signature" This allows us to sign a transaction! That's how to spend bitcoin Only with the private key can we sign a transaction If we lose it, we can't sign a transaction If we lose it, we can't calculate it or guess it So if we lose it, we've lost our bitcoin! This problem is somewhat unique to bitcoin The is no authority who can fix this problem The bitcoin dump guy: https://www.businessinsider.com/james-howells-threw-away-bitcoin-dump-masterplan-get-back-2022-7?op=1 There's an active trade in extrating private keys from hardware wallets For people who forgot the password Or maybe "forgot"... Since private key loss is a real problem, maybe we should make a few extra copies! But, if anyone gets any copy, they can transfer our bitcoin So extra copies increase the risk as well