sgx enabled functional encryption and applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct)...

49
SGX Enabled Functional Encryption and Applications Ben Fisch Stanford University

Upload: others

Post on 09-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

SGX Enabled Functional Encryption and

ApplicationsBen Fisch

Stanford University

Page 2: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Functional Encryption (FE)Key Manager

MSK

E(PK, m)

PK

Public

SKf1SKf2SKf3

f1(m)f2(m)f3(m)

setup -> pk, msk keygen(msk, f) -> skf encrypt(pk, m) -> ct decrypt(skf,ct) -> f(m)

Page 3: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Multi-Input FEKey Manager

MSK

E(PK, m1)

E(PK, m2)

E(PK, m3)

SKf

f(m1, m2, m3)

Server

PK

Public

Page 4: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Intel SGX

Source: ISCA 2015 tutorial slides for Intel SGX

Enclave Application Remote Attestation

Page 5: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

SGX FE Design

DecryptionEnclave

Key Manager Enclave

Key Manager Platform Decryption Platform

PKSK

VKSK’

KME Tasks: ✴Setup Public Key

Cryposytem ✴Send SK to Decryption

Enclave(s) ✴Setup Signature Scheme ✴Approve and sign functions

SK

SK

“skf”

<f>

(<f>, sig) skf = (<f>, sig)

✴Check sig on <f>

✴Decrypt ciphertext

✴evaluate f

E(pk, m)

f(m)

Page 6: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Implementation Challenges• How to represent the function f:

✴ Cannot move code into enclave after EINIT ✴ Implement interpreter in enclave? ✴ Separate enclave runs f and gives attestation?

• Memory access patterns leaked

• Timing attacks

Page 7: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Genomics ApplicationGenome Database

SKf1SKf2SKf3

Researchers/Doctors

Study 1Study 2

Study 3

GWAS studies

Page 8: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Smart Devices Application

Encrypt data independently

Devices collect data

SKf1SKf2

SKf3

Apps in cloud learn restricted

functions

Page 9: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Better Buildings with BLE Sensors and Gateways

Distributed applications running on gateways

Real-time monitoring

Energy attribution and analysis

Brad Campbell – [email protected]

Page 10: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Branden Ghena ([email protected])

Michigan Architecture for Sensing Systems

TemperaturePressureHumidityLightAcceleration

Motion

PowerVoltageWatt-HoursPower Factor

Device specific data

Reference tointerface description

Data translation script

Human readable data stream

{"device": "BLEES","id": "c098e5300069","pressure_pascals": 98423.5,"humidity_percent": 41.33,"temperature_celcius": 23.62,"light_lux": 49,

}

MQTT

Translation sandbox

Page 11: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

The Toastboard

Daniel Drew

Prof. Bjoern Hartmann

“Professional software development environments usually provide a debugger, which helps programmers to locate and fix faults … Unfortunately, physical computing does not have analogous support tools and thus it

was sometimes difficult for participants in our study to identify what the problem was. “ Booth, Tracey, et al. "Crossed Wires: Investigating the Problems of End-User Developers in a Physical Computing Task."

Page 12: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 13: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Machine Learning for Makers David Mellis, Ben Zhang, Audrey Leung, Bjoern Hartmann

Experts Author Rich Code Examples Interface Supports Makers in Applying the Examples

#include <ESP.h>

ASCIISerialStream stream(0, 9600, 3);GestureRecognitionPipeline pipeline;Calibrator calibrator;TcpOStream oStream("localhost", 5204, 3, "l", "r", " ");

double zeroG = 0, oneG = 0;

double processAccelerometerData(double input){ return (input - zeroG) / (oneG - zeroG);}

