CRLite: When Industry & Academia Collide Thyla van der Merwe - - PowerPoint PPT Presentation

crlite when industry academia collide
SMART_READER_LITE
LIVE PREVIEW

CRLite: When Industry & Academia Collide Thyla van der Merwe - - PowerPoint PPT Presentation

CRLite: When Industry & Academia Collide Thyla van der Merwe Real World Crypto 9 January 2020 Trust TLS PKI = + l Root CA PKI signature Intermediate CA signature Intermediate CA signature TLS l Impersonate MITM TLS TLS >


slide-1
SLIDE 1

CRLite: When Industry & Academia Collide

Real World Crypto 9 January 2020 Thyla van der Merwe

slide-2
SLIDE 2

l

Trust TLS PKI

= +

slide-3
SLIDE 3

l

PKI

Root CA Intermediate CA Intermediate CA

signature signature signature

TLS

slide-4
SLIDE 4

l

MITM Impersonate TLS TLS

> 500 000 private keys compromised!

slide-5
SLIDE 5

l

PKI

Root CA Intermediate CA Intermediate CA

signature signature signature

TLS revocation Owner requests → CA produces public, verifiable attestation that the certificate should no longer be trusted. Is this a revoked certificate?

slide-6
SLIDE 6

l

Revocation is important!

Current Methods CRLs and OCSP Future Methods CRLite

fuv

Revocation is broken!

Implementing CRLite In Firefox

slide-7
SLIDE 7

l

Revocation is important!

Current Methods CRLs and OCSP Future Methods CRLite

fuv

Revocation is broken!

Implementing CRLite In Firefox

CRLite: A Scalable System for Pushing All TLS Revocations to All Browsers. Larisch et al. IEEE S&P 2017

Building the thing! Where are we now? Are we done yet?

slide-8
SLIDE 8

Current Methods

CRLs OCSP

serial number serial number serial number serial number serial number

CA signature

URL

10 days?

CA

OCSP responder

URL

OCSP request OCSP response

CA signature

OCSP

CA

OCSP responder

URL

OCSP request OCSP response

CA signature

O C S P r e s p

  • n

s e a few days?

slide-9
SLIDE 9

l

Fail-open vs Fail-closed

slide-10
SLIDE 10

Current Methods

CRLs OCSP

serial number serial number serial number serial number serial number

CA signature

URL

10 days?

CA

OCSP responder

URL

OCSP request OCSP response

CA signature

OCSP

CA

OCSP responder

URL

OCSP request OCSP response

CA signature

O C S P r e s p

  • n

s e

Must-Staple

a few days?

slide-11
SLIDE 11

l

Fail-open Delays

200 ms

Privacy concerns

slide-12
SLIDE 12

Evolving... OneCRL Size?? CRLite CRLSets

slide-13
SLIDE 13

Bloom Filters

Certificate Ecosystem

Use a data structure that supports queries for the finite set

  • f unexpired certificates.
slide-14
SLIDE 14

Bloom Filters

1 1 1 1

m = 12 k = 4 Let’s put data item d in the filter: Compute h_1(d) = 4 → set bit in index 4 to 1. Compute h_2(d) = 11 → set bit in index 11 to 1. Compute h_3(d) = 9 → set bit in index 9 to 1. Compute h_4(d) = 2 → set bit in index 2 to 1.

slide-15
SLIDE 15

Bloom Filters

1 1 1 1 1 1 1

m = 12 k = 4 Let’s put data item d in the filter: Compute h_1(d) = 4 → set bit in index 4 to 1. Compute h_2(d) = 11 → set bit in index 11 to 1. Compute h_3(d) = 9 → set bit in index 9 to 1. Compute h_4(d) = 2 → set bit in index 2 to 1. Add another item d’?

slide-16
SLIDE 16

Bloom Filters

1 1 1 1 1 1 1

m = 12 k = 4 Is d* in the filter? If any of the h_i(d*) values is 0 then DEFINITELY NOT in the filter. If all of the h_i(d*) values are 1 then MAYBE in the filter. So maybe it’s a legitimate insertion, maybe it’s not.

slide-17
SLIDE 17

Bloom Filters

1 1 1 1 1 1 1

m = 12 k = 4 Will have false positives → rate p determined by m, k, occupancy.

slide-18
SLIDE 18

Bloom Filters

