cryptography for iotiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · people with...

63
Cryptography for IoT Dan Boneh Stanford University SiTP Dec. 2017

Upload: others

Post on 22-Jan-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

CryptographyforIoT

DanBonehStanfordUniversity

SiTP Dec. 2017

Page 2: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

…butfirst:ComputerSecurityatStanford

AlexAikensoftwareanalysis

DanBonehappliedCrypto,cryptocurrencies

Matei Zahariasecurityandbigdata

DawsonEnglerautomatedbugfinding

DavidMazièresOp.Systems

PhilLevisIoT Security

JohnMitchellprotocoldesign,

onlineed.

MendelRosenblumVM’sinsecurity

Page 3: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Courses

Ø Courses:• CS55N(freshmenseminar):tenideasincomputersecurity

• CS155: ComputerSecurity

• CS251: Cryptocurrenciesandblockchain technologies

• CS255: IntrotoCrypto

• CS259: Securityanalysisofnetworkprotocols

• CS355: Graduatecourseincryptography

Ø StanfordAdvancedComputerSecurityCertificatehttp://scpd.stanford.edu/computerSecurity/

Page 4: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

OnlineCourses

//www.coursera.org/learn/crypto

Course open to the public

Page 5: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

AGraduateCourseinAppliedCryptography

DanBoneh andVictorShoup

Freeat://cryptobook.us

Pleasesenduscomments

FreeBookDraft

Page 6: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Multipartycomputation(MPC)andSGX

Page 7: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

MPCforgenomicdataanalysis

PeoplewithKabukisyndrome

[Jagadeesh,Wu,Birgmeier, Boneh,Bejerano,Science 2017]

Eachhas211to374raregenesoutof≈20,000genes

Patienti:vectorvi ofdim20,000thatis0fornormalgenes

What genes causes a specific disorder?2

664

0 1 0 2 0 11 0 1 2 0 12 0 0 2 1 10 0 1 2 0 1

3

775

v1 :

v3 :

Page 8: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

MPCforgenomicdataanalysis

PeoplewithKabukisyndrome

[Jagadeesh,Wu,Birgmeier, Boneh,Bejerano,2017]

Eachhas211to374raregenesoutof≈20,000genes

Patienti:vectorvi ofdim20,000thatis0fornormalgenes

r1 v1-r1r2 v2-r2r3 v3-r3r1,r2,r3,… v1-r1,v2-r2,v3-r3,…

MPC protocol

Page 9: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

MPCforgenomicdataanalysis

PeoplewithKabukisyndrome

[Jagadeesh,Wu,Birgmeier, Boneh,Bejerano,2017]

Nothingelseisrevealedabouttheindividualgenomes!!

MPC protocol

mostcommonraregenes

KMT2D,COL6A1

r1,r2,r3,… v1-r1,v2-r2,v3-r3,…

Page 10: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

CanwedothiswithIntel’sSGX?

Source: ISCA 2015 tutorial slides for Intel SGX

Enclave Application Remote Attestation

Enclave

Page 11: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

BenFisch,Dhinakaran Vinayagamurthy,

DanBoneh, SergeyGorbunov

Iron:FunctionalencryptionandobfuscationusingIntelSGX

In proc. ACM CCS 2017

Page 12: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

FunctionalEncryption[Boneh-Sahai-Waters,2011]

msk

Master-keyAuthoritympk

programP

functionalkeyKPapprove?

Decrypt

KP

c1 ← E(mpk, v1)

c2 ← E(mpk, v2)

c3 ← E(mpk, v3)P(v1, v2, v3)

researcher

KMT2D, COL6A1

Page 13: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

FunctionalEncryption[Boneh-Sahai-Waters,2011]

Decrypt

KP

c1 ← E(mpk, v1)

c2 ← E(mpk, v2)

c3 ← E(mpk, v3)P(v1, v2, v3)

researcherWhyisfunctionalencryptionhard?

nointeractionduringdecryption

can’tuseMPCtechniques

Satisfy regulators?(GDPR)

