PKI applications (C2)

Protocols and standards

Pascal Steichen (MSSI-uni.lu) - 31/03/2007 (03)

1. Internet X.509 Public Key Infrastructure (PKIX)

PKIX standardisation areas:

  1. Profiles of X.509 Public Key Certificates and X.509 Certificate Revocation Lists (CRLs).
  2. Management protocols.
  3. Operational protocols.
  4. Certificate policies and Certificate Practice Statements.
  5. Time–stamping and data–certification/validation services.

Subject RFC
Certificate and Certificate Revocation List (CRL) Profile RFC 3280
Certificate Management Protocol (CMP) RFC 4210
Operational protocols RFC 3494 (LDAP), RFC 2585, RFC 2560 (OCSP)
Certificate Policy and Certification Practices Framework RFC 3647
Time–stamping and data–certification services RFC 3628, RFC 3161

1.1. PKI - Public-Key Infrastructure

A PKI is a set of hardware, software, people, policies and procedures needed to create, manage, store, distribute and revoke PKCs based on public–key cryptography.

A PKI consists of five types of components.

Type of component Description
Certification Authorities (CAs) to issue and revoke PKCs
Registration Authorities (RAs) to vouch for the binding between public keys and certificate holder identities and other attributes
Certificate holders (end entities, EE) to sign and encrypt digital documents
Clients (end entities, EE) to validate digital signatures and their certification path from a known public key of a trusted CA
Repositories to store and make available certificates and Certificate Revocation Lists (CRLs)

1.2. PMI - Privilege Management Infrastructure

PMI is the set of hardware, software, people, policies and procedures needed to create, manage, store, distribute and revoke Attribute Certificates.

A PMI consists of five types of components.

Type of component Description
Attribute Authorities (AAs) to issue and revoke ACs (also called Attribute Certificate Issuer)
Attribute certificate verifier to check the validity of an AC and then make use of the result
Attribute certificate holders (end entities, EEs) to parse or process an AC
Clients (end entities, EEs) to request an action for which authorisation checks are to be made
Repositories to store and make available certificates and Certificate Revocation Lists (CRLs)

2. Certificate and Certificate Revocation List (CRL) Profile - RFC 3280

2.1. Certificate

     Certificate ::= SEQUENCE {
          tbsCertificate         TBSCertificate,
          signatureAlgorithm     AlgorithmIdentifier,
          signatureValue         BIT STRING 
          }

     Version  ::=   INTEGER   <  v1(0), v2(1), v3(2)  >
  
     CertificateSerialNumber    ::=  INTEGER
  
     Validity ::= SEQUENCE {
          notBefore       Time,
          notAfter        Time }
  
     SubjectPublicKeyInfo ::= SEQUENCE {
          algorithm              AlgorithmIdentifier,
          subjectPublicKey       BIT STRING }
  
     Extensions   ::=  SEQUENCE SIZE (1..MAX) OF Extension
  
     Extension ::=     SEQUENCE {
           extnID       OBJECT IDENTIFIER,
           critical     BOOLEAN DEFAULT FALSE,
           extnValue    OCTET STRING }

2.2. CRL (Certificate Revocation List)

  CertificateList ::= SEQUENCE {
       tbsCertList        TBSCertList,
       signatureAlgorithm AlgorithmIdentifier,
       signatureValue     BIT STRING }

2.3. Certification Path Validation

3. Online Certificate Status Protocol (OCSP) - RFC 2560