Say we want to store R U. R is the set of revoked certificates, and U is the finite set of unexpired certificates. R S = U. But there will be false positives!

slide-19
SLIDE 19

Cascading Bloom Filters

Say we want to store R U. R is the set of revoked certificates, and U is the finite set of unexpired certificates. R S = U. Store those in another bloom filter.

slide-20
SLIDE 20

Cascading Bloom Filters

BF1

R

But there are going to be false positives Elements of S that shouldn’t be in BF1!

slide-21
SLIDE 21

Cascading Bloom Filters

BF1

R

But there are going to be false positives

BF2

But there are going to be false positives

slide-22
SLIDE 22

Cascading Bloom Filters

BF1

R

But there are going to be false positives

BF2

But there are going to be false positives Elements of R that shouldn’t be in BF2!

slide-23
SLIDE 23

BF1

But there are going to be false positives

BF2

But there are going to be false positives no false positives*

Cascading Bloom Filters

BFx

* for a constrained, finite set

slide-24
SLIDE 24

But there are going to be false positives But there are going to be false positives no false positives

Cascading Bloom Filters

R

If d* in not in BF1, then definitely not in R. If d* is in BF1, then we don’t know. If d* in BF1 but not in BF2, then in R. If d* is in BF1 and BF2, then we don’t know. If d* in BF1 and BF2 but not in BF3, then definitely not in R. If d* is all three, then in R. 3 levels

slide-25
SLIDE 25

But there are going to be false positives But there are going to be false positives no false positives

Cascading Bloom Filters

R

Starting at i = 1, keep going until u not in BF_i.

  • If i is odd, u not in R.
  • If i is even, u in R.

If u in all BF_i, look at number of levels, l. Is u in U in R?

  • If l is odd, u in R.
  • If l is even, u not in R.
slide-26
SLIDE 26

But there are going to be false positives But there are going to be false positives no false positives

Cascading Bloom Filters

R

Starting at i = 1, keep going until u not in BF_i.

  • If i is odd, u not in R.
  • If i is even, u in R.

If u in all BF_i, look at number of levels, l. Is u in U in R?

  • If l is odd, u in R.
  • If l is even, u not in R.

not in R in BF2? in R in BF3? in BF1? not in R in R Y Y Y N N N

slide-27
SLIDE 27

Cascading Bloom Filters

Want the minimum possible size… Bloom filter minimized: k = log_2(1/p) and m ≅ 144r log_2(1/p) How do we set for p for filter cascades? Analysis → p_1 for BF_1, p for other BFs r = |R|, s = |S| p_1 = r√p/s p = 0.5 → close to theoretical lower bound Simulations confirm! Size of R dominates, does not grow considerably with S!

slide-28
SLIDE 28

CRLite Architecture

CRLite Aggregator

slide-29
SLIDE 29

CRLite Architecture

CRLite: A Scalable System for Pushing All TLS Revocations to All Browsers. Larisch et al. IEEE S&P 2017

slide-30
SLIDE 30

CRLite Architecture

slide-31
SLIDE 31

Implementing CRLite for Firefox

Individuals’ security and privacy on the Internet are fundamental and must not be treated as optional.

Principle 4

  • CRL-like properties
  • Small data sizes (fast to parse)
  • Incremental updates
  • Scales well
  • Builds on useful properties of CT

Building the thing!

slide-32
SLIDE 32

Implementing CRLite for Firefox

4 x 95 M 1.4 MB 0.4 MB

Building the thing!

slide-33
SLIDE 33

Implementing CRLite for Firefox

Have our OneCRL mechanism for signing and pushing.

4 x 95 M

Building the thing!

0.4 MB 1.4 MB

slide-34
SLIDE 34

Implementing CRLite for Firefox

Paper did have a prototype using Firefox → built as a Firefox extension.

Academic Prototype Mozilla Prototype TLS APIs for cert checking

  • JavaScript (11.9MB memory)

Native code (C++, Rust, some JS) 10ms to check a cert chain

  • includes parsing certs (API

provides unparsed certs) 0.04 ms (check a cert) < 8ms (all Firefox calls to check a chain)

  • We check end-entity certs
  • Use OneCRL -> intermediates

Building the thing!

slide-35
SLIDE 35

Implementing CRLite for Firefox

  • 1. Create our aggregator to produce filters
  • 2. Write the client-side code for checking filters
  • 3. Link up to our Remote Settings infrastructure to push filters

