Non-browser TLS Woes Dan Boneh Joint work with M. - - PowerPoint PPT Presentation

non browser tls woes
SMART_READER_LITE
LIVE PREVIEW

Non-browser TLS Woes Dan Boneh Joint work with M. - - PowerPoint PPT Presentation

Non-browser TLS Woes Dan Boneh Joint work with M. Georgiev, S. Iyengar, S. Jana, R. Anubhai, and V. Shma?kov Proc. ACM CCS 2012 30


slide-1
SLIDE 1

Non-­‑browser ¡TLS ¡Woes ¡

Dan ¡Boneh ¡ ¡ Joint ¡work ¡with ¡M. ¡Georgiev, ¡S. ¡Iyengar, ¡ ¡

  • S. ¡Jana, ¡R. ¡Anubhai, ¡and ¡V. ¡Shma?kov ¡
  • Proc. ¡ACM ¡CCS ¡2012 ¡
slide-2
SLIDE 2

30 ¡second ¡summary ¡

Lots ¡of ¡non-­‑browser ¡systems ¡using ¡TLS: ¡ – Payment ¡gateway ¡SDK, ¡ ¡Mobile ¡ads, ¡ ¡ ¡ Web ¡services ¡middleware, ¡ ¡cloud ¡client ¡API, ¡… ¡ Developers ¡use ¡TLS ¡through ¡a ¡higher ¡level ¡library: ¡ ¡ ¡ ¡e.g. ¡ ¡HRpClient, ¡cURL, ¡Weberknecht, ¡PHP, ¡Python ¡

  • Problem ¡1: ¡ ¡ ¡complex ¡and ¡confusing ¡interfaces ¡to ¡TLS ¡layer ¡

– result: ¡ ¡ ¡lots ¡of ¡improper ¡server-­‑side ¡cert ¡valida?on ¡ ¡ ¡⇒ ¡man ¡in ¡the ¡middle ¡vulnerabili?es ¡

  • Problem ¡2: ¡ ¡ ¡liRle ¡tes?ng ¡of ¡ ¡server-­‑side ¡cert. ¡valida?on ¡

¡ ¡Should ¡be ¡part ¡of ¡QA ¡tes?ng ¡… ¡ ¡ ¡

slide-3
SLIDE 3

Case ¡studies: ¡ ¡(1) ¡PHP ¡/ ¡cURL ¡binding ¡