Page 14: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

SGXFunctionalEncryption:approach

DecryptionEnclave

Key Manager Enclave

Master-key Authority FE Decryption Node

mpkmsk

sig.pksig.sk

msksig.pk

msk

skf =sig(sk,<P>) <P>

- Check sig on <P> - Decrypt ciphertext- evaluate f on

plaintext

(c, <P>, sig)

P(m)

mpk:multi-inputfunc.enc.publickey

c ⟵ E(mpk, m)

Page 15: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Butnotsosimple…

• Enclave memory access pattern leaks and can break FE security

• How to represent the program P:- Cannot move code into enclave after EINIT- Difficult to safely implement interpreter in enclave:

performance and memory access pattern leak

• Side channel attacks (timing, power)

Page 16: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

IronarchitectureKeymanagerenclave:

managemasterkey

Decryptionenclave:initializedatstartup

Functionenclave:forspecificprogramP.ifapproved,signedbykeymanager

c1⟵ E(mpk,m1)c2⟵ E(mpk,m2)

P(m1,m2)

mpk

Page 17: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Security• Formally modelthe SGXHWinterface:

Setup, Load, Run, Run&Report,Run&Quote, ReportVerify, QuoteVerify

BuildsonHWsecuritymodelsof:

Passet.al.[PST’17],Bahmani et.al.[BBB+’16]

• MIFEsimulation-basedsecurity, assuming:adversarycannotdistinguishblack-boxHWinterfaceandrealSGX

Page 18: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Side-channelatacks

SecurityproofdoesnotcapturesidechannelattacksonSGX

• Cache-timingattacks[CD16]leakmemory accesspatternsatcache-linegranularity

• Page-faultattacks[XCP15]leakmemory accesspatternsat4KBpagegranularity

• Branchshadowingattacks[LSG+16]candirectlyviewbranchhistory(savedforpipelinebranchprediction)

DEFENSE: onlysignfunctionenclaveswhosememoryaccesspatternisindependentofsensitivedata(e.g.ORAMbased)

Page 19: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

ImplementationandEvaluation

• C++usingtheIntel(R)SGXSDK1.6forWindows

IntelSkylakei7-6700,3.40GHz,8GiBRAM,WindowsServer2012R2Standard

• Functionenclaveimplementationisdata-oblivious toresistside-channels

Page 20: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

ComparingIrontocryptographicconstructions

BF-IBE

Page 21: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

JointworkwithHenryCorrigan-Gibbs

NSDI2017

Prio:Private,Robust,andEfficientComputationofAggregateStatistics

Private data aggregation

Page 22: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Twitter usage

Bloo

d pr

essu

re

Today: Non-private aggregation

StressTracker

Every user has a private data point

Page 23: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

StressTrackerBl

ood

pres

sure

Today: Non-private aggregation

Twitter usage

Page 24: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

StressTrackerBl

ood

pres

sure

Today: Non-private aggregation

The app provider learnsmore than it needs

Twitter usage

Page 25: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

StressTrackerApp storeBl

ood

pres

sure

Prio: Private aggregation

Clients send one share of their data to each aggregator

Twitter usage

Page 26: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Bloo

d pr

essu

re

Prio: Private aggregation

StressTrackerApp store

Twitter usage

Aggregatorlearnsnothingelse

Page 27: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Bloo

d pr

essu

re200

100,000,000

StressTrackerApp store

Twitter usage

THEPROBLEM

Page 28: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Privateaggregationf(x1, …, xN)x1 x3 xNx2

Exactcorrectness: ifallserversarehonesttheylearnf(x1,…,xn)

Privacy: ifoneserverishonesttheylearnonly f(x1,…,xn)

Robustness: maliciousclientshaveboundedinfluence

Scalable: nopublic-keycrypto(otherthanTLS)

Page 29: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Prio contributionsAchievesallfour goals

1. Robustnessusingsecret-sharednon-interactiveproofs(SNIPs)

• Everyclientefficientlyprovestoserversthatitssubmissioniswellformed

