# Bitcoin Best Practices --- ## Building Block: Hash -- ### Properties - input -> hash -> 256 bit output - hiding: can't find x if you know h(x) - binding/collisions free: impossible to find (x, y) st h(x) = h(y) - allows hash to be a message digest - puzzle friendly: impossible to find key st h(key + x) = y -- ### Application - committment API 1. h(key + msg) = committment 2. sealing the envelope: publish committment 3. opening the envelope: publish key & msg => other ppl can check validatity - search puzzle - fix x st h(id + x) in Y - hash pointer - pointer of information + hash of information - non tamperable chains and trees --- ## Building Block: Digital Signature -- ### Properties - 1 can sign, anyone can verify - tied to a specific message -- ### Application - api - (secret_key, public_key) st 1. sign(secret_key, message) = signature 2. verifty(public_key, message, signature) - decentralized id management --- ## Storage: Managing Secret Keys -- ### 1. Hot Storage - like a wallet - convenient - good for daily use (less than $1000) - as secure as the device Best iOS App: [Airblitz](https://itunes.apple.com/us/app/airbitz-bitcoin-wallet/id843536046?mt=8) -- ### 2. Cold Storage - convenient to deposit, but annoying to withdraw - good for (more than $1000) - as secure as the safe the device is stored in Best Device: [KeepKey](http://amzn.to/2tSL5PD) or [Trezor](http://amzn.to/2tT0fUX) --- ## Trade -- ### Where - on [exhanges](https://bitcoincharts.com/markets/) - locally via [ATM](https://coinatmradar.com/) - locally via [Local Bitcoins](https://localbitcoins.com/) - locally via Meetups -- ### How - don't provided any personal info - use a burner phone - use Tor - buy with cash - meet in pupulated public place --- ## Best Practices - work with people with a good and long track record - don't link personal info - don't fully trust online services - don't fully trust hot wallets - protect your wallet (backup, password, safety deposit) - use a new address for every deposit --- ## Resources ### For more information: - [Princeton's course on Cryptocurrency](https://www.coursera.org/learn/cryptocurrency) - [Bitcoin Wiki](https://en.bitcoin.it/wiki/Main_Page)