using intel sgx
play

using Intel SGX Sergey Gorbunov University of Waterloo Joint work - PowerPoint PPT Presentation

Iron: Functional encryption using Intel SGX Sergey Gorbunov University of Waterloo Joint work with Ben Fisch, Dhinakaran Vinayagamurthy, Dan Boneh. Motivation DNA_A DB = Database of DNA sequences DNA_B DB DB DB Challenges: 1. Ensure


  1. Iron: Functional encryption using Intel SGX Sergey Gorbunov University of Waterloo Joint work with Ben Fisch, Dhinakaran Vinayagamurthy, Dan Boneh.

  2. Motivation DNA_A DB = Database of DNA sequences DNA_B DB DB DB Challenges: 1. Ensure privacy of users’ DNA sequences in the DB. 2. Selectively enable services (i.e. computations) over private data in DB 2

  3. FE to the Rescue ct = Enc(mpk, DB) sk F2 CT CT mpk, msk CT F2 sk F1 F1 CT CT CT F1(DB) F3(DB) F2(DB) sk F1 sk F3 sk F2 3

  4. FE Definition [Boneh, Sahai, Waters 11] • (mpk, msk ) ← Setup(1 n ) Authority (NIH) • ct ← Enc(mpk, X) Data Owner (may not be NIH) • sk F ← Keygen(msk, F) Authority • F(X) ← Dec( sk F , ct) Service / Data User 4

  5. FE Security - Informal • Simulation (SIM): Adversary given (sk F1 , sk F2 , … , sk Fq ) and Enc(mpk, X), learns only F1(X), F2(X), … , Fq(X) • Indistinguishability (IND): Adversary given access to (sk F1 , sk F2 , … , sk Fq ), cannot distinguish between Enc(mpk, X 0 ) and Enc(mpk, X 1 ) where F i (X 0 ) = F i (X 1 ) for all i. 5

  6. FE Security – semi-formal [BSW11,O’N10] Ideal eal World ld Real World Sim FE scheme F1, F2, … F1, F2, … Adv Adv SK F1 , SK F2 , … SK F1 , SK F2 , … F1(X), F2(X), … X ct ct MPK MPK st st 𝑑 ≈ (X, st) (X, st) 6

  7. Previous Results • FE for Boolean formulas/inner products [GPSW06, LOSTW10, AFV11, ABDP15, BJK15, ALS16, KLM+16, BCFG17, … ]  Various standard assumptions: LWE, pairings, etc.  Somewhat efficient • General functions/circuits [GGHRSW14, ABSV15, Wat16, BKS16, BNPW16, … ] х Non-standard assumptions (multi-linear maps, obfuscation) х Very inefficient [ACLL’15] 7

  8. Can we build an efficient, provably-secure FE scheme for arbitrary functions from a plausible assumption? 8

  9. Our Results Thm: We present efficient, provably-secure FE for arbitrary functions assuming existence of secure hardware (Intel SGX) modules.  We model and argue the security under strong simulation notion.  No restriction on the complexity of functions: need to be written in C/C++.  We demonstrate practical efficiency with a prototype implementation and benchmark against known crypto FE constructions.

  10. Outline  Motivation and our results • Background on secure hardware (Intel SGX) • Construction overview • Proof insights • Implementation details and performance

  11. Intel SGX Overview Goal: provide secure execution environment on an untrusted remote host, assuming only security of a processor enabled with a set of encryption routines (Intel SGX). Untrusted Host Memory Container: Only the CPU is tamper • Program code safe from the adversary • User Stack • program/data Libraries CPU • Internal states Standard CPU Logic + • Data pages User Hardware Module + program/data Encryption Routines (SGX) (steady state, post-setup) 11

  12. Intel SGX Overview  Encrypted user-level memory container • User-level = cannot do syscalls, IO, network communication, etc.  Physically encrypted pages of program code and data in memory  Key is protected on the CPU and cannot be extracted, encrypts/decrypts container pages before execution 12

  13. Intel SGX Overview Property 1: Attestation • A party can verify that it is communicating with a program running in the encrypted container on a platform associated with a key pair (pk, sk) • Verification wrt a public “measurement” of the program (hash) • Lo Local al attestatio ion: two containers running on the same node can attest each other • Remote attestatio ion: a remote user can attest that a specific program is running inside a secure container 13

  14. Intel SGX Overview Memory pk, sk User program P CPU Proof P Proof P = pk Proof P Sign(sk, H(P)) Attest(pk, P, Proof P ) User program/data User program/data 14

  15. Intel SGX Overview Property 2: Isolated execution • Confidentiality : “black - box” execution of a program  Internal state of the program is hidden from adversary • Integrity :  Adversary cannot change execution state/data/program,  Cannot modify the output of the program on a given input 15

  16. Intel SGX Overview Memory Input X pk, sk User P(X), Proof P(X) program P pk CPU Proof P(X) = Verify(pk, P(X), Proof P(X) ) Sign(sk, P(X)) User program/data 16

  17. SGX Formal Algorithms • Setup(1 n ) → (sk, pk) • Load sk (P) → Proof P • Attest(pk, P, Proof P ) → 0/1 • Run sk (X) → (P(X), Proof P(X) ) • Verify(pk, P(X), Proof P(X) ) → 0/1 17

  18. SGX Initialization and Runtime Goal: secure verifiable computation outsourcing of a program P on input X. Memory pk P, X Load(P) pk, sk Proof P CPU Attest(pk, P, Proof P ) P(X), Proof P(X) User Sec. channel program P X P(X), Proof P(X) Verify(pk, P(X), Proof P(X) ) 18

  19. SGX – The Good • Shielded execution of unmodified Windows apps [BPH14] • Secure MapReduce computations [SCF+15, DSC+15, OCF+15] • Secure Linux containers [ATG+16, STT+17] • An authenticated data feed for smart contracts [ZCC+16] • Secure distributed data analytics (Spark SQL) [ZDB+17] • Other CPU manufacturers have their own version of SGX (AMD SEV) • Easy to use, develop, integrate, etc. Becoming a building block for many secure applications! 19

  20. SGX – The Ugly • Programs running inside encrypted containers are subject to side- channel attacks: • Page-fault attacks [XCP15] • Synchronization bugs [WKPK16] • Branch shadowing [SLK+17] • Cache attacks [BMD+17, SWG+17] • Lots of academic work providing stronger security guarantees and mitigating SGX side-channels [CLD16, SLKP16, LSG+16, WKPK16, SLK+17, SGF17]. 20

  21. SGX – The Ugly Cont. • Intel is trusted for the HW implementation • Cannot change the working function inside the encrypted container after it is loaded/attested • Small working memory (~90MB) • No system calls/IO/network communication 21

  22. System vs Model vs Proof IPSec Disk encryption 22

  23. Outline  Motivation and our results  Background on secure hardware (Intel SGX) • Construction overview • Proof insights • Implementation details and performance

  24. Our Construction (simplified) Building blocks: • SGX (on data user node) • public-key encryption (p.setup, p.enc, p.dec) • signature scheme (s.setup, s.sign, s.verify) 24

  25. Our Construction (simplified) F mpk Data Authority Data User Owner SGX Enc(mpk, X) → ct Setup(1 k ) → (mpk, msk) Dec(sk F , ct) → F(X) s.setup(1 k ) → (vk s , sk s ) p.enc(pk p , X) → ct 1) 1) (next slide) p.setup(1 k ) → (pk p , sk p ) 2) 3) mpk = (pk p , vk s ), msk = (sk p , sk s ) Keygen(msk, F) → sk F 1) s.sign(sk s , F) → sk F 25

  26. Dec(sk F , ct) → F(X): F Authority Data User Problems : msk = (sk p , sk s ) ct, 1) Enc. container mpk = (pk p , pk s ) cannot talk Attest over network? SGX Encrypted Sec. channel Container 2) Which function sk p • Verify sk F to attest in enc. • Decrypt X container? • Output F(X) 26

  27. 1) Enc. container Dec(sk F , ct) → F(X): cannot talk over network? F Authority Data User msk = (sk p , sk s ) ct, mpk = (pk p , pk s ) Attest SGX Encrypted IO Sec. channel Container S sk p H • Verify sk F I • Decrypt X M • Output F(X) 27

  28. 2) Which function Dec(sk F , ct) → F(X): to attest in enc. container? Define: P(mpk, ct, sk F ): F Authority Data User 1) Establish secure msk = (sk p , sk s ) ct, mpk = (pk p , pk s ) channel 2) Verify sk F Attest 3) Decrypt X SGX Encrypted 4) Output F(X) IO Sec. channel Container S Load and attest P sk p H • Verify sk F I • Decrypt X M • Output F(X) 28

  29. 2) Which function Dec(sk F , ct) → F(X): to attest in enc. container? F Authority Data User msk = (sk p , sk s ) ct, mpk = (pk p , pk s ) P(mpk, ct, sk F ): IO Attest P • Establishes secure channel S Sec. channel • Verifies sk F H • Decrypt X I sk p • Launches enclave F’ M Attest F’ F’: • Local attests enclave F’ • Establish sec. sec. channel channel X • Compute F(X)

  30. Q & A Q: Adversary controls the IO Shim layer. Can she/he modify: 1. The secret key sk F 2. Program loaded P 3. The encryption of the secret key sk p and observe output F(X) to learn information about sk p ? A: 1. No, follows by security of signature scheme 2. No, follows by attestation property of SGX 3. Channel must be protected with CCA2 properties.

  31. Q & A Q: How does the proof work? f Authority Data User msk = (sk p , sk s ) ct, mpk = (pk p , pk s ) Attest SGX Encrypted IO Sec. channel Container S sk p H • sk F sk p Need to simulate! I • F(X) M F(X)

  32. Q & A Q: How does the proof work? A: • In simulation, F(X) f Authority Data User comes from the msk = (sk p , sk s ) ct, mpk = (pk p , pk s ) authority via sec. channel (enc(0) in the real game) Attest SGX Encrypted • Indistinguishability of IO Sec. channel Container enc(0) and enc(F(X)) S follows by sec. channel F(X), sk p H • sk F sk p (not readily. need to I • F(X) use dual-encryption M tech.) F(X)

  33. Q & A Q: What is “function description” and how does authority validate it? A: An arbitrary C/C++ program code that is given to the authority. Authority can inspect the code, compile into sgx-enabled executable and sign the executable. sk F = (executable, signature of the executable).

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend