Blockchains slides have been taken from:

Slides:



Advertisements
Similar presentations
SeND Hash Threat Analysis CSI WG Ana Kukec, Suresh Krishnan, Sheng Jiang.
Advertisements

Hashing.
Hash Function. What are hash functions? Just a method of compressing strings – E.g., H : {0,1}*  {0,1} 160 – Input is called “message”, output is “digest”
Payment Systems 1. Electronic Payment Schemes Schemes for electronic payment are multi-party protocols Payment instrument modeled by electronic coin that.
Bitcoin Double Spending Attack Karame, Androulaki & Capkun Presented by Subhro Kar CSCE 715, Fall 2013.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
Hashing Table Professor Sin-Min Lee Department of Computer Science.
Foundations of Cryptography Lecture 6 Lecturer: Moni Naor.
Theory of Computation II Topic presented by: Alberto Aguilar Gonzalez.
1 Bitcoin A Digital Currency. Functions of Money.
Hashing Sections 10.2 – 10.3 CS 302 Dr. George Bebis.
Ihab Mohammed and Safaa Alwajidi. Introduction Hash tables are dictionary structure that store objects with keys and provide very fast access. Hash table.
Hash Table March COP 3502, UCF 1. Outline Hash Table: – Motivation – Direct Access Table – Hash Table Solutions for Collision Problem: – Open.
Intro to Cryptocurrencies & Review of Relevant Crypto Tyler Moore, CS 7403, University of Tulsa Slides adapted from Arvind Narayanan, Joseph Bonneau, Edward.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Cryptographic Hash Function
Bitcoin - a distributed virtual currency system
LEARNING OBJECTIVES O(1), O(N) and O(LogN) access times. Hashing:
Chapter 5: The Art of Ensuring Integrity
Data Abstraction & Problem Solving with C++
Hashing Alexandra Stefan.
Hashing Alexandra Stefan.
Review Graph Directed Graph Undirected Graph Sub-Graph
Bitcoin and the Blockchain
Topic 14: Random Oracle Model, Hashing Applications

CS898AT – Bitcoins and Cryptocurrencies
Technical Overview of Bitcoin
Hash Table.
External Memory Hashing
Hash Table.
Cryptographic Hash Functions
Nakamoto Consensus Marco Canini
CS 240: Computing Systems and Concurrency Lecture 20 Marco Canini
ICS 454 Principles of Cryptography
Computer Science 2 Hashing
Security through Encryption
Teach A level Computing: Algorithms and Data Structures
Dictionaries and Their Implementations
Blockchains (2) slides have been taken from:
Blockchain Alexander Prenta 9/27/2018.
Hash Tables Chapter 12 discusses several ways of storing information in an array, and later searching for the information. Hash tables are a common.
Hashing Alexandra Stefan.
ICS 454 Principles of Cryptography
CS202 - Fundamental Structures of Computer Science II
Hashing Sections 10.2 – 10.3 Lecture 26 CS302 Data Structures
Lecture 4.1: Hash Functions: Introduction
CS 394B Introduction Marco Canini.
Consensus Algorithms.
Pseudorandom number, Universal Hashing, Chaining and Linear-Probing
Hash Tables Chapter 12 discusses several ways of storing information in an array, and later searching for the information. Hash tables are a common.
Lecture 4.1: Hash Functions, and Message Authentication Codes
Modified from Bob Vachon
TELE3119: Trusted Networks Week 5
Hashing Hash are the auxiliary values that are used in cryptography.
Faculty Seminar Series Blockchain Technology
Randomized Algorithms
Instructor Materials Chapter 5: Ensuring Integrity
Cryptography Lecture 15.
Blockchain Technology: A New Approach to Provenance
Lecture 4: Hash Functions
Ensuring Correctness over Untrusted Private Database
Randomized Algorithms
Chapter 8 roadmap 8.1 What is network security?
Bitcoin and Blockchain
Explore Txs, block, blockchain in Bitcoin
Not about digital currencies
Presentation transcript:

Blockchains slides have been taken from: Intro to Crypto and Crypto Currencies by Ed Felton

