T2 Key Management
T2 Key Management
T2 Key Management
Key Management
Key management is the hardest part of cryptography
Actually, key management is the Achilles heel of
cryptography
None of the solutions that we have today work very well
Key storage
Where do I safely store Bobs key?
Validity checking
Is the key that I have for Bob still valid?
My keys been compromised, how do I inform Bob?
Key Lifetimes
Two classes of keys
Short-term session keys (sometimes called ephemeral keys)
Generated automatically and invisibly
Used for one message or session and discarded
Long-term keys
Generated explicitly by the user
Confidentiality keys
Should have as short a lifetime as possible
Online mechanisms
On-demand distributions (SSL/TLS, S/MIME)
Key continuity (SSH)
Key Distribution
Alice retains the private key and sends the public key to
Alice
Bob
Bob
Mallet
Bob
Committee design
Address the MITM problem
No specific goal, so add more and more complexity to the
middle
Application-specific design
Address the actual needs of the application
Need to solve a particular problem, so design a workable
domain-specific solution
Key Backup/Archival
Need to very carefully balance security vs. backup
requirements
Every extra copy of your key is one more failure point
Communications and signature keys never need to be
recovered generating a new key only takes a minute or so
Long-term data storage keys should be backed up
Key Destruction
Ensure that all copies of a private key are destroyed
Is every copy really gone?
Remote
SignR( msg, CertR )
SignL( EncrR( chall ), CertL )
SignR( chall )
Alice
Bob
CA
Certification Authorities
A certification authority (CA) guarantees the connection
between a key and an end entity
An end entity is
A person
A role (Director of marketing)
An organisation
A pseudonym
A piece of hardware or software
An account (bank or credit card)
Role of a CA
Original intent was to certify that a key really did belong to
a given party
Role was later expanded to certify all sorts of other things
CA
1. Alice generates a key pair and signs the public key and
identification information with the private key
Proves that Alice holds the private key corresponding to the
public key
Protects the public key and ID information while in transit to
the CA
CA
Alice
CA
Certificate History
To understand the X.509 PKI, its necessary to understand
the history behind it
Why does X.509 do otherwise straightforward things in
such a weird way?
[The] standards have been written by little green
monsters from outer space in order to confuse normal
human beings and prepare them for the big invasion
comp.std.internat
Someone tried to explain public-key-based authentication to
aliens. Their universal translators were broken and they had to
gesture a lot
They were created by the e-commerce division of the Ministry
of Silly Walks
Lynn Wheeler
Object
Attribute Value
Attribute Value
Attribute Value
X.500 DN Example
Typical DN components
Country C
State or province SP
Locality L
Organisation O
Organisational unit OU
Common name CN
Typical X.500 DN
C=US/L=Area 51/O=Hanger 18/OU=X.500 Standards
Designers/CN=John Doe
When the X.500 revolution comes, your name will be lined
up against the wall and shot
Example
Base = C=NZ
Chop = 1 RDN down from the base
Filter = organisation
Directory Implementation
The directory is implemented using directory service
agents (DSAs)
Directory Access
Typical directory accesses:
Directory Example
C=NZ
RD
O=University of Auckland
DN
RD
CN=end user
O=University of Auckland
Organisational CA
DN
RD
CN=end user
Top-level CA is called the root CA, a.k.a. the single point of failure
No indication of
CA vs. end entity certs
Implicit from their position in the directory
Key usage
Only one usage, directory authentication
Cert policy
Only one policy, directory authentication
Any of the other X.509v3 paraphernalia
LDAP
X.500 Directory Access Protocol (DAP) adapted for
Internet use
Originally Lightweight Directory Access Protocol, now closer
to HDAP
LDAP (ctd)
LDAP provides a complex hierarchical directory
containing information categories with sub-categories
containing nested object classes containing entries with
one or more (usually more) attributes containing actual
values
In one large-scale interop test the use of a directory for cert
storage was found to be the single largest cause of problems
LDAP (ctd)
Most practical way to use it is as a simple database
SELECT key WHERE name = Bob
LDAP (ctd)
So far, LDAP has not done a great job of supporting PKI
requirements
Location of company?
Location of parent company?
Location of field office?
Location of incorporation?
DNs in Practice
Public CAs typically set
C = CA country or something creative (Internet)
O = CA name
OU = Certificate type / class / legal disclaimer
CN = User name or URI
email = User email address
Minimalist DNs
Freds Certificate
My key
202.125.47.110
Non-DN Names
X.509 v3 added support for other name forms
email addresses
DNS names
URLs
IP addresses
EDI and X.400 names
Anything else (type + value pairs)
These add-ons are largely ignored in favour of the DN though
Qualified Certificates
Certificate designed to identify a person with a high level
of assurance
Precisely defines identification information in order to
identify the cert owner in a standardised manner
Defines additional parameters such as key usage, jurisdiction
where the certificate is valid, biometric information, etc
Qualified certificates only apply to natural persons
PGP Certificates
Certificates are key-based, not identity-based
Keys can have one or more free-form names attached
Key and name(s) are bound through (independent) signatures
SPKI (ctd)
Certificates may be distributed by direct communications
or via an online distribution mechanism
Each certificate contains the minimum information
required for the job (c.f. X.509 dossier certificates)
Hearkens back to the original Public File one-time assertions
Signing/purchasing authority
Letter of introduction
Security clearance
Software licensing
Voter registration
Drug prescription
Phone/fare card
Baggage claim check
Reputation certificate (e.g. Better Business Bureau rating)
Access control (e.g. grant of administrator privileges under
certain conditions)
Verification
Service provider checks signatures from B A own key
Authorisation loop requires no CA, trusted third party, or
external intervention
Trust management decisions can be justified/explained/verified
How was this decision reached?
What happens if I change this bit?
SPKI Redux
SPKIs greatest feature is that its not X.509
SPKIs greatest flaw is that its not X.509
RAs
Registration authorities offload user processing and
checking from the CA
RAs (ctd)
Everyone wants to be the CA
Stamps out certificates and collects fees
Certificate Chains
Collection of certificates from a leaf up to a root or trust
anchor
Root CA/trust anchor
Intermediate CA(s)
End entity
RA Cert
CRL
CRL
CA Cert
CA Cert
Cert
Cross-Certification
Original X.500-based scheme envisaged a strict hierarchy
rooted at the X.500 directory root
PEM tried (and failed) to apply this to the Internet
Cross-Certification (ctd)
Solution: CAs cross-certify each other
A signs Bs certificate
B signs As certificate
Cross-Certification (ctd)
With further cross-certification, re-parenting, subordination
of one CA to another, revocation and reissuance/
replacement, the hierarchy of trust
Cross-Certification (ctd)
becomes the spaghetti of doubt
Cross-Certification (ctd)
Different CAs and paths have different validity periods,
constraints, etc etc
Certificate paths can contain loops
Certificate semantics can change on different iterations through
the loop
Are certificate paths Turing-complete?
No software in existence can handle these situations
Cross-Certification (ctd)
The theory: A well-managed PKI will never end up like
this
If it does occur, we can handle it via nameConstraints,
policyConstraints, etc etc
The practice: If you give them the means, they will build it
Allow cross-certification and its only a matter of time before
the situation will collapse into chaos
c.f. CA vs. EE certificates
There are at least 5 different ways to differentiate the two
Only one of these was ever envisaged by X.509
Support for name and policy constraints is dubious to
nonexistant
Playing Russian roulette with your security
Cross-Certification in Browsers
CAs are hard-coded into browsers
Implicitly trusted
Totally unknown
entities
CA 1
CA keys have been onsold to third parties
CA 2
when the original CA
went out of business
Moribund web sites
Browser
Server certificates
512-bit keys
40-year cert lifetime (!!)
How much would you trust a NO LIABILITY ACCEPTED
CA?
Lucky Green
Bridge CAs
Attempt to solve the cross-certification chaos by unifying
disparate PKIs with a super-root
Bridge CA
Fe
t ch
tch
Fe
Cert
Check
Signature
Check
CRL
Certificate Revocation
Revocation is managed with a certificate revocation list
(CRL), a form of anti-certificate that cancels a certificate
Equivalent to 1970s-era credit card blacklist booklets
Based on even earlier cheque blacklists
Relying parties are expected to check CRLs before using a
certificate
This certificate is valid unless you hear somewhere that it
isnt
CRL Problems
CRLs mirror credit card blacklist problems
Not issued frequently enough to be effective against an attacker
Expensive to distribute
Vulnerable to simple DoS attacks
Attacker can prevent revocation by blocking delivery of the
CRL
Delta CRLs
Short-term CRLs that modify a main CRL
Discussion on PKI mailing lists indicates that use of delta
CRLs will be an interesting experience
Bypassing CRLs
SET sidesteps CRL problems entirely
End user certificates are revoked by cancelling the credit
card
Merchant certificates are revoked by marking them as invalid
at the acquiring bank
Payment gateways have short-term certificates that can be
quickly replaced
Validate
Cert
Check
Signature
OCSP
Acts as a selective CRL query protocol
Standard CRL process: Send me a CRL for everything youve
got
OCSP process: Send me a pseudo-CRL/OCSP response for
only these certs
Lightweight pseudo-CRL avoids CRL size problems
Reply is created on the spot in response to the request
Ephemeral pseudo-CRL avoids CRL validity period
problems
OCSP (ctd)
Can be used with an access concentrator to handle chains
OCSP
Fetch
Cert chain
Check
Signature
Validate
OCSP
Gateway
OCSP
OCSP
OCSP (ctd)
Returned status values are non-orthogonal
Status = not revoked, revoked, or unknown
Not revoked doesnt mean good, merely not on the CRL
Unknown could be anything from Certificate was never
issued to It was issued but I cant find a CRL for it
If asked Is this a valid cert and fed
A freshly-issued cert, cant say Yes
An MPEG of a cat, cant say No
Compare this with the credit card authorisation model
Response is authorised or declined (with optional
reasons)
OCSP (ctd)
Problems are due in some extent to the CRL-based origins
of OCSP
CRL can only report a negative result
Not revoked doesnt mean that a cert was ever issued
Some OCSP implementations will report I cant find a CRL
as not revoked
Some relying party implementations will assume that
revoked not good, so any other status = good
Much debate among implementors about OCSP semantics
OCSP (ctd)
OCSP has no scalability
Vendors eliminate replay-attack protection in order to get
usable performance
The changes we are making to scale our OCSP responder will
result in the discontinuation of the nonce extension
Verisign
This breaks OCSPs security (anyone can forge/replay status
responses), but at least you can claim that you have a workable
responder now
Cert Server
Fetch
Cert
Check
Signature
Setting up a CA
No-one makes money running a CA
You make money by selling CA products and services
Bootstrapping a CA
Get your root certificate signed by a known CA
Your CAs certificate is certified by the existing CA
Generally requires becoming a licensee of the existing CA
Your CA is automatically accepted by existing software
But see the section on CA survivability
Bootstrapping a CA (ctd)
Get users to install your CA certificate in their applications
Somewhat cumbersome
for users to do
However, no more
complex than the procedure
for installing an (unsigned)
driver for new hardware
Half the Windows
drivers on the planet
have unsigned drivers
Google for digital signature not found
If users are expecting the certificate install dialog and know
where to click, it works pretty well
Bootstrapping a CA (ctd)
Publish your CA certificate(s) by traditional means
Global Trust Register,
http://www.cl.cam.ac.uk/Research/Security/
Trust-Register/
Business Expectations of a CA
Current work follows the if you build it, they will (might)
come model
Industry (particularly governments) make great testbeds for
PKI experimentation
Theyll even pay you for it!
CA Business Model
Free email certs
No-one will pay for them
Clown suit certificates
CA consulting services
CA Survivability
Something youll never find in any PKI text: What happens
when your CA fails?
PKI or Bust
The majority of the commercial CAs have failed
Timestamping
Certifies that a document existed at a certain time
Used for added security on existing signatures
Timestamped countersignature proves that the original
signature was valid at a given time
Even if the original signature key is later compromised, the
timestamp can be used to verify that the signature was created
before the compromise