Symposium on Distributed Ledger Technology SDLT'2017

Slides:



Advertisements
Similar presentations
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Advertisements

Digital Signatures and Hash Functions. Digital Signatures.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown and edited by Archana Chidanandan Cryptographic Tools.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
CSE331: Introduction to Networks and Security Lecture 21 Fall 2002.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
BITCOIN An introduction to a decentralised and anonymous currency. By Andy Brodie.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
HASH Functions.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
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.
Hashing Algorithms: Basic Concepts and SHA-2 CSCI 5857: Encoding and Encryption.
CSCI 172/283 Fall 2010 Hash Functions, HMACs, and Digital Signatures.
Cryptographic Hash Functions and Protocol Analysis
Lecture 2: Introduction to Cryptography
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Week 4 - Friday.  What did we talk about last time?  Snow day  But you should have read about  Key management.
Authentication. Goal: Bob wants Alice to “prove” her identity to him Protocol ap1.0: Alice says “I am Alice” Failure scenario?? “I am Alice”
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Hashes Lesson Introduction ●The birthday paradox and length of hash ●Secure hash function ●HMAC.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
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.
@Yuan Xue 285: Network Security CS 285 Network Security Hash Algorithm Yuan Xue Fall 2012.
Hervey Allen Phil Regnauld 15 June 2009 Papeete, French Polynesia DNSSEC Tutorial: Public / Private.
Block Chain 101 May 2017.
Chapter 12 – Hash Algorithms
Blockchain Infrastructure for e-Science
Cryptographic Hash Function
CSCE 715: Network Systems Security
Cryptography And Network Security
Message Authentication and Hash Functions
Secured Hash Algorithm(SHA)
Presented by: Dr. Munam Ali Shah
So what is Blockchain anyway?
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Cryptography Lecture 13.
B504/I538: Introduction to Cryptography
Cryptographic Hash Functions
ICS 454 Principles of Cryptography
Cryptographic Hash Functions
Chapter 11 – Message Authentication and Hash Functions
Introduction to Symmetric-key and Public-key Cryptography
Hash and MAC Algorithms
ICS 454 Principles of Cryptography
Security Analysis of Network Protocols
Blockchain Concepts RISK FORUM 2017 Hash function (e.g. SHA-256)
Swagatika (Jazz) Sarangi
Lecture 4.1: Hash Functions, and Message Authentication Codes
Cryptography Lecture 14.
Hashing Hash are the auxiliary values that are used in cryptography.
Wokshop SAIS 2018 Dr. Meg Murray Kennesaw state university
Faculty Seminar Series Blockchain Technology
Cryptography Lecture 13.
Lecture 4: Hash Functions
Seyed Amir Hossain Naseredini
Pseudorandom Numbers Network Security.
Hash Function Requirements
CRYPTOGRAPHY & NETWORK SECURITY
Campbell R. Harvey Duke University and NBER
Simple Hash Functions Network Security.
Blockchain Tech Big Picture
Blockchain Tech Big Picture
One-Way Hash Functions
Presentation transcript:

Symposium on Distributed Ledger Technology SDLT'2017 Gold Coast Campus, Griffith University June 13, 2017 Design Patterns which Facilitate Message Digest Collision Attacks on Blockchains Peter Robinson, peter.robinson@sent.com School of Information Technology and Electrical Engineering, University of Queensland.

Overview Message digest algorithms are one of the underlying building blocks of blockchain platforms such as Ethereum. This paper analyses situations in which the message digest collision resistance property can be exploited by attackers. Two mitigations for possible attacks are described: Longer message digest sizes make attacks more difficult; and, Including timeliness properties limits the amount of time an attacker has to determine a hash collision. Ref 1: Image on cover slide: Preneel, B. (2013) “Introduction to the Design and Cryptanalysis of Cryptographic Hash Functions” Available: https://www.cosic.esat.kuleuven.be/summer_school_albena/slides/preneel_hash_july2013_shortv1_print.pdf

Message Digest / Cryptographic Hash Algorithms Digest Algorithm (Hash): Variable length input => Fixed Length Output. Address Hash: Bitcoin and Ripple: RIPEMD160(SHA256): 160 bit digest, Ethereum: KECCAK/160: 160 bit digest. Main Hash: Bitcoin: SHA256(SHA256): 256 bit digest, Ethereum: KECCAK/256: 256 bit digest, Ripple: 256 bit truncated SHA512: 256 bit digest.

Message Digest Security Strength & Cryptanalysis Preimage Resistance Second Preimage Resistance Collision Resistance ? x ≠ ? ? ≠ ? Hash Hash Hash Hash Hash h(x) h(x) = h(x’) h(x) = h(x’) Classical Quantum n n/2 n n/2 n/2 n/3

NIST Recommendation on Security Strength 80 bit Security Strength algorithms should not be used after 20102. 160 bit message digest functions provide 80 bits of security strength for collision resistance property. Address hashes used by Bitcoin, Ethereum, and Ripple may be susceptible to collision attacks by large state based actors. Ref 2: NIST (2009) “DISCUSSION PAPER: The Transitioning of Cryptographic Algorithms and Key Sizes” http://csrc.nist.gov/groups/ST/key_mgmt/documents/Transitioning_CryptoAlgos_070209.pdf SP800-57: http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57-Part1-revised2_Mar08-2007.pdf EINSA: https://www.enisa.europa.eu/publications/algorithms-key-sizes-and.../fullReport

Design Patterns to Avoid / Exploitation Scenarios The attacker chooses the value to be digested. The attacker is able to trick an entity into doing something based the message digest and value. There is no time-sensitive aspect to the value. Time-sensitivity is important as the first message digest collisions for an algorithm have historically taken a significant period of time.

Attack Scenario #1: EIP86 Transaction Verification Contracts Contract is deployed the address calculated as: Keccak256(rlp:encode([creator+nonce+initcode]))%2160 Where: creator is the account that created the contract, nonce is a value which should be sequential, initcode is the initialization code for the contract.

Attack Scenario #1: EIP86 Transaction Verification Contracts An attacker who had broken the message digest collision resistance property could manipulate the nonce value or the contents of the contract such that there exists two contracts which would be deployed to the same address. The attacker could show one variant of the contract to a user and persuade them to send some Ether to the address. The attacker could then deploy the nefarious contract and spend the Ether.

Attack Scenario #2: Proposal for Proof of Stake Agreed Random Number Ethereum’s Proof of Stake proposal needs an agreed random number to use to choose which miner will create the next block. One proposal is: Each miner generates a random value, To prevent cheating, miners submit commitment values: message digest(random value), The random values are then exposed and combined using XOR to produce the agreed random number.

Attack Scenario #2: Proposal for Proof of Stake Agreed Random Number An attacker who had broken the collision resistance property could: Determine two random values which hash to produce the same commitment value, Submit their commitment value, Then, after seeing the random values exposed by the other miners, choose which of their random values to deliver, thus influencing the resulting agreed random number.

Design Pattern & Attack Mitigations The message digest size used for account numbers should be increased. In an email from V. Buterin and M. Swende from the Ethereum team on May 18, 2017, they tentatively agreed to adopt this recommendation of mine. A temporal component should be incorporated into designs. The random value proposed for use in PoS should incorporate some value from a recent block.

Questions