PKI and OpenSSL part 1 X.509 from the user s and the client software s point of view



Similar documents
Digital Certificates (Public Key Infrastructure) Reshma Afshar Indiana State University

X.509 Certificate Generator User Manual

Certification Authority. The X.509 standard, PKI and electronic documents. X.509 certificates. X.509 version 3. Critical extensions.

Key Management and Distribution

Ciphermail S/MIME Setup Guide

DEPARTMENT OF DEFENSE PUBLIC KEY INFRASTRUCTURE EXTERNAL CERTIFICATION AUTHORITY MASTER TEST PLAN VERSION 1.0

Purpose of PKI PUBLIC KEY INFRASTRUCTURE (PKI) Terminology in PKIs. Chain of Certificates

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 15.1

associate professor BME Híradástechnikai Tanszék Lab of Cryptography and System Security (CrySyS)

Brocade Engineering. PKI Tutorial. Jim Kleinsteiber. February 6, Page 1

public key version 0.2

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

Part III-a. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

Cryptography and Network Security Chapter 14. Key Distribution. Key Management and Distribution. Key Distribution Task 4/19/2010

Certificates. Noah Zani, Tim Strasser, Andrés Baumeler

OFFICE OF THE CONTROLLER OF CERTIFICATION AUTHORITIES TECHNICAL REQUIREMENTS FOR AUDIT OF CERTIFICATION AUTHORITIES

Cryptography and Network Security Chapter 14

Entrust Managed Services PKI. Getting started with digital certificates and Entrust Managed Services PKI. Document issue: 1.0

Public Key Infrastructure (PKI)

Information Systems Security Management

Asymmetric cryptosystems fundamental problem: authentication of public keys

An LDAP/X.500 based distributed PGP Keyserver

How To Make A Trustless Certificate Authority Secure

Key Management and Distribution

CS 356 Lecture 28 Internet Authentication. Spring 2013

Dr. Cunsheng DING HKUST, Hong Kong. Security Protocols. Security Protocols. Cunsheng Ding, HKUST COMP685C

Certificates and network security

Understanding Digital Certificates and Secure Sockets Layer (SSL)

What is a digital certificate, why do I need one, and how do I get it?

1 Public Key Cryptography and Information Security

Network Security: Public Key Infrastructure

AD CS.

Authentication Applications

A PKI For IDR Public Key Infrastructure and Number Resource Certification

APNIC Trial of Certification of IP Addresses and ASes

Evaluation of Certificate Revocation in Microsoft Information Rights Management v1.0

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

CSE543 - Introduction to Computer and Network Security. Module: Public Key Infrastructure

Public Key Infrastructure. A Brief Overview by Tim Sigmon

Certificate Path Validation

Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 14 Key Management and Distribution.

Understanding digital certificates

Network Security Protocols

