mining opportunities of block chain and bitcoin

Post on 09-Jan-2017

106 Views

Category:

Technology

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

“Mining” the opportunities of Block Chain & Bit Coin By Praseed Pai K.T.

Functions of Money - Medium of Xchng (purchase Goods/Services) - Unit of Accounts (Goods and Services are quoted in terms of money value) - Store of Value (Can be used to transfer purchasing power to a future date)

A Lookback at Modern FIAT Currencies - Money printed based on Govt. Decree (FIAT) - All Currencies are Inflationary (Value depletion) - Most often Value is arbitrary

- decided by currency supply/demand - market sentiment - Hedging ( China and India in $ )

What is Bit-Coin? - A Crypto Currency - A Technology ( an Open distributed Ledger) - A Political Tool

What is Block Chain? - The Technology behind Bit-Coin - A Tamper proof Decentralized Open Ledger - A Protocol which ensures Transaction - Confidentiality,Integrity,Availability - Has a Network Consensus Algorithm in it - Every node stores all transactions since the Genesis Block - A Triple Entry Accounting System

Block Chain 1.0 - The Bit-Coin Crypto Currency - Alt-Coins - Market Caps (https://coinmarketcap.com/)

Block Chain 2.0 (Not Only Currency) - Smart Contracts - Decentralized Autonomous Apps (Dapps) - Decentralized Autonomous Organizations (DAO) - Decentralized Autonomous Corporations (DAC) - Decentralized Autonomous Societies (DAS) - Ethereum Turing Complete Smart Contract Platform

BlockChain Platforms URL UsesEthereum http://ethereum.org/ Smart Contracts

Ripple https://ripple.com/ Remittance Network

MasterCoin http://www.mastercoin.org/ Financial Derivatives

NXT http://www.nxtcommunity.org/

Alt-Coin (Proof of Stake)

Bit Shares http://bitshares.org/ Crpypto-Equity Share Exchange

Block Chain Platforms

DAPPS URL Centralized EquivalentLazooz http://lazooz.org/ Uber

OpenBazar https://openbazaar.org/ Craigslist

StorJ http://storj.io/ DropBox (File Storage)

Twister http://twister.net.co/ Twitter (Peer to Peer Microblogging)

Some DApps

Block Chain 3.0 (Beyond Smart Contracts) - An Effective way to organize Activities - Censorship-Resistant Organizational Models - Example of a Distributed DNS ( NameCoin) - Alexandria (Combining Tweet/BC) - Ostel (Encrypted VOIP/survilence proof) - Digital Identity ( OneName, BitID) - Virtual notary (http://virtual-notary.org/) - Digital Rights Management (DRM) - Decentralized Govt. Services

Currency,Private equities,Public equities,Bonds,Derivatives (futures, forwards, swaps, options, and more complex variations),Voting rights associated with any of the preceding,Commodities,Spending records,Trading records,Mortgage/loan records,Servicing records,Crowdfunding,MicrofinanceMicrocharity

Legra Capital – Finance Record Keeping using Block Chain

Land titles,Vehicle registries,Business license,Business incorporation/dissolution records,Business ownership records,Regulatory records,Criminal records,Passports,Birth certificates,Death certificates,Voter IDs,Voting,Health/safety inspections,Building permits,Gun permits,Forensic evidence,Court records,Voting records,Nonprofit records,Government/nonprofit accounting/transparency

Legra Capital – Public Records

Contracts,Signatures,Wills,Trusts,Escrows,GPS trails (personal)Degree,Certifications,Learning outcomes,Grades,HR records (salary, performance reviews, accomplishment),Medical records,Accounting records,Business transaction records,Genome data,GPS trails (institutional),Delivery records, Arbitration

Legra Capital – Private Records/Semi Private Records

Home/apartment keys,Vacation home/timeshare keys,Hotel room keysCar keys,Rental car keys,Leased cars keys,Locker keys,Safety deposit box keys,Package delivery (split key between delivery firm and receiver),Betting records,Fantasy sports records,Intangibles,Coupons,Vouchers,Reservations (restaurants, hotels, queues, etc.),Movie tickets,Patents,Copyrights,Trademarks,Software licenses,Videogame licenses,Music/movie/book licenses (DRM),Domain names,Online identities,Proof of authorship/proof of prior art

Legra Capital – Physical Asset Keys

Documentary records (photos, audio, video),Data records (sports scores, temperature, etc.),Sim cards,GPS network identity,Gun unlock codes,Weapons unlock codes,Nuclear launch codes,Spam control (micropayments for posting)

Legra Capital – Others

BlockChain Revolution – An important book

http://blockchain-revolution.com/

BitCoin/BlockChain Internals

“There are no bitcoins, only records of bitcoin transactions in a Block Chain (Transaction based accounting). Another funny fact is that, there is no Encryption. A distributed Ledger which can get open as it can ” – something worth remembering!

Privacy Model of the BitCoin/BlockChain

God’s Protocol (Network as GOD)

Part 1 - Cryptography

Cryptographic Internals

Hash Algorithms => A = RIPEMD160(SHA256(K))

Digital Signature – EC DSA

Encryption – None

• BitCoin uses Hash functions for • Identifiers• Addresses• Transaction signatures• Checksums and other validations

• hash256(d) = SHA256(SHA256(d))• hash160(d) = RIPEMD160(SHA256(d))• block_id = hash256(block.header)• transaction_id = hash256(transaction)• Address => hash160(pk)

Hashing (SHA256) demo using OpenSSL• Create a Text file (temp.txt) using “Hello World..” as the content• Generate the SHA256 of the temp.txt using OpenSSL

• openssl –dgst sha256 temp.txt• Output

SHA256(temp.txt)= bbf242f2054d9c01a623b6d340378f83c2e1e3baa055c04ef31f045f24a11b7c• Generate SHA256 by changing contents of the temp.txt into “Hello World…”

• openssl –dgst sha256 temp.txt

• OutputSHA256(temp.txt)=

77e612c2fd40015a1945fc2b20d6ac6febcf57d6cbd8ec8026df317e03a346

Hashing (SHA256) demo using Python• C:\OpenSSL>python• Python 2.7.11 • >>> import hashlib• >>> print hashlib.sha256("Hello World").hexdigest()• a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f14

6e• >>> print hashlib.sha256("Hello World").hexdigest()• 60ab9317806dc4d589535de03f782620ae35c7c641c43e99e8823acf10cf11b

3

• BitCoin uses Elliptic Curve Cryptography for • Keypair generation (private key + public key)• Digital Signing• Digital Signature verificationSIGN

• digest = H(message) • signature = ec_sign(EllipticCurve, digest, private_key) VERIFY• digest = H(message) • is_auth = ec_verify(EllipticCurve, digest, signature, public_key)• EllipticCurve => secp256k1 (OpenSSL)

• Some facts about Elliptic Curve Cryptography for BitCoin• Private keys => 32 bytes long.• Public keys =>64 bytes (uncompressed form) or 32 bytes (compressed form) long plus a 1-byte prefix.• The elliptic curve C is the secp256k1 curve.• EC crypto is based on modular arithmetic

• Generate a ECC Private Key (Output in Base64 format)openssl ecparam -name secp256k1 -genkey -out ec-priv.pem

• Output in Human Readable formatopenssl ec -in ec-priv.pem -text –noout

• Output the public key to a file ( ec-pub.pem)openssl ec -in ec-priv.pem -pubout -out ec-pub.pem

• Output the file in human readable formatopenssl ec -in ec-pub.pem -pubin -text –noout

• Output in the Compressed formatopenssl ec -in ec-pub.pem -pubin -text -noout -conv_form compressed

EC DSA using OpenSSL• Take a file and digitally sign its SHA256 digest using EC• openssl dgst -sha256 -sign ec-priv.pem ex-message.txt >ex-signature.der

• Hex Encoded Signature• openssl dgst -sha256 -hex -sign ec-priv.pem ex-message.txt

• Verify the Signature• openssl dgst -sha256 -verify ec-pub.pem -signature ex-signature.der ex-

message.txt

Part 2 – Transactions, Block and BlockChain

Account vs Transaction based Ledger

The BitCoin Transaction

The BitCoin Transaction (Output) Script

Block Data Structure (Merkle Tree)

Easy Membership detection for transactions on a Merkle Tree. A Sorted Merkle tree can be used for non membership query as well

The Block Chain schema

Block Chain – The Big Picture

BitCoin Ledger update Algorithm

Part 3 – Network, Proof of Work, Mining

Hashing and Proof of work

• The Hash value generated is a random one • hash256(BlockHeader + Nonce) < target (This is infamous Puzzle)• Target is based on the current difficulty level • Target is reduced to make it hard to find out the right Nonce (More

computing power)• Arrived based on the computation happened in the last 2016• next_difficulty = (previous_difficulty * 2016 * 10 minutes) / (time to

mine last 2016 blocks)

The Bitcoin Full Node

Mining Evolution

Part 4 – Forking,Consensus

Block Chain Forking and Resolution

Thank You

top related