Coinpunk - Enemy of the Banks
-
Upload
kyle-drake -
Category
Economy & Finance
-
view
1.654 -
download
1
description
Transcript of Coinpunk - Enemy of the Banks
![Page 1: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/1.jpg)
enemy of the banks
COIN PUNK
Kyle Drake
Obsoleting the banking industry with HTML5 and JavaScript
Tuesday, October 15, 13
![Page 2: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/2.jpg)
What is Coinpunk?• First open-source Bitcoin web wallet
service
• Designed and intended for power users and developers
• Funded by a grant from the Bitcoin Foundation (and others)
Tuesday, October 15, 13
![Page 3: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/3.jpg)
Coinpunk “Old School”
Tuesday, October 15, 13
![Page 4: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/4.jpg)
• Ruby application
• Bitcoind (official client) JSON RPC does all heavy lifting
• Implemented in 4 days
• Stored all private keys on server
• Works. But there’s a Serious security risk.
Coinpunk “Old School”
Tuesday, October 15, 13
![Page 5: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/5.jpg)
• July 2011: Bitomat “loses” database. $220,000 USD
• August 2011: MyBitcoin hacked. $800,000
• August 2012: Bitcoinica hacked. $460,000
• March 2012: Linode servers trawled. $250,000
• Sept 2012: BitFloor hacked. $250,000
• April 2013: InstaWallet hacked. $4.6 million
Major Bitcoin Wallet Thefts
Tuesday, October 15, 13
![Page 6: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/6.jpg)
We’re starting to think putting the private keys on a central server is a really bad idea. I can’t imagine why.
Tuesday, October 15, 13
![Page 7: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/7.jpg)
But web interfaces are easy to use. They’re lightweight. They’re universal. They make sense to non-tech users.
Tuesday, October 15, 13
![Page 8: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/8.jpg)
How can we provide a web interface while reducing server trust?
Tuesday, October 15, 13
![Page 9: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/9.jpg)
“Bitcoin wallets” that store the private keys on the server are not wallets.
They are Bitcoin accounts.
The Problem
Tuesday, October 15, 13
![Page 10: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/10.jpg)
The Solution
Move the wallet encryption over to the browser.Yes, really.No, seriously!
Tuesday, October 15, 13
![Page 11: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/11.jpg)
Fear, Uncertainty and Doubt
“DOOMED”? REALLY?Tuesday, October 15, 13
![Page 12: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/12.jpg)
Tuesday, October 15, 13
![Page 13: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/13.jpg)
Counterpoint
http://log.nadim.cc/?p=33Tuesday, October 15, 13
![Page 14: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/14.jpg)
Tuesday, October 15, 13
![Page 15: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/15.jpg)
Coinpunk “New Wave”
• HTML5/JS frontend• Node.js backend• Redis• Bitcoind
Tuesday, October 15, 13
![Page 16: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/16.jpg)
Coinpunk “New Wave”
Browser generates Bitcoin private keys, encrypts them, sends encrypted payload to server for storage/backup.
Tuesday, October 15, 13
![Page 17: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/17.jpg)
Coinpunk “New Wave”
Browser also creates all the transactions. The server (and therefore hackers) cannot spend the user’s money.
Tuesday, October 15, 13
![Page 18: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/18.jpg)
Progress
Tuesday, October 15, 13
![Page 19: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/19.jpg)
Browser Crypto Libraries• CryptoJS
• Stanford JS Crypto Lib (SJCL)
• BigInteger (JSBN)
• BitcoinJS-lib
• RandJS
https://github.com/kyledrake/randjs
Tuesday, October 15, 13
![Page 20: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/20.jpg)
RandJS• Uses
window.crypto.getRandomValues if exists, otherwise falls back
• Allows you to decide whether you’re cool with that.
Tuesday, October 15, 13
![Page 21: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/21.jpg)
window.crypto.getRandomValues
Tuesday, October 15, 13
![Page 22: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/22.jpg)
Observations• It’s all kindof slow
• SJCL PBKDF2 is (a lot) faster than CryptoJS
• Can’t go above 4k-5k iterations
• Limited pre-rolled authenticated encryption options (sjcl.encrypt)
http://tonyarcieri.com/all-the-crypto-code-youve-ever-written-is-probably-broken
Tuesday, October 15, 13
![Page 23: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/23.jpg)
I’m not doing Bitcoin work.Why should I care?
Tuesday, October 15, 13
![Page 24: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/24.jpg)
Browser-side crypto will become a lot more commonplace.
Tuesday, October 15, 13
![Page 25: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/25.jpg)
JS crypto libraries will become secure, standardized and fast.
Tuesday, October 15, 13
![Page 26: Coinpunk - Enemy of the Banks](https://reader034.fdocuments.net/reader034/viewer/2022051107/53f1b91c8d7f72e94b8b4ade/html5/thumbnails/26.jpg)
One-way hashing of the password on the browser will be considered “best practice”.
Tuesday, October 15, 13