Nonce Making Sense of Nonces.

Slides:



Advertisements
Similar presentations
Bitcoin: A New Internet Currency Stephen Clayton Senior Economic Education Specialist Federal Reserve Bank of Dallas The opinions expressed are solely.
Advertisements

Bitcoin. What is Bitcoin? A P2P network for electronic payments Benefits: – Low fees – No middlemen – No central authority – Can be anonymous – Each payment.
Bitcoin Double Spending Attack Karame, Androulaki & Capkun Presented by Subhro Kar CSCE 715, Fall 2013.
Towards a More Democratic Mining in Bitcoins Goutam Paul R. C. Bose Centre for Cryptology & Security, Indian Statistical Institute Pratik Sarkar Indian.
BITCOIN An introduction to a decentralised and anonymous currency. By Andy Brodie.
The world’s first decentralized digital currency Meni Rosenfeld Bitcoil 29/11/2012Written by Meni Rosenfeld1.
Bitcoin (what, why and how?)
1 Bitcoin A Digital Currency. Functions of Money.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Bitcoin Tech Talk Zehady Abdullah Khan (Andy) Graduate Assistant, Computer Science Department, Purdue University.
Section #9: Bitcoins. Digital currency Unique string of bits Use cryptography for security and privacy Not tied to names: hard to trace Finite set of.
Blockchain Mechanics Terence Spies Crypto Geek HPE.
Block Chain 101 May 2017.
Motivation ✓ ✘ ? Bitcoin/Ideal Credit Card Works on Internet
CSE 4095 Lecture 22 – BlockChain Slides adapted from Claudio Orlandi.
What Is Bitcoin? Launched in 2009 A p2p Electronic Cash System
Cryptocurrencies by.
Bitcoin Based on “Bitcoin Tutorial” presentation by
Blockchains in 12 Easy Steps and Observations to Ponder…
Virtual currency? Crypto-currency? Internet Money? Property?
Bitcoin - a distributed virtual currency system
Distributed Systems for Information Systems Management
Cryptocurrencies By Rui Sakurai and Shane Spears
Introduction to Blockchain & Ethereum
Bitcoin Created By: CoinSecure.in.
Blockchains and Cryptocurrencies: What Financial Planners Need to Know
Creating Crypto Community……!
So what is Blockchain anyway?
Campbell R. Harvey Duke University and NBER

Zcash Mining – A Guide For Beginners. Zcash (also known as ZEC and seventeenth most valued cryptocurrency with market capitalization of $500 million)
START The way we trust is changing Presentation for Thursday at IAAO
BARTS Blockchain ART Simulation
Strategizing Testing for Blockchain /Distributed Ledger Products
Data Structures and Analysis (COMP 410)
Let’s build a Blockchain!
Life skill presentation
EECS 498 Introduction to Distributed Systems Fall 2017
Focus Group 3: Blockchain and digitalisation
NEECOM – May 16, 2018 Todd L. Gould, CEO
Security through Encryption
Bitcoin: A New Internet Currency
Setting the Stage for a Community Blockchain Incubator
Bitcoin: Data flow.
Blockchain Principles
Blockchain Concepts RISK FORUM 2017 Hash function (e.g. SHA-256)
A-Noncing the Use and Performance of Hashing Algorithms
Bitcoin & Blockchain Bina Ramamurthy 2/22/2019.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Data Structures and Analysis (COMP 410)
Consensus Algorithms.
Kai Bu 04 Blockchain Kai Bu
Presentation On Bit-Coins.
Blockchains and Auditing
Blockchains and Smart Contracts for the Internet of Things
Introduction to blockchain
Wokshop SAIS 2018 Dr. Meg Murray Kennesaw state university
Faculty Seminar Series Blockchain Technology
Distributed Computers and Web Technologies (3-0-6)
CSE 552 preparation for reading
Campbell R. Harvey Duke University and NBER
GAYATRI INSTITUTE OF COMPUTER AND MANAGEMENT HINJILICUT (GANJAM)
Bitcoin and Blockchain
Secret-Key Encryption
One-Way Hash Functions
Blockchain.
Explore Txs, block, blockchain in Bitcoin
Author: Satoshi Nakamoto
Not about digital currencies
BUILDING A BLOCKCHAIN USING PYTHON
Presentation transcript:

Nonce Making Sense of Nonces

Blockchain The blockchain serves as the public ledger. Bitcoin blockchain ledger database size is 167.97 GB. The blockchain database is managed autonomously through the use of a peer-to-peer network, along with a timestamp server. Solves double spending issue. See http://sebfor.com/how-bitcoin-mining-works/ Briefly discuss here the history of blockchain.

Blockchain basics The ledger is distributed across the network to others on the same network. The ledger is also distributed to those who mine, called miners. The goal of blockchain technology is to eliminate third parties and to provide an immutable ledger. Discuss what is blockchain.

Why an immutable ledger is ideal Denotes something which can never be modified or changed. Provides a global log of transactions, created by a consensus between the chain's participants. Ensures that a blockchain transaction cannot be replaced or reversed because of cryptographic levels of validation. https://www.coindesk.com/blockchain-immutability-myth/