void restingDataCollected(const MatrixDouble& data){ // take average of X and Y acceleration as the zero G value zeroG = (data.getMean()[0] + data.getMean()[1]) / 2; oneG = data.getMean()[2]; // use Z acceleration as one G value}

int timeout = 500; // millisecondsdouble threshold = 0.4;

void setup(){ stream.setLabelsForAllDimensions({"x", "y", "z"}); useStream(stream);

calibrator.setCalibrateFunction(processAccelerometerData); calibrator.addCalibrateProcess("Resting", "Rest accelerometer on flat surface.", restingDataCollected); useCalibrator(calibrator);

pipeline.setClassifier(DTW(false, true, threshold)); pipeline.addPostProcessingModule(ClassLabelTimeoutFilter(timeout)); usePipeline(pipeline);

registerTuneable(threshold, 0.1, 3.0, "Similarity", "How similar a live gesture needs to be to a training sample. " "The lower the number, the more similar it needs to be."); registerTuneable(timeout, 1, 1000, "Timeout", "How long (in milliseconds) to wait after recognizing a " "gesture before recognizing another one.");

useOStream(oStream);}

B

C

D

A

F

G

H

I

J

E

Page 14: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Machine Learning for Makers David Mellis, Ben Zhang, Audrey Leung, Bjoern Hartmann

Iterative Refinement of Training Data

Tuning of Parameters

Calibration Across Sensor Models

Feedback on Signal Quality

Page 15: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Drill Sergeant:Supporting Physical Construction Projectsthrough an Ecosystem of Augmented Tools

Eldon Schoop & Michelle Nguyen, Mitchell Karchemsky, Daniel Lim,Valkyrie Savage, Bjoern Hartmann & Sean Follmer

Page 16: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 17: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 18: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 19: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Private Data Collectionin an Internet of ThingsHenry Corrigan-Gibbs and Dan Boneh

• How can we collect privacy-sensitive data in a privacy-preserving way?

• Can we efficiently collect interesting aggregate statistics without collecting any individual user’s data?

• What are the theoretical limits on the efficiency of these techniques?

Page 20: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Mo#va#on  

•  California  drought  •  Collabora#on  with  earth  sciences  and  residen#al  housing  departments  to  reduce  water  usage  across  campus  

•  Gain  an  understanding  of  the  pa:erns  driving  water  consump#on  

Page 21: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Tethys:  Energy  Harves#ng  Networked  Water  Flow  Sensor  

Page 22: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Auditing IoT Communicationswith TLS-RaR

Judson Wilson, Henry Corrigan-Gibbs, Riad S. Wahby,Keith Winstein, Philip Levis, Dan Boneh

Stanford University

Page 23: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

How can we audit TLS communication between our IoT devices and the cloud?

*Nest used for illustrative purposes only.

Secure Devices:- No man-in-the-middle- Signed firmware

Page 24: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Goals

1) Preserve End-to-End Integrity

2) Fewest changes possible to TLS

3) Avoid changes to server side

Page 25: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Solution: TLS-RaR

Time

Handshake

Encrypted Session

AES-GCM

Begin TCPConnection

Enter TLSSession

A standard TLS connection...

Page 26: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Time

Handshake AES-GCM AES-GCM

Epoch 0 Epoch 1

Rotate KeysReconnect,Renegotiate,Resumeor KeyUpdate

Begin TCPConnection

Enter TLSSession

Use standard TLS features to Rotate keys, Solution: TLS-RaR

Page 27: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Time

Handshake

Securely Release Previous Epoch (0) Key to Auditing Devices

AES-GCM AES-GCM

Epoch 0 Epoch 1

Rotate KeysReconnect,Renegotiate,Resumeor KeyUpdate

Begin TCPConnection

Enter TLSSession

Solution: TLS-RaRSolution: TLS-RaRUse standard TLS features to Rotate keys, and then securely Release the previous keys to auditing devices.

Page 28: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

CESEL• Flexible hardware architecture for accelerating

cryptography

Fast Hash Function

Finite Field Coprocessor

R-LWE Coprocessor

HW RNG and HW Counter

Micro-controller with extended instructions

S-Box

Polynomial Multiplication

Vector Arithmetic

Memory Bus

Page 29: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Problem

Internet of Things applications are complex distributed systems that include embedded devices, Internet gateways, and backend cloud services.

Their software often uses three or more programming languages, operating systems, and processor architectures for devices with dramatically different resources. This heterogeneity makes applications error-prone, laborious to develop and notoriously insecure.

Page 30: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