• Takesadvantageofnon-colludingservers(verifiers)

2. AggregatableencodingsComputesumsprivately ⟹

computef(·)privately formanyf’sofinterest

Page 30: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Existingapproaches

• AdditivelyhomomorphicencryptionP4P(2010),Privatestreamaggregation(2011),Gridaggregation(2011),PDDP(2012),SplitX(2013),PrivEx(2014),PrivCount(2016),Succinctsketches(2016),…

• Multi-partycomputation[GMW87],[BGW88]

FairPlay(2004),Brickell-Shmatikov(2006),FairplayMP(2008),SEPIA(2010),Privatematrixfactorization(2013),JustGarble(2013),…

• Anonymouscredentials/tokensVPriv(2009),PrivStats(2011),ANONIZE(2014),…

• Randomizedresponse[W65],[DMNS06],[D06],RAPPOR(2014,2016)

Page 31: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Privateaggregationneededinmanysettings

Private client value (xi) Aggregate f(x1, …, xN)

Location data (phones/cars) • Number of devices in location L• Ten most popular locations• Locations with weakest signal strength

Web browsing history • Most common bug-triggering websites• Websites with TLS certificate errors

Health information • Min, max, avg, stddev heart rate• ML model relating BP to Twitter usage

Text messages • Min, max, average number per day• ML model relating time of day to emotion

Page 32: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Warm-up:Computingprivatesums

Every device i holds a value xi

Cloud wants to computef(x1, …, xN) = x1 + … + xN

without learning any users’ private value xi

Example: Privately measuring traffic congestion

1 if user i is on Golden Gate Bridge0 otherwise

x1 + … + xN gives number of users on bridge

xi =

Think: integersmodulo a prime p

Page 33: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Private sums:A “straw-man” scheme

Server A Server B Server C

Assume that at least one server is honest.

[Chaum88], [BGW88], …[KDK11] [DFKZ13] [PrivEx14] …

Page 34: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x1Split into shares s.t.x1 = [x1]a + [x1]b + [x1]c

0 0 0

Private sums:A “straw-man” scheme

[x1]a [x1]b [x1]c

[x] means“additive share of x”

Page 35: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x1

0 0 0

Private sums:A “straw-man” scheme

[x1]a [x1]b [x1]c

Page 36: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x1

[x1]a [x1]b [x1]c

Private sums:A “straw-man” scheme

Page 37: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x2

[x2]a

Private sums:A “straw-man” scheme

[x1]a [x1]b [x1]c

[x2]b [x2]c

Page 38: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x2

Private sums:A “straw-man” scheme

[x1]a [x1]b [x1]c[x2]b [x2]c[x2]a

Page 39: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x2

Private sums:A “straw-man” scheme

[x1]a+[x2]a [x1]b+[x2]b [x1]c+[x2]c

Page 40: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

Private sums:A “straw-man” scheme

[x1]a+[x2]a+… [x1]b+[x2]b+… [x1]c+[x2]c+…

Page 41: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Servers learn thesum of xis and nothing else.Learn that three phones are on the

Bridge—but not which three

Server A Server B Server C

SB SCSA

SA + SB + SC = x1 + x2 + … + xN

Private sums:A “straw-man” scheme

SA + SB + SC = [x1]a + [x1]b + [x1]c + …

Page 42: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Strawmancomputingprivatesums

Correctness: if everyone follows the protocol, servers compute the sum of all xis.

Privacy: any proper subset of the servers can simulate everything given(a) the public parameters, and (b) the sum of the xis.

Scalability: by inspection.

Robustness: ???

Page 43: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server CPrivate sums:A “straw-man” scheme

[x1]a+[x2]a [x1]b+[x2]b [x1]c+[x2]c

x3

x3 is supposed to be a 0/1 value

Page 44: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server CPrivate sums:A “straw-man” scheme

[x1]a+[x2]a [x1]b+[x2]b [x1]c+[x2]c

An evil client needn’t follow the rules! [r]a [r]b [r]c ⟵ 𝔽

