Cinderella: Turning Shabby X.509 Certificates into Elegant - - PowerPoint PPT Presentation

cinderella turning shabby x 509 certificates into elegant
SMART_READER_LITE
LIVE PREVIEW

Cinderella: Turning Shabby X.509 Certificates into Elegant - - PowerPoint PPT Presentation

Cinderella: Turning Shabby X.509 Certificates into Elegant Anonymous Credentials with the Magic of Verifiable Computation Antoine Delignat-Lavaud Cdric Fournet, Markulf Kohlweiss, Bryan Parno X.509 V.C. The X.509 Public Key Infrastructure


slide-1
SLIDE 1

Cinderella: Turning Shabby X.509 Certificates into Elegant Anonymous Credentials

Antoine Delignat-Lavaud

Cédric Fournet, Markulf Kohlweiss, Bryan Parno

X.509 V.C.

with the Magic of Verifiable Computation

slide-2
SLIDE 2

The X.509 Public Key Infrastructure (1988)

Endpoint certificate Intermediate Certificate Authority certificate Root Certification Authority certificate

Chain

slide-3
SLIDE 3

X.509 Authentication

certificate validation program authorized root certificates (data) certificates + private keys

OCSP, Certificate Transparency, Perspectives…

(1-3KB / certificate)

Certificate Authority

slide-4
SLIDE 4

X.509 Problem: Application Heterogeneity

(1-3KB / certificate)

certificate validation program authorized root certificates (data) certificates + private keys

OCSP, Certificate Transparency, Perspectives…

  • TLS
  • S/MIME
  • 802.1X (Wi-Fi)
  • Code signing
  • Document signing

Basic Validation

Correct ASN.1 encoding (injective parsing) Correct signatures from one certificate to the next Valid basic constraints Valid key usages Acceptable algorithms and key sizes

TLS validation

notBefore < now() < notAfter ? Domain == Subject CN? Domain in Subject Alternative Names? Matches a wildcard name? Domain compatible with Name Constraints? Endpoint EKU includes TLS client / server? Chain allows TLS EKU? Not revoked now

S/MIME validation

notBefore < email date < notAfter ? Subject emailAddress or Alternative Names include sender email? Endpoint EKU includes S/MIME ? Chain allows S/MIME EKU? Not revoked when mail was sent

slide-5
SLIDE 5

Crypto failures

Recent PKI Failures

2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 HashClash rogue CA (MD5 collision) Stevens et al. Flame maleware NSA/GCHQ attack against Windows CA Bleichenbacher’s e=3 attack on PKCS#1 signatures 512 bit Korean School CAs TÜRKTRUST BERSerk DigiNotar hack EKU-unrestricted VeriSign certificates ANSSI Comodo hack Trustwave VeriSign NetDiscovery Debian OpenSSL entropy bug Basic constraints not properly enforced (recurring & catastrophic bug) OpenSSL null prefix The SHAppening DROWN KeyUsage Name constraints failures VeriSign hack OpenSSL CVE- 2015-1793 GnuTLS X509v1 Formatting & semantics CA failures Superfish India NIC StartCom hack China NNIC

slide-6
SLIDE 6

X.509 Problem: Privacy

(1-3KB / certificate)

certificate validation program authorized root certificates (data) certificates + private keys

OCSP, Certificate Transparency, Perspectives…

Network Observer Network Observer Learns all certificate contents Monitor Requests

slide-7
SLIDE 7

Cinderella: Main Idea

evaluation key verification key certificates + private keys Other evidence (OCSP, CT) certificate validation policy (C code) authorized root certificates (data) Geppetto compiler Proof

(288 B)

Proof

(288 B)

slide-8
SLIDE 8

Computation Outsourcing with Pinocchio

Setup Phase Runtime Phase C program F(priv, pub)

public verifier inputs private prover inputs

+

X X C D

Arithmetic Circuit

Verification Key Vk Evaluation Key Ek Succinct Proof Query(pub)

Check(Proof, Vk) F(priv, pub)

Complex programs compile to very large arithmetic circuits

[GGP, CRYPTO’10]; [GGPR, EUROCRYPT’13]; [PGHR; S&P’13]; [CFHKKNBZ; S&P’15] Ek Proof

slide-9
SLIDE 9

Cinderella: Contributions

  • A compiler from high-level validation policy templates to

Pinocchio-optimized certificate validators

  • Pinocchio-optimized libraries for hashing and RSA-PKCS#1

signature validation

  • Several TLS validation policies based on concrete templates