How can we make the development process of IoT

applications simpler and more secure?

If you know the answer or want to hear an idea

come and talk with me!

Page 31: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

IoT generates a huge amount of times series data

Page 32: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Time series can be hard to interpret - how to prioritize human attention?

Challenge: reduce noise while preserving interesting features

Page 33: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

ASAP: Automatic Smoothing Parameter Selection for Time Series Visualization

Motivation

- Prioritize user attention

Key Insight

- Smooth as much as possible without losing “interesting” features

Approach

- Optimize signal smoothing parameters on the fly

(Kexin Rong, Peter Bailis)

Page 34: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 35: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,
Page 36: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

MIC DROP: Massive IoT Computations via Dimensionality Reduction OPtimization

Sahaana Suri

Page 37: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Internet of Things

Page 38: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Millions of heterogeneous sensor readings per second!

Time!

Valu

e!

Time! Time!

Valu

e!

Valu

e!

Page 39: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Gain real-time insight into system behavior !via automated tools and machine learning systems!

Millions of heterogeneous sensor readings per second!

Time!

Valu

e!

Time!

Valu

e!

Page 40: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Automatically select dimensionality reduction technique that preserves information of interest!!Quickly determine how to uncover data’s intrinsic dimensionality subject to latency constraints!

Gain real-time insight into system behavior !via automated tools and machine learning systems!

Millions of heterogeneous sensor readings per second!

Page 41: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Learn quickly and bound error by training on bootstrap-based samples!!

Train multiple models at once via memoization !!

Seed techniques by using results from previously tested techniques!

Gain real-time insight into system behavior !via automated tools and machine learning systems!

Millions of heterogeneous sensor readings per second!

Page 42: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Automated Arbitrarily Complete Full-Loopback Driver VerificationSergio Benitez, Alejandro Russo, David Mazieres

Problem: 91% of critical CVEs caused by drivers leading to serious vulnerabilities

0

50

100

150

200

2010 - 2011 2012 2013 2014

Module Bugs Core Kernel

Observation: Devices modeled by state machines

Our Approach: Guarantee device is programmed according to state machine at compile time via programming language properties

State A State Baction

Page 43: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Automated Arbitrarily Complete Full-Loopback Driver VerificationSergio Benitez, Alejandro Russo, David Mazieres

Completed: ✓ Formalized and proved type system.

✓ Formalized and proved correctness properties.

✓ Developed (small) OS kernel and drivers.

✓ Found bugs in manuals and hardware!

Observation: Device specification/hardware still susceptible to bugs.

State “actions” cannot be statically checked.

Approach: Generate (arbitrarily) complete correctness tests using SM model.

Run tests against real hardware (full-loopback).

Page 44: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

When developers write code,they makemistakes.

Page 45: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

When developers write code,

When developers design hardware,

they makemistakes.

they makemistakes.

Page 46: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

When developers write code,

When developers design hardware,

they makemistakes.

they makemistakes.

And when they write code for custom hardware,bugs come from the HW and SW, butalso from the interface.

Page 47: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Halide code

Driver template

FPGA bitstream

Kernel driver

Application SW

Testbench

Verilog IP core

Algorithm+

Schedule

Verification collateral

Runtime stackSource

High-level languages and generators can help.

We're automatically building complete HW/SWstacks for image processing algorithms.

Come ask questions!

Page 48: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

What we're doing...

Poster Title: Building a Component Library from Datasheets

Tabl

e Ex

trac

tor

doc | part_num | storage_temp_min------+----------+-----------------X.pdf | BC546 | -55X.pdf | BC547 | -55 X.pdf | BC548 | -55

Proc

ess

Cel

l Fea

ture

s

Page 49: SGX Enabled Functional Encryption and Applicationsiot.stanford.edu/retreat16/sitp16-posters.pdff,ct) -> f(m) Multi-Input FE Key Manager MSK E(PK, m1) E(PK, m2) E(PK, m3) SKf f(m1,

Come chat with us if you're interested in...● Embedded hardware design productivity● New applications built on a detailed component library● Extracting data from PDFs and tables● Giving feedback