3.1. Request Syntax

     OCSPRequest     ::=   SEQUENCE {
         tbsRequest                TBSRequest,
         optionalSignature [0]     EXPLICIT Signature OPTIONAL }
  
     TBSRequest      ::=   SEQUENCE {
         version             [0]     EXPLICIT Version DEFAULT v1,
         requestorName       [1]     EXPLICIT GeneralName OPTIONAL,
         requestList                 SEQUENCE OF Request,
         requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }
  
     Signature        ::=    SEQUENCE {
         signatureAlgorithm      AlgorithmIdentifier,
         signature               BIT STRING,
         certs               [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
  
     Version          ::=            INTEGER  <   v1(0) >
  
     Request          ::=    SEQUENCE {
         reqCert                     CertID,
         singleRequestExtensions     [0] EXPLICIT Extensions OPTIONAL }
  
     CertID           ::=    SEQUENCE {
         hashAlgorithm       AlgorithmIdentifier,
         issuerNameHash      OCTET STRING, -- Hash of Issuer’s DN
         issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
         serialNumber        CertificateSerialNumber }

3.2. OCSP Response

An OCSP response at a minimum consists of a responseStatus field indicating the processing status of the prior request. If the value of responseStatus is one of the error conditions, responseBytes are not set.

  OCSPResponse ::= SEQUENCE {
     responseStatus         OCSPResponseStatus,
     responseBytes          [0] EXPLICIT ResponseBytes OPTIONAL }
  
  OCSPResponseStatus ::= ENUMERATED {
      successful            (0), --Response has valid confirmations
      malformedRequest      (1), --Illegal confirmation request
      internalError         (2), --Internal error in issuer
      tryLater              (3), --Try again later
                                  --(4) is not used
      sigRequired           (5), --Must sign the request
      unauthorized          (6)   --Request unauthorized }

4. Certificate Policy and Certification Practices Framework - RFC 3647

4.1. Certificate policy (CP)

The X.509 standard defines a CP as "a named set of rules that indicates the applicability of a certificate to a particular community and/or class of application with common security requirements". An X.509 Version 3 certificate may identify a specific applicable CP, which may be used by a relying party to decide whether or not to trust a certificate, associated public key, or any digital signatures verified using the public key for a particular purpose.

4.2. Certification Practice Statement (CPS)

The term certification practice statement (CPS) is defined as: "A statement of the practices which a certification authority employs in issuing certificates". A CPS establishes practices concerning lifecycle services in addition to issuance, such as certificate management (including publication and archiving), revocation, and renewal or re-keying.

4.3. Recommended CP or CPS outline

In order to comply with the RFC, the drafters of a compliant CP or CPS are strongly advised to adhere to the following outline:

  1. INTRODUCTION
  2. PUBLICATION AND REPOSITORY RESPONSIBILITIES
  3. IDENTIFICATION AND AUTHENTICATION
  4. CERTIFICATE LIFE-CYCLE OPERATIONAL REQUIREMENTS
  5. FACILITY, MANAGEMENT, AND OPERATIONAL CONTROLS
  6. TECHNICAL SECURITY CONTROLS
  7. CERTIFICATE, CRL, AND OCSP PROFILES
  8. COMPLIANCE AUDIT AND OTHER ASSESSMENTS
  9. OTHER BUSINESS AND LEGAL MATTERS

5. Time-Stamping Authorities (TSAs) - RFC 3628

A timestamp or a time mark (which is an audit record kept in a secure audit trail from a trusted third party) applied to a digital signature value proves that the digital signature was created before the date included in the time-stamp or time mark.

To prove the digital signature was generated while the signer’s certificate was valid, the digital signature must be verified and the following conditions satisfied:

  1. the time-stamp (or time mark) was applied before the end of the validity period of the signer’s certificate,
  2. the time-stamp (or time mark) was applied either while the signer’s certificate was not revoked or before the revocation date of the certificate.

The electronic time stamp is gaining interest from the business sector as an important component of electronic signatures. It is also featured by the ETSI Electronic Signature Format standard (TS 101 733) or Electronic Signature Formats for long term electronic signatures (RFC 3126), built upon the Time-Stamp Protocol (RFC 3161). Agreed minimum security and quality requirements are necessary in order to ensure trustworthy validation of long-term electronic signatures.

5.1. Time-Stamp Token

  1. The time-stamp token shall include an identifier for the time-stamp policy;
  2. Each time-stamp token shall have a unique identifier;
  3. The time values the TSU uses in the time-stamp token shall be traceable to at least one of the real time values distributed by a UTC(k) laboratory.
  4. The time included in the time-stamp token shall be synchronized with UTC within the accuracy defined in this policy and, if present, within the accuracy defined in the time-stamp token itself;
  5. If the time-stamp provider’s clock is detected as being out of the stated accuracy then time-stamp tokens shall not be issued.
  6. The time-stamp token shall include a representation (e.g., hash value) of the datum being time-stamped as provided by the requestor;

  7. The time-stamp token shall be signed using a key generated exclusively for this purpose.
  8. The time-stamp token shall include:
    • where applicable, an identifier for the country in which the TSA is established;
    • an identifier for the TSA;
    • an identifier for the unit which issues the time-stamps.

5.2. Clock Synchronization with UTC

  1. The calibration of the TSU clocks shall be maintained such that the clocks shall not be expected to drift outside the declared accuracy.
  2. The TSU clocks shall be protected against threats which could result in an undetected change to the clock that takes it outside its calibration.
  3. The TSA shall ensure that, if the time that would be indicated in a time-stamp token drifts or jumps out of synchronization with UTC, this will be detected.
  4. The TSA shall ensure that clock synchronization is maintained when a leap second occurs as notified by the appropriate body. The change to take account of the leap second shall occur during the last minute of the day when the leap second is scheduled to occur. A record shall be maintained of the exact time (within the declared accuracy) when this change occurred.

5.3. Time-Stamp Protocol (TSP) - RFC 3161

5.4. Request Format

     TimeStampReq ::= SEQUENCE {
          version                      INTEGER < v1(1) >,
          messageImprint               MessageImprint,
            --a hash algorithm OID and the hash value of the data to be
            --time-stamped
          reqPolicy             TSAPolicyId               OPTIONAL,
          nonce                 INTEGER                   OPTIONAL,
          certReq               BOOLEAN                   DEFAULT FALSE,
          extensions            [0] IMPLICIT Extensions   OPTIONAL }
  
     MessageImprint ::= SEQUENCE   {
          hashAlgorithm               AlgorithmIdentifier,
          hashedMessage               OCTET STRING }

5.5. Response Format

     TimeStampResp ::= SEQUENCE {
          status                    PKIStatusInfo,
          timeStampToken            TimeStampToken   OPTIONAL  }
  
     PKIStatusInfo ::= SEQUENCE {
          status         PKIStatus,
          statusString PKIFreeText        OPTIONAL,
          failInfo       PKIFailureInfo   OPTIONAL }
     PKIStatus ::= INTEGER {
          granted                 (0),
          -- when the PKIStatus contains the value zero a TimeStampToken, as
             requested, is present.
          grantedWithMods         (1),
           -- when the PKIStatus contains the value one a TimeStampToken,
             with modifications, is present.
          rejection               (2),
          waiting                 (3),
          revocationWarning       (4),
           -- this message contains a warning that a revocation is
           -- imminent
          revocationNotification (5)
           -- notification that a revocation has occurred }

6. Public-Key Cryptography Standards (PKCS)

Version Name Comments
PKCS#1 2.1 RSA Cryptography Standard See RFC 3447. Defines the format of RSA encryption.
PKCS#3 1.4 Diffie-Hellman Key Agreement Standard A cryptographic protocol that allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel.
PKCS#5 2.0 Password-based Encryption Standard See RFC 2898 and PBKDF2.
PKCS#6 1.5 Extended-Certificate Syntax Standard Defines extensions to the old v1 X.509 certificate specification. Obsoleted by v3 of the same.
PKCS#7 1.5 Cryptographic Message Syntax Standard See RFC 2315. Used to sign and/or encrypt messages under a PKI. Used also for certificate dissemination (for instance as a response to a PKCS#10 message). Formed the basis for S/MIME, which is now based on RFC 3852, an updated Cryptographic Message Syntax Standard (CMS).
PKCS#8 1.2 Private-Key Information Syntax Standard
PKCS#9 2.0 Selected Attribute Types Defines selected attribute types for use in PKCS #6 extended certificates, PKCS #7 digitally signed messages, PKCS #8 private-key information, and PKCS #10 certificate-signing requests.
PKCS#10 1.7 Certification Request Standard See RFC 2986. Format of messages sent to a certification authority to request certification of a public key. See certificate signing request.
PKCS#11 2.20 Cryptographic Token Interface (Cryptoki) An API defining a generic interface to cryptographic tokens (see also Hardware Security Module).
PKCS#12 1.0 Personal Information Exchange Syntax Standard Defines a file format commonly used to store private keys with accompanying public key certificates, protected with a password-based symmetric key.
PKCS#13 Elliptic Curve Cryptography Standard (Under development)
PKCS#14 Pseudo-random Number Generation (Under development)
PKCS#15 1.1 Cryptographic Token Information Format Standard Defines a standard allowing users of cryptographic tokens to identify themselves to applications, independent of the application's Cryptoki implementation (PKCS #11) or other API. RSA has relinquished IC-card-related parts of this standard to ISO/IEC 7816-15.[1]