and additional evidence (OCSP), tested on real certificates

  • An e-Voting validation policy based on Helios with Estonian

ID card

slide-10
SLIDE 10

Benefits and Caveats

  • Compatible with existing PKI and

certificates (practicality)

  • Ensures uniform application of the

validation policy but, allows flexible issuance policies

  • Complete control over disclosure of

certificate contents (anonymity)

  • Less exposure of long-term private

key through weak algorithms

  • Computationally expensive
  • Initial agreement on the

validation policy

  • Reliance on security of verified

computation system (new exotic crypto assumption, new trusted key generation)

  • Does not solve key management

(one more layer to manage)

slide-11
SLIDE 11

Cinderella: Soundness

verification key

certificates + private keys Other evidence (OCSP, CT) certificate validation policy (C code) authorized root certificates (data) Geppetto compiler Proof

(288 B)

Public inputs certificate validation policy (C code) Public inputs

slide-12
SLIDE 12

Compiling Certificate Templates

seq {seq { # Version tag<0>: const<2L>; # Serial Number var<int, serial, 10, 20>; # Signature Algorithm seq { const<O1.2.840.113549.1.1.5>; const<null>; }; # Issuer seq { set { seq { const<O2.5.4.10>; const<printable:"AlphaSSL">; };};set { seq { const<O2.5.4.3>; const<printable:"AlphaSSL CA - G2">; }; }; }; # Validity Period seq { var<date, notbefore, 13, 13>; var<date, notafter, 13, 13>; }; # Subject seq { varlist<subject, 2, 4>: set { seq { var<oid, subjectoid, 3, 10>; var<x500, subjectval, 2, 31>; }; }; }; […]

Template

Untrusted Native Parser Parse certificate Generate Prover Inputs C/QAP verifier Concatenate compile-time constants and run-time vars Compute running hash Template Verifier compiler Variables Constants Variable lists Private inputs

slide-13
SLIDE 13

C verifier program

Produced Verifier (Fragment)

if(in_subject.v[0] > 2) { append(&buffer, in_subjectval[2].tag); append(&buffer, 0 + LEN(in_subjectval[2])); for(i=0; i<31; i++) if(i<LEN(in_subjectval[2])) append(&buffer, in_subjectval[2].v[i]); } if(buffer.cur >= 85) reduce(&buffer, &hash);

Hashing buffer = 2 * hash function block size Current Hash

Append(byte) Add given byte to the hashing buffer Reduce() compress one block of buffer, update current hash

Variable list Variable Constants Compression

Output = hash of ASN.1 formatted certificate contents

slide-14
SLIDE 14

Verifying PKCS#1 RSA Signatures

S ^ e mod N = 1ffffffffff[…]ffffffkkkkk[…]kkkkkkXXXXXXXXXXXXXXXXXXXXX Hash (computed before) S

120 bits 120 bits 120 bits

S^2

240+ bits 240+ bits 240+ bits 240+ bits 240+ bits

… … S² = Q*N + R Q*N

240+ bits 240+ bits 240+ bits 240+ bits 240+ bits

… R

120 bits 120 bits 120 bits

… S <- R S ^ e = S (((S ^ 2) ^ 2) … Private inputs Q and R -> Assume fixed e = 65537 = 2 ^ 16 + 1 Verify the prover hints are valid

slide-15
SLIDE 15

Application: TLS Client (with Offline Signing)

Key Exchange signed with Ek

Pseudo Ek Proof No change to TLS!

Client Cert Ck, fields

Pseudo Ek F(fields) Geppetto compiler evaluation key verification key Proof Pseudo Ek Proof

Offline

slide-16
SLIDE 16

Single Template Evaluation (With Signature)

0.001 0.01 0.1 1 10 100 1000

Estonian EID S/MIME TLS server OCSP TLS Pseudonym Seconds

Keygen time Proof time Verify time

slide-17
SLIDE 17

Application evaluation

0.001 0.01 0.1 1 10 100 1000

TLS (2 intermediates + OCSP) TLS (1 intermediate + OCSP) TLS (no intermediate, OCSP) Helios (OCSP) Seconds

Keygen time Proof time Verify time

slide-18
SLIDE 18

Conclusions

  • One of the first practical application of verifiable computing
  • We enhance the privacy and integrity of X.509 authentication
  • No change to the PKI or to application protocols
  • Working prototype for TLS and Helios
slide-19
SLIDE 19
slide-20
SLIDE 20

The Internet PKI

With M. Abadi, A. Birrell, I. Mironov,

  • T. Wobber and Y. Xie (NDSS’14)
slide-21
SLIDE 21

Core Pinocchio protocol

𝐿𝑓𝑧𝐻𝑓𝑜(𝑆) 𝐹𝐿 , 𝑊𝐿

Generate the MultiQAP for 𝑆 Pick random 𝑡 Compute 𝐹𝐿 = {𝐹𝐿

0}, {𝑕34}

𝐹𝐿5 = 𝑕67 3 , 𝑕87 3 , 𝑕97 3 𝑕:;,<67 3 , 𝑕:;,=87 3 , 𝑕:;,>97 3

?∈A;

Compute 𝑊𝐿 = (𝑕B 3 = 𝑕∏ 3DE

  • 4

)

𝐷𝑝𝑛𝑛𝑗𝑢(𝐹𝐿

0, 𝑣0, 𝑝 0) Generate the commitment: 𝑤 0 𝑡 = ∑ 𝑣?𝑤? 𝑡

  • ?∈A;

+ 𝑝

0,8𝑒 𝑡 , similarly for 𝑥 and 𝑧

𝐷

0 = (𝑕6 0 , 𝑕8 0 , 𝑕9 0 , 𝑕:;,<6 0 , 𝑕:;,=8 0 , 𝑕:;,>9 0 ).

𝑤 𝑡 = ∏𝑤(0) and similarly for 𝑥 and 𝑧

𝐷 𝑊𝑓𝑠𝑗𝑔𝑧(𝑊𝐿

0, 𝐷 0) 𝑓 𝑕6 0 , 𝑕0

:;,<

= 𝑓(𝑕:;,<6 0 , 𝑕) and similarly for 𝑥 and 𝑧

𝑄𝑠𝑝𝑤𝑓(𝐹𝐿, 𝒗, 𝒑)

Find ℎ(𝑦) s.t. ℎ 𝑦 ∗ 𝑒 𝑦 = 𝑤 𝑦 ∗ 𝑥 𝑦 − 𝑧(𝑦) Compute 𝑕[(3) = ∏ 𝑕34 [4 Proof is (𝑕6 3 , 𝑕8 3 , 𝑕9 3 𝑕[(3))

𝜌 𝑊𝑓𝑠𝑗𝑔𝑧(𝑊𝐿, 𝑫, 𝜌) {Yes, No}

^ _< ` ,_= ` ^ _> ` ,_

=? 𝑓(𝑕[ 3 , 𝑕B(3)) 𝑓(b,b) is a pairing: 𝑓 𝑕𝑞, 𝑕𝑟 = 𝑓(𝑕, 𝑕)𝑞𝑟

slide-22
SLIDE 22

Workaround: Tunneling

Server Certificate DH Key Exchange Server authenticated channel Client Authentication Compound authentication

I see all certificate fields

Performance

  • verhead of

tunneling

  • TLS Renegotiation
  • TLS 1.3 Handshake Encryption
  • Server still sees all contents
  • Not always possible (S/MIME,

code and document signing)

slide-23
SLIDE 23

Server authenticated channel

Usability and Privacy of PKI Authentication

Server Certificate DH Key Exchange Server authenticated channel Channel-bound Client Authentication Current Privacy Approach Authentication binding e.g. Channel ID or Renego Extension Anonymous Client Certificate CB = sign(tls-unique, cliSk(channel)) <user, HMAC(password, CB)>

  • User Unfriendly
  • Complex
  • Key Compromise Impersonation attacks
slide-24
SLIDE 24

The Internet PKI

Public Key Public Key Public Key

Algorithm + Parameters Signature value Algorithm + Parameters Signature value Algorithm + Parameters Signature value

Issuer Subject Subject Subject Issuer Issuer Signed by Matches

slide-25
SLIDE 25

Deployment: X.509 Signature Scheme

CA Public Key Public Key Public Key

Algorithm + Parameters

Signature value Algorithm + Parameters

Signature value

Proof

Root CA Intermediate CA

CN=Peggy, Age=29

Intermediate CA Pseudonym Certificate Extension: Vk Peggy’s cert C OCSP certificate of Non-revocation Pseudonym creation Ek

slide-26
SLIDE 26

ASN.1

Binary encoding standard Ancient (1984) <Tag, Length, Value> Distinguished rules (DER): unique serialization

slide-27
SLIDE 27

Checking RSA Signatures

Assume fixed e = 65537 = 2 ^ 16 + 1