PHP ¡TLS ¡binding: ¡

  • fsockopen( ¡“ssl://…”) ¡ ¡: ¡ ¡ ¡ ¡no ¡server-­‑side ¡cert. ¡valida?on ¡
  • cURL ¡binding: ¡ ¡ ¡ ¡ ¡cert. ¡verifica?on ¡controlled ¡by ¡ ¡

¡ ¡ ¡ ¡boolean ¡ ¡ ¡CURLOPT_SSL_VERIFYPEER ¡

¡ ¡ ¡ ¡int ¡ ¡ ¡CURLOPT_SSL_VERIFYHOST ¡ ¡ ¡0: ¡ ¡no ¡server-­‑side ¡cert ¡valida?on ¡ ¡ ¡1: ¡ ¡check ¡the ¡existence ¡of ¡a ¡common ¡name ¡in ¡server ¡cert. ¡ ¡ ¡2: ¡ ¡check ¡common ¡name ¡in ¡cert. ¡matches ¡provided ¡hostname ¡ ¡ Very ¡common ¡mistake: ¡ ¡CURLOPT_SSL_VERIFYPEER ¡= ¡true ¡ ¡CURLOPT_SSL_VERIFYHOST ¡= ¡true ¡ (default ¡= ¡2) ¡

We ¡found ¡four ¡SDKs ¡ using ¡it ¡for ¡SSL ¡

slide-4
SLIDE 4

Recent ¡Developments ¡in ¡ Broadcast ¡EncrypTon ¡

Dan ¡Boneh ¡ Stanford ¡University ¡

Real ¡World ¡Crypto ¡Workshop, ¡ ¡Jan. ¡2013. ¡

Instead: ¡

slide-5
SLIDE 5

Background: ¡ ¡ ¡bilinear ¡maps ¡

G ¡, ¡G2 ¡: ¡ ¡ ¡finite ¡cyclic ¡groups ¡of ¡prime ¡order ¡q ¡ An ¡admissible ¡bilinear ¡map ¡ ¡ ¡ ¡e: ¡G×G ¡→ ¡G2 ¡ ¡ ¡ ¡ ¡is: ¡

– Bilinear: ¡ ¡ ¡ ¡e(ga, ¡gb) ¡= ¡e(g,g)ab ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡∀a,b∈Z, ¡ ¡ ¡g∈G ¡ – Non-­‑degenerate: ¡ ¡ ¡ ¡ ¡g ¡generates ¡G1 ¡ ¡ ¡ ¡ ¡⇒ ¡ ¡ ¡ ¡e(g,g) ¡ ¡generates ¡G2 ¡ ¡ – Efficiently ¡computable ¡

¡ Several ¡examples ¡where ¡Dlog ¡in ¡G ¡believed ¡to ¡be ¡hard ¡

slide-6
SLIDE 6

Many ¡ApplicaTons: ¡ ¡ ¡enc., ¡sigs., ¡NIZK, ¡… ¡

Simplest ¡example: ¡ ¡ ¡ ¡ ¡BLS ¡signatures ¡ ¡ ¡ ¡[B-­‑Lynn-­‑Shacham’01] ¡ ¡KeyGen: ¡ ¡ ¡ ¡sk ¡= ¡rand. ¡x ¡ ¡ ¡in ¡ ¡Zq ¡ ¡ ¡ ¡, ¡ ¡ ¡ ¡pk ¡= ¡gx ¡ ¡∈ ¡G ¡ ¡Sign(sk, ¡m) ¡⟶ ¡ ¡H(m)x ¡ ¡∈ ¡G ¡

¡verify(pk, ¡m, ¡sig) ¡⟶ ¡ ¡accept ¡iff ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡e(g, ¡ ¡ ¡ ¡sig ¡ ¡ ¡) ¡ ¡≟ ¡ ¡ ¡e(pk, ¡H(m)) ¡ ¡

Thm: ¡ ¡Existen?ally ¡unforgeable ¡under ¡CDH ¡in ¡the ¡RO ¡model ¡ ¡ Beyond ¡bilinear ¡maps: ¡ ¡ ¡ ¡k-­‑linear ¡maps ¡ ¡ ¡ ¡[BS’03] ¡ ¡k-­‑linear ¡map ¡ ¡ ¡ ¡ ¡e: ¡G×G×⋯×G ¡⟶ ¡Gk ¡ ¡ ¡ ¡ ¡non-­‑degen. ¡& ¡efficient ¡ ¡Even ¡more ¡applica?ons. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ hard ¡Dlog ¡in ¡G ¡ e(g, ¡H(m)x) ¡ = ¡ ¡ ¡e(gx, ¡H(m)) ¡ Can ¡they ¡be ¡constructed? ¡ k ¡

slide-7
SLIDE 7

k-­‑linear ¡maps: ¡ ¡a ¡recent ¡breakthrough ¡

  • S. ¡Garg, ¡C. ¡Gentry, ¡S. ¡Halevi ¡

ProperTes: ¡ ¡ ¡ ¡(informal) ¡

  • The ¡map ¡ ¡ ¡x ¡⟶ ¡gx ¡ ¡ ¡is ¡randomized ¡
  • Representa?on ¡of ¡ ¡ ¡g ¡∈ ¡G ¡ ¡ ¡is ¡ ¡ ¡O(k) ¡ ¡bits ¡
  • BeRer ¡than ¡k-­‑linear ¡map: ¡ ¡ ¡ ¡ ¡ ¡gradaTon ¡

e1: ¡G×G ¡ ¡⟶ ¡G2 ¡ e2: ¡G×G2 ¡⟶ ¡G3 ¡ ¡ ¡ ¡ ¡⋮ ¡ ek: ¡G×Gk ¡⟶ ¡Gk+1 ¡ For ¡our ¡purposes: ¡ ¡ek: ¡G×⋯×G ¡ ¡⟶ ¡Gk ¡ ¡e: ¡ ¡ ¡Gk ¡× ¡Gk ¡ ¡⟶ ¡G2k ¡ ¡ ¡

slide-8
SLIDE 8

Broadcast ¡EncrypTon ¡ ¡[Fiat-­‑Naor ¡1993] ¡

Security goal (informal): Full collusion resistance: secure even if all users in Sc collude d1 d2 d3 S ⊆ {1,…,n} c⟵E(pk,S,m) Encrypt to arbitrary subsets S:

slide-9
SLIDE 9

Broadcast ¡EncrypTon ¡

Public-­‑key ¡BE ¡system: ¡

– Setup(n) ¡ ¡⟶ ¡ ¡ ¡pub. ¡key ¡ ¡pk, ¡ ¡ ¡ ¡master ¡sec. ¡key ¡ ¡ ¡msk ¡ – KeyGen( ¡msk, ¡j) ¡⟶ ¡ ¡ ¡dj ¡ ¡ ¡ ¡ ¡ ¡(private ¡key ¡for ¡user ¡j) ¡ – Enc( ¡pk, ¡S ¡) ¡⟶ ¡ ¡ ¡ct ¡ ¡ ¡, ¡ ¡ ¡k ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡k ¡used ¡to ¡encrypt ¡ ¡msg ¡ ¡for ¡users ¡ ¡S ¡⊆ ¡{1, ¡…, ¡n} ¡

– Dec( ¡pk, ¡dj, ¡S, ¡ct): ¡ ¡ ¡ ¡ ¡ ¡If ¡ ¡j ¡∈ ¡S, ¡ ¡ ¡output ¡ ¡k ¡ ¡

Broadcast ¡contains ¡ ¡ ¡ ¡( ¡[S], ¡ ¡ ¡ct ¡, ¡ ¡ ¡ESYM(k, ¡msg) ¡ ¡ ¡) ¡

slide-10
SLIDE 10

Broadcast ¡EncrypTon: ¡StaTc ¡Security

Seman?c ¡security ¡when ¡users ¡collude ¡ ¡ ¡ ¡(sta?c ¡adversary) ¡ Def: ¡ ¡ ¡ ¡ ¡ ¡ ¡Adv[A] ¡ ¡= ¡ ¡ ¡| ¡Pr[ ¡b’ ¡is ¡correct ¡] ¡-­‑ ¡½ ¡ ¡| ¡ Security: ¡ ¡ ¡∀poly-­‑?me ¡A: ¡ ¡ ¡ ¡ ¡Adv[A] ¡ ¡is ¡ ¡negligible ¡

run ¡ Setup(n) ¡

pk, ¡ ¡ ¡{ ¡dj ¡| ¡ ¡j ¡∉ ¡S ¡} ¡ ¡(ct, ¡ ¡k0) ¡ ¡ ¡ ¡ ¡or ¡ ¡ ¡ ¡(ct, ¡k1) ¡ S ¡⊆ ¡{1, ¡…, ¡n ¡} ¡

challenger ¡ aRacker ¡ b’ ∈ ¡{0,1} ¡

(ct, ¡k1) ¡← ¡Enc( ¡pk, ¡S) ¡ k0←K ¡

slide-11
SLIDE 11

Broadcast ¡systems ¡are ¡everywhere ¡

File ¡sharing ¡in ¡encrypted ¡file ¡systems ¡ ¡(e.g. ¡ ¡EFS): ¡ Social ¡networks: ¡ ¡ ¡ ¡privately ¡send ¡message ¡to ¡a ¡group ¡ encrypted ¡ file ¡system ¡ file ¡

ACL ¡

file ¡

dBob ¡ dNed ¡

Encrypted ¡mail ¡system: ¡ mail ¡ system ¡ mail ¡

recipients ¡

mail ¡

dBob ¡ dNed ¡

slide-12
SLIDE 12

ConstrucTons ¡

  • Subs. ¡Service ¡

0 ¡

n ¡

|ct| ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡|sk| ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡|pk| ¡

small ¡sets ¡ email ¡ revoca?on ¡ DVD ¡players ¡

The ¡trivial ¡system: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(|S|) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(n) ¡ Revoca?on ¡schemes: ¡ ¡ ¡ ¡ ¡ ¡ ¡O(n-­‑|S|) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(log ¡n) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡[ ¡NNL,HS,GST, ¡ ¡LSW,DPP,…] ¡

¡

¡Can ¡we ¡have ¡ ¡O(1) ¡ ¡size ¡ciphertext ¡for ¡all ¡sets ¡ ¡ ¡S ¡?? ¡ The ¡BGW ¡system: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(n) ¡

¡ ¡ ¡[B-­‑Gentry-­‑Waters’05] ¡

slide-13
SLIDE 13

The ¡BGW ¡system ¡

Setup(n): ¡ ¡ ¡ ¡g ¡← ¡G ¡, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡α, ¡ ¡msk ¡← ¡Zq ¡, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡def: ¡ ¡ ¡ ¡gk ¡= ¡g(αk) ¡ ¡ ¡ ¡ ¡ ¡pk ¡= ¡( ¡g, ¡ ¡ ¡ ¡g1, ¡ ¡g2, ¡… ¡, ¡gn ¡, ¡ ¡ ¡ ¡ ¡ ¡gn+2 ¡, ¡…, ¡ ¡g2n ¡, ¡ ¡ ¡ ¡ ¡v=gmsk ¡) ¡∈ ¡G2n+1 ¡ ¡ KeyGen( ¡msk, ¡j) ¡⟶ ¡ ¡ ¡ ¡ ¡ ¡dj ¡= ¡(gj)msk ¡ ¡ ¡ ¡∈ ¡G ¡ Enc(pk, ¡S): ¡ ¡ ¡ ¡ ¡ ¡t ⟵ Zq ¡ ¡ ¡ct ¡ ¡= ¡ ¡( ¡ ¡gt ¡, ¡ ¡ ¡ ¡ ¡(v ¡⋅ ¡Πj∈S gn+1-j)t ) , key = e(gn,g1)t ¡

hole ¡

slide-14
SLIDE 14

Security ¡

Thm: ¡ ¡ ¡ ¡BGW ¡is ¡sta?cally ¡secure ¡for ¡n ¡users ¡in ¡a ¡ ¡ ¡ ¡ ¡bilinear ¡group ¡where ¡n-­‑DDHE ¡assump?on ¡holds ¡ ¡ ¡ n-­‑DDHE: ¡ ¡ ¡ ¡ ¡ ¡for ¡rand. ¡ ¡ ¡ ¡g,h ¡← ¡G ¡, ¡ ¡α ¡← ¡Zq ¡ ¡, ¡ ¡ ¡ ¡R ¡← ¡G2 ¡ ¡ ¡ ¡ ¡: ¡ ¡[ ¡h, ¡g, ¡ ¡ ¡ ¡gα, ¡g(α2),…,g(αn), ¡ ¡ ¡ ¡ ¡ ¡g(αn+2),…,g(α2n) ¡, ¡ ¡ ¡ ¡e(g,h)(αn+1) ¡ ¡ ¡] ¡ ¡ ¡ ¡ ¡[ ¡h, ¡g, ¡ ¡ ¡ ¡ ¡gα, ¡g(α2),…,g(αn), ¡ ¡ ¡ ¡ ¡ ¡g(αn+2),…,g(α2n) ¡, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡R ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡] ¡

≈p ¡

slide-15
SLIDE 15

Extensions, ¡ ¡VariaTons, ¡ ¡Improvements ¡

AdapTve ¡security: ¡ ¡ ¡ ¡[GW’10, ¡ ¡PPSS’12, ¡…] ¡

  • Adversary ¡can ¡adap?vely ¡select ¡what ¡keys ¡to ¡request ¡

¡ IdenTty-­‑based: ¡ ¡ ¡ ¡ ¡[SF’07, ¡ ¡D’07, ¡ ¡GW’10, ¡… ¡ ¡] ¡

  • Smaller ¡pubic ¡key ¡size: ¡ ¡ ¡ ¡|pk| ¡= ¡O( ¡maximal ¡|S|) ¡

¡ ¡⇒ ¡ ¡ ¡ ¡Set ¡of ¡all ¡users ¡can ¡be ¡ ¡ ¡{0, ¡1, ¡2, ¡3, ¡…, ¡2256 ¡} ¡

¡ Chosen ¡ciphertext ¡secure: ¡[BGW’05, ¡ ¡PPSS’12, ¡…] ¡ ¡ Trace ¡& ¡revoke: ¡ ¡ ¡ ¡[BW’06] ¡

slide-16
SLIDE 16

BGW ¡using ¡(log ¡n)-­‑linear ¡map ¡

Recall: ¡ ¡ ¡ ¡ ¡BGW ¡Setup(n): ¡ ¡ ¡ ¡g ¡← ¡G ¡, ¡ ¡ ¡ ¡ ¡α, ¡ ¡msk ¡ ¡← ¡Zq ¡. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡pk: ¡

¡ ¡ ¡ ¡g, ¡ ¡ ¡ ¡ ¡ ¡gα, ¡g(α2),…, ¡g(αn), ¡ ¡ ¡ ¡ ¡ ¡ ¡g(αn+2),…,g(α2n) ¡, ¡ ¡ ¡ ¡v=gmsk ¡

Suppose: ¡ ¡ ¡ ¡ ¡ek: ¡G×⋯×G ¡ ¡⟶ ¡Gk ¡ ¡ ¡ ¡ ¡ ¡ ¡; ¡ ¡ ¡ ¡ ¡ ¡ ¡e: ¡ ¡ ¡Gk ¡× ¡Gk ¡ ¡⟶ ¡G2k ¡ Set ¡ ¡ ¡pk ¡ ¡ ¡as: ¡ ¡ ¡ ¡ ¡ ¡( ¡#users ¡≈ ¡2k-­‑1 ¡ ¡) ¡

¡g, ¡ ¡ ¡ ¡ ¡ ¡gα, ¡ ¡g(α2), ¡ ¡g(α4)…, ¡ ¡g(α(22k)) ¡ ¡, ¡ ¡g(α(22k+1)) ¡, ¡ ¡ ¡ ¡ ¡ ¡v=gk msk ¡

Using ¡2k-­‑linear ¡map ¡: ¡ ¡ ¡ ¡ ¡can ¡build ¡all ¡needed ¡elements ¡in ¡pk ¡ ¡ ¡ ¡ ¡but ¡for ¡rand. ¡h∈ ¡G ¡cannot ¡build ¡ ¡ ¡ ¡ ¡ ¡ ¡e(g,…,g,h) ¡(α(22k-­‑1)) ¡ ¡ ¡ ¡∈ ¡G2k ¡

slide-17
SLIDE 17

BGW ¡using ¡(log ¡n)-­‑linear ¡map ¡

Open ¡ques?ons: ¡

  • Same ¡parameters ¡without ¡k-­‑linear ¡maps ¡?? ¡
  • O(1) ¡ ¡size ¡ ¡ct ¡ ¡from ¡standard ¡lazce ¡assump?ons ¡(LWE) ¡ ¡?? ¡

|ct| ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡|sk| ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡|pk| ¡ Bilinear ¡BGW: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(1) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(n) ¡

¡ ¡ ¡[B-­‑Gentry-­‑Waters’05] ¡ ¡

(log ¡n)-­‑linear ¡BGW: ¡ ¡ ¡ ¡ ¡O(log ¡n) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(log ¡n) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡O(log2n) ¡

¡

slide-18
SLIDE 18

Summary ¡

Many ¡open ¡problems ¡in ¡broadcast ¡encryp?on: ¡

  • O(log ¡n) ¡ ¡size ¡ciphertext ¡& ¡secret ¡keys ¡from ¡LWE? ¡
  • O(log ¡n) ¡ ¡size ¡ct, ¡sk, ¡and ¡pub-­‑key ¡ ¡w/o ¡ ¡ ¡k-­‑linear ¡maps? ¡
  • Distributed ¡BE ¡with ¡sub-­‑linear ¡ciphertext? ¡