40
Transparency, Trust Agility, Pinning (Recent Developments in Server Authen;ca;on) Trevor Perrin <[email protected]>

Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Transparency,  Trust  Agility,  Pinning    (Recent  Developments  in  Server  Authen;ca;on)  

Trevor  Perrin  <[email protected]>  

Page 2: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Cer;ficate  Authori;es  

Browser   Web  Server  

Web  server  requests  cert,  typically  authen;cated  via  email  

Server  presents  cert  to  Client  

CA  

Page 3: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Web  PKI  

•  50+  Root  CAs,  unknown  number  of  Sub  CAs  

•  Most  CAs  can  issue  certs  for  any  domain  

•  Known  CA  failures  in  last  2  years:  – Comodo  -­‐  hacker  issued  bad  certs  – Diginotar  -­‐  hacker  issued  bad  certs  for  MITM  – Trustwave  -­‐  issued  sub  CA  to  customer  for  MITM  

– Turktrust  -­‐  issued  sub  CA  by  mistake,  used  for  MITM  

Page 4: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Can  we  recover  from  bad  certs?  

Page 5: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Revoca;on  

•  Online  lookups  (CRLs,  OCSP)  – Slow  – Leaks  browsing  history  – Connec;on  could  fail  (security/reliability  tradeoff)  

•  Fresh  signatures  from  CA  (e.g.  OCSP  stapling)  

•  Out-­‐of-­‐band  update  (soZware  update,  crlsets)  –  (Chrome  current  crlset  =  ~24000  entries,  ~250  KB)    

Page 6: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Change  who  we  trust?  

Page 7: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

DNSSEC/DANE  

•  DNSSEC  adds  key  and  signature  records  to  DNS  

•  DANE  adds  records  for  applica;on  keys  

•  Considered  as  a  PKI:  – Fewer  trusted  par;es  (ICANN  root,  TLD  registry,  registrar,  and  your  own  DNSSEC  keys)  

– Builds  on  exis;ng  authen;ca;on  rela;onships  

Page 8: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

DNSSEC/DANE  challenges  

•  “Last  mile”  problem:  gecng  DNSSEC  to  clients  – Fetching  DNSSEC  records  over  DNS  has  reliability  and  latency  problems  

– Stapling  needs  universal  deployment  before  a  “fail-­‐if-­‐absent”  client  policy  

•  DNSSEC  is  not  widely  deployed  on  domains  – More  complex  than  cert  requests  

Page 9: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Change  how  much  we  have  to  trust  anyone?  

Page 10: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Cer;ficate  Transparency  

•  Goals  – CAs  publish  all  cer;ficates  

•  Challenges  – What  if  they  don’t?  (mistakes,  hacks,  inten;onal,  etc.)  

•  Laurie  and  Langley  et  al,  Google,  started  2011  –  IETF  draZ  in  progress  

Page 11: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Logs  and  Monitors  

Browser   Web  Server  

CA  

Monitors  

Logs  

Monitors  watch  logs  and  send  revoca;ons  

CAs  send  certs  to  Logs  

Logs  periodically  publish  hash  trees  of  all  certs  

Page 12: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

CT  Part  1  –  Log  Signing  

Browser   Web  Server  

CA  sends  each  pre-­‐signed  cert  to  a  quorum  of  logs,  gets  back  “log  signatures”  to  embed  in  cert  

Browser  rejects  any  cert  without  quorum  of  log  sigs  

CA  

Logs  

Monitors  

Monitors  watch  logs  and  send  revoca;ons  

Page 13: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

CT  Part  2  –  Online  Log  Checking  

Browser   Web  Server  

Monitors  

Log  

Monitors  send  revoca;ons  and  hash  tree  roots.  

Browsers  report  certs  not    in  tree.  

Browsers  asynchronously  fetch  and  check  inclusion  proofs  for  each  cert  they  see  

Page 14: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Cert  Transparency  Challenges  

•  Requires  mul;ple  high-­‐availability  logs  

•  Log  signatures  need  universal  deployment  before  a  “fail-­‐if-­‐absent”  policy  – But  can  be  done  by  CAs  

•  Requires  good  monitoring  and  revoca;on,  and  an  infrequently-­‐breached  CA  system    

Page 15: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Don’t  use  CAs?  

Page 16: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

CAs  again  

Browser   Web  Server  

Web  server  requests  cert    CA  

Page 17: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Convergence  

Browser  

Monitors  

Web  Server  

Browser  sends  server  name  and  hash  of  cert  to  monitors  

query  

Page 18: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Convergence  

Browser  

Monitors  

Web  Server  

Monitors  probe  server  to  confirm  the  cert  

Browser  sends  server  name  and  hash  of  cert  to  monitors  

query   probe  

Page 19: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Convergence  

Browser  

Monitors  

Web  Server  

Network  Perspec;ve  

Trust  Agility  

Page 20: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Trust  Agility  in  ac;on  

Monitors  

Browsers  

Observable  Facts  (e.g.  observed  certs,  public  log)  

Page 21: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Observa;onal  Trust  Modes  

•  Net  Perspec;ve:  “Do  you  see  what  I  see?”  

•  Key  Con;nuity:  “Is  this  the  same  as  before?”  

