Bitcoin and other distributed virtual currencies are revolutionizing how monetary value is stored and exchanged on the Internet. Key opportunities and risks will be described. The two main objectives of this talk will be to explain the underlying blockchain and cryptology technologies that make them work, and to demonstrate PHP recipes for using the web services that enable payment processing, identity validation, and smart contract execution.
2. BASICS - What is cryptocurrency
TECHNOLOGY - and terminology
OPPORTUNITIES - and RISKS
IMPLEMENTATION - PHP and beyond
COOKBOOK - recipes for use cases
CRYPTOCURRENCIES
15. Privacy Risks
Easier for a theoretical quantum
computer to hack
DON’T REUSE ADDRESSES
16. Addresses are targeted in transactions
They do not "store" a running balance
AN ADDRESS IS NOT AN ACCOUNT
17. Software that stores your private keys
Reads through the entire transaction
history to calculate your balance
Sends coins by automatically choosing
unspent transactions to spend
Signs transactions with your private keys
WALLET
19. Don't backup your wallet and lose all
your private keys
WAYS TO LOSE YOUR COINS #1
20. Use a web wallet service that gets
hacked or disappears
WAYS TO LOSE YOUR COINS #2
21. Distributed database of all transactions
Feb 2015: Size is 29 GB, doubled in size
last year
BLOCKCHAIN
22. Groups of transactions
Miners solve math problems
The first solution wins!
The miner wins an award (coins + fees)
Txns put in a new block and chained to
end of the blockchain
BLOCKS
23. Everyone was supposed to mine with the
software
ASICS (optimized hardware) took over
Risks centralization
MINING
25. Microtransactions with low fees
Make direct payments without third
party privacy risks
Sellers avoid chargebacks
No central point of failure
Developing world
OPPORTUNITIES
27. Few consumer protections or regulations
High learning curve
Confirmation delays
Not anonymous
Scammers and hackers
Fluctuating values
RISKS
28. Herd mentality: buy high, sell low
speculating
Complex tax reporting, compliance
Government crackdowns and regulations
Experimental
Possible exploits discovered in future
Competing virtual currencies
RISKS
29. bitcoin-qt: bitcoin peer and GUI wallet
bitcoind: bitcoin peer and JSON-RPC
bitcoin-cli: command line RPC
IMPLEMENTATION
38. https://bitpay.com/
REST API
CURL, PHP, Node.js, Python, Ruby, Java, C#, Perl,
Android
Integration with popular shopping carts
https://www.coinbase.com
Gocoin + Shopify
COMMERCIAL APIS
39. 1. User scans a QR code containing a callback page
and user session id:
bitid://www.site.com/callback?x=NONCE
2. Wallet asks user if they want to proceed with
identification
3. Wallet signs the BitID URI with the user's private key
4. Server validates the signature
BITID AUTHENTICATION
40. m of n signatures
Escrow
people.xiph.org/~greg/escrowexample.txt
MULTISIGNATURE