Nonce Definition (American Heritage Dictionary): A word coined and used for a single or particular occasion. I thought I invented a unique nonce to describe people full of beer. “He was gambrious from drinking that stout ale.” But gambrious is actually a word Definition (cryptography): An arbitrary number used just once.

Blockchain Header This is a overview of how the information within a block is compartmentalized and arranged. https://ethereum.stackexchange.com/questions/268/ethereum-block-architecture

Mining Process Simplified Sally Sally Miner Bob Miner Bob Gets Bitcoin wallet from friend with 2 Bitcoins in wallet Sends 1.5 Bitcoins to Bill with transaction fee of .05 Bitcoins After verifying Sally’s Bitcoins, consolidates transactions into a block Finds a SHA256 hash for entire block with 17 leading zeroes Bill Bill gets 1.5 Bitcoins and sees them in his wallet Miner Bob Miners Bitcoin Software Sally Sally now has 1.55 fewer bitcoins in her wallet Broadcasts to miners he found a SHA256 hash with 17 leading zeroes Miners verify Bob’s claim that he has found SHA256 hash Validated block is added to blockchain Miner Bob Gets 12.5 Bitcoins for mining block + transaction fees Mining Process Simplified

Judy sends Ralph 2 Bitcoins. 2. Miner Check to see if sender has Bitcoin 4. Miner Searches for a hash has the right number of leading zeros 3. Miner Assembles valid bitcoin transactions into block of 1 mb 5. Miner broadcasts to other miners. Transactions Judy 2 Ralph Hilary 1.5 Dan Doug .5 Jill Hank 10 … 1. Transaction Pool Judy sends Ralph 2 Bitcoins. Hillary sends Dan 1.5 Bitcoins Doug sends Jill .5 Bitcoins … Block Chain Ledger B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 6.Miners Add validated transactions to block chain ledger

Nonce from a Crypto Perspective “(Number ONCE) An arbitrary number that is generated to provide a unique identification or for security purposes such as when logging into a network (see initialization vector). The nonce is used only once and not repeated. Although random and pseudo-random numbers theoretically produce unique numbers, there is the possibility that the same number can be generated more than once. However, if a very large, true random number is used, the chances are extremely small. A perfect nonce is the time of day; for example, 12.53 seconds past 5:13pm on 1/18/2012 because it can only occur once.” Read more at http://www.yourdictionary.com/nonce#websters#Ubbks1qRqkVPVxlq.99

How the Nonce is Used in Mining In the construction of a SHA 224,256, or 512 hash, this algorithm was developed by NSA. A cryptographic hash is derived from a mathematical operation on text; it is used to make sure that the text has not been altered in any way. In Bitcoin mining the SHA 224,256, or 512 hash, is generated by adding a nonce or unique value to the end of the text that is being hashed. The goal is to generate a SHA256 hash that starts with zeros. The nonce is the random number that is added to the end of the text being hashed until the desired number of leading zeros are generated. This adding of a random number, or nonce, to generate a hash with leading zeros is what mining is all about.

Mining Process Sally Sally Miner Bob Miner Bob Gets Bitcoin wallet from friend with 2 Bitcoins in wallet Sends 1.5 Bitcoins to Bill with transaction fee of .05 Bitcoins After verifying Sally’s Bitcoins, consolidates transactions into a block Finds a SHA256 hash for entire block with 17 leading zeroes Bill Bill gets 1.5 Bitcoins and sees them in his wallet Miner Bob Miners Bitcoin Software Sally Sally now has 1.55 fewer bitcoins in her wallet Broadcasts to miners he found a SHA256 hash with 17 leading zeroes Miners verify Bob’s claim that he has found SHA256 hash Validated block is added to blockchain Miner Bob Gets 12.5 Bitcoins for mining block + transaction fees Mining Process

Mining Complexity It takes more time to generate a hash with 4 zeroes in front than 8 zeroes. Hash with one zero requires about 16^1 or 16 attempts. Hash with two zeros requires about 16^2 or 256 attempts. Hash with three zeros requires about 16^3 or 4096 attempts. Right now Bitcoin miners have to generate hashes with 17 leading zeros. This requires billions of calculations. Watch these two videos for more information. Solomon Lederer video Gary Sims video.

Exercise 1 Go to: http://104.156.254.129/Exercise1.php Enter in your name in the input box Enter in a random integer value after your name and click submit. If you see a SHA256 hash with a leading zero the exercise is completed. If not, repeat the above steps until you see a SHA 256 hash with a leading zero.

Exercise 2 Go to: http://104.156.254.129/Exercise2.html Enter your name and the number of Bitcoins you want to give to a friend. (For example: Sean transfers 2 Bitcoins to Matt) Enter 5 for the number of leading zeros to generate. Enter SHA512 for the hashing algorithm. What was total number of attempts? What was the expected number of attempts? How long did it take to find the nonce that generated the correct number of leading zeros? What was the hash rate?

Exercise 3 Go to: http://104.156.254.129/Exercise3.html Enter in your name and major Check for 4 zeros Select SHA256 for the hash Let the simulation run for 10 iterations