[SMO-SFO-ICO-PE-046-GU-

SBClient SSL. Ehab AbuShmais

WIRELESS LAN SECURITY FUNDAMENTALS

Introduction to Network Security Key Management and Distribution

CALIFORNIA SOFTWARE LABS

Interoperability Guidelines for Digital Signature Certificates issued under Information Technology Act

Certificate Management. PAN-OS Administrator s Guide. Version 7.0

Grid Computing - X.509

Public Key Infrastructure

Authentication Applications

Lecture VII : Public Key Infrastructure (PKI)

Authentication Application

UNDERSTANDING PKI: CONCEPTS, STANDARDS, AND DEPLOYMENT CONSIDERATIONS, 2ND EDITION

Introduction to Public Key Technology and the Federal PKI Infrastructure 26 February 2001

Public-Key Infrastructure

Expert Reference Series of White Papers. Fundamentals of the PKI Infrastructure

PUBLIC-KEY CERTIFICATES

Meeting the FDA s Requirements for Electronic Records and Electronic Signatures (21 CFR Part 11)

X.509 Certificate Revisited

How To Encrypt Data With Encryption

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

Certificate Policy for. SSL Client & S/MIME Certificates

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Using etoken for SSL Web Authentication. SSL V3.0 Overview

Business Issues in the implementation of Digital signatures

NIST Test Personal Identity Verification (PIV) Cards

mod_ssl Cryptographic Techniques

Digital Certificates Demystified

CS 392/681 - Computer Security

Public Key Cryptography in Practice. c Eli Biham - May 3, Public Key Cryptography in Practice (13)

Chapter 7 Managing Users, Authentication, and Certificates

SSL Protect your users, start with yourself

Ciphire Mail. Abstract

Reducing Certificate Revocation Cost using NPKI

Certificate Management in Ad Hoc Networks

TeliaSonera Public Root CA. Certification Practice Statement. Revision Date: Version: Rev A. Published by: TeliaSonera Sverige AB

Certification Path Processing in the Tumbleweed Validation Authority Product Line Federal Bridge CA Meeting 10/14/2004

7 Key Management and PKIs

A PKI case study: Implementing the Server-based Certificate Validation Protocol

Cross-Certification and PKI Policy Networking

ETSI TS V1.1.1 ( )

Digital Signatures in a PDF

How To Understand And Understand The Security Of A Key Infrastructure

KEY DISTRIBUTION: PKI and SESSION-KEY EXCHANGE. Mihir Bellare UCSD 1

OpenCA v (ten-ten 2 )

encryption keys, signing keys are not archived, reducing exposure to unauthorized access to the private key.

Restricting Access with Certificate Attributes in Multiple Root Environments A Recipe for Certificate Masquerading

Concept of Electronic Approvals

PKI: Public Key Infrastructure

Securing Service Access with Digital Certificates Best Practice Document

Transcription:

PKI and OpenSSL part 1 X.509 from the user s and the client software s point of view Version 0.5 Richard Levitte, mailto:levittelp.se November 18, 2003

A serie of lectures PKI and OpenSSL part 1: codex.509 from the user s and the client software s point of view. PKI and OpenSSL part 2: X.509 from the CA s point of view. PKI and OpenSSL part 3: to set up a CA using OpenSSL and CSP.

References Russ Housley, Tim Polk, Planning for PKI: Best Practics Guide for Deploying Public Key Infrastructure, ISBN 0-471-39702-4, 2001 R. Housley, W. Polk, W. Ford, D. Solo, Internet X.509 Public Key Infrastructure Certificate and CRL Profile, RFC 3280, 2002

Public Key Cryptography: a reminder PKC is performed with pairs of keys: one private, one public. Anything encrypted with one of the keys in the pair can be decrypted by the other key in the pair. The private key is only known by the owner. The public key is known by everyone. Signing is performed by encrypting with the private key. Verification is performed by decrypting with the public key. This is used to prove authenticity of the signed document. Encryption is performed by encrypting with the public key. Decryption is performed by decrypting with the private key. This is used to make sure only the intended recidpient can read the encrypted document.

PKI basics: what s the big deal? Q: Who owns the private key? Q: How is that proven? A: Tie the identity securely with the key! Q: How do I know this is still true? Q: How do I know it s safe to use? A: Require expiration and out-of-band checks.

PKI basics: real world certificates Business card with PGP key fingerprint or a complete public key. This loosely ties the name on the business card with a public key. Problems: The card must be received in person, or there can be no trust. And still, everything on it may be a lie! The card can t realistically be taken back if the validity of the information changes. There s also no realistic way to check if the information is still valid.

PKI basics: real world certificates Credit card. Doesn t have a public key, so it isn t really a certificate in a PKI sense. Instead, it ties a name with an account number. Pros compared to business card: Has a visible issuer. With hologram techniques and recognisable images, it s hard to forge, and is therefore considered secure. Has name, account number and expiration date printed in raised letters, which is hard to changed after the card has been issued. Thanks to magnetic stripe, it can be used electronically. It has an expiration date, so validity is limited.

PKI basics: the ideal certificates 1. Purely digital object. 2. Contains name of private key holder, includes contact info 3. Easy to determine if issued recently 4. Created by trusted party rather than key holder 5. Easy to tell certificates from same issuer apart 6. Easy to determine if the certificate is genuine or forged 7. Tamper-proof 8. We can immediately determine if the information is no longer current 9. Easy to determine from certificate which application it applies to

PKI basics: general public key certificates Serial Number: 48 Certificate for: Company: Issued by: Email address: Bob Burton Fox Consulting CertsRUs, Inc. bb@pleasantville.ca.us Activation: Jan 10, 2002 Expiration: Jan 10, 2004 Public Key: CertsRUs Digital Signature: 2421ab81fe61448a c6b88142056fde8c ba7527c96148cbe1 4682ade412ed8923 83bd86124d90e16a d81e135671324bde 89c562d5ae182134 33de8ade19ed9143

PKI basics: CA vs. EE CA = Certificate Authority. They issue certificates. EE = End Entity. The use certificates for services, authentication, identity. The two should not be mixed. A CA certificate must not be used to certify a server or a person. An EE certificate must not be used to sign other certificates.

PKI basics: PKI architectures Simple architectures Single CA : one trust point. Real easy, not very interoperable. Basic trust list : multiple trust points which are single CA s. Enterprise architectures Hierarchical PKI : a tree of CA s. The top of the tree is the normal trust point for everyone. Mesh PKI : every department has it s own individual CA, and all of them cross-certify with each other. The trust point is usually your own CA.

PKI basics: more PKI architectures Hybrid PKI architectures Extended trust list : like the trust list, but each entry may point at any kind of architecture. This is the most common way in web browsers. Cross-certified Enterprise PKIs : many enterprises cross-certify with their partners, and form a mesh PKI at a higher level. Bridge CA Architecture : when many enterprises cross-certify, the number of certificates to keep track of gets quite large. A bridge CA is an intermediate CA that cross-certifies with every enterprise. The bridge is never used as a trust point.

X.500: The directory In the beginning, there was the directory (X.500). It was designed to become a gigantic global on-line phone directory. The directory needed security. Public Key cryptography was chosen, and the certificate was created (X.509, 1988). The directory never became a reality except in some enterprises and communities. They never got connected together. The certificate was still cool, and got used as a general authentication tool for some protocols. The most popular are still SSL and TLS. PKIX (a working group of IETF) started working on standardising the use of X.509 certificates on the Internet. Today, the result is RFC 3280 and a bunch more.

X.509: certificates version v1 serialnumber 48 signature issuer validity subject subjectpublickeyinfo signaturealgorithm signature DSA with SHA-1 C=US; L=CA; O=CertsRUs, Inc.; CN=CA1 020110120000Z to 040110120000Z C=US; O=Fox Consulting, Inc.; OU=R&D; CN=Bob Burton RSA, 2421ab81fe61448a c6b88142056fde8c ba7527c96148cbe1 4682ade412ed8923 DSA with SHA-1 83bd86124d90e16a d81e135671324bde 89c562d5ae182134 33de8ade19ed9143

X.509: certificates version v2 serialnumber 48 signature issuer validity subject subjectpublickeyinfo issueruniqueid subjectuniqueid signaturealgorithm signature DSA with SHA-1 C=US; L=CA; O=CertsRUs, Inc.; CN=CA1 020110120000Z to 040110120000Z C=US; O=Fox Consulting, Inc.; OU=R&D; CN=Bob Burton RSA, 2421ab81fe61448a c6b88142056fde8c ba7527c96148cbe1 4682ade412ed8923 (usually omitted) (usually omitted) DSA with SHA-1 83bd86124d90e16a d81e135671324bde 89c562d5ae182134 33de8ade19ed9143

X.509: certificates version v3 serialnumber 48 signature issuer validity subject subjectpublickeyinfo issueruniqueid subjectuniqueid extensions signaturealgorithm signature DSA with SHA-1 C=US; L=CA; O=CertsRUs, Inc.; CN=CA1 020110120000Z to 040110120000Z C=US; O=Fox Consulting, Inc.; OU=R&D; CN=Bob Burton RSA, 2421ab81fe61448a c6b88142056fde8c ba7527c96148cbe1 4682ade412ed8923 (usually omitted) (usually omitted) DSA with SHA-1 83bd86124d90e16a d81e135671324bde 89c562d5ae182134 33de8ade19ed9143

PKI basics: X.509 certification Serial Number: 112 Serial Number: 48 Serial Number: 206 Issuer: Fox Subject: Hawk Data Issuer: Hawk Data Subject: Dove Ltd Issuer: Dove Ltd Subject: Doug Dillon Hawk s Public Key Fox CA s Signature Dove s Public Key Hawk CA s Signature Doug s Public Key Dove CA s Signature

PKI basics: older X.509 certificate formats, the horrors! Misuse of certificates (for applications it wasn t meant for) Anyone can sign any certificate! Everyone must rely on the same certification policy So, what address does this person have? Is alice@fox.com the same as C=US; O=Fox Consulting, Inc; CN=Alice Adams? Is www.fox.com the same as C=US; O=Fox Consulting, Inc; CN=Web Server? The latter was solved with subject names like C=US; O=Fox Consulting, Inc; CN=Alice Adams; emailaddress=alice@fox.com and C=US; O=Fox Consulting, Inc; CN=www.fox.com, which is ugly and counterproductive

PKI basics: X.509 v3 certificates extensions Subject type : is the certificate a CA or EE certificate? Identity information : DNS names, email addresses Key attributes : can this key be used for key transport? Can it also be used to verify a digital signature? Policy information : can I trust Alice s certificate? Is it appropriate for large value transactions? Additional information where can I find the CA certificate for the issuer of this certificate? Where can I find the certificate revocation list for that issuer?

PKI basics: X.509 v3 certificates extensions Extensions can be critical. If it is, it must be recognised, or the certificate is invalid. If it isn t critical, it can safely be ignored. Subject type extensions Basic Constraints : CA, a boolean that is true if this is a CA certificate. pathlenconstraint, an integer that contains the number of steps further one may walk along the certificate chain.

PKI basics: X.509 v3 certificates extensions Name Extensions Subject Alternative Name : may contain extra identifiers, like DNS names (for servers, for example), IP addresses (useful in IPsec), e-mail addresses (for persons), and other types of data (Microsoft uses this to contain Kerberos data). Name Constraints : used in CA certificates to constrain what names may be verified with it. This applies both to the basic subject name and the names gven in the subject alternate name. It s composed of a serie of permitted and excluded subtrees.

PKI basics: X.509 v3 certificates extensions Key Attributes Key Usage : identifies the security services that the public key can be used for. They include: keycertsign : the public key may be used to verify signatures on certificates. crlsign : the public key may be used to verify signatures on CRLs non-repudiation : the public key may be used to verify signature on documents and protects against the signer falsely denying some action. digitalsignature : the public key may be used to verify signatures in other cases than the three given above. keyencipherment : the public key may be used for key transport and key management. dataencipherment : the public key may be used to encrypt data other than cryptographic keys.

PKI basics: X.509 v3 certificates extensions Key Attributes Key Usage : identifies the security services that the public key can be used for. They include: keyagreement : the public key may be used for key agreement. This is used when a DH key must be used for key management. encipheronly : the symmetric key resulting from key agreement may only be used for encrypting data. decipheronly : the symmetric key resulting from key agreement may only be used for decrypting data.

PKI basics: X.509 v3 certificates extensions Key Attributes Subject Key Identifier : a hash value of the private key connected to this certificate. That makes it easier to keep track of which private key corresponds to which certificate. Authority Key Identifier : a hash value of the private key connected to the issuer s certificate, or the issuer name and serial number from the issuer s certificate. That makes it easier to find the issuer s certificate when it has more than one, and thereby helps in certification path construction. Serial Number: 112 Issuer: Fox Subject: Hawk Data AKI: Fox; 0 Serial Number: 48 Issuer: Hawk Data Subject: Dove Ltd AKI: Fox; 112 Serial Number: 206 Issuer: Dove Ltd Subject: Doug Dillon AKI: Hawk Data; 48 Fox CA s Signature Hawk CA s Signature Dove CA s Signature

PKI basics: X.509 v3 certificates extensions Policy Information Certificate policies : a number of identities for the policy or policies that this certificate has been issued under. Policy Mapping : when several CA s cross-certify, they usually don t have the same policy identifiers. However, they may agree that some of their policies are similar enough to be considered equal. The issued cross-certificates will then contain the mapping between those policies. Policy Constraints : can be used to require that each certificate in the path has a valid policy identity, and can be used to prohibit policy mapping. For both these cases, there is a counter that says in how many steps this restriction starts to apply.

PKI basics: X.509 v3 certificates extensions Additional Information CRL Distribution point : in a CA cerificate, says where to find the CRL generated by that issuer. Authority Information Access : points at other validation resources, for example an OCSP responder.

PKI basics: X.509 v3 certificates extensions As you can imagine, there are many more extension, some standardised, some not. There are also many ways to abuse them (for example, setting the critical flag on non-standard), and most likely, we have not seen the end of creativity in this department.

PKI basics: X.509 v2 Certificate Revocation List version signature issuer thisupdate nextupdate revokedcertificates v2 DSA with SHA-1 C=US; L=CA; O=CertsRUs, Inc.; CN=CA1 021101120000Z 021108120000Z (see next page]) crlextensions signaturealgorithm signature DSA with SHA-1 83bd86124d90e16a d81e135671324bde 89c562d5ae182134 33de8ade19ed9143 usercertificate 48 revocationdate 021012042234Z crlentryextensions

PKI basics: X.509 Certificate Path Construction The best source here is draft-ietf-pkix-certpathbuild-01.txt, until it becomes and RFC...

PKI basics: X.509 Certificate Path Validation The best source here is RFC 3280.