Page 45: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server CPrivate sums:A “straw-man” scheme

[x1]a+[x2]a [x1]b+[x2]b [x1]c+[x2]c[r]a [r]b [r]c

Page 46: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server CPrivate sums:A “straw-man” scheme

r’ r’ r’

Users have incentives to cheat

Typical defenses(NIZKs) are costly

A single bad client can undetectably corrupt the sum

Page 47: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x

0 0 0

[x]a [x]b [x]c

Solution:SNIP Proofs

x is supposed to be a 0/1 value

Page 48: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x

0 0 0

[x]a [x]b [x]c

Without learning x,the servers want to ensure that:[x]a + [x]b + [x]c∈ {0,1}

Remember: these are big integers mod p

Solution:SNIP Proofs

Page 49: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x

0 0 0

[x]a [x]b [x]c

• Servers hold shares of x and a publicpredicate Valid(·)

• Servers want to test if “Valid(x) = 0” without leaking anything else about x

• The Valid predicate can be an arbitrary circuit:

Valid(x1,x2) = “3 < x1 < 19 and x2∈{0,1,2}”

Solution:SNIP Proofs

Page 50: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x

0 0 0

πbπa

πc

[x]a [x]b [x]c

Solution:SNIP Proofs

Page 51: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Server A Server B Server C

x

0 0 0

[x]a [x]b [x]c

Solution:SNIP Proofs

X X X

Prio serversdetectandrejectmalformedclientsubmissions

⇒ aclientcaninfluenceaggregatesbyatmost± 1

Page 52: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

A “valid” x

[x]a

[x]b

[x]c

Client Servers

πa, πb, πc

Security goals for SNIPsCompleteness: Honestclientconvinceshonestservers

Soundness: Dishonestclientalmostneverconvinceshonestservers

Zero-knowledge: Anypropersubsetofmaliciousserverslearnsnothingaboutx,exceptthatxisvalid

Page 53: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

A “valid” x

[x]a

[x]b

[x]c

Client Servers

πa, πb, πc

Existingtechniques

FullblownMPC

Commitments+NIZKs

Commitments+SNARKs

Func.secretsharing[BGI’16]

SNIP

Limitations

Heavysetupandcomm.

Highserverwork

Highclientwork

Specialpurpose

Info.theoretictechniques⇒ littlecomp.overhead

O(1)server-to-servercomm.|πa| islinearincircuitsize

Page 54: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

SNIPs:How?

Step1: reduceverifyingcircuittoverifyingasingle multiplication

Step2: Use“Beavertriple”suppliedbyclient toverifythemultiplication

Step3: Injectadditionalentropytodefendagainstmaliciousservers(similartoAMDcodes)

Page 55: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Five-server cluster in five Amazon data centers

Page 56: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374
Page 57: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374
Page 58: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

ComplexstatisticsComputing private sums ⇒

can compute many other interesting aggregates

• Average• Variance• Standard deviation• Most popular value (approx) – small universe• “Heavy hitters” (approx)

[PrivStats11], [KDK11], [DFKZ13], [PrivEx14], [MDD16], …

Page 59: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

… andevenmorestatistics

Prio can aggregate a richer class of statistics:• Approximate min and max• Most popular value in a large universe• Quality of arbitrary machine learning model (R2)• Least-squares regression

Prio supports a rich set of aggregation functions

Some limitations: cannot compute exact max

Page 60: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

StressTrackerBl

ood

pres

sure

Putting it all together: Today

Twitter usage

Page 61: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

StressTrackerApp storeBl

ood

pres

sure

With Prio…

Twitter usage

Page 62: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

Bloo

d pr

essu

re

With Prio…

StressTrackerApp store

Twitter usage

exact,privaterobust, scalable

Page 63: Cryptography for IoTiot.stanford.edu/workshop17/sitp17w-crypto.pdf · 2018-01-29 · People with Kabuki syndrome [Jagadeesh, Wu, Birgmeier,Boneh, Bejerano, 2017] Each has 211 to 374

THEEND