33
Workshop on Blockchain Technology and Theory – October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM) with Proofs of Useful Work (PoUW) with Fan Zhang, Robert Escriva. Ari Juels, and Robbert van Renesse

Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

Workshop on Blockchain Technology and Theory – October 16, 2017

Ittay EyalTechnion, EE and IC3

Resource-Efficient Mining (REM) withProofs of Useful Work (PoUW)

with Fan Zhang, Robert Escriva. Ari Juels, and Robbert van Renesse

Page 2: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

2

Fintech Blockchain / DLT Vision

• Bank to bank transactions (money, securities) • Smart contracts infrastructure • Security structuring • Insurance • Provenance (supply chain, art, fair trade) • IoT micropayments

Page 3: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

3

The Blockchain

Log Blockchain

block

header

Page 4: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

4

The Blockchain

Log Blockchain

block

header

Page 5: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

5

The Blockchain

Log Blockchain

hash( ) < target*

* target: a deterministic function of previous blocks

Page 6: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

6

The Blockchain

Page 7: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

7

The Blockchain

Page 8: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

8

The Blockchain

Block validation: Proof of work Ok – one hash function(and transactions Ok)

Page 9: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

9

PoW Requirements

• Memoryless random distribution • Tunable difficulty • O(1) validation • All data on the blockchain

Page 10: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

10

Fork Resolution

Longest chain wins

Minority attacker cannot out-run honest parties

Page 11: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

11

Mining Farms

Page 12: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

12

PoW: Proof of Waste?

Block proves (statistically) real-world waste • Capital expenditure • Operational expenditure

Attacker must similarly waste resources

Page 13: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

13

PoW: Proof of Waste?

Block proves (statistically) real-world waste • Capital expenditure • Operational expenditure

Attacker must similarly waste resources

That’s not waste!

Page 14: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

14

Environment-Friendly Alternatives

Permissioned system (BFT)• Centralized

Internal waste – Proof of Stake • Different properties

“Useful” resources (storage, prime numbers) • Useful? • For whom? Unfair

Page 15: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

15

Partially Decentralized

Guarantees• Similar to PoW

Assumptions • Permissionless• Trust secure-hardware manufacturer

Page 16: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

16

Software Guard Extensions (SGX)

Untrusted Operating System & Hypervisor

Untrusted Application Code

Code & Data

Untrusted Hardware

TrustedProcessor

Attestation: • Output • Fingerprint • signature

B

1. Confidentiality (incl. SRNG)2. Integrity 3. Remote attestation

output

Page 17: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

17

Intel’s Proof of Elapsed Time (PoET)

Model: Partially decentralized

Idea: Simulate PoW by sleeping.

Pros: • PoW-like guarantees • Energy-waste-free

Page 18: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

18

Intel’s Proof of Elapsed Time

Mining power not proportional to CPU value

The Stale Chips Problem: • Build a mining farm • Old useless CPUs

Waste hardware rather than power

Page 19: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

19

Intel’s Proof of Elapsed Time

Individual CPUs can be compromised

The Broken Chips Problem

Intel proposes a simple statistical test. But 1. What is the adversary’s advantage? 2. What is the cost of this test?

Page 20: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

Proof of Useful Work

Page 21: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

21

Proof of Useful Work

Dedicate useful work rather than useless

How to measure and prove?

• Memoryless random distribution • Tunable difficulty • O(1) validation • All data on the blockchain

Page 22: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

22

Proof of Useful Work

Proof of

Useful Work

Useful

Work

ResultInstruction

count 𝑛

Useful work, block header

SGX

Enclave

Simulate 𝑛Bernoulli tests

Run

Useful

Work

If success

Page 23: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

23

Hierarchical Attestation

Only predefined programs?

Alice’s Enclave

Bob’sEnclave

Carols’sEnclave

output

Page 24: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

24

Hierarchical Attestation

Only predefined programs?

Hierarchical attestation!

Compliance Checker

Alice’s Enclave

Bob’sEnclave

Carols’sEnclave

output:

output

Page 25: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

25

Hierarchical Attestation

Only predefined programs?

Hierarchical attestation! Add instruction counting

Return count

Page 26: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

26

State

New block

Block-chainagent

Block template

PoUW

Miner

PoUWEnclave

Blockchain PNetwork

TEE

Useful tasks

Useful results

1

2

2

3 45

Useful Workclient

Page 27: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

27

State

New block

Blockchain P2P Network

State

Blockchain Agent

Content

Compliance

Effort

Verifiers1

5

6

Page 28: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

28

Performance

Page 29: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

29

SGX Compromise

Individual SGX instances might be broken • Compromised SGX will attest to anything • Compromise does not allow key forgery

The Broken Chip problem

Page 30: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

30

The Broken Chip Problem

Statistically test likelihood of blocks from same CPU. Reject if unlikely.

Too permissive: Attacker gains

Too restrictive: Lose mining power

Page 31: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

31

Attacker’s Advantage

Blo

ck C

ou

nt

Att

acke

r’s

Ad

van

tage

Page 32: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

32

Wasted Proof of Work

Blo

ck C

ou

nt

Was

te

Page 33: Resource-Efficient Mining REM) with · 2017-10-16 · Workshop on Blockchain Technology and Theory –October 16, 2017 Ittay Eyal Technion, EE and IC3 Resource-Efficient Mining (REM)

33

ConclusionBlockchain security in partially-decentralized model

Proof of Useful Work with TEE (SGX)

PoCtool-chain

Hierarchical Attestation

Practical Performance

Broken Chip Resilience

Zhang, Eyal, Escriva, Juels, van Renesse. USENIX Security 2017