Building the thing!

slide-36
SLIDE 36
  • 1. Create our aggregator to produce filters
  • 2. Write the client-side code for checking filters
  • 3. Link up to our Remote Settings infrastructure to push filters

Implementing CRLite for Firefox

Building the thing! > 2B!

S unexpired, valid R unexpired, revoked

slide-37
SLIDE 37
  • 1. Create our aggregator to produce filters
  • 2. Write the client-side code for checking filters
  • 3. Link up to our Remote Settings infrastructure to push filters

Implementing CRLite for Firefox

Building the thing! > 2B!

S unexpired, valid R unexpired, revoked

“It’s hard, Thyla, just plain hard.”

slide-38
SLIDE 38
  • 1. Create our aggregator to produce filters

Implementing CRLite for Firefox

Building the thing!

single high-performance server, large disk

cache size? slow downs Golang timeouts

slide-39
SLIDE 39

Implementing CRLite for Firefox

Building the thing!

slide-40
SLIDE 40

Implementing CRLite for Firefox

Building the thing!

process CT logs create filters store publish

slide-41
SLIDE 41

Implementing CRLite for Firefox

Building the thing!

CPU usage of the Kubernetes cluster for filter generation, each peak is a generation run.

slide-42
SLIDE 42

Implementing CRLite for Firefox

Building the thing!

Filter generation times (minutes)

creating R & S cascaded filter generation

slide-43
SLIDE 43

Implementing CRLite for Firefox

Building the thing!

  • 1. Create our aggregator to produce filters
  • 2. Write the client-side code for checking filters
  • 3. Link up to our Remote Settings infrastructure to push filters
slide-44
SLIDE 44

Implementing CRLite for Firefox

Where are we now?

12-day period in December

289

slide-45
SLIDE 45

Implementing CRLite for Firefox

Where are we now?

12-day period in December

median 125 ms

slide-46
SLIDE 46

Implementing CRLite for Firefox

Where are we now?

A few technical caveats

  • We don’t catch Let’s Encrypt entries in our filter -- currently

don’t have a CRL, but this should change soon

  • The client needs to check if using CRLite for revocation is

possible -- if not, resort to OSCP

  • So, we’re not fully fail-closed, yet

PROTOTYPE!

slide-47
SLIDE 47

Implementing CRLite for Firefox

Are we done yet?

slide-48
SLIDE 48

Implementing CRLite for Firefox

Are we done yet?

  • Deeper security questions and attack scenarios

○ stress testing, sizing, p values?

  • Crypto agility

○ upgrade the hash functions?

  • Architecture enhancements
  • Performance enhancements

○ smaller delta sizes

As robust as possible!

slide-49
SLIDE 49

Implementing CRLite for Firefox

Are we done yet?

Design Build Refine Academia Academia Industry

slide-50
SLIDE 50

From Academia to Industry?

  • Idea tracks well, and a Firefox extension helped. We like it :-).
  • But the paper doesn’t/couldn’t take our existing infrastructure

into account. (In this case, our infrastructure helps).

  • Timing - other tools can be harnessed in the solution.

Intern project Further development Working prototype ??? Refinement

Here now...

slide-51
SLIDE 51

From Academia to Industry?

  • Idea tracks well, and a Firefox extension helped. We like it :-).
  • But the paper doesn’t/couldn’t take our existing infrastructure

into account. (In this case, our infrastructure helps).

  • Timing - other tools can be harnessed in the solution.

“It’s an excellent solution to a problem we shouldn’t have.”

slide-52
SLIDE 52

l

Is this going to help us move towards a more robust Web PKI? The Web PKI is fundamental but it’s fragile.

Academia Industry

slide-53
SLIDE 53

Thank Yous and Blog Posts...

★ Thank you!

J.C. Jones, Dana Keeler, Mark Goodwin, Dipen Patel, Benton Case, the CRLite Academic Team, especially Christo Wilson and Dave Levin, as well as other teams, including Tom Shrimpton, David Clayton, Kenny Paterson, Karin Holzhauser, and many more. ★ Released today - our CRLite blog post at https:/ /blog.mozilla.org/security/2020/01/09/crlite-part-1-all

  • web-pki-revocations-compressed

★ We’re hiring - https:/ /careers.mozilla.org/position/gh/1959213/