30
| | BITE: Bitcoin Lightweight Client Privacy using Trusted Execution Siniša Matetić (ETH Zurich), Karl Wüst (ETH Zurich), Moritz Schneider (ETH Zurich), Kari Kostiainen (ETH Zurich), Ghassan Karame (NEC Labs) Srdjan Čapkun (ETH Zurich) 28 th Usenix Security Symposium, August 14-16, 2019, Santa Clara, CA, USA 15-Aug-19 1 BITE: Bitcoin Lightweight Clients Privacy using Trusted Execution Siniša Matetić

BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Siniša Matetić (ETH Zurich), Karl Wüst (ETH Zurich), Moritz Schneider (ETH Zurich), Kari Kostiainen (ETH Zurich), Ghassan Karame (NEC Labs) Srdjan Čapkun (ETH Zurich)

28th Usenix Security Symposium, August 14-16, 2019, Santa Clara, CA, USA

15-Aug-19 1

BITE: Bitcoin Lightweight Clients Privacyusing Trusted Execution

Siniša Matetić

Page 2: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Bitcoin - characteristics

15-Aug-19Siniša Matetić 2

§ Heavily used§ ~ 4.1 Tx/s§ ~ 360k Tx/day

BTC Price: 10’344 USD

Page 3: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Bitcoin - characteristics

§ Significant deployment issue is client requirements§ Clients need to download and process entire chain (~230GB)§ Participating in the P2P network carries high communication overhead§ Partial Anonymity achieved through Pseudonymity

§ Implications: using mobile clients for transaction confirmation is infeasible§ Many different ”light” clients available for use in mobile (resource constrained) devices

§ Problem: full reliance on the full node that stores the entire chain§ Light client stores only block headers, all other information is requested from the full node§ Fully breaks privacy

15-Aug-19Siniša Matetić 3

Page 4: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Strawman solutions

§ Bitcoin supports Simplified Payment Verification (SPV)§ Works, but sharing the addresses breaks privacy

§ Use the same approach with Bloom Filters?§ Sharing the filters still breaks privacy [1]

§ Share addresses with a TEE?....

Full node(full chain)

Light client(block headers)

address(es)matching transactions (+ Merkle paths)

15-Aug-19Siniša Matetić 4

[1] Gervais et al. On the Privacy Provisions of Bloom Filters in Lightweight Bitcoin Clients. ACSAC (2014), ACM.

filter(s)

Page 5: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

§ Enable isolated execution within a user’s system§ Secure, integrity-protected environment§ Provides processing, memory, and storage capabilities§ Smart cards, TPM, ARM Trustzone, Keystone, etc.§ Intel SGX

15-Aug-19Siniša Matetić 5

GOOD FROM HERE EXAMPLESTrusted Execution Environments

Page 6: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

§ Intel’s architecture containing new instructions, protective mechanisms, and key material in the CPU § Runtime isolation, sealing, attestation§ Memory content encrypted

§ Trust model§ CPU and protected enclaves§ Untrusted system software

§ NOTE: Recent works show successful compromise of such environments§ Side-channel attacks, Spectre, Meltdown, Foreshadow

Siniša Matetić 6

GOOD FROM HERE EXAMPLESIntel Software Guard Extensions (SGX)

Images taken from software.intel.com 15-Aug-19

Page 7: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Strawman solutions - continued

§ Bitcoin supports Simplified Payment Verification (SPV)§ Works, but sharing the addresses breaks privacy

§ Use the same approach with Bloom Filters?§ Sharing the filters still breaks privacy

§ Share addresses with a TEE (SGX enclave)?§ Better… but enclaves leak and privacy is still a problem§ Side-channel attacks

§ Send also the private key to the full node?§ If enclave compromised, client looses all money

Full node(full chain)

Light client(block headers)

matching transactions (+ Merkle paths)

enclave

private key

15-Aug-19Siniša Matetić 7

address(es)

Page 8: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Isolated execution and leakage - challenges

§ CPU enforces that other software cannot access enclave memory§ But physical resources are shared

§ Side-channels were a known threat§ Original SGX docs: “software side-channels may be possible”§ Page-fault attacks demonstrated soon after release

§ Essentially, SGX itself does not provide protection against external and internal information leakage

815-Aug-19Siniša Matetić

Page 9: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

How to prevent side-channels on SGX?

§ Side-channel resilient implementation (Intel recommendation)§ Difficult to apply for all enclaves

§ Developer annotation (Cloak, Raccoon)§ Difficult to assess what might leak

§ Address specific attack vectors (T-SGX, DejaVu)§ Does not prevent all attacks

