+ All Categories
Home > Technology > Mining Opportunities of Block Chain and BitCoin

Mining Opportunities of Block Chain and BitCoin

Date post: 09-Jan-2017
Category:
Upload: deepu-s-nath
View: 106 times
Download: 8 times
Share this document with a friend
46
“Mining” the opportunities of Block Chain & Bit Coin By Praseed Pai K.T.
Transcript
Page 1: Mining Opportunities of Block Chain and BitCoin

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

Page 2: Mining Opportunities of Block Chain and BitCoin

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)

Page 3: Mining Opportunities of Block Chain and BitCoin

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 $ )

Page 4: Mining Opportunities of Block Chain and BitCoin

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

Page 5: Mining Opportunities of Block Chain and BitCoin

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

Page 6: Mining Opportunities of Block Chain and BitCoin

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

Page 7: Mining Opportunities of Block Chain and BitCoin

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

Page 8: Mining Opportunities of Block Chain and BitCoin

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

Page 9: Mining Opportunities of Block Chain and BitCoin

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

Page 10: Mining Opportunities of Block Chain and BitCoin

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

Page 11: Mining Opportunities of Block Chain and BitCoin

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

Page 12: Mining Opportunities of Block Chain and BitCoin

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

Page 13: Mining Opportunities of Block Chain and BitCoin

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

Page 14: Mining Opportunities of Block Chain and BitCoin

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

Page 15: Mining Opportunities of Block Chain and BitCoin

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

Page 16: Mining Opportunities of Block Chain and BitCoin

BlockChain Revolution – An important book

http://blockchain-revolution.com/

Page 17: Mining Opportunities of Block Chain and BitCoin

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!

Page 18: Mining Opportunities of Block Chain and BitCoin

Privacy Model of the BitCoin/BlockChain

Page 19: Mining Opportunities of Block Chain and BitCoin

God’s Protocol (Network as GOD)

Page 20: Mining Opportunities of Block Chain and BitCoin

Part 1 - Cryptography

Page 21: Mining Opportunities of Block Chain and BitCoin

Cryptographic Internals

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

Digital Signature – EC DSA

Encryption – None

Page 22: Mining Opportunities of Block Chain and BitCoin

• 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)

Page 23: Mining Opportunities of Block Chain and BitCoin

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

Page 24: Mining Opportunities of Block Chain and BitCoin

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

Page 25: Mining Opportunities of Block Chain and BitCoin

• 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)

Page 26: Mining Opportunities of Block Chain and BitCoin

• 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

Page 27: Mining Opportunities of Block Chain and BitCoin

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

Page 28: Mining Opportunities of Block Chain and BitCoin

Part 2 – Transactions, Block and BlockChain

Page 29: Mining Opportunities of Block Chain and BitCoin

Account vs Transaction based Ledger

Page 30: Mining Opportunities of Block Chain and BitCoin

The BitCoin Transaction

Page 31: Mining Opportunities of Block Chain and BitCoin

The BitCoin Transaction (Output) Script

Page 32: Mining Opportunities of Block Chain and BitCoin

Block Data Structure (Merkle Tree)

Page 33: Mining Opportunities of Block Chain and BitCoin

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

Page 34: Mining Opportunities of Block Chain and BitCoin

The Block Chain schema

Page 35: Mining Opportunities of Block Chain and BitCoin

Block Chain – The Big Picture

Page 36: Mining Opportunities of Block Chain and BitCoin

BitCoin Ledger update Algorithm

Page 37: Mining Opportunities of Block Chain and BitCoin

Part 3 – Network, Proof of Work, Mining

Page 38: Mining Opportunities of Block Chain and BitCoin

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)

Page 39: Mining Opportunities of Block Chain and BitCoin

The Bitcoin Full Node

Page 40: Mining Opportunities of Block Chain and BitCoin
Page 41: Mining Opportunities of Block Chain and BitCoin
Page 42: Mining Opportunities of Block Chain and BitCoin
Page 43: Mining Opportunities of Block Chain and BitCoin

Mining Evolution

Page 44: Mining Opportunities of Block Chain and BitCoin

Part 4 – Forking,Consensus

Page 45: Mining Opportunities of Block Chain and BitCoin

Block Chain Forking and Resolution

Page 46: Mining Opportunities of Block Chain and BitCoin

Thank You


Recommended