Cinderella: Turning Shabby X.509 Certificates into Elegant Anonymous Credentials
Antoine Delignat-Lavaud
Cédric Fournet, Markulf Kohlweiss, Bryan Parno
X.509 V.C.
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
X.509 V.C.
Endpoint certificate Intermediate Certificate Authority certificate Root Certification Authority certificate
Chain
certificate validation program authorized root certificates (data) certificates + private keys
OCSP, Certificate Transparency, Perspectives…
(1-3KB / certificate)
Certificate Authority
(1-3KB / certificate)
certificate validation program authorized root certificates (data) certificates + private keys
OCSP, Certificate Transparency, Perspectives…
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
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
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
Crypto 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
(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
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)
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
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
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
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
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
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
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
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
With M. Abadi, A. Birrell, I. Mironov,
𝐿𝑓𝑧𝐻𝑓𝑜(𝑆) 𝐹𝐿 , 𝑊𝐿
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
)
𝐷𝑝𝑛𝑛𝑗𝑢(𝐹𝐿
0, 𝑣0, 𝑝 0) Generate the commitment: 𝑤 0 𝑡 = ∑ 𝑣?𝑤? 𝑡
+ 𝑝
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: 𝑓 𝑞, 𝑟 = 𝑓(, )𝑞𝑟
Server Certificate DH Key Exchange Server authenticated channel Client Authentication Compound authentication
I see all certificate fields
Performance
tunneling
code and document signing)
Server authenticated channel
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)>
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
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
Binary encoding standard Ancient (1984) <Tag, Length, Value> Distinguished rules (DER): unique serialization