§ Private information retrieval (ORAM) for every memory access§ Very high overhead§ Control-flow and timing leakage à oblivious execution

915-Aug-19Siniša Matetić

Page 10: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Our solution: BITE – transaction fetching and verification

§ Light client shares the adresses with the enclave on the full node

§ Enclave hardened using known techniques§ Memory access: in-memory ORAM to prepare a response§ Control flow: secret-dep branching removed using CMOV [Raccoon]§ Response: Fixed ratio between response size and scanned blocks

§ Two variants – Scanning Window and Oblivious Database

1015-Aug-19Siniša Matetić

Page 11: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 11

Bitcoin Full Nodes

BFN2

BFN1

BFNm

BFN3

Bitcoin Lightweight Clients

BLC2

BLC1

BLCn

……

secure Enclave E

Originalfull

node

BC

BITE: System Model and protocol overview

BITE

UTXO

enclaveUTXO

Page 12: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 12

Bitcoin Lightweight Clients

BLC1

secure Enclave E

Originalfull

node

BC

BITE: System Model and protocol overview

Bitcoin Full Nodes

BFN2

BFN1

BFNm

BFN3

……

BITE

UTXO

enclaveUTXO

Page 13: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

Bitcoin Lightweight Clients

BLC1

secure Enclave E

Originalfull

node

BC

BITE: System Model and protocol overview

UTXO

enclaveUTXO

Page 14: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

BITE: System Model and protocol overview

acquire latest block header

P2P Bitcoin network

1 Attestation, establish TLS connection

secure Enclave E

Originalfull

node

BC

UTXO

enclaveUTXO

Bitcoin Lightweight Clients

BLC1

Page 15: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 15

BITE v1: Scanning Window

Page 16: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

Address1,2…nBlock height h

BITE v1: Scanning Window

2 Information request for transaction retrieval

createresponsestructure

34scan BC from last block to h

if block contains transactions-›(move TXs to response)-›(move MPs to response)

else-›(move header to response)

BLC1

secure Enclave E

Originalfull

node

BC

UTXO

enclaveUTXO

Bitcoin Lightweight Clients

Page 17: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

BITE v1: Scanning Window

5return request information

TXs, block headers,

verify PoW and longest chainverify TXs and Merkle paths

6

secure Enclave E

Originalfull

node

BC

UTXO

enclaveUTXO

BLC1

Bitcoin Lightweight Clients

Page 18: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 18

BITE v2: Oblivious Database

Page 19: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

Address1,2…nBlock height h

BITE v2: Oblivious Database

2 Information request for transaction retrieval

createresponsestructure

34Search through enclave UTXO

if UTXO contains transactions-›(move TXs to response using ORAM)

else-›(move nothing to response using ORAM)

BLC1

secure Enclave E

Originalfull

node

BC

UTXO

enclaveUTXO

Bitcoin Lightweight Clients

Build enclave UTXO

encrypted, indexed and accessed using ORAM

Page 20: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 13

BITE v2: Oblivious Database

5return request information

TXs, latest block header (longest chain)

verify longest chainapply and summarize enclave results

6

secure Enclave E

Originalfull

node

BC

UTXO

enclaveUTXO

BLC1

Bitcoin Lightweight Clients

Page 21: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Performance

1415-Aug-19Siniša Matetić

Page 22: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Results

§ BITE is the first practical solution enabling strong privacy protection for Bitcoin light clients § BITE provides all the necessary data for light clients in order to verify and create transactions

§ BITE tolerates strong adversary § Malicious full node that performs side-channel attacks on enclave§ Monitors control flow (instruction-level) and data accesses (byte-granularity)

§ Graceful failure§ In the case of full break of SGX, clients don’t lose money

1615-Aug-19Siniša Matetić

Page 23: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution

Siniša Matetić

ETH ZürichSystem Security GroupInstitute of Information SecurityDepartment of Computer Science

www.syssec.ethz.ch

[email protected]

© ETH Zurich, August 2019

15-Aug-19Siniša Matetić 17

Thank you for your attention! Questions?

Page 24: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 24

Backup

Page 25: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 25

BITE: Scanning Window mechanism

Page 26: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 26

Page 27: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 27

Page 28: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 28

Page 29: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 29

Page 30: BITE: Bitcoin Lightweight Clients Privacy using Trusted ... · BITE: Bitcoin Lightweight Client Privacy using Trusted Execution | | §Intel’s architecture containing new instructions,

||BITE: Bitcoin Lightweight Client Privacy using Trusted Execution 15-Aug-19Siniša Matetić 30