•  SSH,  Convergence,  Perspec;ves,  etc.  

•  Ra;onale:  Internet  works  for  most  people  most  of  the  ;me  

Page 22: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Convergence  Challenges  

•  Online  lookups  – Performed  on  first  connec;on  or  key  discon;nuity  

– Costly  infrastructure  – Performance  and  reliability  risk  

Page 23: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Observa;onal  Trust  Challenges  

•  Key  Con;nuity  – Doesn’t  protect  ini;al  connec;on  – Doesn’t  handle  key  changes  well  

•  Network  Perspec;ve  – Handles  ini;al  connec;on  and  key  changes  at  cost  of  online  lookups  

– Doesn’t  handle  mul;ple-­‐keys-­‐per-­‐site  well  

Page 24: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Observa;onal  Trust  

Browser  

Monitors  

Web  Server  

Key  Con;nuity  

Trust  Agility   Network  Perspec;ve  

Page 25: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Can  we  improve  observa;onal  trust…  

Page 26: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

…with  some  help?  

Browser  

Monitors  

Web  Server  

Key  Con;nuity  

Trust  Agility   Network  Perspec;ve  

“I’m  using  keys  X,Y,Z  for  the  next  week”  

Page 27: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Server  Asserted  Pinning  

•  Improves  reliability  (server  has  made  a  commitment)  – Regardless  of  mul;ple-­‐keys-­‐per-­‐site  or  key  change  

•  Can  help  with  ini;al  connec;on  /  online  lookup  – Gives  us  longer-­‐lived  “tokens”  which  can  be  distributed  in  different  ways  

Page 28: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Pins  

•  Pin  =  (Name,  Authen;ca;on  Data,  Expira;on)  •  Authen;ca;on  Data  

– Public  key(s)  – Opt-­‐In  (HSTS,  DNSSEC,  Cer;ficate  Transparency)  

•  How  are  pins  asserted?  

•  How  are  pins  distributed?  

Page 29: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Distribu;ng  Pins  

•  Preloaded  pins  

•  Key  con;nuity  

Page 30: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Secure  Links  

Browser  

Introducer  Website  

Web  Server  

Web  page  with  secure  links  

Page 31: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Secure  Links  

Browser  

Introducer  Website  

Web  Server  

Web  page  with  secure  links  

E.g.  trusted  search  engine  

Observa;onal  Trust  

Page 32: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Secure  Links  

<a  link-­‐security="expiry=1357849989;    pin-­‐sha256=YWRmYXNkZmFzZGZhc2RmcXdlcnF3ZXJxd2VycXdlcnF=;    

pin-­‐sha256=LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=;"    

href="hyps://www.example.com">a  secure  link!</a>  

Page 33: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Secure  Links  

•  Use  current  trust  model  on  the  web  •  A  broken  link  is  the  introducer’s  fault  

•  Build  on  trust  in  the  web’s  major  “hubs”  •  Search  engines,  social  networks,  link  shorteners  

•  Also  useful  for  loading  page  resources  securely  •  i.e.  JavaScript  libraries  

•  Feedback  welcome:  www.secure-­‐links.org  

Page 34: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Asser;ng  Pins  

•  HPKP  – HTTP  layer,  pins  to  EE  keys  and/or  CA  keys  

•  TACK  – At  TLS  layer,  pins  to  self-­‐chosen  signing  key  

Page 35: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Pin  Asser;on  Challenges  

•  Risks  to  relying  party  – Bad  pins  

•  Risks  to  asser;ng  party  – Key  loss  – Key  compromise  

–  Inflexible  /  impossible  key  changes  

Page 36: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Pin  Ac;va;on  

end  

30  days  

Ac;ve  periods  

ini;al   current  

30  days  

Ac;ve  period  dura;on  =  MIN(30  days,  current  –  ini;al)  

Page 37: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

pin  1  

Pin  flexibility  

Signing  key  

key  3  

pin  2   pin  3  

Ex:  (K1,K2,K3,K4)    (K3,K4,K5,K6)    …  

key  1   key  2  ShiZing  pins  could  use  CA  or  EE  keys  

Page 38: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Pin  Redundancy  

•  Pin  to  mul;ple  public  keys  (HPKP)  – E.g.  several  popular  CAs  and  your  TLS  key  

•  Distributed  backup  /  delega;on  of  private  key  – E.g.  TACK  

Page 39: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Summary  

•  Lots  to  think  about  

•  Oh,  and  we  can  combine  lots  of  these  things!  – Sovereign  Keys  ~=  transparency  +  pinning  

Page 40: Transparency,+TrustAgility,+Pinning+ · 2013-01-12 · Web+PK+I • 50+RootCAs,+unknown+number+of+Sub+CAs+ • MostCAs+can+issue+certs+for+any+domain+ • Known+CA+failures+in+last2+years:+

Thanks!  

•  hyp://dnssec-­‐deployment.org  •  hyp://www.cer;ficate-­‐transparency.org  •  hyp://convergence.io  •  hyp://tack.io  •  hyp://tools.ie}.org/html/draZ-­‐ie}-­‐websec-­‐key-­‐pinning  

•  hyps://www.eff.org/sovereign-­‐keys  •  hyp://www.secure-­‐links.org