(N−1)/N×(N−2)/N×⋯×(N−{k−})N×(N−{k−1})/N Collision Free Given a space of N possible hash values, already picked a single value. After that, there are N−1 remaining values (out of a possible N) that are unique from the first. Therefore, the probability of randomly generating two integers that are unique from each other is (N-1)/N After that, there are N−2 remaining values (out of a possible N) that are unique from the first two. Probability of randomly generating three integers that are all unique is (N-1)/N x (N-2)/N (multiply the probabilities because each random number generation is an independent event.) In general, the probability of randomly generating k integers that are all unique is: (N−1)/N×(N−2)/N×⋯×(N−{k−})N×(N−{k−1})/N Can be approximated by: e−k(k−1)/2N

Collision Free (2) If you have 2130 randomly chosen inputs 99.8% chance that two of the inpts will collide This is the case regardless of what H( ) is Take a long time to compute No H( ) has been proven to be collision free. Despite – safe to assume If H(x) = H(y) than x = y Therefore you can use to recognise large files Adapted from Ed Felton

Hiding Given H(x) it is not pssoble to find x If r is chosen from a probability distribution has a high minimum entropy H(r|x), it is infeasible to find x High minimum entropy means that the distribution is very spread out Probability of a particular value being chosen is negligibly small Adapted from Ed Felton

Commitments Commit to a value and reveal it later commit(msg) => (com, key) Match := verify (com, key, msg) – true or false Publish commitment then reval key, mg Any one can verify Two properties com –> cannot see msg Once key & msg is revealed -> non repudiation Adapted from Ed Felton

Commit Implementation Property of Hiding Commit (msg) = H(key|msg), H(key) commit key Property of collision avoidance Verify (com, key, msg) = H(key|msg) Adapted from Ed Felton

Puzzle Friendly For every possible output y, if k is chosen forma distribution with high minimum entropy, then it is not possible to find x such that H(k|x) = y Search Puzzle Given a “puzzle ID” and target set Y, find a solution x such that H(puzzle ID|x) ∈ Y Only way -> Try random values of x Adapted from Ed Felton

SHA-256 Block1 Block2 Blockn 256 256 IV Hash C C C If C, the compression function is collision free, then the final has is also collision free Adapted from Ed Felton

Hash Pointers & Blockchains Has pointer – locations + verification Can be used to create any data structure as long as there are no cycles Simple linked list H( ) H( ) H( ) H( ) Data Data Data Adapted from Ed Felton

Binary Tree Data Data Data Data Data Data Data Data Adapted from Ed Felton

Membership of a Merkle Tree Data Adapted from Ed Felton

Advantages Can hold many items but need remember the root hash Can verify membership in O(logn) time/space Sorted Merkle trees Can verify non membership in O9logn) Show items before, after missing one Adapted from Ed Felton

Digital Signatures Only you can sign, but anyone can verify Signature is tied to particular document Cannot cut and paste Public Key == an identity Decentralised ID Anybody can make a new identity at any time No central point of coordination Address in crypto currencies Adapted from Ed Felton

A Simple Cryptocurrency Signed by PKAlice Pay to PKBob H( ) Signed by PKAruna Pay to PKAlice H( ) Signed by PKAruna CreateCoin [uniqueCoinID] Adapted from Ed Felton

Simple Cryptocurrency – Double Spending Signed by PKAlice Signed by PKAlice Pay to PKBob H( ) Pay to PKRandy H( ) Signed by PKAruna Pay to PKAlice H( ) Signed by PKAruna CreateCoin [uniqueCoinID] Adapted from Ed Felton

Overcoming Double Spend H( ) H( ) H( ) H( ) Trans ID #9 Trans ID #10 Trans ID #8 Data Data Data Aruna published a history of all transactions Blockchain, signed by Aruna Can optimise by putting multiple transaction into the same block Adapted from Ed Felton

Summary CreateCoints create new coins transID #10 type:CreateCoins Coins created num value recipient Coin10(0) 3.3 0x…. 1.4 0x…. Coin10(1) 7.1 0x…. Coin10(2) Adapted from Ed Felton

Paycoins Valid if: Consumed coins are valid Not already consumed Total value = Total value in, and Signed by owners of all consumed coins transID #10 type:PayCoins Consumed coinIDs: 68(1), 42(0), 72(3) Coins created num value recipient 3.3 0x…. 1.4 0x…. 7.1 0x…. Adapted from Ed Felton