RFC 5126

CMS Advanced Electronic Signatures (CAdES)

๐Ÿ“… published March 2008, from ietf

Part 1 of 28 ๐ŸŽ€ more parts are coming, so don't go anywhere! ๐Ÿ’–

Title Block ๐Ÿฆ‹

Okay bestie, this RFC is RFC 5126 and it's called CMS Advanced Electronic Signatures (CAdES) โœจ. It's giving "signature that doesn't expire," which is iconic.

  • Network Working Group: the group that put it out ๐Ÿ’œ
  • Authors: D. Pinkas (Bull SAS), N. Pope (Thales eSecurity), and J. Ross (Security and Standards) ๐Ÿ‘‘
  • Category: Informational ๐ŸŒธ
  • Date: February 2008 ๐Ÿ“…
  • Obsoletes: RFC 3126 ๐Ÿ’…
  • Updates: nothing is listed in the header ๐Ÿ™ˆ

Status of This Memo ๐Ÿ“œ

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited. ๐Ÿซถ

Abstract ๐Ÿ”ฎ

This document defines the format of an electronic signature that can remain valid over long periods. That includes evidence of its validity, even if the signer or the verifying party later tries to deny (i.e., repudiates) the signature. Not me trying to disown my own signature ๐Ÿ’€

The format can be considered as an extension to RFC 3852 and RFC 2634. Where it makes sense, extra signed and unsigned attributes have been defined. โœจ

The contents of this Informational RFC are basically a transposition of the ETSI Technical Specification (TS) 101 733 V.1.7.4 (CMS Advanced Electronic Signatures -- CAdES), and they're technically equivalent to it. ๐Ÿงš

The technical contents of this specification are maintained by ETSI. The ETSI TS and further updates are available free of charge at: http://www.etsi.org/WebSite/Standards/StandardsDownload.aspx ๐ŸŒˆ

Table of Contents ๐Ÿ—‚๏ธ

1. Introduction ....................................................6
2. Scope ...........................................................6
3. Definitions and Abbreviations ...................................8
   3.1. Definitions ................................................8
   3.2. Abbreviations .............................................11
4. Overview .......................................................12
   4.1. Major Parties .............................................13
   4.2. Signature Policies ........................................14
   4.3. Electronic Signature Formats ..............................15
        4.3.1. CAdES Basic Electronic Signature (CAdES-BES) .......15
        4.3.2. CAdES Explicit Policy-based Electronic
               Signatures (CAdES-EPES) ............................18
   4.4. Electronic Signature Formats with Validation Data .........19
        4.4.1. Electronic Signature with Time (CAdES-T) ...........20
        4.4.2. ES with Complete Validation Data References
               (CAdES-C) ..........................................21
        4.4.3. Extended Electronic Signature Formats ..............23
               4.4.3.1. EXtended Long Electronic Signature
                        (CAdES-X Long) ............................24
               4.4.3.2. EXtended Electronic Signature with
                        Time Type 1 ...............................25
               4.4.3.3. EXtended Electronic Signature with
                        Time Type 2 ...............................26
               4.4.3.4. EXtended Long Electronic Signature
                        with Time (CAdES-X Long ...................27
        4.4.4. Archival Electronic Signature (CAdES-A) ............27
   4.5. Arbitration ...............................................28
   4.6. Validation Process ........................................29
5. Electronic Signature Attributes ................................30
   5.1. General Syntax ............................................30
   5.2. Data Content Type .........................................30
   5.3. Signed-data Content Type ..................................30
   5.4. SignedData Type ...........................................31
   5.5. EncapsulatedContentInfo Type ..............................31
   5.6. SignerInfo Type ...........................................31
        5.6.1. Message Digest Calculation Process .................32
        5.6.2. Message Signature Generation Process ...............32
        5.6.3. Message Signature Verification Process .............32
   5.7. Basic ES Mandatory Present Attributes .....................32
        5.7.1. content-type .......................................32
        5.7.2. Message Digest .....................................33
        5.7.3. Signing Certificate Reference Attributes ...........33
               5.7.3.1. ESS signing-certificate Attribute
                        Definition ................................34
               5.7.3.2. ESS signing-certificate-v2
                        Attribute Definition ......................34

okay bestie, here's the rest of the map ๐Ÿ—บ๏ธโœจ the TOC keeps going, and every number and page is exactly where it should be ๐Ÿ’…

                  5.7.3.3. Other signing-certificate
                           Attribute Definition ......................35
      5.8. Additional Mandatory Attributes for Explicit
           Policy-based Electronic Signatures ........................36
           5.8.1. signature-policy-identifier ........................36
      5.9. CMS Imported Optional Attributes ..........................38
           5.9.1. signing-time .......................................38
           5.9.2. countersignature ...................................39
      5.10. ESS-Imported Optional Attributes .........................39
           5.10.1. content-reference Attribute .......................39
           5.10.2. content-identifier Attribute ......................39
           5.10.3. content-hints Attribute ...........................40
      5.11. Additional Optional Attributes Defined in the
            Present Document .........................................40
           5.11.1. commitment-type-indication Attribute ..............41
           5.11.2. signer-location Attribute .........................43
           5.11.3. signer-attributes Attribute .......................43
           5.11.4. content-time-stamp Attribute ......................44
      5.12. Support for Multiple Signatures ..........................44
           5.12.1. Independent Signatures ............................44
           5.12.2. Embedded Signatures ...............................45
   6. Additional Electronic Signature Validation Attributes ..........45
      6.1. signature time-stamp Attribute (CAdES-T) ..................47
           6.1.1. signature-time-stamp Attribute Definition ..........47
      6.2. Complete Validation Data References (CAdES-C) .............48
           6.2.1. complete-certificate-references Attribute
                  Definition .........................................48
           6.2.2. complete-revocation-references Attribute
                  Definition .........................................49
           6.2.3. attribute-certificate-references Attribute
                  Definition .........................................51
           6.2.4. attribute-revocation-references Attribute
                  Definition .........................................52
      6.3. Extended Validation Data (CAdES-X) ........................52
           6.3.1. Time-Stamped Validation Data (CAdES-X Type
                  1 or Type 2) .......................................53
           6.3.2. Long Validation Data (CAdES-X Long, CAdES-X
                  Long Type 1 or 2) ..................................53
           6.3.3. certificate-values Attribute Definition ............54
           6.3.4. revocation-values Attribute Definition .............54
           6.3.5. CAdES-C-time-stamp Attribute Definition ............56
           6.3.6. time-stamped-certs-crls-references
                  Attribute Definition ...............................57
      6.4. Archive Validation Data ...................................58
           6.4.1. archive-time-stamp Attribute Definition ............58
   7. Other Standard Data Structures .................................60
      7.1. Public Key Certificate Format .............................60
      7.2. Certificate Revocation List Format ........................60
      7.3. OCSP Response Format ......................................60
      7.4. Time-Stamp Token Format ...................................60
      7.5. Name and Attribute Formats ................................60
      7.6. AttributeCertificate ......................................61
   8. Conformance Requirements .......................................61
      8.1. CAdES-Basic Electronic Signature (CAdES-BES) ..............62
      8.2. CAdES-Explicit Policy-based Electronic Signature ..........63
      8.3. Verification Using Time-Stamping ..........................63
      8.4. Verification Using Secure Records .........................63
   9. References .....................................................64
      9.1. Normative References ......................................64
      9.2. Informative References ....................................65
   Annex A (normative): ASN.1 Definitions ............................69
           A.1. Signature Format Definitions Using
                X.208 ASN.1 Syntax ...................................69
           A.2. Signature Format Definitions Using
                X.680 ASN.1 Syntax ...................................77
   Annex B (informative): Extended Forms of Electronic Signatures ....86
           B.1. Extended Forms of Validation Data ....................86
                B.1.1. CAdES-X Long ..................................87
                B.1.2. CAdES-X Type 1 ................................88
                B.1.3. CAdES-X Type 2 ................................90
                B.1.4. CAdES-X Long Type 1 and CAdES-X Long Type 2 ...91
           B.2. Time-Stamp Extensions ................................93
           B.3. Archive Validation Data (CAdES-A) ....................94
           B.4. Example Validation Sequence ..........................97
           B.5. Additional Optional Features ........................102
   Annex C (informative): General Description .......................103
           C.1. The Signature Policy ................................103
           C.2. Signed Information ..................................104
           C.3. Components of an Electronic Signature ...............104
                C.3.1. Reference to the Signature Policy ............104
                C.3.2. Commitment Type Indication ...................105
                C.3.3. Certificate Identifier from the Signer .......106
                C.3.4. Role Attributes ..............................106
                       C.3.4.1.  Claimed Role .......................107
                       C.3.4.2.  Certified Role .....................107
                C.3.5. Signer Location ..............................108
                C.3.6. Signing Time .................................108
                C.3.7. Content Format ...............................108
                C.3.8. content-hints ................................109
                C.3.9. Content Cross-Referencing ....................109
           C.4. Components of Validation Data .......................109
                C.4.1. Revocation Status Information ................109
                       C.4.1.1. CRL Information .....................110
                       C.4.1.2. OCSP Information ....................110
                C.4.2. Certification Path ...........................111
                C.4.3. Time-stamping for Long Life of Signatures ....111
                C.4.4. Time-stamping for Long Life of Signature
                       before CA key Compromises ....................113
                        C.4.4.1. Time-stamping the ES with
                                 Complete Validation Data ...........113
                        C.4.4.2. Time-Stamping Certificates and
                                 Revocation Information References ..114
                C.4.5. Time-stamping for Archive of Signature .......115
                C.4.6. Reference to Additional Data .................116
                C.4.7. Time-Stamping for Mutual Recognition .........116
                C.4.8. TSA Key Compromise ...........................117
           C.5. Multiple Signatures .................................118
   Annex D (informative): Data Protocols to Interoperate with TSPs ..118
           D.1. Operational Protocols ...............................118
                D.1.1. Certificate Retrieval ........................118
                D.1.2. CRL Retrieval ................................118
                D.1.3. Online Certificate Status ....................119
                D.1.4. Time-Stamping ................................119
           D.2. Management Protocols ................................119
                D.2.1. Request for Certificate Revocation ...........119
   Annex E (informative): Security Considerations ...................119
           E.1. Protection of Private Key ...........................119
           E.2. Choice of Algorithms ................................119
   Annex F (informative): Example Structured Contents and MIME ......120
           F.1. General Description .................................120
                F.1.1. Header Information ...........................120
                F.1.2. Content Encoding .............................121
                F.1.3. Multi-Part Content ...........................121
           F.2. S/MIME ..............................................122
                F.2.1. Using application/pkcs7-mime .................123
                F.2.2. Using application/pkcs7-signature ............124
   Annex G (informative): Relationship to the European Directive
                          and EESSI .................................125
           G.1. Introduction ........................................125
           G.2. Electronic Signatures and the Directive .............126
           G.3. ETSI Electronic Signature Formats and the Directive .127
           G.4. EESSI Standards and Classes of Electronic Signature .127
                G.4.1. Structure of EESSI Standardization ...........127
                G.4.2. Classes of Electronic Signatures .............128
                G.4.3. Electronic Signature Classes and the ETSI
                       Electronic Signature Format ..................128
   Annex H (informative): APIs for the Generation and Verification
                          of Electronic Signatures Tokens ...........129
           H.1. Data Framing ........................................129
           H.2. IDUP-GSS-APIs Defined by the IETF ...................131
           H.3. CORBA Security Interfaces Defined by the OMG ........132
   Annex I (informative): Cryptographic Algorithms ..................133
           I.1. Digest Algorithms ...................................133
                I.1.1. SHA-1 ........................................133
                I.1.2. General ......................................133
           I.2. Digital Signature Algorithms ........................134
                I.2.1. DSA ..........................................134
                I.2.2. RSA ..........................................135
                I.2.3. General ......................................135
   Annex J (informative): Guidance on Naming ........................137
           J.1. Allocation of Names .................................137
           J.2. Providing Access to Registration Information ........138
           J.3. Naming Schemes ......................................138
                J.3.1. Naming Schemes for Individual Citizens .......138
                J.3.2. Naming Schemes for Employees of an
                       Organization .................................139

1. Introduction โœจ

Okay bestie, this doc is all about electronic signatures for every kind of transaction ๐Ÿ’… like business stuff (purchase requisitions, contracts, invoices) where the signature needs to stay valid for ages ๐Ÿ“œ. It covers evidence that the signature is still good even if the signer or the verifying party later tries to deny it (repudiate, see ISO/IEC 10181-5 [ISO10181-5]) ๐Ÿ™…โ€โ™€๏ธ literally iconic protection.

So this can be used for any transaction between an individual and a company, between two companies, between an individual and a governmental body, etc. ๐ŸŒˆ It's independent of any environment, so it works with smart cards, Global System for Mobile Communication Subscriber Identity Module (GSM SIM) cards, special programs for electronic signatures, etc. ๐Ÿงš

The European Directive on a community framework for Electronic Signatures defines an electronic signature as: "Data in electronic form which is attached to or logically associated with other electronic data and which serves as a method of authentication". ๐ŸŽ€

And an electronic signature, as used in this document, is a form of advanced electronic signature, as defined in the Directive ๐Ÿ”ฅ that's the main character energy right there.


2. Scope

Okay so the scope is ONLY electronic signature formats ๐Ÿ’– no more, no less. The aspects of Electronic Signature Policies are defined in RFC 3125 [RFC3125] and ETSI TR 102 272 [TR102272], so those are a different story ๐Ÿฆ‹

This document defines a number of electronic signature formats, including ones that can remain valid over long periods โณ and it includes evidence that the signature is valid even if the signer or verifying party later tries to deny (repudiate) the validity of the electronic signature. Not me doubting it ๐Ÿ’…

It also specifies the use of Trusted Service Providers (e.g., Time-Stamping Authorities) and the data that needs to be archived (e.g., cross-certificates and revocation lists) to meet the requirements of long-term electronic signatures ๐Ÿซถ

An electronic signature, as defined by this document, can be used for arbitration in case of a dispute between the signer and verifier, which may happen at some later time, even years later ๐Ÿ’€ yes, years.

The document includes the concept of signature policies that can be used to establish technical consistency when validating electronic signatures, but it does not mandate their use ๐ŸŒธ totally optional, no pressure.

This document is based on the use of public key cryptography to produce digital signatures, supported by public key certificates ๐Ÿ” It also specifies the use of time-stamping and time-marking services to prove the validity of a signature long after the normal lifetime of critical elements of an electronic signature โœจ And as an option, it also defines ways to provide very long-term protection against key compromise or weakened algorithms ๐Ÿ›ก๏ธ extra protection, lowkey genius.

This document builds on existing standards that are widely adopted. These include:

  • RFC 3852 [4]: "Cryptographic Message Syntax (CMS)";
  • ISO/IEC 9594-8/ITU-T Recommendation X.509 [1]: "Information technology - Open Systems Interconnection - The Directory: Authentication framework";
  • RFC 3280 [2]: "Internet X.509 Public Key Infrastructure (PKIX) Certificate and Certificate Revocation List (CRL) Profile";
  • RFC 3161 [7]: "Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)".
NOTE: See Section 11 for a full set of references. ๐Ÿ“š

This document describes formats for advanced electronic signatures using ASN.1 (Abstract Syntax Notation 1) [14]. ASN.1 is encoded using X.690 [16] ๐Ÿค“

These formats are based on CMS (Cryptographic Message Syntax) defined in RFC 3852 [4]. That's why these electronic signatures are called CAdES, for "CMS Advanced Electronic Signatures" ๐ŸŽ€ the naming is giving organized.

Another document, TS 101 903 [TS101903], describes formats for XML advanced electronic signatures (XAdES) built on XMLDSIG as specified in [XMLDSIG] ๐Ÿ’œ

This document also identifies other documents that define formats for Public Key Certificates, Attribute Certificates, and Certificate Revocation Lists, plus supporting protocols, including protocols for use by trusted third parties to support the operation of electronic signature creation and validation ๐Ÿงšโ€โ™€๏ธ

Informative annexes include:

  • illustrations of extended forms of Electronic Signature formats that protect against various vulnerabilities and examples of validation processes (Annex B);
  • descriptions and explanations of some of the concepts used in this document, giving a rationale for normative parts of this document (Annex C);
  • information on protocols to interoperate with Trusted Service Providers (Annex D);
  • guidance on naming (Annex E);
  • an example structured content and MIME (Annex F);
  • the relationship between this document and the directive on electronic signature and associated standardization initiatives (Annex G);
  • APIs to support the generation and verification of electronic signatures (Annex H);
  • cryptographic algorithms that may be used (Annex I); and
  • naming schemes (see Annex J). ๐Ÿ“

3. Definitions and Abbreviations

3.1. Definitions

Here are the terms and definitions that apply for this document. Read these, they're the vocab list ๐Ÿ“–โœจ

Arbitrator: an arbitrator entity may be used to arbitrate a dispute between a signer and verifier when there is a disagreement on the validity of a digital signature.

Attribute Authority (AA): an authority that assigns privileges by issuing attribute certificates.

Authority Certificate: a certificate issued to an authority (e.g., either to a certification authority or an attribute authority).

Attribute Authority Revocation List (AARL): a revocation list containing a list of references to certificates issued to AAs that are no longer considered valid by the issuing authority.

Attribute Certificate Revocation List (ACRL): a revocation list containing a list of references to attribute certificates that are no longer considered valid by the issuing authority.

Certification Authority Revocation List (CARL): a revocation list containing a list of public key certificates issued to certification authorities that are no longer considered valid by the certificate issuer.

Certification Authority (CA): an authority trusted by one or more users to create and assign public key certificates; optionally, the certification authority may create the users' keys.

NOTE: See ITU-T Recommendation X.509 [1].

Certificate Revocation List (CRL): a signed list indicating a set of public key certificates that are no longer considered valid by the certificate issuer.

Digital Signature: data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery, e.g., by the recipient.

NOTE: See ISO 7498-2 [ISO7498-2].

Electronic Signature: data in electronic form that is attached to or logically associated with other electronic data and that serves as a method of authentication.

NOTE: See Directive 1999/93/EC of the European Parliament and of the Council of 13 December 1999 on a Community framework for electronic signatures [EUDirective].

Extended Electronic Signatures: electronic signatures enhanced by complementing the baseline requirements with additional data, such as time-stamp tokens and certificate revocation data, to address commonly recognized threats. ๐Ÿ›ก๏ธ

Explicit Policy-based Electronic Signature (EPES): an electronic signature where the signature policy that shall be used to validate it is explicitly specified.

Grace Period: a time period that permits the certificate revocation information to propagate through the revocation process to relying parties. โฐ

Initial Verification: a process performed by a verifier done after an electronic signature is generated in order to capture additional information that could make it valid for long-term verification.

Public Key Certificate (PKC): public keys of a user, together with some other information, rendered unforgeable by encipherment with the private key of the certification authority that issued it.

NOTE: See ITU-T Recommendation X.509 [1].

Rivest-Shamir-Adleman (RSA): an asymmetric cryptography algorithm based on the difficulty to factor very large numbers using a key pair: a private key and a public key. ๐Ÿ”‘

Signature Policy: a set of rules for the creation and validation of an electronic signature that defines the technical and procedural requirements for electronic signature creation and validation, in order to meet a particular business need, and under which the signature can be determined to be valid.

Signature Policy Issuer: an entity that defines and issues a signature policy.

Signature Validation Policy: part of the signature policy that specifies the technical requirements on the signer in creating a signature and verifier when validating a signature.

Signer: an entity that creates an electronic signature. โœ๏ธ

Subsequent Verification: a process performed by a verifier to assess the signature validity.

NOTE: Subsequent verification may be done even years after the electronic signature was produced by the signer and completed by the initial verification, and it might not need to capture more data than those captured at the time of initial verification.

Time-Stamp Token: a data object that binds a representation of a datum to a particular time, thus establishing evidence that the datum existed before that time. ๐Ÿ•ฐ๏ธ

Time-Mark: information in an audit trail from a Trusted Service Provider that binds a representation of a datum to a particular time, thus establishing evidence that the datum existed before that time.

Time-Marking Authority: a trusted third party that creates records in an audit trail in order to indicate that a datum existed before a particular point in time.

Time-Stamping Authority (TSA): a trusted third party that creates time-stamp tokens in order to indicate that a datum existed at a particular point in time.

Time-Stamping Unit (TSU): a set of hardware and software that is managed as a unit and has a single time-stamp token signing key active at a time.

Trusted Service Provider (TSP): an entity that helps to build trust relationships by making available or providing some information upon request. ๐Ÿค

Validation Data: additional data that may be used by a verifier of electronic signatures to determine that the signature is valid.

Valid Electronic Signature: an electronic signature that passes validation. โœ…

Verifier: an entity that verifies evidence.

NOTE 1: See ISO/IEC 13888-1 [ISO13888-1].
NOTE 2: Within the context of this document, this is an entity that validates an electronic signature. ๐Ÿ’œ

3.2. Abbreviations โœจ

Okay bestie, here's the full acronym line-up for this doc ๐Ÿ’… For the purposes of this document, these abbreviations apply:

   AA           Attribute Authority
   AARL         Attribute Authority Revocation List
   ACRL         Attribute Certificate Revocation List
   API          Application Program Interface
   ASCII        American Standard Code for Information Interchange
   ASN.1        Abstract Syntax Notation 1
   CA           Certification Authority
   CAD          Card Accepting Device
   CAdES        CMS Advanced Electronic Signature
   CAdES-A      CAdES with Archive validation data
   CAdES-BES    CAdES Basic Electronic Signature
   CAdES-C      CAdES with Complete validation data
   CAdES-EPES   CAdES Explicit Policy Electronic Signature
   CAdES-T      CAdES with Time
   CAdES-X      CAdES with eXtended validation data
   CAdES-X Long CAdES with EXtended Long validation data
   CARL         Certification Authority Revocation List
   CMS          Cryptographic Message Syntax
   CRL          Certificate Revocation List
   CWA          CEN (European Committee for Standardization) Workshop
                Agreement
   DER          Distinguished Encoding Rules (for ASN.1)
   DSA          Digital Signature Algorithm
   EDIFACT      Electronic Data Interchange For Administration,
                Commerce and Transport
   EESSI        European Electronic Signature Standardization
                Initiative
   EPES         Explicit Policy-based Electronic Signature
   ES           Electronic Signature
   ESS          Enhanced Security Services (enhances CMS)
   IDL          Interface Definition Language
   MIME         Multipurpose Internet Mail Extensions
   OCSP         Online Certificate Status Provider
   OID          Object IDentifier
   PKC          Public Key Certificate
   PKIX         Public Key Infrastructure using X.509
                (IETF Working Group)
   RSA          Rivest-Shamir-Adleman
   SHA-1        Secure Hash Algorithm 1
   TSA          Time-Stamping Authority
   TSP          Trusted Service Provider
   TST          Time-Stamp Token
   TSU          Time-Stamping Unit
   URI          Uniform Resource Identifier
   URL          Uniform Resource Locator
   XML          Extensible Markup Language
   XMLDSIG      XML Digital Signature

4. Overview ๐Ÿฆ‹

okay so this section is basically the tour guide ๐Ÿ—บ๏ธ The present document defines a bunch of Electronic Signature (ES) formats that build on CMS (RFC 3852 [4]) by adding signed and unsigned attributes. Iconic architecture, no notes โœจ

This section:

  • gives you an intro to the major parties involved (Section 4.1),
  • introduces the concept of signature policies (Section 4.2),
  • gives an overview of the various ES formats (Section 4.3),
  • introduces the concept of validation data, and gives an overview of formats that include validation data (Section 4.4), and
  • shares relevant considerations on arbitration (Section 4.5) and for the validation process (Section 4.6).

The formal specs for the attributes live in Sections 5 and 6, and Annexes C and D explain the reasoning behind the different ES forms ๐Ÿงš

4.1. Major Parties ๐Ÿ‘‘

The major parties in a business transaction supported by electronic signatures, as defined in this document, are:

  • the signer;
  • the verifier;
  • Trusted Service Providers (TSP); and
  • the arbitrator.

The signer is the entity that creates the electronic signature. When the signer digitally signs data using the prescribed format, that's a commitment from the signing entity to the data being signed. Literally a promise in code ๐Ÿซถ

The verifier is the entity that validates the electronic signature. It can be one entity or several, no judgement ๐Ÿ’œ

The Trusted Service Providers (TSPs) are one or more entities that help build trust between the signer and verifier. They back up the signer and verifier with supporting services, like user certificates, cross-certificates, time-stamp tokens, CRLs, ARLs, and OCSP responses. These TSPs support the functions defined in this document:

  • Certification Authorities;
  • Registration Authorities;
  • CRL Issuers;
  • OCSP Responders;
  • Repository Authorities (e.g., a Directory);
  • Time-Stamping Authorities;
  • Time-Marking Authorities; and
  • Signature Policy Issuers.

Certification Authorities hand out public key certificates and run a revocation service ๐ŸŽ€

Registration Authorities handle identifying and registering entities before a CA generates certificates. Gatekeepers, but make it cute ๐ŸŒธ

Repository Authorities publish CRLs issued by CAs, signature policies issued by Signature Policy Issuers, and optionally public key certificates. The "optionally" is doing a lot of work here ๐Ÿ™ˆ

Time-Stamping Authorities attest that some data was formed before a given trusted time โฐ

Time-Marking Authorities record that some data was formed before a given trusted time. Super similar vibes to the stamping ones, just a different job title โœจ

Signature Policy Issuers define the signature policies that signers and verifiers use ๐Ÿ“œ

In some cases, the following extra TSP is needed:

  • Attribute Authorities.

Attributes Authorities hand out attributes linked to public key certificates ๐Ÿงšโ€โ™€๏ธ

An Arbitrator is an entity that settles disputes between a signer and a verifier. The referee of the group chat โš–๏ธ

4.2. Signature Policies ๐Ÿ’…

This document includes the concept of signature policies, which can be used to establish technical consistency when validating electronic signatures. It's giving "everyone reads the same rulebook" ๐Ÿ“–

When a comprehensive signature policy used by the verifier is either explicitly indicated by the signer or implied by the data being signed, then a consistent result can be obtained when validating an electronic signature. โœจ

When the signature policy the verifier uses is neither indicated by the signer nor derivable from other data, or the signature policy is incomplete, then verifiers, including arbitrators, may get different results when validating an electronic signature. Ngl that's the chaos scenario ๐Ÿ’€ So comprehensive signature policies that keep signature validation consistent are recommended from both the signer's and the verifier's point of view ๐Ÿ”ฅ

Further info on signature policies is in:

  • TR 102 038 [TR102038];
  • Sections 5.8.1, C.1, and C.3.1 of this document;
  • RFC 3125 [RFC3125]; and
  • TR 102 272 [TR102272].

4.3. Electronic Signature Formats ๐ŸŒˆ

This section gives an overview of two forms of CMS advanced electronic signature specified in this document: the CAdES Basic Electronic Signature (CAdES-BES) and the CAdES Explicit Policy-based Electronic Signature (CAdES-EPES). Conformance to this document mandates that the signer create one of these formats ๐Ÿฆ‹ Main character energy for both of them!

4.3.1. CAdES Basic Electronic Signature (CAdES-BES) ๐ŸŽ€

okay so a CAdES Basic Electronic Signature (CAdES-BES) ๐Ÿ’–, per this doc, has four must-have parts:

  • the signed user data (aka the signer's document), as defined in CMS (RFC 3852 [4]);
  • a collection of mandatory signed attributes, as defined in CMS (RFC 3852 [4]) and in ESS (RFC 2634 [5]);
  • additional mandatory signed attributes, defined right here in this doc; and
  • the digital signature value, computed on the user data and, when present, on the signed attributes, as defined in CMS (RFC 3852 [4]).

it can also have extras: ๐ŸŒธ

  • a collection of additional signed attributes; and
  • a collection of optional unsigned attributes.

the mandatory signed attributes are:

  • Content-type ๐Ÿงš. it's defined in RFC 3852 [4] and says what type the EncapsulatedContentInfo value being signed is. the details are in Section 5.7.1 of this doc, and the reasoning for including it is in Annex C.3.7.
  • Message-digest ๐Ÿ’…. defined in RFC 3852 [4], it specifies the message digest of the eContent OCTET STRING within encapContentInfo being signed. details are in Section 5.7.2.
  • ESS signing-certificate OR ESS signing-certificate-v2 ๐Ÿ‘‘. the ESS signing-certificate attribute is defined in Enhanced Security Services (ESS), RFC 2634 [5], and it only allows SHA-1 as a digest algorithm (ew ๐Ÿ˜ญ). the ESS signing-certificate-v2 attribute is defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], and it allows any digest algorithm (much better โœจ). a CAdES-BES claiming compliance with this doc must include one of them. Section 5.7.3 has the details, and the rationale is in Annex C.3.3.

optional signed attributes can be added to the CAdES-BES, including ones defined in CMS (RFC 3852 [4]), ESS (RFC 2634 [5]), and this doc. here are the optional ones that are defined in Section 5 and have a rationale in Annex C, iykyk ๐Ÿฆ‹:

  • Signing-time โฐ: as defined in CMS (RFC 3852 [4]), it shows the time of the signature, as claimed by the signer. details and a short rationale are in Section 5.9.1, and Annex C.3.6 has the full rationale.
  • content-hints ๐Ÿ“: as defined in ESS (RFC 2634 [5]), it gives info describing the innermost signed content of a multi-layer message, where one content is encapsulated in another. Section 5.10.1 has the specification details, and Annex C.3.8 has the rationale.
  • content-reference ๐Ÿ”—: as defined in ESS (RFC 2634 [5]), it can be used to link request and reply messages in an exchange between two parties. Section 5.10.1 has the specification details, and Annex C.3.9 has the rationale.
  • content-identifier ๐Ÿชช: as defined in ESS (RFC 2634 [5]), it contains an identifier that may be used later on in the previous content-reference attribute. Section 5.10.2 has the specification details.
  • commitment-type-indication ๐Ÿค: this one is defined by this doc as a way to indicate the commitment the signer endorses when producing the signature. Section 5.11.1 has the specification details, and Annex C.3.2 has the rationale.
  • signer-location ๐Ÿ“: defined by this doc. it lets the signer indicate the place where the signer purportedly produced the signature. Section 5.11.2 has the specification details, and Annex C.3.5 has the rationale.
  • signer-attributes ๐ŸŽญ: also defined by this doc. it lets a claimed or certified role be incorporated into the signed information. Section 5.11.3 has the specification details, and Annex C.3.4 has the rationale.
  • content-time-stamp โณ: defined by this doc too. it lets a time-stamp token of the data to be signed be incorporated into the signed information, which gives proof that the data existed before the signature was created. Section 5.11.4 has the specification details, and Annex C.3.6 has the rationale.

a CAdES-BES form can also include unsigned attributes, as defined in CMS (RFC 3852 [4]) and ESS (RFC 2634 [5]):

  • CounterSignature ๐Ÿชž, as defined in CMS (RFC 3852 [4]). it can be used wherever embedded signatures (that's a signature on a previous signature) are needed. Section 5.9.2 has the specification details, and Annex C.5 in Annex C has the rationale.

here's the structure of the CAdES-BES, illustrated in Figure 1 ๐Ÿฆ‹:

                +------Elect.Signature (CAdES-BES)------+
                |+----------------------------------- + |
                ||+---------+ +----------+            | |
                |||Signer's | |  Signed  |  Digital   | |
                |||Document | |Attributes| Signature  | |
                |||         | |          |            | |
                ||+---------+ +----------+            | |
                |+------------------------------------+ |
                +---------------------------------------+

Figure 1: Illustration of a CAdES-BES

the signer's conformance requirements for a CAdES-BES are defined in Section 8.1. ๐Ÿ“‹

NOTE: The CAdES-BES is the minimum format for an electronic signature to be generated by the signer. On its own, it does not provide enough information for it to be verified in the longer term. For example, revocation information issued by the relevant certificate status information issuer needs to be available for long-term validation (see Section 4.4.2).

the CAdES-BES satisfies the legal requirements for electronic signatures, as defined in the European Directive on Electronic Signatures (see Annex C for more on how this doc relates to the Directive). it provides basic authentication and integrity protection. ๐Ÿ”

the semantics of the signed data of a CAdES-BES, or its context, may implicitly indicate a signature policy to the verifier. ๐Ÿง 

specifying the contents of signature policies is outside the scope of this doc. still, more info on signature policies is in TR 102 038 [TR102038], RFC 3125 [RFC3125], and Sections 5.8.1, C.1, and C.3.1 of this doc. ๐Ÿ“š


4.3.2. CAdES Explicit Policy-based Electronic Signatures (CAdES-EPES) ๐Ÿ’œ

a CAdES Explicit Policy-based Electronic Signature (CAdES-EPES), per this doc, takes the electronic signature definition and extends it so it conforms to an identified signature policy. ๐ŸŒˆ

a CAdES-EPES includes a signed attribute (the sigPolicyID attribute) that indicates the signature policy that shall be used to validate the electronic signature. this signed attribute is protected by the signature. the signature may also have other signed attributes required to conform to the mandated signature policy. ๐Ÿ›ก๏ธ

Section 5.7.3 has the details on the signature-policy-identifier attribute spec. Annex C.1 has a short rationale. again, specifying the contents of signature policies is outside the scope of this doc. โœ‹

more info on signature policies is in TR 102 038 [TR102038] and Sections 5.8.1, C.1, and C.3.1 of this doc.

here's the structure of the CAdES-EPES, illustrated in Figure 2 ๐Ÿงš:

          +------------- Elect.Signature (CAdES-EPES) ---------------+
          |                                                          |
          |+-------------------------------------------------------+ |
          || +-----------+                                         | |
          || |           |   +---------------------------+         | |
          || |           |   |   +----------+            |         | |
          || | Signer's  |   |   |Signature | Signed     | Digital | |
          || | Document  |   |   |Policy ID | Attributes |Signature| |
          || |           |   |   +----------+            |         | |
          || |           |   +---------------------------+         | |
          || +-----------+                                         | |
          |+-------------------------------------------------------+ |
          |                                                          |
          +----------------------------------------------------------+

Figure 2: Illustration of a CAdES-EPES

the signer's conformance requirements for CAdES-EPES are defined in Section 8.2. ๐Ÿ“‹


4.4. Electronic Signature Formats with Validation Data ๐Ÿซถ

validating an electronic signature, per this doc, needs extra data to do the job. this is called validation data, and it includes: ๐Ÿ”

  • Public Key Certificates (PKCs);
  • revocation status information for each PKC;
  • trusted time-stamps applied to the digital signature, otherwise a time-mark shall be available in an audit log.
  • when appropriate, the details of a signature policy to be used to verify the electronic signature.

the validation data may be collected by the signer and/or the verifier. when the signature-policy-identifier signed attribute is present, it shall meet the requirements of the signature policy. ๐Ÿงพ

validation data includes CA certificates, plus revocation status information in the form of Certificate Revocation Lists (CRLs) or certificate status information (OCSP) provided by an online service. it also includes evidence that the signature was created before a particular point in time, which can be either a time-stamp token or a time-mark. โฑ๏ธ

this doc defines unsigned attributes that can hold validation data and be added to CAdES-BES and CAdES-EPES, which leads to electronic signature formats that include validation data. the sections below summarize these formats and their most relevant characteristics, so keep reading bestie ๐Ÿ’•โœจ

4.4.1. Electronic Signature with Time (CAdES-T) โฐโœจ

okay so a CAdES-T (electronic signature with time) ๐Ÿ•ฐ๏ธ is basically a CAdES-BES or CAdES-EPES that has trusted time attached to it. It's giving "I can prove when I signed this" ๐Ÿ’…

The trusted time can come from either of these:

  • a time-stamp attribute, added to the ES as an unsigned attribute ๐ŸŽ€; and
  • a time-mark of the ES, provided by a Trusted Service Provider ๐Ÿฆ‹

The time-stamp attribute holds a time-stamp token of the electronic signature value ๐ŸŒธ. The specification details are in Section 6.1.1, and the reasoning behind it lives in Annex C.4.3 ๐Ÿงš

A time-mark from a Trusted Service gives you a similar effect to the signature-time-stamp attribute, but no attribute gets added to the ES ๐Ÿ™ˆ That's because it's the TSP's job to produce evidence of a time-mark when it's needed. Managing time marks is outside the scope of this document, so we're not going there ๐Ÿ’œ

Trusted time is the first step toward long-term validity ๐ŸŒˆ A signature with the time-stamp attribute, or a time-marked BES/EPES, is what forms the CAdES-T. Check out Figure 3 for the visual ๐Ÿ‘‘

+-------------------------------------------------CAdES-T ---------+
|+------ CAdES-BES or CAdES-EPES -------+                          |
||+-----------------------------------+ | +----------------------+ |
|||+---------+ +----------+           | | |                      | |
||||Signer's | |  Signed  |  Digital  | | | Signature-time-stamp | |
||||Document | |Attributes| Signature | | | attribute required   | |
||||         | |          |           | | | when using time      | |
|||+---------+ +----------+           | | | stamps.              | |
||+-----------------------------------+ | |                      | |
|+--------------------------------------+ | or the BES/EPES      | |
|                                         | shall be time-marked | |
|                                         |                      | |
|                                         | Management and       | |
|                                         | provision of time    | |
|                                         | mark is the          | |
|                                         | responsibility of    | |
|                                         | the TSP.             | |
|                                         +----------------------+ |
+------------------------------------------------------------------+

Figure 3: Illustration of CAdES-T formats

๐Ÿ“ NOTE 1: A time-stamp token gets added to the CAdES-BES or CAdES-EPES as an unsigned attribute.
๐Ÿ“ NOTE 2: Time-stamp tokens can themselves include unsigned attributes that are needed to validate the time-stamp token, like the complete-certificate-references and complete-revocation-references attributes, as defined by this document. ๐Ÿซถ

4.4.2. ES with Complete Validation Data References (CAdES-C) ๐Ÿ”

Electronic Signature with Complete validation data references (CAdES-C) ๐Ÿ’–, in accordance with this document, takes a CAdES-T and adds the complete-certificate-references and complete-revocation-references attributes, as defined by this document. The complete-certificate-references attribute holds references to every certificate in the certification path used to verify the signature ๐Ÿ“œ The complete-revocation-references attribute holds references to the CRLs and/or OCSP responses used to verify the signature ๐Ÿ” Section 6.2 has the specification details. Storing these references means the certification path values and the CRL or OCSP responses can be kept somewhere else, which shrinks the size of a stored electronic signature format ๐Ÿงณ

Sections C.4.1 to C.4.2 explain why you'd use validation data and when it makes sense to generate the CAdES-C form โœจ The electronic signature with the extra validation data (the CAdES-C) is shown in Figure 4 ๐Ÿฆ‹

+------------------------- CAdES-C --------------------------------+
|+----------------------------- CAdES-T ---------+                 |
||                                  +----------+ | +-------------+ |
||                                  |Timestamp | | |             | |
||                                  |attribute | | |             | |
||+- CAdES-BES or CAdES-EPES ------+|over      | | |             | |
|||                                ||digital   | | | Complete    | |
|||+---------++----------+         ||signature | | | certificate | |
||||Signer's ||  Signed  | Digital ||is        | | |     and     | |
||||Document ||Attributes|Signature||mandatory | | | revocation  | |
||||         ||          |         ||if is not | | | references  | |
|||+---------++----------+         ||timemarked| | |             | |
||+--------------------------------++----------+ | |             | |
|+-----------------------------------------------+ +-------------+ |
+------------------------------------------------------------------+

Figure 4: Illustration of CAdES-C format

๐Ÿ“ NOTE 1: The complete certificate and revocation references are added to the CAdES-T as an unsigned attribute.
๐Ÿ“ NOTE 2: At minimum, the signer provides the CAdES-BES or, when the signature is meant to conform to an explicit signing policy, the CAdES-EPES. ๐ŸŽ€
๐Ÿ“ NOTE 3: To cut down on the risk of repudiating signature creation, the trusted time indication needs to be as close as possible to the time the signature was created โฑ๏ธ The signer or a TSP could provide the CAdES-T. If they don't, the verifier should create the CAdES-T on first receipt of an electronic signature, because the CAdES-T gives independent evidence that the signature existed before the trusted time indication ๐Ÿ•ต๏ธโ€โ™€๏ธ
๐Ÿ“ NOTE 4: A CAdES-T trusted time indication must be created before a certificate has been revoked or expired. โš ๏ธ
๐Ÿ“ NOTE 5: The signer and TSP could provide the CAdES-C to minimise this risk. When the signer doesn't provide the CAdES-C, the verifier should create it once the required components of revocation and validation data become available, which may take a grace period โณ
๐Ÿ“ NOTE 6: A grace period lets certificate revocation information spread through the revocation processes ๐ŸŒŠ It can run from the moment an authorised entity asks for a certificate to be revoked until the information is ready for the relying party to use. To make sure the certificate wasn't revoked at the time the signature was time-marked or time-stamped, verifiers should wait until the grace period is over ๐Ÿ™Œ A signature policy may define specific values for grace periods ๐Ÿ’…

A grace period is illustrated in Figure 5 ๐ŸŒธ

           +<--------------Grace Period --------->+
----+-------+-------+--------+---------------------+----------+
    ^       ^       ^        ^                     ^          ^
    |       |       |        |                     |          |
    |       |       |        |                     |          |
Signature   |     First      |                   Second       |
 creation   |   revocation   |                  revocation    |
  time      |     status     |                    status      |
            |    checking    |                  checking      |
            |                |                                |
        Time-stamp      Certification                       Build
           or              path                            CAdES-C
        time-mark      construction
          over          & verification
        signature

Figure 5: Illustration of a grace period

๐Ÿ“ NOTE 7: CWA 14171 [CWA14171] specifies a signature validation process using CAdES-T, CAdES-C, and a grace period ๐Ÿง  Annex B has example validation processes, and Annex C.4 has more info on applying grace periods during validation ๐Ÿ“š

The verifier's conformance requirements are defined in Section 8.3 for time-stamped CAdES-C, and in Section 8.4 for time-marked CAdES-C ๐ŸŽฏ This document only defines conformance requirements for the verifier up to an ES with Complete validation data (CAdES-C). So none of the extended and archive forms of electronic signatures (defined in Sections 4.4.3 to 4.4.4) need to be implemented to hit conformance with this document ๐Ÿฆ‹

4.4.3. Extended Electronic Signature Formats ๐ŸŒˆ

CAdES-C can be extended by adding unsigned attributes to the electronic signature โœจ This document defines various unsigned attributes that apply to very long-term verification, and to preventing some disaster situations discussed in Annex C ๐Ÿงš Annex B has the details of the extended formats, all the required unsigned attributes for each type, and how they're used in the electronic signature validation process ๐Ÿ“– The sections below give an overview of the extended signature formats in this document ๐Ÿ’œ

4.4.3.1. EXtended Long Electronic Signature (CAdES-X Long) ๐Ÿ‘‘

Extended Long format (CAdES-X Long), in accordance with this document, adds the certificate-values and revocation-values attributes to the CAdES-C format ๐ŸŽ€ The first one holds the whole certificate path needed to verify the signature. The second one holds the CRLs and/OCSP responses needed to validate the signature ๐Ÿ” Together they form a known repository of certificate and revocation information for validating a CAdES-C, so that information can't get lost ๐Ÿ™Œ Sections 6.3.3 and 6.3.4 give the specification details. Annex B.1.1 explains how the format gets produced, and Annexes C4.1 to C.4.2 cover the rationale ๐Ÿซถ

The structure of the CAdES-X Long format is shown in Figure 6 ๐Ÿฆ‹

+----------------------- CAdES-X-Long -----------------------------+
|+------------------------------------ CadES-C --+                 |
||                                  +----------+ | +-------------+ |
||+------ CAdES -------------------+|Timestamp | | |             | |
|||                                ||  over    | | | Complete    | |
|||+---------++----------+         ||digital   | | | certificate | |
||||Signer's ||  Signed  | Digital ||signature | | |     and     | |
||||Document ||Attributes|Signature||          | | | revocation  | |
||||         ||          |         ||Optional  | | |    data     | |
|||+---------++----------+         ||when      | | |             | |
||+--------------------------------+|timemarked| | |             | |
||                                  +----------+ | |             | |
||                               +-------------+ | +-------------+ |
||                               | Complete    | |                 |
||                               | certificate | |                 |
||                               | and         | |                 |
||                               | revocation  | |                 |
||                               | references  | |                 |
||                               +-------------+ |                 |
|+-----------------------------------------------+                 |
|                                                                  |
+------------------------------------------------------------------+

Figure 6: Illustration of CAdES-X-Long


4.4.3.2. EXtended Electronic Signature with Time Type 1 (CAdES-X Type 1) โœจ

okay bestie, CAdES-X Type 1 ๐Ÿฆ‹ this one adds the CAdES-C-time-stamp attribute to the CAdES-C format. That attribute holds a time-stamp token that covers the CAdES-C itself, so it's basically a time stamp on the whole bundle ๐Ÿ“ฆ

It gives you integrity and trusted-time protection over all the elements and references ๐Ÿ”’ It may also protect the certificates, CRLs, and OCSP responses if a CA key, CRL key, or OCSP issuer key gets compromised later on. The full specs are in Section 6.3.5 ๐Ÿ’…

Annex B.1.2 explains how the time-stamping process gets produced, and Annex C.4.4.1 has the rationale ๐ŸŒธ

Here's how the CAdES-X Type 1 format is laid out, Figure 7 ๐ŸŽ€

  +----------------------- CAdES-X-Type 1 ------------------------------+
  |+-------------------------------------- CAdES-C -----+               |
  ||                                    +-------------+ | +-----------+ |
  ||+--------- CAdES ------------------+| Timestamp   | | |           | |
  |||                                  || over        | | |           | |
  |||+---------++----------+           || digital     | | |           | |
  ||||Signer's ||  Signed  |  Digital  || signature   | | | Timestamp | |
  ||||Document ||Attributes| Signature ||             | | |   over    | |
  ||||         ||          |           || Optional    | | | CAdES-C   | |
  |||+---------++----------+           || when        | | |           | |
  ||+----------------------------------+| time-marked | | |           | |
  ||                                    +-------------+ | |           | |
  ||                                    +-------------+ | +-----------+ |
  ||                                    | Complete    | |               |
  ||                                    | certificate | |               |
  ||                                    | and         | |               |
  ||                                    | revocation  | |               |
  ||                                    | references  | |               |
  ||                                    +-------------+ |               |
  |+----------------------------------------------------+               |
  +---------------------------------------------------------------------+

Figure 7: Illustration of CAdES-X Type 1

4.4.3.3. EXtended Electronic Signature with Time Type 2 (CAdES-X Type 2) ๐Ÿงš

Type 2 ๐ŸŒˆ this one adds the CAdES-C-time-stamped-certs-crls-references attribute to the CAdES-C format. Its content is a time-stamp token on the certification path and the revocation information references. Basically it gives integrity and trusted-time protection over all the references ๐Ÿซถ

It may protect the certificates, CRLs and OCSP responses if a CA key, CRL key or OCSP issuer key gets compromised later.

Both CAdES-X Type 1 and CAdES-X Type 2 counter the same threats ๐Ÿ˜ญ Which one you pick depends on your environment. Section 6.3.5 has the specification details, Annex B.1.3 explains how the time-stamping process gets produced, and Annex C.4.4.2 has the rationale ๐Ÿ’œ

Here's the CAdES-X Type 2 structure, Figure 8 โœจ

+------------------------- CAdES-X-Type 2 ----------------------------+
|+----------------------------------------CAdES-C ---+                |
||                                     +------------+|                |
||+----- CAdES -----------------------+| Timestamp  ||                |
|||                                   || over       ||                |
|||+---------+ +----------+           || digital    || +-------------+|
||||Signer's | |  Signed  |  Digital  || signature  || | Time-stamp  ||
||||Document | |Attributes| signature ||            || | only over   ||
||||         | |          |           || optional   || | complete    ||
|||+---------+ +----------+           || when       || | certificate ||
||+-----------------------------------+| timemarked || |    and      ||
||                                     +------------+| | revocation  ||
||                                   +-------------+ | | references  ||
||                                   | Complete    | | +-------------+|
||                                   | certificate | |                |
||                                   | and         | |                |
||                                   | revocation  | |                |
||                                   | references  | |                |
||                                   +-------------+ |                |
|+---------------------------------------------------+                |
+---------------------------------------------------------------------+

Figure 8: Illustration of CAdES-X Type 2

4.4.3.4. EXtended Long Electronic Signature with Time (CAdES-X Long Type 1 or 2) ๐Ÿ“

Extended Long with Time (CAdES-X Long Type 1 or 2) is a combo ๐Ÿค It's CAdES-X Long plus one of the two types we just covered (CAdES-X Type 1 or CAdES-X Type 2). Annex B.1.4 gives the details on how the time-stamping process gets produced, and Annex C.4.8 in Annex C has the rationale ๐ŸŒŸ

The structure of CAdES-X Long Type 1 and CAdES-X Long Type 2 is in Figure 9 ๐Ÿ‘‘

   +------------------ CAdES-X Long Type 1 or 2 -----------------------+
   |                                                   +--------------+|
   |+-------------------------------------- CAdES-C --+|+------------+||
   ||                                                 ||| Timestamp  |||
   ||+------- CAdES --------------------++----------+ |||   over     |||
   |||                                  ||Timestamp | |||  CAdES-C   |||
   |||                                  ||over      | ||+------------+||
   |||+---------++----------+           ||digital   | ||      OR      ||
   ||||Signer's ||  Signed  | Digital   ||signature | ||+------------+||
   ||||Document ||Attributes| signature ||          | ||| Timestamp  |||
   ||||         ||          |           ||Optional  | ||| only over  |||
   |||+---------++----------+           ||when      | ||| complete   |||
   ||+----------------------------------+|timemarked| ||| certificate|||
   ||                                    +----------+ |||    and     |||
   ||                                                 ||| Revocation |||
   ||                                 +-------------+ ||| References |||
   ||                                 | Complete    | ||+------------+||
   ||                                 | certificate | |+--------------+|
   ||                                 | and         | | +------------+ |
   ||                                 | revocation  | | | Complete   | |
   ||                                 | references  | | |certificate | |
   ||                                 +-------------+ | |   and      | |
   |+-------------------------------------------------+ |revocation  | |
   |                                                    |  value     | |
   |                                                    +------------+ |
   +-------------------------------------------------------------------+

Figure 9: Illustration of CAdES-X Long Type 1 and CAdES Long Type 2

4.4.4. Archival Electronic Signature (CAdES-A) ๐Ÿ—‚๏ธ

Archival Form (CAdES-A) ๐Ÿ’พ builds on a CAdES-X Long, or on a CAdES-X Long Type 1 or 2, by adding one or more archive-time-stamp attributes. It's made for archiving long-term signatures. Successive time-stamps protect the whole material against vulnerable hashing algorithms, or against the breaking of the cryptographic material or algorithms ๐Ÿ” The specs are in Section 6.4, and Sections C.4.5 and C.4.8 have the rationale ๐Ÿฆ‹

Here's how CAdES-A is structured, Figure 10 ๐ŸŒธ

  +---------------------------CAdES-A ---------------------------------+
  |+----------------------------------------------------+              |
  ||                                    +--------------+| +----------+ |
  ||+----------------------CAdES-C ----+|+------------+|| |          | |
  |||                     +----------+ ||| Timestamp  ||| |          | |
  |||+---- CAdES-BES ----+|Timestamp | |||    over    ||| |          | |
  ||||    or CAdeS-EPES  ||  over    | |||   CAdES-C  ||| |  Archive | |
  ||||                   ||digital   | ||+------------+|| |          | |
  ||||                   ||signature | ||      or      || |Timestamp | |
  ||||                   ||          | ||+------------+|| |          | |
  ||||                   ||Optional  | ||| Timestamp  ||| |          | |
  ||||                   ||when      | ||| only over  ||| |          | |
  ||||                   ||Timemarked| ||| complete   ||| |          | |
  |||+-------------------+|          | ||| certificate||| +----------+ |
  |||                     +----------+ |||    and     |||              |
  |||                  +-------------+ ||| revocation |||              |
  |||                  | Complete    | ||| references |||              |
  |||                  | certificate | ||+------------+||              |
  |||                  | and         | |+--------------+|              |
  |||                  | revocation  | | +------------+ |              |
  |||                  | references  | | |  Complete  | |              |
  |||                  +-------------+ | |certificate | |              |
  |||                                  | |    and     | |              |
  ||+----------------------------------+ |revocation  | |              |
  ||                                     |  values    | |              |
  ||                                     +------------+ |              |
  |+----------------------------------------------------+              |
  +--------------------------------------------------------------------+

Figure 10: Illustration of CAdES-A

4.5. Arbitration โš–๏ธ

Okay, the CAdES-C can be used for arbitration if the signer and verifier ever end up in a dispute ๐Ÿ˜ค But only if all of these are true:

  • the arbitrator knows where to retrieve the signer's certificate (if not already present), all the cross-certificates and the required CRLs, ACRLs, or OCSP responses referenced in the CAdES-C;
  • when time-stamping in the CAdES-T is being used, the certificate from the TSU that has issued the time-stamp token in the CAdES-T format is still within its validity period;
  • when time-stamping in the CAdES-T is being used, the certificate from the TSU that has issued the time-stamp token in the CAdES-T format is not revoked at the time of arbitration;
  • when time-marking in the CAdES-T is being used, a reliable audit trail from the Time-Marking Authority is available for examination regarding the time;
  • none of the private keys corresponding to the certificates used to verify the signature chain have ever been compromised;
  • the cryptography used at the time the CAdES-C was built has not been broken at the time the arbitration is performed; and
  • if the signature policy can be explicitly or implicitly identified, then an arbitrator is able to determine the rules required to validate the electronic signature.

4.6. Validation Process ๐Ÿ”โœจ

Okay bestie, the validation process is how we check an electronic signature, and the output status can be one of three things ๐Ÿ’…

  • invalid;
  • incomplete validation; or
  • valid.

An invalid response means either the signature format is wrong, or the digital signature value fails verification. That could be the integrity check on the digital signature value failing, or any certificate the verification depends on being known to be invalid or revoked. Big ๐Ÿ’€ energy, no cap.

An incomplete validation response means the signature validation status is currently unknown ๐Ÿคทโ€โ™€๏ธ In that case, extra info may be made available to the application or user, so they can decide what to do with the electronic signature. The signature can also be checked again later, once more info shows up. Patience is a whole vibe ๐Ÿ•ฐ๏ธ

NOTE: For example, an incomplete validation may be because all the required certificates are not available or the grace period is not completed.

A valid response means the signature passed verification and complies with the signature validation policy. Iconic ๐Ÿ‘‘

Example validation sequences are illustrated in Annex B. ๐Ÿฆ‹

5. Electronic Signature Attributes ๐ŸŽ€

This section builds on the Cryptographic Message Syntax (CMS), which is defined in RFC 3852 [4], and Enhanced Security Services (ESS), which is defined in RFC 2634 [5]. The overall structure of an Electronic Signature is as defined in CMS. The Electronic Signature (ES) uses attributes defined in CMS, ESS, and this document. This document only defines the ES attributes it uses that aren't defined anywhere else โœจ

The mandated set of attributes and the digital signature value make up the minimum Electronic Signature (ES) required by this document. A signature policy may mandate that other signed attributes be present too ๐Ÿ’–

5.1. General Syntax ๐Ÿงฉ

The general syntax of the ES is as defined in CMS (RFC 3852 [4]).

NOTE: CMS defines content types for id-data, id-signedData, id-envelopedData, id-digestedData, id-encryptedData, and id-authenticatedData. Although CMS permits other documents to define other content types, the ASN.1 type defined should not be a CHOICE type. This document does not define other content types.

5.2. Data Content Type ๐Ÿ“ฆ

The data content type of the ES is as defined in CMS (RFC 3852 [4]).

NOTE: If the content type is id-data, it is recommended that the content be encoded using MIME, and that the MIME type is used to identify the presentation format of the data. See Annex F.1 for an example of using MIME to identify the encoding type. ๐ŸŒธ

5.3. Signed-data Content Type ๐Ÿ–Š๏ธ

The Signed-data content type of the ES is as defined in CMS (RFC 3852 [4]).

5.4. SignedData Type ๐Ÿ’Œ

The syntax of the SignedData of the ES is as defined in CMS (RFC 3852 [4]).

The fields of type SignedData are as defined in CMS (RFC 3852 [4]).

The identification of a signer's certificate used to create the signature is always signed (see Section 5.7.3). The validation policy may specify requirements for the presence of certain certificates. The degenerate case, where there are no signers, is not valid in this document. Zero signers? Not it ๐Ÿ™…โ€โ™€๏ธ

5.5. EncapsulatedContentInfo Type ๐ŸŽ

The syntax of the EncapsulatedContentInfo type ES is as defined in CMS (RFC 3852 [4]).

For long-term validation, as defined by this document, it is advisable that either the eContent is present, or the data that is signed is archived in such as way as to preserve any data encoding. It is important that the OCTET STRING used to generate the signature remains the same every time either the verifier or an arbitrator validates the signature. Consistency is everything ๐Ÿง 

NOTE: The eContent is optional in CMS:

  • When it is present, this allows the signed data to be encapsulated in the SignedData structure, which then contains both the signed data and the signature. However, the signed data may only be accessed by a verifier able to decode the ASN.1 encoded SignedData structure.
  • When it is missing, this allows the signed data to be sent or stored separately from the signature, and the SignedData structure only contains the signature. It is, in the case of the signature, only the data that is signed that needs to be stored and distributed in such as way as to preserve any data encoding.

The degenerate case where there are no signers is not valid in this document. ๐Ÿ™ƒ

5.6. SignerInfo Type ๐Ÿชช

The syntax of the SignerInfo type ES is as defined in CMS (RFC 3852 [4]).

Per-signer information is represented in the type SignerInfo. In the case of multiple independent signatures (see Annex B.5), there is an instance of this field for each signer. Everyone gets their own card ๐Ÿƒ

The fields of type SignerInfo have the meanings defined in CMS (RFC 3852 [4]), but the signedAttrs field shall contain the following attributes:

  • content-type, as defined in Section 5.7.1; and
  • message-digest, as defined in Section 5.7.2;
  • signing-certificate, as defined in Section 5.7.3.

5.6.1. Message Digest Calculation Process ๐Ÿงฎ

The message digest calculation process is as defined in CMS (RFC 3852 [4]).

5.6.2. Message Signature Generation Process โœ๏ธ

The input to the message signature generation process is as defined in CMS (RFC 3852 [4]).

5.6.3. Message Signature Verification Process ๐Ÿ•ต๏ธโ€โ™€๏ธ

The procedures for message signature verification are defined in CMS (RFC 3852 [4]) and enhanced in this document. The input to the signature verification process must be the signer's public key, which shall be verified as correct using the signing certificate reference attribute containing a reference to the signing certificate. That means when SigningCertificateV2 from RFC 5035 [16] or SigningCertificate from ESS [5] is used, the public key from the first certificate identified in the sequence of certificate identifiers from SigningCertificate must be the key used to verify the digital signature. Key matching is non-negotiable ๐Ÿ”‘

5.7. Basic ES Mandatory Present Attributes ๐ŸŒŸ

The following attributes shall be present with the signed-data defined by this document. The attributes are defined in CMS (RFC 3852 [4]).

5.7.1. content-type ๐Ÿท๏ธ

The content-type attribute indicates the type of the signed content. The syntax of the content-type attribute type is as defined in CMS (RFC 3852 [4]) Section 11.1.

NOTE 1: As stated in RFC 3852 [4], the content-type attribute must have its value (i.e., ContentType) equal to the eContentType of the EncapsulatedContentInfo value being signed.

NOTE 2: For implementations supporting signature generation, if the content-type attribute is id-data, then it is recommended that the eContent be encoded using MIME. For implementations supporting signature verification, if the signed data (i.e., eContent) is MIME-encoded, then the OID of the content-type attribute must be id-data. In both cases, the MIME content-type(s) must be used to identify the presentation format of the data. See Annex F for further details about the use of MIME. ๐Ÿ“ฌ

5.7.2. Message Digest ๐Ÿ“

The syntax of the message-digest attribute type of the ES is as defined in CMS (RFC 3852 [4]).

5.7.3. Signing Certificate Reference Attributes ๐Ÿ“œ

The Signing certificate reference attributes are supported by using either the ESS signing-certificate attribute or the ESS-signing-certificate-v2 attribute.

These attributes shall contain a reference to the signer's certificate. They're designed to prevent simple substitution and reissue attacks, and to allow a restricted set of certificates to be used in verifying a signature. They have a compact form (much shorter than the full certificate) that lets a certificate be unambiguously identified. Compact and secure, the dream ๐Ÿฆ‹

One, and only one, of the following alternative attributes shall be present with the signedData, defined by this document:

  • The ESS signing-certificate attribute, defined in ESS [5], must be used if the SHA-1 hashing algorithm is used.
  • The ESS signing-certificate-v2 attribute, defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], which shall be used when other hashing algorithms are to be used.

The certificate to be used to verify the signature shall be identified in the sequence (i.e., the certificate from the signer), and the sequence shall not be empty. The signature validation policy may mandate other certificates be present, which may include all the certificates up to the trust anchor. ๐ŸŒˆ

5.7.3.1. ESS signing-certificate Attribute Definition ๐Ÿ”

The syntax of the signing-certificate attribute type of the ES is as defined in Enhanced Security Services (ESS), RFC 2634 [5], and further qualified in this document.

The sequence of the policy information field is not used in this document.

The ESS signing-certificate attribute shall be a signed attribute. The encoding of the ESSCertID for this certificate shall include the issuerSerial field.

If present, the issuerAndSerialNumber in SignerIdentifier field of the SignerInfo shall match the issuerSerial field present in ESSCertID. In addition, the certHash from ESSCertID shall match the SHA-1 hash of the certificate. The certificate identified shall be used during the signature verification process. If the hash of the certificate does not match the certificate used to verify the signature, the signature shall be considered invalid. Hash mismatch = instant โŒ

NOTE: Where an attribute certificate is used by the signer to associate a role, or other attributes of the signer, with the electronic signature; this is placed in the signer-attributes attribute as defined in Section 5.8.3. ๐Ÿงš

5.7.3.2. ESS signing-certificate-v2 Attribute Definition ๐ŸŽ€

okay so the ESS signing-certificate-v2 attribute is basically the older ESS signing-certificate attribute we just covered, but with a glow-up ๐Ÿ’…. The big difference is that it can be used with hashing algorithms other than SHA-1 ๐Ÿ™Œ

The syntax of the signing-certificate-v2 attribute type of the ES is as defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], and further qualified in the present document ๐Ÿ“š

The sequence of the policy information field is not used in the present document โœ‹

This attribute shall be used in the same manner as defined above for the ESS signing-certificate attribute โœจ

The object identifier for this attribute is:

id-aa-signingCertificateV2 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
  smime(16) id-aa(2) 47 }

If present, the issuerAndSerialNumber in SignerIdentifier field of the SignerInfo shall match the issuerSerial field present in ESSCertIDv2. In addition, the certHash from ESSCertIDv2 shall match the hash of the certificate computed using the hash function specified in the hashAlgorithm field. The certificate identified shall be used during the signature verification process. If the hash of the certificate does not match the certificate used to verify the signature, the signature shall be considered invalid ๐Ÿ™…โ€โ™€๏ธ no exceptions, bestie ๐Ÿ˜ญ

NOTE 1: Where an attribute certificate is used by the signer to associate a role, or other attributes of the signer, with the electronic signature; this is placed in the signer-attributes attribute as defined in Section 5.8.3. ๐Ÿงš

NOTE 2: RFC 3126 was using the other signing-certificate attribute (see Section 5.7.3.3) for the same purpose. Its use is now deprecated, since this structure is simpler ๐Ÿ’€ the old one is literally being retired lol

5.7.3.3. Other signing-certificate Attribute Definition ๐Ÿฆ‹

okay so RFC 3126 was using the other signing-certificate attribute as an alternative to the ESS signing-certificate when hashing algorithms other than SHA-1 were being used. Its use is now deprecated, since the structure of the signing-certificate-v2 attribute is simpler. Its description is however still present in this version for backwards compatibility ๐Ÿซถ we're keeping it around for the old-school crowd

id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
    member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
    smime(16) id-aa(2) 19 }

The other-signing-certificate attribute value has the ASN.1 syntax OtherSigningCertificate:

OtherSigningCertificate ::=  SEQUENCE {
    certs        SEQUENCE OF OtherCertID,
    policies     SEQUENCE OF PolicyInformation OPTIONAL
                 -- NOT USED IN THE PRESENT DOCUMENT }

OtherCertID ::= SEQUENCE {
    otherCertHash            OtherHash,
    issuerSerial             IssuerSerial OPTIONAL }

OtherHash ::= CHOICE {
    sha1Hash OtherHashValue,  -- This contains a SHA-1 hash
    otherHash OtherHashAlgAndValue}

OtherHashValue ::= OCTET STRING
OtherHashAlgAndValue ::= SEQUENCE {
    hashAlgorithm     AlgorithmIdentifier,
    hashValue         OtherHashValue }

5.8. Additional Mandatory Attributes for Explicit Policy-based Electronic Signatures ๐Ÿ”

5.8.1. signature-policy-identifier ๐Ÿ“œ

The present document mandates that for CAdES-EPES, a reference to the signature policy is included in the signedData. This reference is explicitly identified. A signature policy defines the rules for creation and validation of an electronic signature, and is included as a signed attribute with every Explicit Policy-based Electronic Signature. The signature-policy-identifier shall be a signed attribute ๐Ÿ–Š๏ธ

The following object identifier identifies the signature-policy-identifier attribute:

id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 15 }

signature-policy-identifier attribute values have ASN.1 type SignaturePolicyIdentifier:

SignaturePolicyIdentifier ::= CHOICE {
     signaturePolicyId          SignaturePolicyId,
     signaturePolicyImplied     SignaturePolicyImplied
                                -- not used in this version
}

SignaturePolicyId ::= SEQUENCE {
     sigPolicyId           SigPolicyId,
     sigPolicyHash         SigPolicyHash,
     sigPolicyQualifiers   SEQUENCE SIZE (1..MAX) OF
                             SigPolicyQualifierInfo OPTIONAL}

SignaturePolicyImplied ::= NULL

The sigPolicyId field contains an object-identifier that uniquely identifies a specific version of the signature policy. The syntax of this field is as follows:

SigPolicyId ::= OBJECT IDENTIFIER

The sigPolicyHash field optionally contains the identifier of the hash algorithm and the hash of the value of the signature policy. The hashValue within the sigPolicyHash may be set to zero to indicate that the policy hash value is not known ๐Ÿคทโ€โ™€๏ธ

NOTE: The use of a zero sigPolicyHash value is to ensure backwards compatibility with earlier versions of the current document. If sigPolicyHash is zero, then the hash value should not be checked against the calculated hash value of the signature policy ๐Ÿง

If the signature policy is defined using ASN.1, then the hash is calculated on the value without the outer type and length fields, and the hashing algorithm shall be as specified in the field sigPolicyHash ๐Ÿงฎ

If the signature policy is defined using another structure, the type of structure and the hashing algorithm shall be either specified as part of the signature policy, or indicated using a signature policy qualifier ๐ŸŒˆ

SigPolicyHash ::= OtherHashAlgAndValue

OtherHashAlgAndValue ::= SEQUENCE {
   hashAlgorithm   AlgorithmIdentifier,
   hashValue       OtherHashValue }

OtherHashValue ::= OCTET STRING

A Signature Policy Identifier may be qualified with other information about the qualifier. The semantics and syntax of the qualifier is as associated with the object-identifier in the sigPolicyQualifierId field. The general syntax of this qualifier is as follows:

SigPolicyQualifierInfo ::= SEQUENCE {
     sigPolicyQualifierId  SigPolicyQualifierId,
     sigQualifier          ANY DEFINED BY sigPolicyQualifierId }

The present document specifies the following qualifiers:

  • spuri: this contains the web URI or URL reference to the signature policy, and
  • sp-user-notice: this contains a user notice that should be displayed whenever the signature is validated.

sigpolicyQualifierIds defined in the present document:

SigPolicyQualifierId ::= OBJECT IDENTIFIER

id-spq-ets-uri OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 1 }

SPuri ::= IA5String

id-spq-ets-unotice OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 2 }

SPUserNotice ::= SEQUENCE {
        noticeRef        NoticeReference OPTIONAL,
        explicitText     DisplayText OPTIONAL}

NoticeReference ::= SEQUENCE {
        organization     DisplayText,
        noticeNumbers    SEQUENCE OF INTEGER }

DisplayText ::= CHOICE {
        visibleString    VisibleString  (SIZE (1..200)),
        bmpString        BMPString      (SIZE (1..200)),
        utf8String       UTF8String     (SIZE (1..200)) }

5.9. CMS Imported Optional Attributes ๐ŸŒธ

The following attributes may be present with the signed-data; the attributes are defined in CMS (RFC 3852 [4]) and are imported into the present document. Where appropriate, the attributes are qualified and profiled by the present document ๐ŸŽ

5.9.1. signing-time โฐ

The signing-time attribute specifies the time at which the signer claims to have performed the signing process ๐Ÿ•ฐ๏ธ

Signing-time attribute values for ES have the ASN.1 type SigningTime as defined in CMS (RFC 3852 [4]).

NOTE: RFC 3852 [4] states that dates between January 1, 1950 and December 31, 2049 (inclusive) must be encoded as UTCTime. Any dates with year values before 1950 or after 2049 must be encoded as GeneralizedTime ๐Ÿ“… date formatting is serious business, fr fr

5.9.2. countersignature โœ๏ธ

The countersignature attribute values for ES have ASN.1 type CounterSignature, as defined in CMS (RFC 3852 [4]). A countersignature attribute shall be an unsigned attribute ๐Ÿ‘€

5.10. ESS-Imported Optional Attributes ๐Ÿ’œ

The following attributes may be present with the signed-data defined by the present document. The attributes are defined in ESS and are imported into the present document and are appropriately qualified and profiled by the present document ๐Ÿงšโ€โ™€๏ธ

5.10.1. content-reference Attribute ๐Ÿ”—

The content-reference attribute is a link from one SignedData to another. It may be used to link a reply to the original message to which it refers, or to incorporate by reference one SignedData into another. The content-reference attribute shall be a signed attribute ๐Ÿ’Œ

content-reference attribute values for ES have ASN.1 type ContentReference, as defined in ESS (RFC 2634 [5]).

The content-reference attribute shall be used as defined in ESS (RFC 2634 [5]).

5.10.2. content-identifier Attribute ๐Ÿชช

The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later. The content-identifier shall be a signed attribute โœจ

content-identifier attribute type values for the ES have an ASN.1 type ContentIdentifier, as defined in ESS (RFC 2634 [5]).

The minimal content-identifier attribute should contain a concatenation of user-specific identification information (such as a user name or public keying material identification information), a GeneralizedTime string, and a random number ๐ŸŽฒ

5.10.3. content-hints Attribute ๐Ÿ’ก

The content-hints attribute provides information on the innermost signed content of a multi-layer message where one content is encapsulated in another. Think of it as a little hint note for the layers inside ๐Ÿซ 

The syntax of the content-hints attribute type of the ES is as defined in ESS (RFC 2634 [5]).

When used to indicate the precise format of the data to be presented to the user, the following rules apply:

  • the contentType indicates the type of the associated content. It is an object identifier (i.e., a unique string of integers) assigned by an authority that defines the content type; and
  • when the contentType is id-data, the contentDescription shall define the presentation format; the format may be defined by MIME types.

When the format of the content is defined by MIME types, the following rules apply:

  • the contentType shall be id-data, as defined in CMS (RFC 3852 [4]);
  • the contentDescription shall be used to indicate the encoding of the data, in accordance with the rules defined RFC 2045 [6]; see Annex F for an example of structured contents and MIME.

NOTE 1:

id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
rsadsi(113549) pkcs(1) pkcs7(7) 1 }

NOTE 2: contentDescription is optional in ESS (RFC 2634 [5]). It may be used to complement contentTypes defined elsewhere; such definitions are outside the scope of the present document ๐ŸŒˆ

5.11. Additional Optional Attributes Defined in the Present Document โœจ

okay so this section adds a bunch of optional attributes that tell the verifier extra stuff ๐Ÿงš there are four kinds of info:

  • a) the type of commitment from the signer, and/or
  • b) the claimed location where the signature is performed, and/or
  • c) claimed attributes or certified attributes of the signer, and/or
  • d) a content time-stamp applied before the content was signed.

5.11.1. commitment-type-indication Attribute

so sometimes a signer wants to be like "hey, by signing this, I'm making a commitment on my behalf" ๐Ÿ’… the commitment-type-indication attribute is how they say that to the verifier ๐ŸŽ€

the commitment-type-indication attribute shall be a signed attribute. the commitment type can be:

  • defined as part of the signature policy, which means the commitment type has precise semantics that are spelled out in that policy; and
  • a registered type, which means the commitment type has precise semantics defined by a registration, under the rules of whoever runs the registration. that registration authority could be a trading association or a legislative authority ๐Ÿ‘‘

the signature policy lists a set of attributes it "recognizes" ๐Ÿซถ this "recognized" set has every commitment type defined in the policy, plus any externally defined commitment types the policy decides to recognize. only recognized commitment types are allowed in this field. no cap, that's the rule ๐Ÿ’€

the following object identifier identifies the commitment-type-indication attribute:

id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}

commitment-type-indication attribute values have ASN.1 type CommitmentTypeIndication.

CommitmentTypeIndication ::= SEQUENCE {
  commitmentTypeId CommitmentTypeIdentifier,
  commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
                 CommitmentTypeQualifier OPTIONAL}

CommitmentTypeIdentifier ::= OBJECT IDENTIFIER
CommitmentTypeQualifier ::= SEQUENCE {
   commitmentTypeIdentifier   CommitmentTypeIdentifier,
   qualifier                  ANY DEFINED BY commitmentTypeIdentifier }

the use of any qualifiers to the commitment type is outside the scope of the present document ๐Ÿ™ˆ

the following generic commitment types are defined in the present document ๐ŸŒˆ

id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}

id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}

id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 3}

id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}

id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 5}

id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 6}

so here's what each generic type means ๐Ÿฆ‹

  • proof of origin: the signer recognizes that they created, approved, and sent the message โœจ
  • proof of receipt: the signer recognizes that they received the content of the message ๐Ÿ“ฌ
  • proof of delivery: the TSP providing that indication has delivered a message into a local store that the recipient of the message can access ๐Ÿงบ
  • proof of sender: the entity providing that indication has sent the message, but not necessarily created it ๐Ÿ“ค
  • proof of approval: the signer has approved the content of the message ๐Ÿ‘
  • proof of creation: the signer has created the message, but not necessarily approved it or sent it ๐Ÿ› ๏ธ

5.11.2. signer-location Attribute

the signer-location attribute is a mnemonic for an address linked to the signer at a particular geographical location, like a city ๐ŸŒธ the mnemonic is registered in the country where the signer is located, and it's used in the Public Telegram Service (according to ITU-T Recommendation F.1 [11]). iykyk, it's very official ๐Ÿ’…

the signer-location attribute shall be a signed attribute. the following object identifier identifies the signer-location attribute:

id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}

signer-location attribute values have ASN.1 type SignerLocation:

SignerLocation ::= SEQUENCE {
   -- at least one of the following shall be present:
      countryName    [0]    DirectoryString OPTIONAL,
                            -- As used to name a Country in X.500
      localityName   [1]    DirectoryString OPTIONAL,
                            -- As used to name a locality in X.500
      postalAdddress [2]    PostalAddress OPTIONAL }

PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString

5.11.3. signer-attributes Attribute

the signer-attributes attribute gives extra info about the signer, like their role ๐Ÿ‘‘ it can be either:

  • claimed attributes of the signer; or
  • certified attributes of the signer.

the signer-attributes attribute shall be a signed attribute. the following object identifier identifies the signer-attribute attribute:

id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}

signer-attributes values have ASN.1 type SignerAttribute:

SignerAttribute ::= SEQUENCE OF CHOICE {
    claimedAttributes     [0]   ClaimedAttributes,
    certifiedAttributes   [1]   CertifiedAttributes }

ClaimedAttributes ::= SEQUENCE OF Attribute

CertifiedAttributes ::= AttributeCertificate
-- as defined in RFC 3281: see Section 4.1.
NOTE 1: Only a single signer-attributes can be used. NOTE 2: Attribute and AttributeCertificate are as defined respectively in ITU-T Recommendations X.501 [9] and X.509 [1].

5.11.4. content-time-stamp Attribute

the content-time-stamp attribute is a time-stamp token of the signed data content, taken before it gets signed โฐ the content-time-stamp attribute shall be a signed attribute.

the following object identifier identifies the content-time-stamp attribute:

id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member- body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}

content-time-stamp attribute values have ASN.1 type ContentTimestamp:

ContentTimestamp ::= TimeStampToken

the messageImprint value of the TimeStampToken (as described in RFC 3161 [7]) shall be a hash of the value of the eContent field within encapContentInfo in the signedData ๐Ÿงพ

for more on the TimeStampToken and how it's defined, see Section 7.4 ๐Ÿฆ‹

NOTE: content-time-stamp indicates that the signed information was formed before the date included in the content-time-stamp.

5.12. Support for Multiple Signatures ๐ŸŒˆ

5.12.1. Independent Signatures

multiple independent signatures (see Annex B.5) are supported, with each signer contributing their own independent SignerInfo ๐Ÿซถ

each SignerInfo shall include all the attributes required under the present document, and the verifier shall process each one independently ๐Ÿ”

NOTE: Independent signatures may be used to provide independent signatures from different parties with different signed attributes, or to provide multiple signatures from the same party using alternative signature algorithms, in which case the other attributes, excluding time values and signature policy information, will generally be the same.

5.12.2. Embedded Signatures

multiple embedded signatures (see Annex C.5) are supported using the countersignature unsigned attribute (see Section 5.9.2) ๐Ÿ’œ each counter signature is carried in a countersignature held as an unsigned attribute on the SignerInfo that the counter-signature is applied to ๐ŸŽ€

NOTE: Counter signatures may be used to provide signatures from different parties with different signed attributes, or to provide multiple signatures from the same party using alternative signature algorithms, in which case the other attributes, excluding time values and signature policy information, will generally be the same.

6. Additional Electronic Signature Validation Attributes โœจ

okay bestie, this section is where we pile on the extra validation data ๐Ÿ’… All of these attributes build on the electronic signature from Section 5, so you know we're going somewhere cute. Here's what's on the list:

  • Signature-time-stamp applied to the electronic signature value, or a Time-Mark in an audit trail. This is the Electronic Signature with Time (CAdES-T) ๐Ÿ•ฐ๏ธ; and
  • Complete validation data references, which bundle the time-stamp of the signature value with references to all the certificates (complete-certificate-references) and revocation (complete-revocation-references) information needed for full validation. This is the Electronic Signature with Complete data references (CAdES-C) ๐ŸŽ€.

NOTE 1: Formats for CAdES-T are illustrated in Section 4.4, and the attributes are defined in Section 6.1.1.

NOTE 2: Formats for CAdES-C are illustrated in Section 4.4. The required attributes for the CAdES-C signature format are defined in Sections 6.2.1 to 6.2.2, and the optional attributes are defined in Sections 6.2.3 and 6.2.4. ๐ŸŒธ

Then there are the optional extended forms of validation data too. Annex B has the overview if you want the full tour ๐Ÿฆ‹

  • CAdES-X with time-stamp: the extended validation data here uses two types of time-stamps:
    • Type 1 (CAdES-X Type 1): a time-stamp over the ES with Complete validation data (CAdES-C); and
    • Type 2 (CAdES-X Type2): a time-stamp over the certification path references and the revocation information references used to support the CAdES-C.

NOTE 3: Formats for CAdES-X Type 1 and CAdES-X Type 2 are illustrated in Sections B.1.2 and B.1.3, respectively.

  • CAdES-X Long: the Complete validation data references (CAdES-C), plus the actual values of all the certificates and revocation information used in the CAdES-C. ๐Ÿ’œ

NOTE 4: Formats for CAdES-X Long are illustrated in Annex B.1.1.

  • CAdES-X Long Type 1 or CAdES-X Long Type 2: an X-Time-Stamp (Type 1 or Type 2), plus the actual values of all the certificates and revocation information used in the CAdES-C, same as CAdES-X Long. ๐Ÿงš

This section also defines the data structures for the Archive validation data format (CAdES-A) of the extended forms. This one is the big boss ๐Ÿ‘‘

  • Archive form of electronic signature (CAdES-A), which comprises:
    • the Complete validation data references (CAdES-C),
    • the certificate and revocation values (as in a CAdES-X Long),
    • any existing extended electronic signature time-stamps (CAdES-X Type 1 or CAdES-X Type 2), if present, and
    • the signed user data and an additional archive time-stamp applied over all that data.

An archive time-stamp may be repeatedly applied after long periods to maintain validity when electronic signature and time-stamping algorithms weaken. Basically, it's a glow-up you can keep giving it ๐ŸŒˆ

The extra data needed to create the forms above is carried as unsigned attributes tied to one individual signature. They go in the unsignedAttrs field of SignerInfo, so every attribute defined in Section 6 is an unsigned attribute. Periodt ๐Ÿ’…

NOTE 5: Where multiple signatures are to be supported, as described in Section 5.12, each signature has a separate SignerInfo. So each signature needs its own unsigned attribute values to create CAdES-T, CAdES-C, and so on. Main character energy for every signer ๐Ÿ™ˆ

NOTE 6: The optional attributes of the extended validation data are defined in Sections 6.3 and 6.4. โญ


6.1. signature time-stamp Attribute (CAdES-T) ๐Ÿ•ฐ๏ธ

An electronic signature with time-stamp is an electronic signature where part, but not all, of the extra data needed for validation is available. Some certificates and revocation information are there, but not all of it ๐Ÿฅฒ

The minimum structure for time-stamp validation data is:

  • the signature time-stamp attribute, as defined in Section 6.1.1, over the ES signature value.

6.1.1. signature-time-stamp Attribute Definition

The signature-time-stamp attribute is a TimeStampToken computed on the signature value for a specific signer. It's an unsigned attribute. More than one instance of this attribute can show up with an electronic signature, coming from different TSAs ๐Ÿฆ‹

The following object identifier identifies the signature-time-stamp attribute:

id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}

The signature-time-stamp attribute value has the ASN.1 type SignatureTimeStampToken:

SignatureTimeStampToken ::= TimeStampToken

The value of the messageImprint field within TimeStampToken shall be a hash of the value of the signature field within SignerInfo for the signedData being time-stamped. That's the hash lock ๐Ÿ”

For more on TimeStampToken, see Section 7.4.

NOTE 1: In the case of multiple signatures, it is possible to have a:

  • TimeStampToken computed for each and all signers; or
  • TimeStampToken computed on one signer's signature; and no
  • TimeStampToken on another signer's signature.

NOTE 2: In the case of multiple signatures, several TSTs, issued by different TSAs, may be present within the same signerInfo (see RFC 3852 [4]). The more the merrier ๐Ÿ“


6.2. Complete Validation Data References (CAdES-C) ๐ŸŽ€

An electronic signature with Complete validation data references (CAdES-C) is one where all the extra data needed for validation (every certificate and all the revocation information) is available. This form is built on the CAdES-T form we just covered ๐Ÿซถ

As a minimum, the Complete validation data shall include the following:

  • a time, which shall either be a signature-timestamp attribute, as defined in Section 6.1.1, or a time-mark operated by a Time-Marking Authority;
  • complete-certificate-references, as defined in Section 6.2.1;
  • complete-revocation-references, as defined in Section 6.2.2.

6.2.1. complete-certificate-references Attribute Definition

The complete-certificate-references attribute is an unsigned attribute. It references the full set of CA certificates that were used to validate an ES with Complete validation data, up to but not including the signer's certificate. Only a single instance of this attribute shall occur with an electronic signature. One and done ๐Ÿ™Œ

NOTE 1: The signer's certificate is referenced in the signing certificate attribute (see Section 5.7.3).

The following object identifier identifies the complete-certificate-references attribute:

id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}

The complete-certificate-references attribute value has the ASN.1 syntax CompleteCertificateRefs:

CompleteCertificateRefs ::=  SEQUENCE OF OtherCertID

OtherCertID is defined in Section 5.7.3.3.

The IssuerSerial shall be present in OtherCertID. The certHash shall match the hash of the certificate referenced. Matching hashes only, no vibes-based verification ๐Ÿ”

NOTE 2: Copies of the certificate values may be held using the certificate-values attribute, defined in Section 6.3.3.

This attribute may include references to the certification chain for any TSUs that provide time-stamp tokens. In this case, the unsigned attribute shall be added to the signedData of the relevant time-stamp token as an unsignedAttrs in the signerInfos field. The chain of custody goes all the way down ๐Ÿงš

6.2.2. complete-revocation-references Attribute Definition

The complete-revocation-references attribute is an unsigned attribute. Only a single instance of this attribute shall occur with an electronic signature. It references the full set of the CRL, ACRL, or OCSP responses that were used in validating the signer, plus the CA certificates used in ES with Complete validation data. ๐Ÿ’…

This attribute shows that the verifier did their due diligence and gathered the available revocation information. The references stored in this attribute can be used to retrieve the referenced information if it isn't stored in the CMS structure, but somewhere else. Receipts, bestie ๐Ÿงพ

The following object identifier identifies the complete-revocation-references attribute:

id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}

The complete-revocation-references attribute value has the ASN.1 syntax CompleteRevocationRefs:

CompleteRevocationRefs ::=  SEQUENCE OF CrlOcspRef

CrlOcspRef ::= SEQUENCE {
   crlids      [0]   CRLListID    OPTIONAL,
   ocspids     [1]   OcspListID   OPTIONAL,
   otherRev    [2]   OtherRevRefs OPTIONAL
}

CompleteRevocationRefs shall contain one CrlOcspRef for the signing-certificate, followed by one for each OtherCertID in the CompleteCertificateRefs attribute. The second and subsequent CrlOcspRef fields shall be in the same order as the OtherCertID to which they relate. At least one of CRLListID or OcspListID or OtherRevRefs should be present for all but the "trusted" CA of the certificate path. Order matters, lowkey a lot ๐Ÿ™ˆ

CRLListID ::=  SEQUENCE {
    crls        SEQUENCE OF CrlValidatedID }

CrlValidatedID ::=  SEQUENCE {
     crlHash                   OtherHash,
     crlIdentifier             CrlIdentifier OPTIONAL }

CrlIdentifier ::= SEQUENCE {
    crlissuer                 Name,
    crlIssuedTime             UTCTime,
    crlNumber                 INTEGER OPTIONAL }

OcspListID ::=  SEQUENCE {
    ocspResponses        SEQUENCE OF OcspResponsesID }

OcspResponsesID ::=  SEQUENCE {
    ocspIdentifier              OcspIdentifier,
    ocspRepHash                 OtherHash    OPTIONAL
}

OcspIdentifier ::= SEQUENCE {
   ocspResponderID    ResponderID,
      -- As in OCSP response data
   producedAt         GeneralizedTime
   -- As in OCSP response data

When you make a crlValidatedID, the crlHash gets computed over the ENTIRE DER encoded CRL, signature and all ๐Ÿ” (no skipping the sig, bestie). The crlIdentifier is usually included too, unless the CRL can be figured out from other info ๐Ÿง .

The crlIdentifier is how you point at a CRL. It uses the issuer name and the CRL issued time, which SHALL correspond to the time thisUpdate contained in the issued CRL ๐Ÿ“œ. If there's a crlNumber, you add that too. The crlListID attribute is an unsigned attribute ๐Ÿฆ‹. If the CRL you're pointing at is a Delta CRL, you SHALL include references to the set of CRLs that together give you a complete revocation list ๐Ÿ’….

The OcspIdentifier identifies an OCSP response using the issuer name and the time of issue, which SHALL correspond to the time produced as contained in the issued OCSP response โฐ. Two OCSP responses can land in the same second, so the hash of the response in the OcspResponsesID may be needed to break the tie ๐Ÿ™ˆ.

NOTE 1: Copies of the CRL and OCSP response values MAY be held using the revocation-values attribute defined in Section 6.3.4 ๐ŸŒธ.

NOTE 2: It is RECOMMENDED that this attribute be used in preference to the OtherRevocationInfoFormat specified in RFC 3852, to maintain backwards compatibility with the earlier version of this specification ๐Ÿ’–.

The syntax and semantics of other revocation references are outside the scope of this document ๐Ÿงš. The syntax of the other form of revocation information is identified by OtherRevRefType.

This attribute MAY include references to the full set of CRLs, ACRLs, or OCSP responses that were used to verify the certification chain for any TSUs that provide time-stamp tokens ๐Ÿ”ฅ. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token, as an unsignedAttrs in the signerInfos field โœจ.

6.2.3. attribute-certificate-references Attribute Definition ๐ŸŽ€

This attribute is only used when a user attribute certificate is present in the electronic signature ๐Ÿ‘‘.

The attribute-certificate-references attribute is an unsigned attribute. It references the full set of AA certificates that were used to validate the attribute certificate. Only a single instance of this attribute SHALL occur with an electronic signature ๐Ÿ’œ.

id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}

The attribute-certificate-references attribute value has the ASN.1 syntax AttributeCertificateRefs:

AttributeCertificateRefs ::=  SEQUENCE OF OtherCertID

OtherCertID is defined in Section 5.7.3.3 ๐ŸŒˆ.

NOTE: Copies of the certificate values MAY be held using the certificate-values attribute defined in Section 6.3.3 ๐Ÿซถ.

6.2.4. attribute-revocation-references Attribute Definition ๐Ÿ’…

This attribute is only used when a user attribute certificate is present in the electronic signature and when that attribute certificate can be revoked ๐Ÿ™Œ.

The attribute-revocation-references attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It references the full set of the ACRL or OCSP responses that were used in validating the attribute certificate. This attribute MAY be used to show that the verifier did their due diligence on the revocation info that was available ๐Ÿฆ‹.

The following object identifier identifies the attribute-revocation-references attribute:

id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
id-aa(2) 45}

The attribute-revocation-references attribute value has the ASN.1 syntax AttributeRevocationRefs:

AttributeRevocationRefs ::=  SEQUENCE OF CrlOcspRef

6.3. Extended Validation Data (CAdES-X) ๐ŸŒธ

This section specifies a number of OPTIONAL attributes that are used by extended forms of electronic signatures (see Annex B for an overview of these forms of validation data) ๐Ÿงš.

6.3.1. Time-Stamped Validation Data (CAdES-X Type 1 or Type 2) โญ

The extended validation data MAY include one of the following additional attributes, forming a CAdES-X Time-Stamp validation data (CAdES-X Type 1 or CAdES-X Type 2). This adds extra protection against later CA compromise and gives integrity for the validation data used ๐Ÿ”:

  • CAdES-C Time-stamp, as defined in Section 6.3.5 (CAdES-X Type 1); or
  • Time-Stamped Certificates and CRLs references, as defined in Section 6.3.6 (CAdES-X Type 2).

6.3.2. Long Validation Data (CAdES-X Long, CAdES-X Long Type 1 or 2) ๐Ÿ“

The extended validation data MAY also include the following additional information, forming a CAdES-X Long, for use if later validation processes may not have access to this information ๐ŸŽ€:

  • certificate-values, as defined in Section 6.3.3; and
  • revocation-values, as defined in Section 6.3.4.

The extended validation data MAY, in addition to certificate-values and revocation-values as defined in Sections 6.3.3 and 6.3.4, include one of the following additional attributes, forming a CAdES-X Long Type 1 or CAdES-X Long Type 2 ๐Ÿ‘‘:

  • CAdES-C Time-stamp, as defined in Section 6.3.3 (CAdES-X long Type 1); or
  • Time-Stamped Certificates and CRLs references, as defined in Section 6.3.4 (CAdES-X Long Type 2).

The CAdES-X Long Type 1 or CAdES-X Long Type 2 gives extra protection against later CA compromise and integrity for the validation data used ๐Ÿ›ก๏ธ.

NOTE 1: The CAdES-X-Long signature gives long-term proof of the validity of the signature, for as long as the CA keys, CRL Issuers keys, and OCSP responder keys are not compromised and are resistant to cryptographic attacks ๐ŸŒˆ.

NOTE 2: As long as the time-stamp data remains valid, the CAdES-X Long Type 1 and the CAdES-X Long Type 2 provide the following important property for long-standing signatures: once found valid, it SHALL continue to be valid months or years later, long after the validity period of the certificates has expired, or after the user key has been compromised ๐Ÿ˜ญ.

6.3.3. certificate-values Attribute Definition ๐Ÿงš

This attribute MAY be used to contain the certificate information required for the following forms of extended electronic signature: CAdES-X Long, ES X-Long Type 1, and CAdES-X Long Type 2. See Annex B.1.1 for an illustration of this form of electronic signature โœจ.

The certificate-values attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It holds the values of certificates referenced in the complete-certificate-references attribute ๐Ÿ’–.

NOTE: If an attribute certificate is used, it is not provided in this structure but SHALL be provided by the signer as a signer-attributes attribute (see Section 5.11.3) ๐Ÿ™ˆ.

The following object identifier identifies the certificate-values attribute:

id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}

The certificate-values attribute value has the ASN.1 syntax CertificateValues.

CertificateValues ::=  SEQUENCE OF Certificate

Certificate is defined in Section 7.1. (which is as defined in ITU-T Recommendation X.509 [1]) ๐Ÿ“š.

This attribute MAY include the certification information for any TSUs that have provided the time-stamp tokens, if these certificates are not already included in the TSTs as part of the TSUs signatures. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token ๐Ÿฆ‹.

6.3.4. revocation-values Attribute Definition ๐ŸŒธ

This attribute is used to contain the revocation information required for the following forms of extended electronic signature: CAdES-X Long, ES X-Long Type 1, and CAdES-X Long Type 2. See Annex B.1.1 for an illustration of this form of electronic signature ๐Ÿ”ฅ.

The revocation-values attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It holds the values of CRLs and OCSP referenced in the complete-revocation-references attribute ๐Ÿ’œ.

NOTE: It is RECOMMENDED that this attribute be used in preference to the OtherRevocationInfoFormat specified in RFC 3852, to maintain backwards compatibility with the earlier version of this specification ๐Ÿซถ.

The following object identifier identifies the revocation-values attribute:

id-aa-ets-revocationValues OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}

The revocation-values attribute value has the ASN.1 syntax RevocationValues

RevocationValues ::=  SEQUENCE {
   crlVals          [0] SEQUENCE OF CertificateList OPTIONAL,
   ocspVals         [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
   otherRevVals     [2] OtherRevVals OPTIONAL }

OtherRevVals ::= SEQUENCE {
   OtherRevValType   OtherRevValType,
   OtherRevVals      ANY DEFINED BY OtherRevValType }

OtherRevValType ::= OBJECT IDENTIFIER

The syntax and semantics of the other revocation values (OtherRevVals) are outside the scope of this document ๐ŸŒˆ. The syntax of the other form of revocation information is identified by OtherRevRefType.

CertificateList is defined in Section 7.2. (which is as defined in ITU-T Recommendation X.509 [1]) ๐Ÿงพ.

BasicOCSPResponse is defined in Section 7.3. (which is as defined in RFC 2560 [3]) ๐Ÿ”.

This attribute MAY include the values of revocation data, including CRLs and OCSPs, for any TSUs that have provided the time-stamp tokens, if these certificates are not already included in the TSTs as part of the TSUs signatures. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token ๐Ÿ’….

6.3.5. CAdES-C-time-stamp Attribute Definition โฐ

okay so this attribute is all about protecting against CA key compromise ๐Ÿ›ก๏ธ it's giving "backup plan for when things go wrong" ๐Ÿ’…

This attribute time-stamps the complete electronic signature (CAdES-C) ๐Ÿ’– It's used in the following forms of extended electronic signature: CAdES-X Type 1 and CAdES-X Long Type 1. See Annex B.1.2 for an illustration of this form of electronic signature ๐ŸŽ€

The CAdES-C-time-stamp attribute is an unsigned attribute ๐ŸŒธ It's a time-stamp token of the hash of the electronic signature and the complete validation data (CAdES-C). It's a special-purpose TimeStampToken Attribute that time-stamps the CAdES-C โœจ You can have several instances of this attribute on one electronic signature, as long as they come from different TSAs ๐Ÿ‘‘

NOTE 1: It is recommended that the attributes being time-stamped be encoded in DER. If DER is not employed, then the binary encoding of the ASN.1 structures being time-stamped should be preserved to ensure that the recalculation of the data hash is consistent. ๐Ÿซถ

NOTE 2: Each attribute is included in the hash with the attrType and attrValues (including type and length) but without the type and length of the outer SEQUENCE. ๐Ÿงš

The following object identifier identifies the CAdES-C-Timestamp attribute ๐Ÿฆ‹

id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}

The CAdES-C-timestamp attribute value has the ASN.1 syntax ESCTimeStampToken:

ESCTimeStampToken ::= TimeStampToken

The value of the messageImprint field within TimeStampToken shall be a hash of the concatenated values (without the type or length encoding for that value) of the following data objects:

  • OCTETSTRING of the SignatureValue field within SignerInfo;
  • signature-time-stamp, or a time-mark operated by a Time-Marking Authority;
  • complete-certificate-references attribute; and
  • complete-revocation-references attribute.

For further information and definition of the TimeStampToken, see Section 7.4 ๐Ÿ“š


6.3.6. time-stamped-certs-crls-references Attribute Definition ๐ŸŒˆ

This one's also for protecting against CA key compromise ๐Ÿ” It time-stamps the certificate and revocation references, and it's used in the following forms of extended electronic signature: CAdES-X Type 2 and CAdES-X Long Type 2. See Annex B.1.3 for an illustration of this form of electronic signature ๐Ÿ’œ

A time-stamped-certs-crls-references attribute is an unsigned attribute ๐Ÿ“ It's a time-stamp token issued for a list of referenced certificates and OCSP responses and/or CRLs, which protects against certain CA compromises. Its syntax is as follows:

NOTE 1: It is recommended that the attributes being time-stamped be encoded in DER. If DER is not employed, then the binary encoding of the ASN.1 structures being time-stamped should be preserved to ensure that the recalculation of the data hash is consistent. ๐Ÿ™ˆ

NOTE 2: Each attribute is included in the hash with the attrType and attrValues (including type and length) but without the type and length of the outer SEQUENCE. ๐Ÿ’…

The following object identifier identifies the time-stamped-certs-crls-references attribute ๐Ÿฆ‹

id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}

The attribute value has the ASN.1 syntax TimestampedCertsCRLs:

TimestampedCertsCRLs ::= TimeStampToken

The value of the messageImprint field within the TimeStampToken shall be a hash of the concatenated values (without the type or length encoding for that value) of the following data objects, as present in the ES with Complete validation data (CAdES-C):

  • complete-certificate-references attribute; and
  • complete-revocation-references attribute.

6.4. Archive Validation Data ๐Ÿ—„๏ธ

okay this is the "my signature needs to last FOREVER" section ๐Ÿ˜ญ Where an electronic signature has to last for a very long time, the time-stamp token on it can end up in danger of being invalidated, because of algorithm weakness or limits in the validity period of the TSA certificate. When that happens, it may be required to time-stamp the electronic signature several times ๐Ÿ•ฐ๏ธ In that case, an archive time-stamp attribute may be required for the archive form of the electronic signature (CAdES-A), and this archive time-stamp attribute may be repeatedly applied over a period of time ๐Ÿ”โœจ

6.4.1. archive-time-stamp Attribute Definition ๐Ÿ“œ

The archive-time-stamp attribute is a time-stamp token of many of the elements of the signedData in the electronic signature ๐Ÿ’– If the certificate-values and revocation-values attributes are not present in the CAdES-BES or CAdES-EPES, then they shall be added to the electronic signature prior to computing the archive time-stamp token ๐ŸŽ€

The archive-time-stamp attribute is an unsigned attribute ๐ŸŒธ Several instances of this attribute may occur with an electronic signature, both over time and from different TSUs โญ

The following object identifier identifies the nested archive-time-stamp attribute ๐Ÿงš

id-aa-ets-archiveTimestampV2  OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}

Archive-time-stamp attribute values have the ASN.1 syntax ArchiveTimeStampToken:

ArchiveTimeStampToken ::= TimeStampToken

The value of the messageImprint field within TimeStampToken shall be a hash of the concatenation of:

  • the encapContentInfo element of the SignedData sequence;
  • any external content being protected by the signature, if the eContent element of the encapContentInfo is omitted;
  • the Certificates and crls elements of the SignedData sequence, when present, and;
  • all data elements in the SignerInfo sequence including all signed and unsigned attributes.

NOTE 1: An alternative archiveTimestamp attribute, identified by an object identifier { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 27 }, is defined in prior versions of TS 101 733 [TS101733] and in RFC 3126.

The archiveTimestamp attribute, defined in versions of TS 101 733 prior to 1.5.1 and in RFC 3126, is not compatible with the attribute defined in the current document. The archiveTimestamp attribute, defined in versions 1.5.1 to 1.6.3 of TS 101 733, is compatible with the current document if the content is internal to encapContentInfo. Unless the version of TS 101 733 employed by the signing party is known by all recipients, use of the archiveTimestamp attribute defined in prior versions of TS 101 733 is deprecated. ๐Ÿ™…โ€โ™€๏ธ

NOTE 2: Counter signatures held as countersignature attributes do not require independent archive time-stamps, as they are protected by the archive time-stamp against the containing SignedData structure. ๐Ÿ’œ

NOTE 3: Unless DER is used throughout, it is recommended that the binary encoding of the ASN.1 structures being time-stamped be preserved when being archived to ensure that the recalculation of the data hash is consistent. ๐Ÿซถ

NOTE 4: The hash is calculated over the concatenated data elements as received/stored, including the Type and Length encoding. ๐Ÿ”

NOTE 5: Whilst it is recommended that unsigned attributes be DER encoded, it cannot generally be so guaranteed except by prior arrangement. For further information and definition of TimeStampToken, see Section 7.4. The timestamp should be created using stronger algorithms (or longer key lengths) than in the original electronic signatures and weak algorithm (key length) timestamps. ๐Ÿ’ช

NOTE 6: This form of ES also provides protection against a TSP key compromise. ๐Ÿ›ก๏ธ

The ArchiveTimeStamp will be added as an unsigned attribute in the SignerInfo sequence. For the validation of one ArchiveTimeStamp, the data elements of the SignerInfo must be concatenated, excluding all later ArchivTimeStampToken attributes ๐Ÿงฉ

Certificates and revocation information required to validate the ArchiveTimeStamp shall be provided by one of the following methods:

  • The TSU provides the information in the SignedData of the timestamp token;
  • Adding the complete-certificate-references attribute and the complete-revocation-references attribute of the TSP as an unsigned attribute within TimeStampToken, when the required information is stored elsewhere; or
  • Adding the certificate-values attribute and the revocation-values attribute of the TSP as an unsigned attribute within TimeStampToken, when the required information is stored elsewhere.

7. Other Standard Data Structures ๐Ÿงธ

7.1. Public Key Certificate Format ๐Ÿ”‘

The X.509 v3 certificate basis syntax is defined in ITU-T Recommendation X.509 [1]. A profile of the X.509 v3 certificate is defined in RFC 3280 [2] โœจ

7.2. Certificate Revocation List Format ๐Ÿ“‹

The X.509 v2 CRL syntax is defined in ITU-T Recommendation X.509 [1]. A profile of the X.509 v2 CRL is defined in RFC 3280 [2] ๐ŸŒท

7.3. OCSP Response Format ๐Ÿ”Ž

The format of an OCSP token is defined in RFC 2560 [3] ๐Ÿ’ซ

7.4. Time-Stamp Token Format โฑ๏ธ

The format of a TimeStampToken type is defined in RFC 3161 [7] and profiled in ETSI TS 101 861 [TS101861] ๐Ÿฆ‹

7.5. Name and Attribute Formats ๐Ÿท๏ธ

The syntax of the naming and other attributes is defined in ITU-T Recommendation X.509 [1] ๐ŸŽ€

NOTE: The name used by the signer, held as the subject in the signer's certificate, is allocated and verified on registration with the Certification Authority, either directly or indirectly through a Registration Authority, before being issued with a Certificate. ๐Ÿ™ˆ

The present document places no restrictions on the form of the name ๐ŸŒˆ The subject's name may be a distinguished name, as defined in ITU-T Recommendation X.500 [12], held in the subject field of the certificate, or any other name form held in the subjectAltName certificate extension field, as defined in ITU-T Recommendation X.509 [1]. In the case that the subject has no distinguished name, the subject name can be an empty sequence and the subjectAltName extension shall be critical ๐Ÿซถ

All Certification Authorities, Attribute Authorities, and Time-Stamping Authorities shall use distinguished names in the subject field of their certificate ๐Ÿ‘‘

The distinguished name shall include identifiers for the organization providing the service and the legal jurisdiction (e.g., country) under which it operates ๐ŸŒ

Where a signer signs as an individual, but wishes to also identify him/herself as acting on behalf of an organization, it may be necessary to provide two independent forms of identification ๐Ÿ’… The first identity, which is directly associated with the signing key, identifies him/her as an individual. The second, which is managed independently, identifies that person acting as part of the organization, possibly with a given role. In this case, one of the two identities is carried in the subject/subjectAltName field of the signer's certificate as described above ๐Ÿงš

The present document does not specify the format of the signer's attribute that may be included in public key certificates ๐Ÿค

NOTE: The signer's attribute may be supported by using a claimed role in the CMS signed attributes field or by placing an attribute certificate containing a certified role in the CMS signed attributes field; see Section 7.6. ๐Ÿ“

7.6. AttributeCertificate

okay so this one is short and sweet ๐ŸŽ€ the AttributeCertificate type's syntax is just defined in RFC 3281 [13], so go read that one for the actual structure โœจ

8. Conformance Requirements ๐Ÿ’…

okay bestie, conformance is where we figure out what you actually have to build to count as a legit CAdES implementation ๐Ÿซถ there are a few layers here, so let's go slow

if your system does signature generation, this doc sets conformance requirements for two forms of basic electronic signature, and you must implement one of the two ๐Ÿ”ฅ same deal for verification: two forms are defined, and one of them must be implemented ๐Ÿ’–

the doc only goes up to an ES with Complete validation data (CAdES-C) ๐Ÿฆ‹ that means you don't need the extended and archive forms (CAdES-X, CAdES-A) to be conformant with this document. no cap, that's a big relief ๐Ÿ˜ญ

one more thing: when verifying, optional signed and unsigned attributes must be supported only to the extent that the signature is verifiable ๐ŸŒธ and the semantics of optional attributes may be unsupported, unless a signature policy says otherwise ๐Ÿงš

8.1. CAdES-Basic Electronic Signature (CAdES-BES)

so a system that supports CAdES-BES signers, under this document, shall, at a minimum, support generating an electronic signature made of these components ๐Ÿ’œ

  • The general CMS syntax and content type, as defined in RFC 3852 [4] (see Sections 5.1 and 5.2);
  • CMS SignedData, as defined in RFC 3852 [4], with the version set to 3 and at least one SignerInfo present (see Sections 5.3 to 5.6);
    • The following CMS attributes, as defined in RFC 3852 [4]:
    • content-type; this shall always be present (see Section 5.7.1); and
    • message-digest; this shall always be present (see Section 5.7.2).
  • One of the following attributes, as defined in the present document:
    • signing-certificate: as defined in Section 5.7.3.1; or
    • signing-certificate v2 : as defined in Section 5.7.3.2.

NOTE: RFC 3126 was using the other signing-certificate attribute (see Section 5.7.3.3). Its use is now deprecated, since the structure of the signing-certificate v2 attribute is simpler than the other signing-certificate attribute. ๐Ÿ™ˆ

8.2. CAdES-Explicit Policy-based Electronic Signature

a system that supports Policy-based signers, under this document, shall, at a minimum, support generating an electronic signature with the previous components from the basic signer, plus this one ๐ŸŽ€

  • The following attributes, as defined in Section 5.9:
    • signature-policy-identifier; this shall always be present (see Section 5.8.1).

8.3. Verification Using Time-Stamping

a system that supports verifiers with time-stamping facilities, under this document, shall, at a minimum, support these things โฐโœจ

  • verification of the mandated components of an electronic signature, as defined in Section 8.1;
  • signature-time-stamp attribute, as defined in Section 6.1.1;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2;
  • Public Key Certificates, as defined in ITU-T Recommendation X.509 [1] (see Section 8.1); and
  • either of:
    • Certificate Revocation Lists, as defined in ITU-T Recommendation X.509 [1] (see Section 8.2); or
    • Online Certificate Status Protocol, as defined in RFC 2560 [3] (see Section 8.3).

8.4. Verification Using Secure Records

a system that supports verifiers, under this document, shall, at a minimum, support these things ๐Ÿ”๐Ÿ’–

  • verification of the mandated components of an electronic signature, as defined in Section 8.1;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2;
  • a record of the electronic signature and the time when the signature was first validated, using the referenced certificates and revocation information, must be maintained, such that records cannot be undetectably modified;
  • Public Key Certificates, as defined in ITU-T Recommendation X.509 [1] (see Section 8.1); and
    • either of:
      • Certificate Revocation Lists, as defined in ITU-T Recommendation X.509 [1] (see Section 8.2); or
      • online Certificate Status Protocol, as defined in RFC 2560 [3] (see Section 8.3).

9. References ๐Ÿ“š

9.1. Normative References

[1] ITU-T Recommendation X.509 (2000)/ISO/IEC 9594-8 (2001): "Information technology - Open Systems Interconnection - The Directory: Public key and Attribute Certificate framework".

[2] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3280, April 2002.

[3] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. Adams, "X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP", RFC 2560, June 1999.

[4] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, July 2004.

[5] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", RFC 2634, June 1999.

[6] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[7] Adams, C., Cain, P., Pinkas, D., and R. Zuccherato, "Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)", RFC 3161, August 2001.

[8] ITU-T Recommendation X.680 (1997): "Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation".

[9] ITU-T Recommendation X.501 (2000)/ISO/IEC 9594-1 (2001): "Information technology - Open Systems Interconnection - Directory models".

[10] Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, August 2002.

[11] ITU-T Recommendation F.1: "Operational provisions for the international public telegram service".

[12] ITU-T Recommendation X.500: "Information technology - Open Systems Interconnection - The Directory: Overview of concepts, models and services".

[13] Farrell, S. and R. Housley, "An Internet Attribute Certificate Profile for Authorization", RFC 3281, April 2002.

[14] ITU-T Recommendation X.208 (1988): "Specification of Abstract Syntax Notation One (ASN.1)".

[15] Schaad, J., "Enhanced Security Services (ESS) Update: Adding CertID Algorithm Agility", RFC 5035, August 2007.

[16] ITU-T Recommendation X.690 (2002): "Information technology ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)".

9.2. Informative References โœจ

okay bestie, these are the informative refs ๐Ÿ“š they're not strictly required reading, but they're the background drama behind everything ๐Ÿซถ

  • [EUDirective] Directive 1999/93/EC of the European Parliament and of the Council of 13 December 1999 on a community framework for Electronic Signatures.
  • [TS101733] ETSI Standard TS 101 733 V.1.7.3 (2005-06) Electronic Signature Formats.
  • [TS101861] ETSI TS 101 861: "Time stamping profile".
  • [TS101903] ETSI TS 101 903: "XML Advanced Electronic Signatures (XAdES)".
  • [TR102038] ETSI TR 102 038: "Electronic Signatures and Infrastructures (ESI); XML format for signature policies".
  • [TR102272] ETSI TR 102 272 V1.1.1 (2003-12). "Electronic Signatures and Infrastructures (ESI); ASN.1 format for signature policies".
  • [RFC2479] Adams, C., "Independent Data Unit Protection Generic Security Service Application Program Interface (IDUP-GSS-API)", RFC 2479, December 1998.
  • [RFC2743] Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, January 2000.
  • [RFC3125] Ross, J., Pinkas, D., and N. Pope, "Electronic Signature Policies", RFC 3125, September 2001.
  • [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC 3447, February 2003.
  • [RFC3494] Zeilenga, K., "Lightweight Directory Access Protocol version 2 (LDAPv2) to Historic Status", RFC 3494, March 2003.
  • [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, July 2004.
  • [RFC4210] Adams, C., Farrell, S., Kause, T., and T. Mononen, "Internet X.509 Public Key Infrastructure Certificate Management Protocol (CMP)", RFC 4210, September 2005.
  • [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.1", RFC 4346, April 2006.
  • [RFC4523] Zeilenga, K., "Lightweight Directory Access Protocol (LDAP) Schema Definitions for X.509 Certificates", RFC 4523, June 2006.
  • [ISO7498-2] ISO 7498-2 (1989): "Information processing systems - Open Systems Interconnection - Basic Reference Model - Part 2: Security Architecture".
  • [ISO9796-2] ISO/IEC 9796-2 (2002): "Information technology - Security techniques - Digital signature schemes giving message recovery - Part 2: Integer factorization based mechanisms".
  • [ISO9796-4] ISO/IEC 9796-4 (1998): "Digital signature schemes giving message recovery - Part 4: Discrete logarithm based mechanisms".
  • [ISO10118-1] ISO/IEC 10118-1 (2000): "Information technology - Security techniques - Hash-functions - Part 1: General".
  • [ISO10118-2] ISO/IEC 10118-2 (2000): "Information technology - Security techniques - Hash-functions - Part 2: Hash-functions using an n-bit block cipher algorithm".
  • [ISO10118-3] ISO/IEC 10118-3 (2004): "Information technology - Security techniques - Hash-functions - Part 3: Dedicated hash-functions".
  • [ISO10118-4] ISO/IEC 10118-4 (1998): "Information technology - Security techniques - Hash-functions - Part 4: Hash-functions using modular arithmetic".
  • [ISO10181-5] ISO/IEC 10181-5: Security Frameworks in Open Systems. Non-Repudiation Framework. April 1997.
  • [ISO13888-1] ISO/IEC 13888-1 (2004): "IT security techniques - Non-repudiation - Part 1: General".
  • [ISO14888-1] ISO/IEC 14888-1 (1998): "Information technology - Security techniques - Digital signatures with appendix - Part 1: General".
  • [ISO14888-2] ISO/IEC 14888-2 (1999): "Information technology - Security techniques - Digital signatures with appendix - Part 2: Identity-based mechanisms".
  • [ISO14888-3] ISO/IEC 14888-3 (1998): "Information technology - Security techniques - Digital signatures with appendix - Part 3: Certificate-based mechanisms".
  • [ISO15946-2] ISO/IEC 15946-2 (2002): "Information technology - Security techniques - Cryptographic techniques based on elliptic curves - Part 2: Digital signatures".
  • [CWA14171] CWA 14171 CEN Workshop Agreement: "General Guidelines for Electronic Signature Verification".
  • [XMLDSIG] XMLDSIG: W3C/IETF Recommendation (February 2002): "XML-Signature Syntax and Processing".
  • [X9.30-1] ANSI X9.30-1 (1997): "Public Key Cryptography for the Financial Services Industry - Part 1: The Digital Signature Algorithm (DSA)".
  • [X9.30-2] ANSI X9.30-2 (1997): "Public Key Cryptography for the Financial Services Industry - Part 2: The Secure Hash Algorithm (SHA-1)".
  • [X9.31-1] ANSI X9.31-1 (1997): "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 1: The RSA Signature Algorithm".
  • [X9.31-2] ANSI X9.31-2 (1996): "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 2: Hash Algorithms".
  • [X9.62] ANSI X9.62 (1998): "Public Key Cryptography for the Financial Services Industry - The Elliptic Curve Digital Signature Algorithm (ECDSA)".
  • [P1363] IEEE P1363 (2000): "Standard Specifications for Public-Key Cryptography".

ETSI technical specifications can be downloaded free of charge via the Services and Products Download Area at: http://www.etsi.org/WebSite/Standards/StandardsDownload.aspx


Annex A (Normative): ASN.1 Definitions โœจ

this annex is the ASN.1 cheat sheet ๐Ÿ’œ it gathers up every new syntax definition from the document in one place, so you can find everything without scrolling forever ๐Ÿงš

A.1. Signature Format Definitions Using X.208 ASN.1 Syntax

NOTE: The ASN.1 module defined in Annex A.1 using syntax defined in ITU-T Recommendation X.208 [14] has precedence over that defined in Annex A.2 in the case of any conflict.
ETS-ElectronicSignatureFormats-ExplicitSyntax88 { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-mod(0)
eSignature-explicit88(28)}

DEFINITIONS EXPLICIT TAGS ::=

BEGIN

-- EXPORTS All

IMPORTS

-- Cryptographic Message Syntax (CMS): RFC 3852

   ContentInfo, ContentType, id-data, id-signedData, SignedData,
   EncapsulatedContentInfo, SignerInfo, id-contentType,
   id-messageDigest, MessageDigest, id-signingTime, SigningTime,
   id-countersignature, Countersignature
      FROM CryptographicMessageSyntax2004
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
      smime(16) modules(0) cms-2004(24) }

-- ESS Defined attributes: ESS Update
-- RFC 5035 (Adding CertID Algorithm Agility)

   id-aa-signingCertificate, SigningCertificate, IssuerSerial,
   id-aa-contentReference, ContentReference, id-aa-contentIdentifier,
   ContentIdentifier, id-aa-signingCertificateV2
      FROM ExtendedSecurityServices-2006
        { iso(1) member-body(2) us(840) rsadsi(113549)
          pkcs(1) pkcs-9(9) smime(16) modules(0) id-mod-ess-2006(30) }

-- Internet X.509 Public Key Infrastructure - Certificate and CRL
-- Profile: RFC 3280

   Certificate, AlgorithmIdentifier, CertificateList, Name,
   DirectoryString, Attribute, BMPString, UTF8String

      FROM PKIX1Explicit88
      {iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-explicit(18)}

   GeneralNames, GeneralName, PolicyInformation
      FROM PKIX1Implicit88
      {iso(1) identified-organization(3) dod(6) internet(1) security(5)
       mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit (19)}

-- Internet Attribute Certificate Profile for Authorization - RFC 3281

   AttributeCertificate
      FROM PKIXAttributeCertificate {iso(1) identified-organization(3)
                dod(6) internet(1) security(5) mechanisms(5) pkix(7)
                id-mod(0) id-mod-attribute-cert(12)}

-- OCSP - RFC 2560

   BasicOCSPResponse, ResponderID
      FROM OCSP {iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-ocsp(14)}

-- Time Stamp Protocol RFC 3161

   TimeStampToken
      FROM PKIXTSP
      {iso(1) identified-organization(3) dod(6) internet(1) security(5)
      mechanisms(5) pkix(7) id-mod(0) id-mod-tsp(13)}

;


-- Definitions of Object Identifier arcs used in the present document
-- ==================================================================

-- OID used referencing electronic signature mechanisms based on
-- the present document for use with the Independent Data Unit
-- Protection (IDUP) API (see Annex D)

   id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
   { itu-t(0) identified-organization(4) etsi(0)
     electronic-signature-standard (1733) part1 (1) idupMechanism (4)
     etsiESv1(1) }


-- Basic ES CMS Attributes Defined in the present document
-- =======================================================
-- OtherSigningCertificate - deprecated

    id-aa-ets-otherSigCert OBJECT IDENTIFIER ::=
    { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
    smime(16) id-aa(2) 19 }

   OtherSigningCertificate ::=  SEQUENCE {
      certs        SEQUENCE OF OtherCertID,
      policies     SEQUENCE OF PolicyInformation OPTIONAL
                   -- NOT USED IN THE PRESENT DOCUMENT
   }

   OtherCertID ::= SEQUENCE {
      otherCertHash            OtherHash,
      issuerSerial             IssuerSerial OPTIONAL }

   OtherHash ::= CHOICE {
       sha1Hash     OtherHashValue,
       -- This contains a SHA-1 hash
       otherHash    OtherHashAlgAndValue}


-- Policy ES Attributes Defined in the present document
-- ====================================================

-- Mandatory Basic Electronic Signature Attributes as above,
-- plus in addition.

okay bestie, the signature-policy-identifier attribute is up first ๐Ÿ’–

-- Signature-policy-identifier attribute

   id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::=
   { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
   smime(16) id-aa(2) 15 }

   SignaturePolicy ::= CHOICE {
      signaturePolicyId          SignaturePolicyId,
      signaturePolicyImplied     SignaturePolicyImplied
                                 --  not used in this version
   }

   SignaturePolicyId ::= SEQUENCE {
      sigPolicyId        SigPolicyId,
      sigPolicyHash      SigPolicyHash,
      sigPolicyQualifiers   SEQUENCE SIZE (1..MAX) OF
                                   SigPolicyQualifierInfo OPTIONAL
   }

   SignaturePolicyImplied ::= NULL
   SigPolicyId ::= OBJECT IDENTIFIER

   SigPolicyHash ::= OtherHashAlgAndValue

   OtherHashAlgAndValue ::= SEQUENCE {
      hashAlgorithm   AlgorithmIdentifier,
      hashValue       OtherHashValue }

   OtherHashValue ::= OCTET STRING

   SigPolicyQualifierInfo ::= SEQUENCE {
      sigPolicyQualifierId  SigPolicyQualifierId,
      sigQualifier          ANY DEFINED BY sigPolicyQualifierId }

   SigPolicyQualifierId ::=   OBJECT IDENTIFIER

   id-spq-ets-uri OBJECT IDENTIFIER ::=
   { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
   smime(16) id-spq(5) 1 }

   SPuri ::= IA5String

   id-spq-ets-unotice OBJECT IDENTIFIER ::=
   { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
   smime(16) id-spq(5) 2 }

   SPUserNotice ::= SEQUENCE {
       noticeRef        NoticeReference OPTIONAL,
       explicitText     DisplayText OPTIONAL}

   NoticeReference ::= SEQUENCE {
      organization     DisplayText,
      noticeNumbers    SEQUENCE OF INTEGER }

   DisplayText ::= CHOICE {
      visibleString    VisibleString  (SIZE (1..200)),
      bmpString        BMPString      (SIZE (1..200)),

      utf8String       UTF8String     (SIZE (1..200)) }

-- Optional Electronic Signature Attributes

-- Commitment-type attribute

id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}

   CommitmentTypeIndication ::= SEQUENCE {

     commitmentTypeId CommitmentTypeIdentifier,
     commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
            CommitmentTypeQualifier OPTIONAL}

   CommitmentTypeIdentifier ::= OBJECT IDENTIFIER

   CommitmentTypeQualifier ::= SEQUENCE {
      commitmentTypeIdentifier CommitmentTypeIdentifier,
      qualifier   ANY DEFINED BY commitmentTypeIdentifier }

id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}

id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}

id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 3}

id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}

id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 5}

id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 6}

-- Signer-location attribute

id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}

   SignerLocation ::= SEQUENCE {
       -- at least one of the following shall be present
       countryName    [0]   DirectoryString OPTIONAL,
          -- As used to name a Country in X.500
       localityName   [1]   DirectoryString OPTIONAL,
           -- As used to name a locality in X.500
       postalAdddress [2]   PostalAddress OPTIONAL }

   PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString

-- Signer-attributes attribute
id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}

   SignerAttribute ::= SEQUENCE OF CHOICE {
      claimedAttributes   [0] ClaimedAttributes,
      certifiedAttributes [1] CertifiedAttributes }

   ClaimedAttributes ::= SEQUENCE OF Attribute

   CertifiedAttributes ::= AttributeCertificate
   -- as defined in RFC 3281: see Section 4.1

-- Content-time-stamp attribute

id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}

   ContentTimestamp ::= TimeStampToken

-- Signature-time-stamp attribute

id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}

SignatureTimeStampToken ::= TimeStampToken

-- Complete-certificate-references attribute

id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}

CompleteCertificateRefs ::=  SEQUENCE OF OtherCertID

-- Complete-revocation-references attribute

id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}

   CompleteRevocationRefs ::=  SEQUENCE OF CrlOcspRef

   CrlOcspRef ::= SEQUENCE {
      crlids          [0] CRLListID   OPTIONAL,
      ocspids         [1] OcspListID  OPTIONAL,
      otherRev        [2] OtherRevRefs OPTIONAL
   }
   CRLListID ::=  SEQUENCE {
      crls        SEQUENCE OF CrlValidatedID}

   CrlValidatedID ::=  SEQUENCE {
      crlHash                   OtherHash,
      crlIdentifier             CrlIdentifier OPTIONAL}

   CrlIdentifier ::= SEQUENCE {
      crlissuer                 Name,
      crlIssuedTime             UTCTime,
      crlNumber                 INTEGER OPTIONAL }

   OcspListID ::=  SEQUENCE {
       ocspResponses        SEQUENCE OF OcspResponsesID}

   OcspResponsesID ::=  SEQUENCE {
       ocspIdentifier              OcspIdentifier,
       ocspRepHash                 OtherHash    OPTIONAL
   }

   OcspIdentifier ::= SEQUENCE {
      ocspResponderID      ResponderID,
      -- As in OCSP response data
      producedAt           GeneralizedTime
      -- As in OCSP response data
   }

   OtherRevRefs ::= SEQUENCE {
       otherRevRefType   OtherRevRefType,
       otherRevRefs      ANY DEFINED BY otherRevRefType
    }

   OtherRevRefType ::= OBJECT IDENTIFIER

-- Certificate-values attribute

id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}

   CertificateValues ::=  SEQUENCE OF Certificate

-- Certificate-revocation-values attribute

id-aa-ets-revocationValues OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}

   RevocationValues ::=  SEQUENCE {

      crlVals           [0] SEQUENCE OF CertificateList OPTIONAL,
      ocspVals          [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
      otherRevVals      [2] OtherRevVals OPTIONAL}

   OtherRevVals ::= SEQUENCE {
       otherRevValType   OtherRevValType,
       otherRevVals      ANY DEFINED BY otherRevValType
   }

   OtherRevValType ::= OBJECT IDENTIFIER

-- CAdES-C time-stamp attribute

id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}

ESCTimeStampToken ::= TimeStampToken

-- Time-Stamped Certificates and CRLs

id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}

TimestampedCertsCRLs ::= TimeStampToken

-- Archive time-stamp attribute
id-aa-ets-archiveTimestampV2  OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}

ArchiveTimeStampToken ::= TimeStampToken

-- Attribute-certificate-references attribute

id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}

AttributeCertificateRefs ::=  SEQUENCE OF OtherCertID

-- Attribute-revocation-references attribute

id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 45}

AttributeRevocationRefs ::=  SEQUENCE OF CrlOcspRef
END

A.2. Signature Format Definitions Using X.680 ASN.1 Syntax โœจ

Heads up, bestie ๐Ÿšจ The ASN.1 module in Annex A.1 wins over the one in Annex A.2 if they ever clash. That A.2 one uses X.680 (1997) [8] syntax, so the A.1 version is the boss.

ETS-ElectronicSignatureFormats-ExplicitSyntax97 { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-mod(0)
eSignature-explicit97(29)}

DEFINITIONS EXPLICIT TAGS ::=

BEGIN

-- EXPORTS All -

IMPORTS

-- Cryptographic Message Syntax (CMS): RFC 3852

   ContentInfo, ContentType, id-data, id-signedData, SignedData,
   EncapsulatedContentInfo, SignerInfo,
   id-contentType, id-messageDigest, MessageDigest, id-signingTime,
   SigningTime, id-countersignature, Countersignature
      FROM CryptographicMessageSyntax2004
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
       smime(16) modules(0) cms-2004(24) }

-- ESS Defined attributes: ESS Update
-- RFC 5035 (Adding CertID Algorithm Agility)

   id-aa-signingCertificate, SigningCertificate, IssuerSerial,
   id-aa-contentReference, ContentReference, id-aa-contentIdentifier,
   ContentIdentifier, id-aa-signingCertificateV2
      FROM ExtendedSecurityServices-2006
        { iso(1) member-body(2) us(840) rsadsi(113549)
          pkcs(1) pkcs-9(9) smime(16) modules(0) id-mod-ess-2006(30) }

-- Internet X.509 Public Key Infrastructure
-- Certificate and CRL Profile: RFC 3280

   Certificate, AlgorithmIdentifier, CertificateList, Name,
   Attribute

      FROM PKIX1Explicit88
      {iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0)
      id-pkix1-explicit(18)}

   GeneralNames, GeneralName, PolicyInformation
      FROM PKIX1Implicit88 {iso(1) identified-organization(3) dod(6)
      internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
      id-pkix1-implicit(19)}

-- Internet Attribute Certificate Profile for Authorization - RFC 3281

   AttributeCertificate
      FROM PKIXAttributeCertificate {iso(1) identified-organization(3)
      dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
      id-mod-attribute-cert(12)}

-- OCSP RFC 2560

   BasicOCSPResponse, ResponderID
      FROM OCSP {iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-ocsp(14)}

-- RFC 3161 Internet X.509 Public Key Infrastructure
-- Time-Stamp Protocol

   TimeStampToken
      FROM PKIXTSP {iso(1) identified-organization(3) dod(6) internet(1)
      security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-tsp(13)}

-- X.520

    DirectoryString {}
        FROM SelectedAttributeTypes
         {joint-iso-itu-t ds(5) module(1) selectedAttributeTypes(5) 4}

;

-- Definitions of Object Identifier arcs used in the present document
-- ==================================================================

-- OID used referencing electronic signature mechanisms based
-- on the present document for use with the IDUP API (see Annex D)

id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
{ itu-t(0) identified-organization(4) etsi(0)
electronic-signature-standard (1733) part1 (1) idupMechanism (4)
etsiESv1(1) }
-- Basic ES Attributes Defined in the present document
-- ===================================================

-- CMS Attributes defined in the present document

-- OtherSigningCertificate - deprecated

id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 19 }


   OtherSigningCertificate ::=  SEQUENCE {
      certs        SEQUENCE OF OtherCertID,
      policies     SEQUENCE OF PolicyInformation OPTIONAL
                   -- NOT USED IN THE PRESENT DOCUMENT
   }

   OtherCertID ::= SEQUENCE {
      otherCertHash            OtherHash,
      issuerSerial             IssuerSerial OPTIONAL }

   OtherHash ::= CHOICE {
      sha1Hash OtherHashValue,
      -- This contains a SHA-1 hash
      otherHash OtherHashAlgAndValue}

-- Policy ES Attributes Defined in the present document
-- ====================================================

-- Mandatory Basic Electronic Signature Attributes, plus in addition.
-- Signature Policy Identifier

id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 15 }

   SignaturePolicy ::= CHOICE {
      signaturePolicyId          SignaturePolicyId,
      signaturePolicyImplied     SignaturePolicyImplied
                              -- not used in this version
   }

   SignaturePolicyId ::= SEQUENCE {
      sigPolicyId           SigPolicyId,
      sigPolicyHash         SigPolicyHash,
      sigPolicyQualifiers   SEQUENCE SIZE (1..MAX) OF
                                 SigPolicyQualifierInfo OPTIONAL

   }

   SignaturePolicyImplied ::= NULL

   SigPolicyId ::= OBJECT IDENTIFIER

   SigPolicyHash ::= OtherHashAlgAndValue

   OtherHashAlgAndValue ::= SEQUENCE {
      hashAlgorithm   AlgorithmIdentifier,
      hashValue       OtherHashValue
   }

   OtherHashValue ::= OCTET STRING

   SigPolicyQualifierInfo ::= SEQUENCE {
      sigPolicyQualifierId       SIG-POLICY-QUALIFIER.&id
      ({SupportedSigPolicyQualifiers}),
      qualifier               SIG-POLICY-QUALIFIER.&Qualifier
                                ({SupportedSigPolicyQualifiers}
                                    {@sigPolicyQualifierId})OPTIONAL }

   SupportedSigPolicyQualifiers SIG-POLICY-QUALIFIER ::=
       { noticeToUser | pointerToSigPolSpec }

   SIG-POLICY-QUALIFIER ::= CLASS {
      &id             OBJECT IDENTIFIER UNIQUE,
      &Qualifier      OPTIONAL }
   WITH SYNTAX {
      SIG-POLICY-QUALIFIER-ID     &id
      [SIG-QUALIFIER-TYPE &Qualifier] }

   noticeToUser SIG-POLICY-QUALIFIER ::= {
      SIG-POLICY-QUALIFIER-ID id-spq-ets-unotice SIG-QUALIFIER-TYPE
      SPUserNotice }

   pointerToSigPolSpec SIG-POLICY-QUALIFIER ::= {
      SIG-POLICY-QUALIFIER-ID id-spq-ets-uri SIG-QUALIFIER-TYPE SPuri }

   id-spq-ets-uri OBJECT IDENTIFIER ::= { iso(1)
    member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
    smime(16) id-spq(5) 1 }

   SPuri ::= IA5String

   id-spq-ets-unotice OBJECT IDENTIFIER ::= { iso(1)
   member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
   smime(16) id-spq(5) 2 }
   SPUserNotice ::= SEQUENCE {
        noticeRef        NoticeReference OPTIONAL,
        explicitText     DisplayText OPTIONAL}

   NoticeReference ::= SEQUENCE {
        organization     DisplayText,
        noticeNumbers    SEQUENCE OF INTEGER }

   DisplayText ::= CHOICE {
        visibleString    VisibleString  (SIZE (1..200)),
        bmpString        BMPString      (SIZE (1..200)),
        utf8String       UTF8String     (SIZE (1..200)) }

-- Optional Electronic Signature Attributes

-- Commitment Type

  id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
    us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}

   CommitmentTypeIndication ::= SEQUENCE {
      commitmentTypeId CommitmentTypeIdentifier,
      commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
         CommitmentTypeQualifier OPTIONAL}

   CommitmentTypeIdentifier ::= OBJECT IDENTIFIER

   CommitmentTypeQualifier ::= SEQUENCE {
      commitmentQualifierId   COMMITMENT-QUALIFIER.&id,
      qualifier               COMMITMENT-QUALIFIER.&Qualifier OPTIONAL }

   COMMITMENT-QUALIFIER ::= CLASS {
      &id             OBJECT IDENTIFIER UNIQUE,
      &Qualifier      OPTIONAL }
   WITH SYNTAX {
      COMMITMENT-QUALIFIER-ID     &id
      [COMMITMENT-TYPE &Qualifier] }

id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}

id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}

id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 3}
id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}

id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 5}

id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 6}

-- Signer Location

id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}

   SignerLocation ::= SEQUENCE {
   -- at least one of the following shall be present
      countryName [0] DirectoryString{maxSize} OPTIONAL,
         -- as used to name a Country in X.520
      localityName [1] DirectoryString{maxSize} OPTIONAL,
         -- as used to name a locality in X.520
      postalAdddress [2] PostalAddress OPTIONAL }

   PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString{maxSize}
                    -- maxSize parametrization as specified in X.683

-- Signer Attributes

id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}

   SignerAttribute ::= SEQUENCE OF CHOICE {
      claimedAttributes   [0] ClaimedAttributes,
      certifiedAttributes [1] CertifiedAttributes }

   ClaimedAttributes ::= SEQUENCE OF Attribute

   CertifiedAttributes ::= AttributeCertificate
   -- as defined in RFC 3281: see Section 4.1

-- Content Timestamp

id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}
   ContentTimestamp ::= TimeStampToken

-- Signature Timestamp

id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}

   SignatureTimeStampToken ::= TimeStampToken

-- Complete Certificate Refs.

id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}

CompleteCertificateRefs ::=  SEQUENCE OF OtherCertID

-- Complete Revocation Refs

id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}

   CompleteRevocationRefs ::=  SEQUENCE OF CrlOcspRef

   CrlOcspRef ::= SEQUENCE {
      crlids          [0] CRLListID   OPTIONAL,
      ocspids         [1] OcspListID  OPTIONAL,
      otherRev        [2] OtherRevRefs OPTIONAL
   }

   CRLListID ::=  SEQUENCE {
      crls        SEQUENCE OF CrlValidatedID
   }

   CrlValidatedID ::=  SEQUENCE {
      crlHash                   OtherHash,
      crlIdentifier             CrlIdentifier OPTIONAL   }

   CrlIdentifier ::= SEQUENCE {
       crlissuer                 Name,
       crlIssuedTime             UTCTime,
       crlNumber                 INTEGER OPTIONAL
   }

   OcspListID ::=  SEQUENCE {
       ocspResponses        SEQUENCE OF OcspResponsesID
   }

   OcspResponsesID ::=  SEQUENCE {
       ocspIdentifier              OcspIdentifier,
       ocspRepHash                 OtherHash    OPTIONAL
   }

   OcspIdentifier ::= SEQUENCE {
      ocspResponderID      ResponderID,
      -- As in OCSP response data
      producedAt           GeneralizedTime
      -- As in OCSP response data
   }

   OtherRevRefs ::= SEQUENCE {
      otherRevRefType   OTHER-REVOCATION-REF.&id,
      otherRevRefs      SEQUENCE OF OTHER-REVOCATION-REF.&Type
   }

OTHER-REVOCATION-REF ::= CLASS {
      &Type,
      &id   OBJECT IDENTIFIER UNIQUE }
   WITH SYNTAX {
      WITH SYNTAX &Type ID &id }

-- Certificate Values

id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}

CertificateValues ::=  SEQUENCE OF Certificate

-- Certificate Revocation Values

id-aa-ets-revocationValues OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}

   RevocationValues ::=  SEQUENCE {
     crlVals           [0] SEQUENCE OF CertificateList OPTIONAL,
     ocspVals          [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,

     otherRevVals      [2] OtherRevVals OPTIONAL
   }

   OtherRevVals ::= SEQUENCE {
      otherRevValType   OTHER-REVOCATION-VAL.&id,
      otherRevVals      SEQUENCE OF OTHER-REVOCATION-REF.&Type
   }

  OTHER-REVOCATION-VAL ::= CLASS {
      &Type,
      &id   OBJECT IDENTIFIER UNIQUE }
   WITH SYNTAX {
      WITH SYNTAX &Type ID &id }

-- CAdES-C Timestamp
id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}

   ESCTimeStampToken ::= TimeStampToken

-- Time-Stamped Certificates and CRLs

id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}

   TimestampedCertsCRLs ::= TimeStampToken

-- Archive Timestamp

id-aa-ets-archiveTimestampV2  OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}

   ArchiveTimeStampToken ::= TimeStampToken

-- Attribute certificate references

id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}

   AttributeCertificateRefs ::=  SEQUENCE OF OtherCertID

-- Attribute revocation references

id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 45}

   AttributeRevocationRefs ::=  SEQUENCE OF CrlOcspRef

END

Annex B (Informative): Extended Forms of Electronic Signatures โœจ

Okay bestie, this is where we level up ๐Ÿ’… Section 4 gives you the overview of all the different formats of electronic signatures in the present document ๐Ÿฆ‹ This annex is the cheat sheet: it lists the attributes that need to be present in each of the extended electronic signature formats, and it walks through example validation sequences using those extended formats ๐ŸŒธ Main character energy for signatures, ngl ๐Ÿซถ

B.1. Extended Forms of Validation Data โœจ

okay so the Complete validation data (CAdES-C) from Section 4.3 (the one shown in Figure 3) can be extended into electronic signatures with extended validation data ๐Ÿ’…. Here are the main flavours of it ๐Ÿฆ‹.

An X-Long electronic signature (CAdES-X Long) is basically the CAdES-C plus the values of the certificates and the revocation information ๐ŸŽ€.

This form can be useful when the verifier does not have direct access to the following info ๐Ÿ™ˆ:

  • the signer's certificate;
  • all the CA certificates that make up the full certification path;
  • all the associated revocation status information, as referenced in the CAdES-C.

sometimes you also want to add extra time-stamps to the Electronic Signatures as additional attributes โฐ. For example:

  • time-stamping all the validation data as held with the ES (CAdES-C). This extended validation data is called a CAdES-X Type 1; or
  • time-stamping individual reference data as used for complete validation. This form of extended validation data is called a CAdES-X Type 2.
NOTE 1: The advantages and drawbacks of CAdES-X Type 1 and CAdES-X Type 2 are discussed in Annex C.4.4. ๐Ÿง

These time-stamp forms can be useful when you need to counter the risk that any CA keys used in the certificate chain may be compromised ๐Ÿ˜ญ.

You can also combine the two formats above ๐Ÿ”ฅ. This form of extended validation data is called an ES X-Long Type 1 or CAdES-X Long Type 2. It's super handy when the verifier needs both the values and proof of when the validation data existed ๐Ÿ‘‘.

NOTE 2: The advantages and drawbacks of CAdES-X long Type 1 and CAdES-X long Type 2 are discussed in Annex C.4.6. ๐Ÿง

B.1.1. CAdES-X Long ๐ŸŒธ

an electronic signature with the additional validation data forming the CAdES-X Long form (CAdES-X-Long) is shown in Figure B.1, and it's made up of the following:

  • CAdES-BES or CAdES-EPES, as defined in Sections 4.3 , 5.7, or 5.8;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2.

the following attributes are required if a TSP is not providing a time-mark of the ES ๐Ÿ•ฐ๏ธ:

  • signature-time-stamp attribute, as defined in Section 6.1.1.

the following attributes are required if the full certificate values and revocation values are not already included in the CAdES-BES or CAdES-EPES ๐Ÿ“:

  • certificate-values attribute, as defined in Section 6.3.3;
  • revocation-values attribute, as defined in Section 6.3.4.

if attributes certificates are used, then the following attributes may be present ๐Ÿงš:

  • attribute-certificate-references attribute, defined in Section 6.2.3;
  • attribute-revocation-references attribute, as defined in Section 6.2.4.

other unsigned attributes may be present, but they're not required ๐Ÿซถ.

NOTE: Attribute certificate and revocation references are only present if a user attribute certificate is present in the electronic signature; see Sections 6.2.2 and 6.2.3. ๐Ÿ’œ
+---------------------- CAdES-X-Long --------------------------------+
|+-------------------------------------- CAdES-C ---+                |
||                                     +----------+ | +-------------+|
||+----- CAdES-BES or CAdES-EPES ----+ |Timestamp | | |             ||
|||                                  | |over      | | | Complete    ||
|||+---------++----------++---------+| |digital   | | | certificate ||
||||         ||          ||         || |signature | | |    and      ||
||||Signer's ||  Signed  ||Digital  || |          | | | revocation  ||
||||Document ||Attributes||signature|| |Optional  | | |    data     ||
||||         ||          ||         || |when      | | |             ||
|||+---------++----------++---------+| |timemarked| | |             ||
||+----------------------------------+ +----------+ | |             ||
||                                     +-----------+| +-------------+|
||                                     |Complete   ||                |
||                                     |certificate||                |
||                                     |and        ||                |
||                                     |revocation ||                |
||                                     |references ||                |
||                                     +-----------+|                |
|+--------------------------------------------------+                |
|                                                                    |
+--------------------------------------------------------------------+

Figure B.1: Illustration of CAdES-X-Long ๐ŸŽจ

B.1.2. CAdES-X Type 1 ๐Ÿฆ„

an electronic signature with the additional validation data forming the eXtended validation data - Type 1 X is shown in Figure B.2, and it comprises the following ๐Ÿ’–:

  • the CAdES-BES or CAdES-EPES, as defined in Sections 4.2, 5.7, or 5.8;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2;
  • CAdES-C-Timestamp attribute, as defined in Section 6.3.5.

the following attributes are required if a TSP is not providing a time-mark of the ES:

  • signature-time-stamp attribute, as defined in Section 6.1.1.

if attributes certificates are used, then the following attributes may be present:

  • attribute-certificate-references attribute, defined in Section 6.2.3;
  • attribute-revocation-references attribute, as defined in Section 6.2.4.

other unsigned attributes may be present, but they are not required.

+------------------------ CAdES-X-Type 1 ----------------------------+
|+---------------------------------- CAdES-C ------+                 |
||                                    +----------+ | +-------------+ |
||+--- CAdES-BES or CAdES-EPES ------+|Timestamp | | |             | |
|||                                  ||over      | | |             | |
|||+---------++----------++---------+||digital   | | |             | |
||||Signer's ||  Signed  || Digital |||signature | | | Timestamp   | |
||||Document ||Attributes||signature|||          | | |    over     | |
||||         ||          ||         |||Optional  | | |   CAdES-C   | |
|||+---------++----------++---------+||when      | | |             | |
||+----------------------------------+|timemarked| | |             | |
||                                    +----------+ | |             | |
||                                    +-----------+| +-------------+ |
||                                    |Complete   ||                 |
||                                    |certificate||                 |
||                                    |   and     ||                 |
||                                    |revocation ||                 |
||                                    |references ||                 |
||                                    +-----------+|                 |
|+-------------------------------------------------+                 |
|                                                                    |
+--------------------------------------------------------------------+

Figure B.2: Illustration of CAdES-X Type 1 ๐ŸŒˆ

B.1.3. CAdES-X Type 2 ๐Ÿง

an electronic signature with the additional validation data forming the eXtended Validation Data - Type 2 X is shown in Figure B.3, and it comprises the following ๐Ÿญ:

  • CAdES-BES or CAdES-EPES, as defined in Sections 4.2, 5.7, or 5.8;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2;
  • time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.

the following attributes are required if a TSP is not providing a time-mark of the ES:

  • signature-time-stamp attribute, as defined in Section 6.1.1.

if attributes certificates are used, then the following attributes may be present:

  • attribute-certificate-references attribute, defined in Section 6.2.3;
  • attribute-revocation-references attribute, as defined in Section 6.2.4.

other unsigned attributes may be present, but they are not required.

+----------------------- CAdES-X-Type 2 -----------------------------+
|+-------------------------------------- CAdES-C --+                 |
||                                    +----------+ |                 |
||+-- CAdES-BES or CAdES-EPES -------+|Timestamp | |                 |
|||                                  ||over      | |                 |
|||+---------++----------++---------+||digital   | | +-------------+ |
||||         ||          ||         |||Signature | | | Timestamp   | |
||||Signer's ||  Signed  || Digital |||          | | | only over   | |
||||Document ||Attributes||signature|||Optional  | | | Complete    | |
||||         ||          ||         |||when      | | | certificate | |
|||+---------++----------++---------+||Timemarked| | |    and      | |
||+----------------------------------++----------+ | | revocation  | |
||                                    +-----------+| | references  | |
||                                    |Complete   || +-------------+ |
||                                    |certificate||                 |
||                                    |and        ||                 |
||                                    |revocation ||                 |
||                                    |references ||                 |
||                                    +-----------+|                 |
|+-------------------------------------------------+                 |
|                                                                    |
+--------------------------------------------------------------------+

Figure B.3: Illustration of CAdES-X Type 2 ๐Ÿฆ‹

B.1.4. CAdES-X Long Type 1 and CAdES-X Long Type 2 ๐ŸŽ€

okay so an ES with the extra validation data that makes up CAdES-X Long Type 1 and CAdES-X Long Type 2 is shown in Figure B.4 โœจ, and it's built from these pieces:

  • CAdES-BES or CAdES-EPES, as defined in Sections 4.3, 5.7, or 5.8;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2;

the signature-time-stamp attribute is required if a TSP is not providing a time-mark of the ES ๐Ÿ•ฐ๏ธ:

  • signature-time-stamp attribute, as defined in Section 6.1.1.

if the full certificate values and revocation values are not already in the CAdES-BES or CAdES-EPES, then these two are required ๐Ÿ’…:

  • certificate-values attribute, as defined in Section 6.3.3;
  • revocation-values attribute, as defined in Section 6.3.4.

if attributes certificates are used, these ones may be present ๐Ÿฆ‹:

  • attribute-certificate-references attribute, defined in Section 6.2.3;
  • attribute-revocation-references attribute, as defined in Section 6.2.4.

plus, one of these attributes is required (it's giving "pick one" energy ๐Ÿซถ):

  • CAdES-C-Timestamp attribute, as defined in Section 6.3.5;
  • time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.

other unsigned attributes may be present, but they're not required ๐ŸŒธ.

   +---------------------- CAdES-X-Type 1 or 2 ------------------------+
   |                                                   +--------------+|
   |+-------------------------------------- CAdES-C --+|+------------+||
   ||                                    +----------+ ||| Timestamp  |||
   ||+-- CAdES-BES or CAdES-EPES -------+|Timestamp | |||    over    |||
   |||                                  ||over      | |||  CAdES-C   |||
   |||+---------++----------++---------+||digital   | | +------------+ |
   ||||         ||          ||         |||signature | ||      or      ||
   ||||Signer's ||  Signed  || Digital |||          | ||+------------+||
   ||||Document ||Attributes||Signature|||Optional  | ||| Timestamp  |||
   ||||         ||          ||         |||when      | ||| only over  |||
   |||+---------++----------++---------+||timemarked| ||| complete   |||
   ||+----------------------------------++----------+ ||| certificate|||
   ||                                                 |||    and     |||
   ||                                    +-----------+||| revocation |||
   ||                                    |Complete   |||| references |||
   ||                                    |certificate|||+------------+||
   ||                                    |and        ||+--------------+|
   ||                                    |revocation || +------------+ |
   ||                                    |references || |Complete    | |
   ||                                    +-----------+| |certificate | |
   |+-------------------------------------------------+ |   and      | |
   |                                                    |revocation  | |
   |                                                    |  values    | |
   |                                                    +------------+ |
   +-------------------------------------------------------------------+

             Figure B.4: Illustration of CAdES-X Long Type 1
                         and CAdES-X Long Type 2

B.2. Time-Stamp Extensions โฑ๏ธ

every instance of the time-stamp attribute may include these attributes related to the TSU as unsigned attributes in the signedData of the time-stamp ๐Ÿ’œ:

  • complete-certificate-references attribute of the TSU, as defined in Section 6.2.1;
  • complete-revocation-references attribute of the TSU, as defined in Section 6.2.2;
  • certificate-values attribute of the TSU, as defined in Section 6.3.3;
  • revocation-values attribute of the TSU, as defined in Section 6.3.4.

other unsigned attributes may be present, but they're not required ๐ŸŽ€.

B.3. Archive Validation Data (CAdES-A) ๐Ÿ—„๏ธ

okay this one is the big-brain move ๐Ÿง . before the algorithms, keys, and other crypto data used when the CAdES-C was built go weak, and the crypto functions become vulnerable (or the certificates backing up earlier time-stamps expire), the signed data, the CAdES-C, and any extra info (aka any CAdES-X) should be time-stamped ๐Ÿ•ฐ๏ธ. if possible, this should use stronger algorithms (or longer key lengths) than the original time-stamp. this extra data plus its time-stamp is called Archive validation data required for the ES Archive format (CAdES-A) โœจ. the time-stamping process may be repeated every time the protection used to time-stamp a previous CAdES-A becomes weak, so a CAdES-A can end up with multiple embedded time-stamps ๐ŸŒˆ.

here's an example of an electronic signature (ES) with the extra validation data for the CAdES-C and CAdES-X forming the CAdES-A, shown in Figure B.5 ๐Ÿฆ‹:

+--------------------------- CAdES-A---------------------------------+
|+----------------------------------------------------+              |
||                                    +--------------+| +----------+ |
||+--------------------- CAdES-C ----+|+------------+|| |          | |
|||                     +----------+ ||| Timestamp  ||| |          | |
|||+-- CAdES-BES ------+|Timestamp | |||   over     ||| |          | |
||||   or CAdES-EPES   ||over      | |||  CAdES-C   ||| |  Archive | |
||||                   ||digital   | ||+------------+|| |          | |
||||                   ||signature | ||     or       || |Timestamp | |
||||                   ||          | ||+------------+|| |          | |
||||                   ||optional  | ||| Timestamp  ||| |          | |
||||                   ||when      | ||| only over  ||| |          | |
||||                   ||timemarked| ||| complete   ||| |          | |
|||+-------------------++----------+ ||| certificate||| +----------+ |
|||                                  |||    and     |||              |
|||                   +-------------+||| revocation |||              |
|||                   | Complete    |||| references |||              |
|||                   | certificate |||+------------+||              |
|||                   | and         ||+--------------+|              |
|||                   | revocation  || +------------+ |              |
|||                   | references  || |Complete    | |              |
|||                   +-------------+| |certificate | |              |
||+----------------------------------+ |   and      | |              |
||                                     |revocation  | |              |
||                                     |  values    | |              |
||                                     +------------+ |              |
|+----------------------------------------------------+              |
+--------------------------------------------------------------------+

                    Figure B.5: Illustration of CAdES-A

the CAdES-A is made up of these elements ๐Ÿงฉ:

  • the CAdES-BES or CAdES-EPES, including their signed and unsigned attributes;
  • complete-certificate-references attribute, as defined in Section 6.2.1;
  • complete-revocation-references attribute, as defined in Section 6.2.2.

the signature-time-stamp attribute is required if a TSP is not providing a time-mark of the ES ๐Ÿ•ฐ๏ธ:

  • signature-time-stamp attribute, as defined in Section 6.1.1.

if attributes certificates are used, these may be present ๐ŸŒธ:

  • attribute-certificate-references attribute, defined in Section 6.2.3;
  • attribute-revocation-references attribute, as defined in Section 6.2.4.

if the full certificate values and revocation values are not already in the CAdES-BES or CAdES-EPES, these are required ๐Ÿ’…:

  • certificate-values attribute, as defined in Section 6.3.3;
  • revocation-values attribute, as defined in Section 6.3.4.

at least one of these two attributes is required ๐Ÿ‘‘:

  • CAdES-C-Timestamp attribute, as defined in Section 6.3.5;
  • time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.

and this one is required too ๐Ÿ”ฅ:

  • archive-time-stamp attributes, defined in Section 6.4.1.

several instances of the archive-time-stamp attribute may show up on an electronic signature, both over time and from different TSUs ๐ŸŒˆ. the time-stamp should be created using stronger algorithms (or longer key lengths) than the original electronic signatures or time-stamps, no cap ๐Ÿ’€.

other unsigned attributes of the ES may be present, but they're not required ๐Ÿซถ.

the archive-time-stamp holds its own certificate and revocation info, which it needs to validate itself ๐ŸŽ€. this may include these unsigned attributes:

  • complete-certificate-references attribute of the TSU, as defined in Section 6.2.1;
  • complete-revocation-references attribute of the TSU, as defined in Section 6.2.2;
  • certificate-values attribute of the TSU, as defined in Section 6.3.3;
  • revocation-values attribute of the TSU, as defined in Section 6.3.4.

other unsigned attributes may be present, but they're not required ๐Ÿฆ‹.

B.4. Example Validation Sequence ๐Ÿงš

as we covered earlier, the signer or the initial verifier may collect all the additional data that forms the electronic signature ๐Ÿ“ฆ. Figure B.6 and the description after it show how the validation process can build up a complete electronic signature over time, and honestly it's so satisfying to watch ๐Ÿ˜ญโœจ.

+------------------------------------------ CAdES-C -------------+
|+------------------------------- CAdES-T ------+                |
||+-------------- CAdES ------------+           |                |
|||+--------------------++---------+|+---------+|  +-----------+ |
|||| ________           ||         |||Timestamp||  |Complete   | |
|||||Sign.Pol|          ||Digital  |||over     ||  |certificate| |
|||||  Id.   | Signed   ||signature|||digital  ||  |   and     | |
||||| option.|attributes||         |||signature||  |revocation | |
|||||________|          |+---------+|+---------+|  |references | |
|||+--------------------+           |    ^      |  +-----------+ |
||+---------------------------------+    |      |        ^       |
||                     1 |              /       |        |       |
|+---------------------- | ------------/--------+        |       |

Okay so bestie, we're picking up right at the figures for the Example Validation Sequence ๐Ÿ’…โœจ Let's look at Figure B.6, the basic validation loop, first.

+----------------------- | ---------- / --------------- / -------+
                         |           /2    ----3--------
      +----------+       |          /     /
      |          |       v         /     |
      | Signer's |      +---------------------+     +-------------+
      | document |----->| Validation Process  |---->|- Valid      |
      |          |      +---------------------+ 4   |- Invalid    |
      +----------+           |  ^       |  ^        |- Validation |
                             v  |       v  |        |  Incomplete |
                         +---------+ +--------+     +-------------+
                         |Signature| |Trusted |
                         | Policy  | |Service |
                         | Issuer  | |Provider|
                         +---------+ +--------+

Figure B.6: Illustration of a CAdES validation sequence ๐Ÿฆ‹

Soon after the signer hands over the electronic signature (CAdES) (1), the digital signature value may be checked ๐Ÿ” The validation process shall at least add a time-stamp (2), unless the signer already provided one that the verifier trusts ๐Ÿซถ The validation process may also validate the electronic signature using extra data (for example certificates, CRL, and so on) that comes from Trusted Service Providers ๐ŸŒธ When it applies, the validation process must also meet the requirements in a signature policy ๐Ÿ‘‘ If the validation process ends up as validation incomplete, then the output from this stage is the CAdES-T โœจ

To figure out whether the validity status is Valid or Invalid and tell the user about it (4), all the extra data needed to validate the CAdES-C has to be on hand ๐Ÿ’– Think the full certificate and the revocation info, periodt ๐Ÿ’…

Once the data needed for the complete validation data references (CAdES-C) is available, the validation process should:

  • obtain all the necessary additional certificates and revocation status information;
  • complete all the validation checks on the ES using the complete certificate and revocation information (if a time-stamp is not already present, this may be added at the same stage, combining the CAdES-T and CAdES-C processes);
  • record the complete certificate and revocation references (3);
  • indicate the validity status to the user (4).

At the same time the validation process creates the CAdES-C, it may provide and/or record the values of certificates and revocation status information used in CAdES-C (5). The end result is called CAdES-X Long. ๐ŸŽ€ Main character era, honestly ๐Ÿ‘‘

This is illustrated in Figure B.7.

+----------------------------------------------------- CAdES-X Long -+
|+------------------------------- CAdES-C -------------+             |
||+-------------- CAdES ------------+                  |             |
|||+--------------------++---------+|+---------+       |+-----------+|
|||| ________           ||         |||Timestamp|       ||Complete   ||
|||||Sign.Pol|          ||Digital  |||over     |       ||certificate||
|||||  Id.   | Signed   ||signature|||digital  |       ||   and     ||
||||| option.|attributes||         |||signature|       ||revocation ||
|||||________|          ||         ||+---------+       ||  values   ||
|||+--------------------++---------+|  ^  +-----------+|+-----------+|
||+---------------------------------+  |  |Complete   ||      ^      |
||                         |           |  |certificate||      |      |
||                         |         2 |  |   and     ||      |      |
||                         |           |  |revocation ||      |      |
||                         |           |  |references ||      |      |
||                       1 |          /   +-----------+|      |      |
|+------------------------ | ------- / --------- ^-----+     /       |
+------------------------- | ------ / ---------- |--------- / -------+
                           |       /      ----- /  ------- /
      +----------+         |      /      /  3     /   5
      |          |         v     |      |        |
      | Signer's |      +--------------------+      +-----------+
      | document |----->| Validation Process |----->| - Valid   |
      |          |      +--------------------+  4   | - Invalid |
      +----------+          |  ^       |  ^         +-----------+
                            v  |       v  |
                        +---------+ +--------+
                        |Signature| |Trusted |
                        | Policy  | |Service |
                        | Issuer  | |Provider|
                        +---------+ +--------+

Figure B.7: Illustration of a CAdES validation sequence with CAdES-X Long ๐ŸŒˆ

When the validation process creates the CAdES-C, it may also create extended forms of validation data ๐Ÿงš

A first alternative is to time-stamp all data forming the CAdES-X Type 1 โฐ

This is illustrated in Figure B.8.

+------------------------------------------------ CAdES-X Type 1 -----+
|+------------------------------- CAdES-C ------------------+         |
||+-------------- CAdES ------------+                       |         |
|||+--------------------++---------+|+---------++----------+|+-------+|
|||| ________           ||         |||Timestamp|| Complete |||       ||
|||||Sign.Pol|          ||Digital  |||over     ||  cert.   |||Time-  ||
|||||  Id.   | Signed   ||signature|||digital  ||   and    |||stamp  ||
||||| option.|attributes||         |||signature||  revoc.  ||| over  ||
|||||________|          |+---------+|+---------+|references|||CAdES-C||
|||+--------------------+           |    ^      |          |||       ||
||+---------------------------------+    |      +----------+|+-------+|
||                         |             |            ^     |    ^    |
||                       1 |            /             |     |    |    |
|+------------------------ | --------- / ----------- / -----+    |    |
+------------------------- | -------- / ----------- / --------- / ----+
                           |       2 /     ---3----            /
      +----------+         |        /    /   -----------5------
      |          |         v       |    |  /
      | Signer's |      +--------------------+       +-----------+
      | document |----->| Validation Process |-----> | - Valid   |
      |          |      +--------------------+  4    | - Invalid |
      +----------+          |  ^       |  ^          +-----------+
                            v  |       v  |
                        +---------+ +--------+
                        |Signature| |Trusted |
                        | Policy  | |Service |
                        | Issuer  | |Provider|
                        +---------+ +--------+

Figure B.8: Illustration of CAdES with eXtended validation data CAdES-X Type 1 ๐ŸŽ€

Another alternative is to time-stamp the certificate and revocation information references used to validate the electronic signature (but not the signature) (6) ๐Ÿฆ‹ The end result is called CAdES-X Type 2 ๐Ÿ’œ

This is illustrated in Figure B.9.

+-------------------------------------------- CAdES-X Type 2 --------+
|+------------------------------- CAdES-C -------------+             |
||+-------------- CAdES ------------+                  |             |
|||+--------------------++---------+|+---------+       |+-----------+|
|||| ________           ||         |||Timestamp|       ||Timestamp  ||
|||||Sign.Pol|          ||         |||over     |       ||   over    ||
|||||  Id.   | Signed   ||Digital  |||digital  |       ||complete   ||
||||| option.|attributes||signature|||signature|       ||certificate||
|||||________|          ||         |||         |       ||           ||
|||+--------------------++---------+|+---------+       ||   and     ||
||+---------------------------------+  ^  +-----------+||revocation ||
||                         |           |  |Complete   |||references ||
||                         |           |  |certificate||+-----------+|
||                         |           |  |   and     ||     ^       |
||                       1 |         2 |  |revocation ||     |       |
||                         |           |  |references ||     |       |
||                         |           |  +-----------+|     |       |
|+------------------------ | --------- | --- ^ --------+     |       |
|                          |           |   3 |              /        |
|                          |           |    /    ----------          |
|                          |          /    /    /   6                |
|                          |         /    /    /                     |
|                          |        /    /    /                      |
+------------------------- | ----- | -- | -- / ----------------------+
                           |       |    |   |
                           v       |    |   |
                        +--------------------+      +-----------+
                        | Validation Process |----->| - Valid   |
                        +--------------------+  4   | - Invalid |
                            |  ^       |  ^         +-----------+
                            v  |       v  |
                        +---------+ +--------+
                        |Signature| |Trusted |
                        | Policy  | |Service |
                        +---------+ +--------+

Figure B.9: Illustration of CAdES with eXtended validation data CAdES-X Type 2 ๐ŸŒธ

Before the algorithms used in any of the electronic signatures become, or are likely to become, compromised or vulnerable in the future, it may be necessary to time-stamp the entire electronic signature, including all the values of the validation and user data, as an ES with Archive validation data (CAdES-A) (7) โญ Think of it as a time capsule ๐Ÿ“

A CAdES-A is illustrated in Figure B.10.

+----------------------------- CAdES-A ---------------------------+
|                                                                 |
|  +-- CAdES-X Long Type 1 or 2  ----------+                      |
|  |                                       |   +------------+     |
|  |                                       |   |            |     |
|  |                                       |   |  Archive   |     |
|  |                                       |   | Time-stamp |     |
|  |                                       |   |            |     |
|  |                                       |   +------------+     |
|  +---------------------------------------+         ^            |
|  +----------+          ^   ^   ^   ^               |            |
|  |          |          |   |   |   |              /             |
|  | Signers' |          |   |   |   |             /              |
|  | Document |\         |   |   |   |            /               |
|  |          | \ 1    2 | 3 | 5 | 6 |         7 /                |
|  +----------+  \       |   |   |   |          /                 |
|                 \      |   |   |   |         /                  |
+----------------- \ --- | - | - | - | ------ / ------------------+
                    \    |   |   |   |       |
                     |   |   |   |   |       |
                     |   |   |   |   |       |
                     v   v   |   |   |       |
                 +-----------------------------+      +-----------+
                 |      Validation Process     |----->| - Valid   |
                 +-----------------------------+  4   | - Invalid |
                     |  ^       |  ^                  +-----------+
                     v  |       v  |
                 +---------+ +--------+
                 |Signature| |Trusted |
                 | Policy  | |Service |
                 | Issuer  | |Provider|
                 +---------+ +--------+

Figure B.10: Illustration of CAdES-A ๐Ÿ”ฅ

B.5. Additional Optional Features โœจ

okay so the document also defines some extra optional features ๐Ÿ’… bestie, these are all optional, but they're iconic:

  • indicate a commitment type being made by the signer ๐Ÿซถ
  • indicate the claimed time when the signature was done โฐ
  • indicate the claimed location of the signer ๐Ÿ“
  • indicate the claimed or certified role under which a signature was created ๐Ÿ‘‘
  • support counter signatures ๐Ÿ”
  • support multiple signatures ๐ŸŒˆ

Annex C (Informative): General Description ๐Ÿฆ‹

this annex is the vibe check ๐Ÿงš It explains some of the concepts and gives the reasoning behind the normative parts of the document ๐Ÿ’œ

the spec below explains why and when each part of an electronic signature is useful ๐ŸŽ€ It also covers the vulnerabilities and threats each part helps counter, and how it does that ๐Ÿ˜ญ

C.1. The Signature Policy ๐Ÿ“œ

the signature policy is a set of rules for creating and validating an electronic signature ๐Ÿ’– If you follow them, the signature can be determined to be valid โœจ A given legal or contractual context may recognize a particular signature policy as meeting its requirements ๐Ÿ‘‘ A signature policy may be issued by a party that relies on the electronic signatures, and the signer picks it for use with that relying party ๐Ÿค Or it can be set up by an electronic trading association for its members to use ๐ŸŒธ Both the signer and the verifier use the same signature policy, no exceptions ๐Ÿ’…

the signature policy may be explicitly identified, or it may be implied by the semantics of the data being signed and by external data, like a contract being referenced that itself points to a signature policy ๐Ÿ” An explicit signature policy has a globally unique reference, and the signer binds that reference to an electronic signature as part of the signature calculation ๐Ÿ”

the signature policy needs to be readable by humans ๐Ÿ‘€ so people can check that it meets the legal and contractual requirements where it's being used ๐Ÿ’ผ To make automatic processing of an electronic signature work, the parts of the policy that define the electronic rules for creating and validating the signature also need to be fully defined and in a form computers can process ๐Ÿค–

so the signature policy includes the following:

  • rules that apply to technical validation of a particular signature ๐Ÿงช
  • rules that may be implied through adoption of Certificate Policies that apply to the electronic signature (e.g., rules for ensuring the secrecy of the private signing key) ๐Ÿ”’
  • rules that relate to the environment used by the signer, e.g., the use of an agreed CAD (Card Accepting Device) used in conjunction with a smart card ๐Ÿ’ณ

for example, the major rules needed for technical validation can include:

  • recognized root keys or "top-level certification authorities" ๐Ÿ‘‘
  • acceptable certificate policies (if any) ๐Ÿ“‹
  • necessary certificate extensions and values (if any) ๐Ÿงฉ
  • the need for the revocation status for each component of the certification tree ๐Ÿšซ
  • acceptable TSAs (if time-stamp tokens are being used) โฑ๏ธ
  • acceptable organizations for keeping the audit trails with time-marks (if time-marking is being used) ๐Ÿ—‚๏ธ
  • acceptable AAs (if any are being used), and ๐ŸŽซ
  • rules defining the components of the electronic signature that shall be provided by the signer with data required by the verifier when required to provide long-term proof ๐Ÿ•ฐ๏ธ

C.2. Signed Information ๐ŸŽ

the information being signed may be defined as a MIME-encapsulated message ๐Ÿ’Œ MIME can signal the format of the content so the right display or application gets picked ๐Ÿ–ฅ๏ธ The content can be formatted data, free text, or fields from an electronic form (e-form) ๐Ÿ“ For example, the Adobe(tm) format "pdf" or the eXtensible Mark up Language (XML) may be used ๐ŸŒŸ Annex D defines how the content may be structured to indicate the type of signed data using MIME ๐Ÿ’–

C.3. Components of an Electronic Signature ๐Ÿงฉ

C.3.1. Reference to the Signature Policy ๐Ÿ“Œ

when two independent parties want to evaluate an electronic signature, it's a must that they get the same result ๐Ÿ™ This can be handled with comprehensive signature policies that keep signature validation consistent ๐Ÿ’ฏ Signature policies can be identified implicitly by the data being signed, or they can be explicitly identified using the CAdES-EPES form of electronic signature ๐ŸŽฏ The CAdES-EPES requires that a consistent signature policy be used by both the signer and verifier ๐Ÿค

by signing over the Signature Policy Identifier in the CAdES-EPES, the signer explicitly shows that they applied the signature policy when creating the signature ๐Ÿซถ

to unambiguously identify the details of an explicit signature policy that is used to verify a CAdES-EPES signature, an identifier and a hash of the "Signature policy" shall be part of the signed data ๐Ÿ”Ž Extra information about the explicit policy (e.g., a web reference to the document) may be carried as "qualifiers" to the Signature Policy Identifier ๐Ÿท๏ธ

to unambiguously identify the authority responsible for defining an explicit signature policy, the "Signature policy" can be signed ๐Ÿ–Š๏ธ

C.3.2. Commitment Type Indication ๐Ÿ’

the commitment type can be indicated in the electronic signature either:

  • explicitly, using a "commitment type indication" in the electronic signature ๐Ÿ“ฃ
  • implicitly or explicitly from the semantics of the signed data ๐Ÿง 

if the commitment type is explicit, using a "commitment type indication" in the electronic signature, then accepting a verified signature implies accepting the semantics of that commitment type โœ… The semantics of explicit commitment type indications may be subject to agreement between signer and verifier, specified as part of the signature policy, or registered for generic use across multiple policies ๐Ÿค“

if a CAdES-EPES electronic signature format is used and the electronic signature includes a commitment type indication other than one of those recognized under the signature policy, the signature shall be treated as invalid ๐Ÿšซ๐Ÿ’€

how commitment is indicated using the semantics of the data being signed is outside the scope of the present document ๐Ÿ™ˆ

NOTE: Examples of commitment indicated through the semantics of the data being signed are:

  • an explicit commitment made by the signer, indicated by the type of data being signed over. Thus, the data structure being signed can have an explicit commitment within the context of the application (e.g., EDIFACT purchase order) ๐Ÿ›’
  • an implicit commitment, which is a commitment made by the signer because the data being signed over has specific semantics (meaning) that only humans can interpret (i.e., free text) ๐Ÿ“–

C.3.3. Certificate Identifier from the Signer ๐Ÿชช

in a lot of real-life environments, users can get different certificates from different CAs, or even from the same CA, that contain the same public key for different names ๐Ÿ”‘ The big perk is that a user can use the same private key for different purposes ๐ŸŽ€ Using one key for multiple things matters when a smart card protects the private key, since a smart card's storage is always limited ๐Ÿ’ณ When several CAs are involved, each certificate may contain a different identity, e.g., as a citizen of a nation or as an employee of a company ๐ŸŒ So when a private key is used for various purposes, the certificate is needed to clarify the context the private key was used in when generating the signature ๐Ÿงพ Where multiple private keys might be used, the signer has to tell the verifier exactly which certificate to use ๐Ÿซต

a lot of current schemes simply add the certificate after the signed data, and that makes them vulnerable to substitution attacks ๐Ÿ˜ฑ If the signer's certificate was just appended to the signature and wasn't protected by it, anyone could swap in a different certificate, and the message would look like it was signed by someone else ๐Ÿ™€ To counter this kind of attack, the signer's identifier has to be protected by the signer's digital signature ๐Ÿ›ก๏ธ

to unambiguously identify the certificate used to verify the signature, an identifier of the signer's certificate shall be part of the signed data ๐Ÿช„

C.3.4. Role Attributes ๐Ÿ‘‘

the signer's name matters, but their position within a company or organization matters just as much ๐Ÿ’ผ Some information (e.g., a contract) may only be valid if signed by someone in a particular role, like a Sales Director ๐Ÿ“ˆ In lots of cases, who the Sales Director actually is isn't that important ๐Ÿคทโ€โ™€๏ธ What's fundamental is making sure the signer is empowered by their company to be the Sales Director ๐Ÿ’…

the present document defines two different ways to provide this feature:

  • by placing a claimed role name in the CMS signed attributes field ๐Ÿ—ฃ๏ธ
  • by placing an attribute certificate containing a certified role name in the CMS signed attributes field ๐Ÿ“œ

NOTE: Another possible approach would have been to use additional attributes containing the role name(s) in the signer's identity certificate. However, it was decided not to follow this approach because it significantly complicates the management of certificates. For example, using separate certificates for the signer's identity and roles means new identity keys don't need to be issued if a user's role changes ๐Ÿ”„

C.3.4.1. Claimed Role ๐Ÿ™‹โ€โ™€๏ธ

the signer may be trusted to state their own role without any certificate to back up the claim ๐Ÿคž In that case, the claimed role can be added to the signature as a signed attribute โœ๏ธ

C.3.4.2. Certified Role ๐Ÿ…

unlike public key certificates, which bind an identifier to a public key, Attribute Certificates bind the identifier of a certificate to some attributes, like a role ๐ŸŽซ An Attribute Certificate is NOT issued by a CA. It's issued by an Attribute Authority (AA) ๐Ÿข In most cases, the Attribute Authority might be under the control of an organization or company that's best placed to know which attributes are relevant to which individual ๐Ÿง‘โ€๐Ÿ’ผ The Attribute Authority may use or point to public key certificates issued by any CA, as long as the appropriate trust may be placed in that CA ๐Ÿค Attribute Certificates may have various periods of validity, and that period may be quite short, e.g., one day โณ That means a new Attribute Certificate has to be obtained every day, valid for that day, but this can be a real advantage because revocation of such certificates may not be needed ๐Ÿ™Œ When signing, the signer has to specify which Attribute Certificate they select ๐ŸŽฏ To do that, the Attribute Certificate has to be included in the signed data so the signer's digital signature protects it ๐Ÿ”

to unambiguously identify the attribute certificate(s) used to verify the signature, an identifier of the attribute certificate(s) from the signer shall be part of the signed data ๐Ÿ’–

C.3.5. Signer Location ๐Ÿ“

okay so sometimes in a transaction it actually matters where the signer was physically sitting when they put their signature on, so there's an optional location indicator that SHALL be able to be included ๐Ÿ—บ๏ธ

to show where the signer was when they applied their signature, a location attribute MAY be included in the signature ๐ŸŒธ

C.3.6. Signing Time โฐ

the doc gives you a way to include a claimed signing time as an attribute of an electronic signature โœจ

with this attribute, a signer MAY sign over a time that is the claimed signing time. when an ES with Time gets created (CAdES-T), there's either a trusted time-stamp that gets obtained and added to the ES, or a trusted time-mark sitting in an audit trail ๐Ÿ“œ when a verifier accepts a signature, the two times SHALL be within acceptable limits ๐Ÿ’…

there's also a further optional attribute defined in the doc to time-stamp the content and prove the content existed at the time shown on the time-stamp token ๐Ÿงพ

with this optional attribute, a trusted secure time MAY be obtained before the document gets signed and included under the digital signature. it does need an online connection to a trusted time-stamping service before generating the signature, so it might not be the precise signing time since it was grabbed in advance ๐Ÿ™ˆ still, the signer MAY use this optional attribute to prove the signed object existed before the date in the time-stamp (see Section 5.11.4) ๐Ÿฆ‹

C.3.7. Content Format ๐Ÿ“„

when you present signed data to a human user, it's really important there's zero ambiguity about how the signed info is shown to the relying party ๐Ÿ‘€ when data (not stuff that's been further signed or encrypted) is wrapped in the SignedData (eContentType in EncapsulatedContentInfo set to id-data), further typing information SHOULD be used to identify the type of document being signed, so the relying party can pick the right representation (text, sound, or video) ๐ŸŽ€ this is generally done with the MIME content typing and encoding mechanism defined in RFC 2045 [6]). more info on MIME is in Annex F ๐Ÿ’–

C.3.8. content-hints ๐Ÿงฉ

this one's giving puzzle energy ๐Ÿช† the contents-hints attribute gives info about the innermost signed content of a multi-layer message, where one content is encapsulated in another. this can be super useful if the signed data is itself encrypted ๐Ÿ”

C.3.9. Content Cross-Referencing ๐Ÿ”—

when you're presenting signed data that relates to other signed data, it may be important to identify which signed data it relates to. the content-reference and content-identifier attributes, defined in ESS (RFC 2634 [5]), let you link a request message and a reply message in an exchange between two parties ๐Ÿ’Œ

C.4. Components of Validation Data ๐Ÿงณ

C.4.1. Revocation Status Information ๐Ÿ•ต๏ธ

a verifier has to make sure that the signer's certificate was valid at the time of the signature. there are two ways to check this:

  • using Certificate Revocation Lists (CRLs);
  • using responses from an online certificate status server (for example, obtained through the OCSP protocol).

NOTE 1: the time of the signature may not be known, so time-stamping or time-marking MAY be used to show when it was known that the signature existed โณ

NOTE 2: when you're validating an electronic signature and checking revocation status information, if a "grace period" is required, it needs to be long enough for the involved authority to process a "last-minute" revocation request and for that request to propagate through the revocation system. this grace period gets added to the time included with the time-stamp token or the time-mark, so the revocation status information SHOULD be captured after the end of the grace period ๐Ÿซถ

C.4.1.1. CRL Information ๐Ÿ“‹

when you're using CRLs to get revocation info, a verifier has to make sure they get, at the time of the first verification, the right certificate revocation information from the signer's CA. this SHOULD be done as soon as possible to keep the delay between generating and verifying the signature small. however, a "grace period" is REQUIRED so CAs have time to process revocation requests โฐ

for example, a revocation request might land at a CA just before the next CRL gets issued, and there may not be enough time to include the revised revocation status information. this means checking that the signer certificate serial number is NOT included in the CRL. the signer, the initial verifier, or a later verifier MAY obtain this CRL. if the signer gets it, it SHALL be conveyed to the verifier. it MAY be convenient to archive the CRL for easier later verification or arbitration ๐Ÿ—‚๏ธ or, as long as the CRL is archived somewhere it can be accessed for arbitration, the serial number of the CRL used MAY be archived together with the verified electronic signature as a CAdES-C form ๐Ÿงพ

even if the certificate serial number shows up in the CRL with the status "suspended" (i.e., on hold), the signature is not to be deemed valid, because a suspended certificate isn't supposed to be used even by its rightful owner ๐Ÿ™…โ€โ™€๏ธ

C.4.1.2. OCSP Information ๐Ÿ›ฐ๏ธ

when you're using OCSP to get revocation info, a verifier has to make sure they get, at the time of the first verification, an OCSP response that contains the status "valid". this SHOULD be done as soon as possible after the signature is generated, while still giving a "grace period" that's suitable enough for the involved authority to process a "last-minute" revocation request. the signer, the verifier, or any other third party MAY fetch this OCSP response. OCSP responses are transient and aren't archived by any TSP, including CA, so every verifier is responsible for making sure it's stored somewhere safe ๐Ÿ”’ the simplest way is to store them with the electronic signature. another option is to store them somewhere they can be easily retrieved and then include references to them in the electronic signature itself as a CAdES-C form ๐Ÿ’œ

just like with CRLs, the certificate might be declared invalid but with the secondary status "suspended". in that case, the same comment as for the CRL applies ๐Ÿ’…

C.4.2. Certification Path ๐Ÿ›ค๏ธ

a verifier may have to ascertain that the certification path was valid at the time of the signature, up to a trust point, according to the:

  • naming constraints;
  • certificate policy constraints;
  • signature policy, when applicable.

since the time of the signature can't be known for sure, an upper limit of it SHOULD be used, as indicated by either the time-stamp or the time-mark โฑ๏ธ

in this case, you'll need to capture all the certificates from the certification path, starting with the signer's and ending with the self-signed certificate from one trusted root. when applicable, this MAY be specified as part of the Signature Policy. you'll also need to capture the Certificate Authority Revocation Lists (CARLs) to prove none of the CAs in the chain were revoked at the time of the signature. again, all of this material MAY be incorporated in the electronic signature (ES X forms). another option is to store this info so it can be easily retrieved, and then include references to it in the electronic signature itself as a CAdES-C form ๐Ÿงฉ

C.4.3. Time-Stamping for Long Life of Signatures ๐Ÿฆ‹

an important property for long-standing signatures is that a signature, once it's been found valid, SHALL continue to be valid months or years later ๐Ÿ‘‘

a signer, a verifier, or both MAY be required to provide, on request, proof that a digital signature was created or verified during the validity period of all the certificates in the certification path. in that case, the signer, verifier, or both will also need to prove that the signer's certificate and all the CA certificates used to form a valid certification path were not revoked when the signature was created or verified ๐Ÿ“‘

it would be quite unacceptable to call a signature invalid just because the keys or certificates were compromised later. so there's a real need to demonstrate that the signature keys were valid when the signature was created, to give long-term evidence of the signature's validity ๐Ÿ˜ญ

it could be the case that a certificate was valid at the time of the signature but got revoked some time later. in this event, evidence SHALL be provided that the document was signed before the signing key was revoked. a Time-Stamping Authority (TSA) can provide that evidence โœจ a time-stamp is obtained by sending the hash value of the given data to the TSA. the returned "time-stamp" is a signed document that contains the hash value, the identity of the TSA, and the time of stamping. this proves the given data existed before the time of stamping ๐Ÿ•ฐ๏ธ time-stamping a digital signature (by sending a hash of the signature to the TSA) before the signer's private key is revoked shows the signature was created before the certificate was revoked ๐Ÿ”ฅ

if a recipient wants to hold a valid electronic signature, they'll need to make sure they've got a valid time-stamp for it before that key (and any key involved in the validation) is revoked. the sooner the time-stamp is obtained after the signing time, the better ๐Ÿƒโ€โ™€๏ธ any time-stamp or time-mark taken after the expiration date of any certificate in the certification path has no value in proving the validity of a signature ๐Ÿ’€

it's important to note that signatures MAY be generated "off-line" and time-stamped later by anyone, like the signer or any recipient who cares about the value of the signature ๐ŸŽ€ the time-stamp can be provided by the signer along with the signed document, or the recipient can get it after receiving the signed document ๐Ÿงš

the time-stamp is NOT a component of the Basic Electronic Signature, but it is the essential component of the ES with Time ๐ŸŒˆ

it is REQUIRED, in the present document, that if a signer's digital signature value is to be time-stamped, the time-stamp token is issued by a trusted source, known as a Time-Stamping Authority ๐Ÿ”

the present document requires that the signer's digital signature value be time-stamped by a trusted source before the electronic signature can become an ES with Complete validation data. acceptable TSAs MAY be specified in a Signature Validation Policy ๐Ÿซง

this technique is referred to as CAdES-C in the present document ๐Ÿ’–

should both the signer and verifier be required to time-stamp the signature value to meet the requirements of the signature policy, the signature policy MAY specify a permitted time delay between the two time-stamps ๐Ÿ“

C.4.4. Time-Stamping for Long Life of Signature before CA Key Compromises ๐Ÿ”โœจ

okay so this one is about protecting your signature in case a CA key ever gets compromised ๐Ÿ˜ญ when there's a requirement to guard against that, you need time-stamped, extended electronic signatures. a verifier may be asked, on request, to prove that the certification path and the revocation information used at signing time were valid, even if one of the issuing keys or OCSP responder keys gets compromised later ๐Ÿซฃ

the present document gives us two ways to use time-stamps against this compromise ๐Ÿ’…

  • time-stamp the ES with Complete validation data, when an OCSP response is used to get the status of the certificate from the signer (CAdES-X Type 1). this format works with an OCSP response, and it has the extra perk of integrity protection over the whole data ๐Ÿฉท
  • time-stamp only the certification path and revocation information references when a CRL is used to get the status of the certificate from the signer (CAdES-X Type2). this format is good for CRLs, since the time-stamped info may be reused for more than one signature (when signers have their certificates issued by the same CA and when signatures can be checked using the same CRLs) ๐Ÿฆ‹

NOTE: The signer, verifier, or both may obtain the time-stamp. ๐ŸŒธ

C.4.4.1. Time-Stamping the ES with Complete Validation Data (CAdES-X Type 1) ๐Ÿ’–

when an OCSP response is involved, you need to time-stamp that response specifically, in case the responder's key ever gets compromised ๐Ÿ™ˆ the info in an OCSP response is user specific and time specific, so every signature received needs its own individual time-stamp ๐Ÿ˜ค instead of only time-stamping the certification path references and revocation information references (which include the OCSP response), the time-stamp goes on the CAdES-C. since the certification path and revocation information references are part of the ES with Complete validation data, they get protected too ๐Ÿ›ก๏ธ for the same cryptographic cost, you get an integrity mechanism over the ES with Complete validation data, so any modification can be detected immediately ๐Ÿ‘€ it should be noticed that other ways of protecting or detecting the integrity of the ES with Complete validation data exist and could be used ๐Ÿ“ this technique does need a time-stamp for every signature, but it's a great fit for individual users who want an integrity-protected copy of all the validated signatures they've received ๐Ÿ’…

by time-stamping the complete electronic signature, including the digital signature and the references to the certificates and revocation status information used to support validating that signature, the time-stamp makes sure there's no ambiguity about how that signature gets validated ๐Ÿ’œ

this technique is referred to as CAdES-X Type 1 in the present document. โœจ

NOTE: Trust is achieved in the references by including a hash of the data being referenced. ๐Ÿ”ฅ

if you want to keep a copy of the additional data being referenced for any reason, that data may be attached to the electronic signature, and then the electronic signature becomes a CAdES-X Long Type 1, as defined by the present document ๐ŸŽ€

a CAdES-X Long Type 1 is simply a CAdES-X Type 1 concatenated with a copy of the additional data being referenced. ๐Ÿงš

C.4.4.2. Time-Stamping Certificates and Revocation Information References (CAdES-X Type 2) ๐ŸŒˆ

time-stamping each ES with Complete validation data, like we just covered, may not be efficient, especially when the same set of CA certificates and CRL information is used to validate lots of signatures ๐Ÿ˜ฉ

time-stamping CA certificates stops any attacker from issuing bogus CA certificates that could be claimed to have existed before the CA key was compromised ๐Ÿšซ any bogus time-stamped CA certificates will show that the certificate was created after the legitimate CA key was compromised. same energy with CA CRLs: time-stamping them stops any attacker from issuing bogus CA CRLs that could be claimed to exist before the CA key was compromised ๐Ÿ™…โ€โ™€๏ธ

time-stamping of commonly used certificates and CRLs can be done centrally, e.g., inside a company or by a service provider ๐Ÿข this cuts down the amount of data the verifier has to time-stamp. for example, it could be reduced to just one time-stamp per day (i.e., in the case where all the signers use the same CA, and the CRL applies for the whole day) ๐Ÿ“… the thing that needs to be time-stamped isn't the actual certificates and CRLs, but the unambiguous references to those certificates and CRLs ๐Ÿซถ

this technique is referred to as CAdES-X Type 2 in the present document and requires the following: ๐Ÿ’…

  • all the CA certificates references and revocation information references (i.e., CRLs) used in validating the CAdES-C are covered by one or more time-stamps.

so a CAdES-C with a time-stamp signature value at time T1 can be proved valid if all the CA and CRL references are time-stamped at time T1+. ๐ŸŽฏ

C.4.5. Time-Stamping for Archive of Signature ๐Ÿฆ‹

okay, computers keep getting faster, which makes it more likely that algorithms can be broken and keys compromised ๐Ÿ˜ฐ so there's a real requirement to protect electronic signatures against that possibility ๐Ÿ›ก๏ธ

over time, weaknesses can show up in the cryptographic algorithms used to create an electronic signature (e.g., due to the time available for cryptoanalysis, or improvements in cryptoanalytical techniques). before those weaknesses become likely, a verifier should take extra measures to keep the electronic signature valid ๐ŸŒท there are several techniques that could do this, depending on the nature of the weakened cryptography. to keep things simple, the present document uses a single technique called Archive validation data that covers all the cases โœจ

Archive validation data is the validation data plus the complete certificate and revocation data, time-stamped together with the electronic signature ๐Ÿ“ฆ it's necessary if the hash function and the crypto algorithms used to create the signature are no longer secure. also, if it can't be assumed that the hash function used by the Time-Stamping Authority is secure, then nested time-stamps of the Archived Electronic Signature are required ๐Ÿ”

the potential for a Trusted Service Provider (TSP) key compromise should be significantly lower than user keys, because TSP(s) are expected to use stronger cryptography and better key protection ๐Ÿ’ช it can be expected that new algorithms (or old ones with greater key lengths) will be used. in that case, a sequence of time-stamps will protect against forgery ๐Ÿ”— each time-stamp needs to be affixed before either the compromise of the signing key or the cracking of the algorithms used by the TSA. TSAs (Time-Stamping Authorities) should have long keys (e.g., which at the time of drafting the present document was at least 2048 bits for the signing RSA algorithm) and/or a "good" or different algorithm ๐Ÿ”‘

nested time-stamps will also protect the verifier against key compromise, or against cracking the algorithm on the old electronic signatures ๐Ÿช†

the process will need to be performed and iterated before the cryptographic algorithms used for generating the previous time-stamp are no longer secure. archive validation data may thus carry multiple embedded time-stamps ๐Ÿง

this technique is referred to as CAdES-A in the present document. ๐Ÿฆ‹

C.4.6. Reference to Additional Data ๐ŸŽ€

using CAdES-X Type 1 or CAdES-X Type 2 extended validation data, verifiers still need to keep track of all the components that were used to validate the signature, so they can retrieve them again later on ๐Ÿ—‚๏ธ these components may be archived by an external source, like a Trusted Service Provider. in that case, the referenced information provided as part of the ES with Complete validation data (CAdES-C) is good enough ๐Ÿ™Œ the actual certificates and CRL information reference in the CAdES-C can be gathered when needed for arbitration โš–๏ธ

if references to additional data aren't adequate, then the actual values of all the certificates and revocation information required may be part of the electronic signature. this technique is referred to as CAdES-X Long Type 1 or CAdES-X Long Type 2 in the present document ๐Ÿ’•

C.4.7. Time-Stamping for Mutual Recognition ๐Ÿซถ

in some business scenarios, both the signer and the verifier need to time-stamp their own copy of the signature value ๐Ÿค ideally, the two time-stamps should be as close to each other as possible โฑ๏ธ

   EXAMPLE:  A contract is signed by two parties, A and B,
   representing their respective organizations; to time-stamp the
   signer and verifier data, two approaches are possible:

      - under the terms of the contract, a predefined common
        "trusted" TSA may be used;

      - if both organizations run their own time-stamping services, A
        and B can have the transaction time-stamped by these two
        time-stamping services.

in the second case, the electronic signature will only be considered valid if both time-stamps were obtained in due time (i.e., there should not be a long delay between obtaining the two time-stamps) โณ that way, neither A nor B can repudiate the signing time indicated by their own time-stamping service ๐Ÿ™… so A and B don't need to agree on a common "trusted" TSA to get a valid transaction ๐Ÿฅ‚

it's important to note that signatures may be generated "off-line" and time-stamped at a later time by anyone, e.g., by the signer or any recipient interested in validating the signature ๐Ÿ“ฌ the time-stamp over the signature from the signer can therefore be provided by the signer together with the signed document, and/or be obtained by the verifier after receiving the signed document ๐Ÿ’Œ

the business scenarios may thus dictate that one or more of the long-term signature time-stamping methods described above be used. this may be part of a mutually agreed Signature Validation Policy, which is part of an agreed signature policy under which digital signatures may be used to support the business relationship between the two parties ๐Ÿ“œ๐Ÿ’…

C.4.8. TSA Key Compromise ๐Ÿ‘‘

TSA servers should be built so that once the private signature key is installed, there's minimal likelihood of compromise for as long as possible ๐Ÿฐ so the validity period for the TSA's keys should be as long as possible ๐Ÿ•ฐ๏ธ

both the CAdES-T and the CAdES-C contain at least one time-stamp over the signer's signature ๐Ÿ–Š๏ธ to protect against compromise of the private signature key used to produce that time-stamp, the Archive validation data can be used when a different Time-Stamping Authority key is involved in producing the additional time-stamp ๐Ÿ”„ if it's believed that the TSA key used for an earlier time-stamp may ever be compromised (e.g., outside its validity period), then the CAdES-A should be used. for extremely long periods, this may be applied repeatedly using new TSA keys ๐ŸŒŒ

this technique is referred to as a nested CAdES-A in the present document. ๐Ÿช†โœจ

C.5. Multiple Signatures ๐Ÿ’…

okay so some electronic signatures are only valid if they have more than one signature on them ๐Ÿซถ this is pretty much always the case when a contract gets signed by two parties. the order of the signatures might matter or might not, aka one might need to go on before the other, or it might not ๐Ÿคทโ€โ™€๏ธ

there are a few kinds of multiple and counter signatures that need to be supported, and they split into two main categories:

  • independent signatures;
  • embedded signatures.

independent signatures are parallel ๐Ÿฆ‹ the order doesn't matter at all. you SHOULD be able to have more than one independent signature over the same data. wait no, the original says "shall be provided", so the capability to have more than one independent signature over the same data shall be provided. โœจ

embedded signatures get applied one after the other ๐Ÿ‘‘ they're for when the order really does matter. the capability to sign over signed data shall be provided.

these forms are described in Section 5.13. ngl every other multiple signature setup, like a signed document with a countersignature, double countersignatures, or multiple signatures, can be reduced to one or more of the two cases above. it's giving simplification ๐Ÿงš


Annex D (Informative): Data Protocols to Interoperate with TSPs ๐ŸŒธ

D.1. Operational Protocols

signers and verifiers can use these protocols to talk to Trusted Service Providers while they're creating and validating electronic signatures. literally the friendly neighbourhood helpers ๐ŸŽ€

D.1.1. Certificate Retrieval

user certificates, CA certificates, and cross-certificates can be pulled from a repository using the Lightweight Directory Access Protocol, as defined in RFC 3494 [RFC3494], with the schema defined in RFC 4523 [RFC4523]. ๐Ÿ“‚

D.1.2. CRL Retrieval

certificate revocation lists, including authority revocation lists and partial CRL variants, can also be fetched from a repository with the Lightweight Directory Access Protocol, as defined in RFC 3494 [RFC3494], with the schema defined in RFC 4523 [RFC4523]. same vibes as D.1.1, just for the revocation lists ๐Ÿ’œ

D.1.3. Online Certificate Status

instead of using certificate revocation lists, you can check a certificate's status using the Online Certificate Status Protocol (OCSP), as defined in RFC 2560 [3]. it's the quick-check option ๐Ÿ“

D.1.4. Time-Stamping

the time-stamping service can be accessed using the Time-Stamping Protocol defined in RFC 3161 [7]. โฐ

D.2. Management Protocols

signers and verifiers can use these management protocols to manage how their certificates get used. ๐ŸŒˆ

D.2.1. Request for Certificate Revocation

if you want a certificate revoked, you can make that request using the revocation request and response messages defined in RFC 4210 [RFC4210]. bye bye cert ๐Ÿฅ€


Annex E (Informative): Security Considerations ๐Ÿ”

E.1. Protection of Private Key

okay this one is SERIOUS bestie ๐Ÿ˜ญ the security of the electronic signature mechanism in this document depends on the privacy of the signer's private key. full stop.

implementations should take steps to make sure private keys cannot be compromised. guard that key like it's your diary ๐Ÿ”’๐Ÿ’€

E.2. Choice of Algorithms

implementers should know that cryptographic algorithms get weaker over time ๐Ÿ•ฐ๏ธ as new cryptanalysis techniques show up and computers get faster, the work factor needed to break a given algorithm goes down. so cryptographic algorithm implementations should be modular, which lets new algorithms be dropped in easily. basically implementers should be ready for the set of mandatory-to-implement algorithms to change over time. no cap, nothing stays the same forever ๐Ÿฆ‹


Annex F (Informative): Example Structured Contents and MIME ๐ŸŽ€

F.1. Use of MIME to Encode Data

the signed content may be structured using MIME (Multipurpose Internet Mail Extensions -- RFC 2045 [6]). MIME was first built for internet email, but it has a bunch of features that make it great for a shared structure for encoding all kinds of electronic documents and other multimedia data, like photos and videos ๐Ÿ“ธ these features include:

  • providing a means of signalling the type of "object" being carried (e.g., text, image, ZIP file, application data);
  • providing a means of associating a file name with an object;
  • associating several independent objects (e.g., a document and image) to form a multi-part object;
  • handling data encoded in text or binary and, if necessary, re-encoding the binary as text.

when encoding a single object, MIME is made of:

  • header information, followed by;
  • encoded content.

this structure can be extended to support multi-part content. the more the merrier ๐Ÿงš

F.1.1. Header Information

a MIME header includes:

MIME Version information: e.g., MIME-Version: 1.0

content type information, which describes the content well enough to be shown to a user or handed to an application process, as needed. this covers the "media type" (e.g., text, image, audio) or whether the data is meant for a particular kind of application. for text, the content type also says which character set is used, e.g., Content-Type: text/plain; charset="us-ascii". ๐Ÿ“

content-encoding information, which says how the content is encoded (more on the encodings MIME supports below) ๐Ÿ”ค

other info about the content, like a description or an associated file name ๐Ÿ—‚๏ธ

here's an example MIME header for a text object:

Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

and here's one for a binary file containing a pdf document:

Content-Type: application/pdf
Content-Transfer-Encoding: base64
Content-Description: JCFV201.pdf
Content-Disposition: filename="JCFV201.pdf"

F.1.2. Content Encoding

MIME supports a range of mechanisms for encoding both text and binary data. โœจ

text data can be carried transparently as lines of text encoded in 7- or 8-bit ASCII characters. MIME also has a "quoted-printable" encoding that turns characters other than basic ASCII into an ASCII sequence. ๐ŸŒธ

binary can either be carried:

  • transparently as 8-bit octets; or
  • converted to a basic set of characters using a system called Base64.
NOTE: As there are some mail relays that can only handle 7-bit ASCII, Base64 encoding is usually used on the Internet. ๐Ÿ™ˆ

F.1.3. Multi-Part Content

several objects (e.g., text and a file attachment) can be linked together using a special "multi-part" content type. this is shown by the content type "multipart" with a string that marks the separation between each part. ๐Ÿงฉ

on top of a header for the overall multipart content, each part gets its own header info showing the inner content type and encoding.

here's an example of multipart content:

Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----
=_NextPart_000_01BC4599.98004A80"
Content-Transfer-Encoding: 7bit

------=_NextPart_000_01BC4599.98004A80
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Per your request, I've attached our proposal for the Java Card Version
2.0 API and the Java Card FAQ.

------=_NextPart_000_01BC4599.98004A80
Content-Type: application/pdf; name="JCFV201.pdf"
Content-Transfer-Encoding: base64
Content-Description: JCFV201.pdf
Content-Disposition: attachment; filename="JCFV201.pdf"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAAgAAAAA
AAAAAEAAAtAAAAAEAAAD+////AAAAAAMAAAAGAAAA//////////////////////////////
//////////AANhAAQAYg==

------=_NextPart_000_01BC4599.98004A80--

multipart content can be nested ๐Ÿช† so a set of linked objects (e.g., HTML text and images) can be handled as one single attachment to another object (e.g., text).

the Content-Type from each part of the S/MIME message tells you what type of content it is. ๐Ÿ’…

F.2. S/MIME

the specific use of MIME to carry CMS data (extended as defined in this document) that's been secured is called S/MIME (see [RFC3851]). ๐Ÿ”

S/MIME carries electronic signatures in either of these two ways:

  • an "application/pkcs7-mime" object with the CMS carried as a binary attachment (PKCS7 is the name of the early version of CMS).

the signed data may be included in the SignedData, which itself may be included in a single S/MIME object. see [RFC3851], Section 3.4.2: "Signing Using application/pkcs7-mime with SignedData" and Figure F.1 hereafter.

or

  • a "multipart/signed" object with the signed data and the signature encoded as separate MIME objects.

the signed data is not included in the SignedData, and the CMS structure only includes the signature. see [RFC3851], Section 3.4.3: "Signing Using the multipart/signed Format" and Figure F.2 hereafter.

    +-------------++----------++-------------++------------+
    |             ||          ||             ||            |
    |   S/MIME    ||  CAdES   ||    MIME     ||  pdf file  |
    |             ||          ||             ||            |
    |Content-Type=||SignedData||Content-Type=||Dear MrSmith|
    |application/ || eContent ||application/ ||Received    |
    |pkcs7-mime   ||          ||pdf          ||  100 tins  |
    |             ||          ||             ||            |
    |smime-type=  ||     /|   ||       /|    ||  Mr.Jones  |
    |signed-data  ||    / -----+      / ------+            |
    |             ||    \ -----+      \ ------+            |
    |             ||     \|   ||       \|    |+------------+
    |             ||          |+-------------+
    |             |+----------+
    +-------------+

        Figure F.1: Signing Using application/pkcs7-mime

F.2.1. Using application/pkcs7-mime

this approach is pretty similar to handling signed data like any other binary file attachment ๐Ÿ“Ž

here's an example of signed data encoded this way:

Content-Type: application/pkcs7-mime; smime-type=signed-data;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m

  567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7
  77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH
  HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh
  6YT64V0GhIGfHfQbnj75

F.2.2. Using application/pkcs7-signature ๐Ÿ’…

okay so CMS has a second option too ๐Ÿฆ‹ this time the signature and the data it protects are separate MIME objects sitting together in one message. the signed data is NOT stuffed inside the SignedData, so the CMS bit only carries the signature ๐ŸŽ€ for the full details, check out [RFC3851], Section 3.4.3: "Signing Using the multipart/signed Format" and Figure F.2 hereafter โœจ

here's what an example of signed data using this approach looks like ๐ŸŒธ

Content-Type: multipart/signed;
          protocol="application/pkcs7-signature";
          micalg=sha1; boundary=boundary42

       --boundary42
       Content-Type: text/plain

       This is a clear-signed message.

       --boundary42

Content-Type: application/pkcs7-signature; name=smime.p7s
       Content-Transfer-Encoding: base64
       Content-Disposition: attachment; filename=smime.p7s

       ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6
       4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj
       n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
       7GhIGfHfYT64VQbnj756

       --boundary42--

so with this second approach, the signed data goes through the CMS process and gets carried as one part of a multipart signed MIME structure, which is shown in Figure F.2 ๐Ÿงš the CMS structure just holds the electronic signature, that's it, that's the tea โ˜•

+---------------++----------++-------------++------------+
|               ||          ||             ||            |
|     MIME      ||  CAdES   ||    MIME     ||  pdf file  |
|               ||          ||             ||            |
|Content-Type=  ||SignedData||Content-Type=||Dear MrSmith|
|multipart/     ||          ||application/ ||Received    |
|signed         ||          ||pdf          ||  100 tins  |
|        /|     ||          ||             ||            |
|       / -------------------+        /|   ||  Mr.Jones  |
|       \ -------------------+       / -----+            |
|        \|     ||          ||       \ -----+            |
|Content-Type=  ||          ||        \|   |+------------+
|application/   ||          |+-------------+
|pdf            ||          |
|               ||          |
|Content-Type=  ||          |
|application/   ||          |
|pkcs7-signature||          |
|               ||          |
|        /|     ||          |
|       / -------+          |
|       \ -------+          |
|        \|     ||----------+
|               |
+---------------+

Figure F.2: Signing Using application/pkcs7-signature

and the big win here ๐Ÿ”ฅ this second approach (multipart/signed) has the advantage that the signed data can be decoded by any MIME-compatible system, even if that system doesn't recognize CMS-encoded electronic signatures ๐Ÿ˜ญ it's giving "everyone can read the letter, even the people who don't know the secret handshake" ๐Ÿ’Œ


Annex G (Informative): Relationship to the European Directive and EESSI ๐Ÿ‡ช๐Ÿ‡บ

G.1. Introduction ๐ŸŒท

this annex is basically a little tour of how electronic signatures made under the present document connect to the requirements in the European Parliament and Council Directive on a Community framework for electronic signatures ๐Ÿ’œ

NOTE: Legal advice should be sought on the specific national legislation regarding use of electronic signatures.

the present document is one of a set of standards defined under the "European Electronic Signature Standardization Initiative" (EESSI) for electronic signature products and solutions compliant with the European Directive for Electronic Signatures ๐ŸŽ€

G.2. Electronic Signatures and the Directive ๐Ÿงพ

the directive defines electronic signatures as:

  • "data in electronic form which are attached to or logically associated with other electronic data and which serve as a method of authentication".

the directive says an electronic signature should not be denied "legal effectiveness and admissibility as evidence in legal proceedings" solely on the grounds that it is in electronic form ๐Ÿฆ‹

the directive also says an electronic signature has equivalence to a hand-written signature if it meets specific criteria, which are:

  • it is an "advanced electronic signature" with the following properties:
    • a) it is uniquely linked to the signatory;
    • b) it is capable of identifying the signatory;
    • c) it is created using means that the signatory can maintain under his sole control; and
    • d) it is linked to the data to which it relates in such a manner that any subsequent change of the data is detectable.
  • it is based on a certificate that meets detailed criteria given in Annex I of the directive and is issued by a "certification-service-provider" that meets requirements given in Annex II of the directive. Such a certificate is referred to as a "qualified certificate";
  • it is created by a "device", for which detailed criteria are given in Annex III of the directive. Such a device is referred to a "secure-signature-creation device".

this form of electronic signature is referred to as a "qualified electronic signature" in EESSI (see below) ๐Ÿ‘‘

G.3. ETSI Electronic Signature Formats and the Directive ๐ŸŒˆ

an electronic signature created in accordance with the present document is:

  • a) considered to be an "electronic signature" under the terms of the Directive;
  • b) considered to be an "advanced electronic signature" under the terms of the Directive;
  • c) considered to be a "Qualified Electronic Signature", provided the additional requirements in Annex I, II, and III of the Directive are met. The requirements in Annex I, II, and III of the Directive are outside the scope of the present document, and are subject to standardization elsewhere.

G.4. EESSI Standards and Classes of Electronic Signature ๐Ÿงš

G.4.1. Structure of EESSI Standardization ๐ŸŒธ

EESSI looks at standards in several areas. See the ETSI and CEN web sites for the latest list of standards and their versions ๐Ÿ”

  • use of X.509 public key certificates as qualified certificates;
  • security Management and Certificate Policy for CSPs Issuing Qualified Certificates;
  • security requirements for trustworthy systems used by CSPs Issuing Qualified Certificates;
  • security requirements for Secure Signature Creation Devices;
  • security requirements for Signature Creation Systems;
  • procedures for Electronic Signature Verification;
  • electronic signature syntax and encoding formats;
  • protocol to interoperate with a Time-Stamping Authority;
  • Policy requirements for Time-Stamping Authorities; and
  • XML electronic signature formats.

each of these standards covers a range of requirements, including the requirements of Qualified Electronic Signatures, as specified in Article 5.1 of the Directive ๐Ÿ’… however, some of them also address general requirements of electronic signatures for business and electronic commerce, which all fall into the category of Article 5.2 of the Directive. that variation can be identified either as different levels or different options ๐Ÿซถ

G.4.2. Classes of Electronic Signatures ๐ŸŽ€

since some of these standards cover a range of requirements, it may be useful to pick out a set of standards that addresses a specific business need. that set of standards and how they're used defines a class of electronic signature ๐Ÿ’– the first class already identified is the qualified electronic signature, which fulfils the requirements of Article 5.1 of the Directive โœจ

a limited number of "classes of electronic signatures" and corresponding profiles could be defined in close cooperation with actors on the market (business, users, suppliers). the need for such standards is envisaged, in addition to those for qualified electronic signatures, in areas such as:

  • different classes of electronic signatures with long-term validity;
  • electronic signatures for business transactions with limited value.

G.4.3. Electronic Signature Classes and the ETSI Electronic Signature Format ๐Ÿฆ‹

the electronic signature format defined in the present document is applicable to the EESSI area "electronic signature and encoding formats" ๐ŸŒท

an electronic signature produced by a signer (see Section 5 and conformance Section 10.1) is applicable to the proposed class of electronic signature: "qualified electronic signatures fulfilling article 5.1" ๐Ÿ”ฅ

with the addition of attributes by the verifier (see Section 6 and conformance Section 10.2), the qualified electronic signature supports long-term validity โญ


Annex H (Informative): APIs for the Generation and Verification of Electronic Signatures Tokens ๐Ÿงšโ€โ™€๏ธ

while the present document describes the data format of an electronic signature, the question is whether there exist APIs (Application Programming Interfaces) able to manipulate these structures ๐Ÿ‘€ at least two such APIs have been defined: one set by the IETF and another set by the OMG (Object Management Group) ๐Ÿ’œ

H.1. Data Framing ๐ŸŽ€

okay bestie, so before either of these APIs can touch the signature data, we need to wrap it in a mechanism-independent token format. ๐ŸŽ [RFC2743] Section 3.1 is the one that sets up this wrapper for the first token in a GSS-API context establishment sequence. It includes an identifier for the mechanism type on that context, so the token can be read unambiguously โœจ

Every electronic signature data format defined in this document shall be framed following that description, or it won't be processable by these APIs ๐Ÿ’…

The token tag's encoding comes from ASN.1 and DER, but it's written straight in octets instead of at the ASN.1 level. That makes it easier to implement interoperably without needing general ASN.1 processing code ๐Ÿงš The token tag has these elements, in order:

  1. 0x60 is the tag for the RFC 2743 SEQUENCE. It means the constructed form with a definite length encoding comes next. ๐Ÿ’œ
  2. The token-length octets say how long everything after them is. That covers elements 3 to 5 below plus the mechanism-defined token object after the tag. This part can be a variable number of octets:
    • a) If the value is less than 128, it fits in one octet. Bit 8 (the high-order bit) is 0, and the other bits hold the value.
    • b) If the value is 128 or more, it takes two or more octets. Bit 8 of the first octet is 1, and the remaining bits of that first octet say how many more octets follow. The following octets carry the value, 8 bits each, with the most significant digit first. The minimum number of octets shall be used to encode the length, so no octets representing leading zeros shall be included in the length encoding. ๐ŸŒธ
  3. 0x06 is the tag for OBJECT IDENTIFIER. ๐Ÿฆ‹
  4. The object identifier length is the number of octets in the encoded object identifier from element 5. It's encoded using the rules in 2a) and 2b) above. ๐Ÿ“
  5. The object identifier octets are a variable number of octets, encoded using ASN.1 BER rules:
    • The first octet is the sum of two values: ๐Ÿ”ฅ
      1. the top-level object identifier component multiplied by 40 (decimal), and
      2. the second-level object identifier component.

This is the only spot in an object identifier encoding where one octet holds more than one component. ๐Ÿ‘‘

  • Any following octets encode the successively lower components of the object identifier. A component can span multiple octets. It uses 7 bits per octet (most significant bits first), and bit 8 is set to 1 on every octet except the final one for that component. The minimum number of octets shall be used to encode each component, so no octets representing leading zeros shall be included in a component's encoding. โญ

NOTE: In many implementations, elements 3 to 5 may be stored and referenced as a contiguous string constant. ๐Ÿซถ

The token tag is followed right away by a mechanism-defined token object. There's no separate size specifier between the object identifier value and that token object, so don't go looking for one ๐Ÿ™ˆ

Tokens that conform to this document shall have the following OID in order to be processable by IDUP-APIs:

id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
 { itu-t(0) identified-organization(4) etsi(0)
  electronic-signature-standard (1733) part1 (1) IDUPMechanism (4)
  etsiESv1(1) }

H.2. IDUP-GSS-APIs Defined by the IETF ๐ŸŒˆ

The IETF CAT WG put out an RFC in December 1998 called IDUP-GSS-API (Independent Data Unit Protection). It's [RFC2479] ๐Ÿง It can handle the electronic signature data format defined in this document. ๐Ÿ’–

IDUP-GSS-API includes support for non-repudiation services. ๐Ÿ”

It supports evidence generation and evidence verification. "Evidence" means information that, either alone or combined with other information, establishes proof about an event or action. โœจ

IDUP supports several types of evidence. This document supports all of the IDUP types through the commitment-type parameter. ๐Ÿ’…

Section 2.3.3 of IDUP describes the specific calls for handling evidence, called "EV" calls. The "EV" group gives a simple, high-level interface to the underlying IDUP mechanisms. It's for when an application only needs to deal with evidence, not with encryption or integrity services. ๐Ÿฆ‹

All generation and verification is done according to the contents of an NR policy referenced in the context. ๐ŸŽ€

Get_token_details returns the attributes for a given input token to an application. IDUP-GSS-API tokens are meant to stay opaque to the calling application. This call lets the application learn about the token without breaking that opaqueness. The most important attribute is the mechanism type. The application can pass it to the IDUP_Establish_Env() call to set up the right environment for processing the token. ๐Ÿงš

Generate_token generates a non-repudiation token using the current environment. ๐ŸŒธ

Verify_evidence verifies the evidence token using the current environment. It returns a major_status code that shows whether the token's evidence is complete, meaning it can still be successfully verified (perhaps years) later. ๐Ÿ•ฐ๏ธ If the token's evidence isn't complete, the token can be passed to another API, form_complete_PIDU, to finish it. This happens when the status "conditionally valid" comes back. That status corresponds to the status "validation incomplete" in this document. ๐Ÿ‘‘

Form_Complete_PIDU is mainly used when the evidence token doesn't contain all the data needed to verify it. Some of the data that isn't stored in the token might become unavailable between when the token is generated and when it's verified. This call gathers the missing information and adds it to the token, so verification can be guaranteed to work at any future time. ๐Ÿ”ฅ

H.3. CORBA Security Interfaces Defined by the OMG ๐Ÿ“

Non-repudiation interfaces are defined in "CORBA Security", a document produced by the OMG (Object Management Group). They're written in IDL (Interface Definition Language) and are optional. ๐Ÿ’œ

Tokens supporting non-repudiation are handled through these interfaces:

  • set_NR_features specifies the features to apply to future evidence generation and verification operations; ๐ŸŒท
  • get_NR_features returns the features that will be applied to future evidence generation and verification operations; ๐ŸŒผ
  • generate_token generates a non-repudiation token using the current non-repudiation features; ๐Ÿซง
  • verify_evidence verifies the evidence token using the current non-repudiation features; ๐Ÿ”
  • get_tokens_details returns information about an input non-repudiation token. The information returned depends on the type of token; ๐Ÿงพ
  • form_complete_evidence is used when the evidence token doesn't contain all the data needed to verify it, and some of that data might become unavailable between generation and verification unless it's stored in the token. The form_complete_evidence operation gathers the missing information and includes it in the token so that verification can be guaranteed at any future time. ๐ŸŒŸ

NOTE: The similarity between the two sets of APIs is noticeable. ๐Ÿ‘ฏโ€โ™€๏ธ


Annex I (Informative): Cryptographic Algorithms ๐Ÿง

[RFC3370] [10] describes the conventions for using several cryptographic algorithms with the Cryptographic Message Syntax (CMS). ๐Ÿ“œ Only the hashing and signing algorithms are appropriate for use with this document. โœจ

Since RFC 3370 [10] was published, MD5 has been broken. It's no longer considered appropriate, so it has been deleted from the list of algorithms. ๐Ÿ’€

I.1. Digest Algorithms ๐ŸŒˆ

I.1.1. SHA-1 ๐Ÿฆ‹

The SHA-1 digest algorithm is defined in FIPS Pub 180-1. The algorithm identifier for SHA-1 is: ๐Ÿ’–

sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) oiw(14)
secsig(3) algorithm(2) 26 }

The AlgorithmIdentifier parameters field is optional. If it's present, the parameters field shall contain an ASN.1 NULL. Implementations should accept SHA-1 AlgorithmIdentifiers with absent parameters as well as NULL parameters. Implementations should generate SHA-1 AlgorithmIdentifiers with NULL parameters. ๐Ÿซถ

I.1.2. General

Okay bestie, time for the digest lineup ๐Ÿ’… (aka hash functions, the grown-up name) and every single one of these is a whole vibe ๐Ÿ”ฅ

  • ISO/IEC 10118-1 (1994) [ISO10118-1]: "Information technology - Security techniques - Hash-functions - Part 1: General". ISO/IEC 10118-1 is the starter pack ๐ŸŒธ It contains definitions and describes basic concepts.
  • ISO/IEC 10118-2 (1994) [ISO10118-2]: "Information technology - Security techniques - Hash-functions - Part 2: Hash-functions using an n-bit block cipher algorithm". ISO/IEC 10118-2 specifies two ways to build a hash-function out of a block cipher ๐Ÿงš
  • ISO/IEC 10118-3 (1997) [ISO10118-3]: "Information technology - Security techniques - Hash-functions - Part 3: Dedicated hash-functions". ISO/IEC 10118-3 specifies these dedicated hash-functions:
    • SHA-1 (FIPS 180-1);
    • RIPEMD-128;
    • RIPEMD-160.
  • ISO/IEC 10118-4 (1998) [ISO10118-4]: "Information technology - Security techniques - Hash-functions - Part 4: Hash-functions using modular arithmetic". Math girl era ๐Ÿฆ‹
  • RFC 1320 (PS 1992): "The MD4 Message-Digest Algorithm". RFC 1320 specifies the hash-function MD4. Honestly? MD4 is considered outdated now ๐Ÿ’€
  • RFC 1321 (I 1992): "The MD5 Message-Digest Algorithm". RFC 1321 (informational) specifies the hash-function MD5. Today, MD5 is not recommended for new implementations ๐Ÿ™ˆ
  • FIPS Publication 180-1 (1995): "Secure Hash Standard". FIPS 180-1 specifies the Secure Hash Algorithm (SHA), a dedicated hash-function developed for use with the DSA. The original SHA, published in 1993, got a slight glow-up in 1995 and was renamed SHA-1 โœจ
  • ANSI X9.30-2 (1997) [X9.30-2]: "Public Key Cryptography for the Financial Services Industry - Part 2: The Secure Hash Algorithm (SHA-1)". X9.30-2 specifies the ANSI-Version of SHA-1 ๐ŸŽ€
  • ANSI X9.31-2 (1996) [X9.31-2]: "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 2: Hash Algorithms". X9.31-2 specifies hash algorithms ๐Ÿ’œ

I.2. Digital Signature Algorithms

I.2.1. DSA

Okay the DSA signature algorithm is defined in FIPS Pub 186 ๐Ÿ’– DSA is always used with the SHA-1 message digest algorithm, no exceptions, no drama. The algorithm identifier for DSA is:

id-dsa-with-sha1 OBJECT IDENTIFIER ::=  { iso(1) member-body(2) us(840)
x9-57 (10040) x9cm(4) 3 }

The AlgorithmIdentifier parameters field shall not be present ๐Ÿซถ

I.2.2. RSA

The RSA signature algorithm is defined in [RFC3447] ๐Ÿ”ฅ RFC 3370 [10] specifies how to use the RSA signature algorithm with the SHA-1 algorithm. The algorithm identifier for RSA with SHA-1 is:

Sha1WithRSAEncryption OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 5 }
NOTE: RFC 3370 [10] recommends that MD5 not be used for new implementations ๐Ÿ’…

I.2.3. General

Here's the rest of the digital signature lineup, the whole squad ๐Ÿ‘‘ The following is a selection of work that has been done in the area of digital signature mechanisms:

  • FIPS Publication 186 (1994): "Digital Signature Standard". NIST's Digital Signature Algorithm (DSA) is a variant of ElGamal's Discrete Logarithm-based digital signature mechanism. The DSA requires a 160-bit hash-function and mandates SHA-1 ๐ŸŒˆ
  • IEEE P1363 (2000) [P1363]: "Standard Specifications for Public-Key Cryptography". IEEE P1363 contains mechanisms for digital signatures, key establishment, and encipherment based on three families of public key schemes:
    • "Conventional" Discrete Logarithm (DL)-based techniques, i.e., Diffie-Hellman (DH) key agreement, Menezes-Qu-Vanstone (MQV) key agreement, the Digital Signature Algorithm (DSA), and Nyberg-Rueppel (NR) digital signatures;
    • Elliptic Curve (EC)-based variants of the DL-mechanisms specified above, i.e., EC-DH, EC-MQV, EC-DSA, and EC-NR. For elliptic curves, implementation options include mod p and characteristic 2 with polynomial or normal basis representation;
    • Integer Factoring (IF)-based techniques, including RSA encryption, RSA digital signatures, and RSA-based key transport.
  • ISO/IEC 9796-2 (1997) [ISO9796-2]: "Information technology - Security techniques - Digital signature schemes giving message recovery - Part 2: Mechanisms using a hash-function". ISO/IEC 9796-2 specifies digital signature mechanisms with partial message recovery that are also based on the RSA technique but make use of a hash-function ๐Ÿฆ‹
  • ISO/IEC 9796-4 (1998) [ISO9796-4]: "Digital signature schemes giving message recovery - Part 4: Discrete logarithm based mechanisms". ISO/IEC 9796-4 specifies digital signature mechanisms with partial message recovery that are based on Discrete Logarithm techniques. The document includes the Nyberg-Rueppel scheme โœจ
  • ISO/IEC 14888-1 [ISO14888-1]: "Digital signatures with appendix - Part 1: General". ISO/IEC 14888-1 contains definitions and describes the basic concepts of digital signatures with appendix ๐ŸŒธ
  • ISO/IEC 14888-2 [ISO14888-2]: "Digital signatures with appendix - Part 2: Identity-based mechanisms". ISO/IEC 14888-2 specifies digital signature schemes with appendix that make use of identity-based keying material. The document includes the zero-knowledge techniques of Fiat-Shamir and Guillou-Quisquater ๐Ÿงš
  • ISO/IEC 14888-3 [ISO14888-3]: "Digital signatures with appendix - Part 3: Certificate-based mechanisms". ISO/IEC 14888-3 specifies digital signature schemes with appendix that make use of certificate-based keying material. The document includes five schemes:
    • DSA;
    • EC-DSA, an elliptic curve-based analog of NIST's Digital Signature Algorithm;
    • Pointcheval-Vaudeney signatures;
    • RSA signatures;
    • ESIGN.
  • ISO/IEC 15946-2 (2002) [ISO15946-2]: "Cryptographic techniques based on elliptic curves - Part 2: Digital signatures", specifies digital signature schemes with appendix using elliptic curves. The document includes two schemes:
    • EC-DSA, an elliptic curve-based analog of NIST's Digital Signature Algorithm;
    • EC-AMV, an elliptic curve-based analog of the Agnew-Muller-Vanstone signature algorithm.
  • ANSI X9.31-1 (1997) [X9.31-1]: "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 1: The RSA Signature Algorithm". ANSI X9.31-1 specifies a digital signature mechanism with appendix using the RSA public key technique ๐Ÿ’œ
  • ANSI X9.30-1 (1997) [X9.30-1]: "Public Key Cryptography Using Irreversible Algorithms for the Financial Services Industry - Part 1: The Digital Signature Algorithm (DSA)". ANSI X9.30-1 specifies the DSA, NIST's Digital Signature Algorithm ๐ŸŽ€
  • ANSI X9.62 (1998) [X9.62]: "Public Key Cryptography for the Financial Services Industry - The Elliptic Curve Digital Signature Algorithm (ECDSA)". ANSI X9.62 specifies the Elliptic Curve Digital Signature Algorithm, an analog of NIST's Digital Signature Algorithm (DSA) using elliptic curves. The appendices provide tutorial information on the underlying mathematics for elliptic curve cryptography and give many examples ๐Ÿซถ

Annex J (Informative): Guidance on Naming

J.1. Allocation of Names

Okay, the subject name shall be allocated through a registration scheme administered through a Registration Authority (RA) to ensure uniqueness ๐Ÿ’– This RA may be an independent body or a function carried out by the Certification Authority.

In addition to ensuring uniqueness, the RA shall verify that the name allocated properly identifies the applicant and that authentication checks are carried out to protect against masquerade ๐Ÿ”ฅ

The name allocated by an RA is based on registration information provided by, or relating to, the applicant (e.g., his personal name, date of birth, residence address) and information allocated by the RA. Three variations commonly exist:

  • the name is based entirely on registration information, which uniquely identifies the applicant (e.g., "Pierre Durand (born on) July 6, 1956");
  • the name is based on registration information, with the addition of qualifiers added by the registration authority to ensure uniqueness (e.g., "Pierre Durand 12");
  • the registration information is kept private by the registration authority and the registration authority allocates a "pseudonym" ๐Ÿฆ‹

J.2. Providing Access to Registration Information

Under certain circumstances, it may be necessary for information used during registration, but not published in the certificate, to be made available to third parties (e.g., to an arbitrator to resolve a dispute or for law enforcement). This registration information is likely to include personal and sensitive information ๐Ÿ™ˆ

Thus, the RA needs to establish a policy for:

  • whether the registration information should be disclosed;
  • to whom such information should be disclosed;
  • under what circumstances such information should be disclosed.

This policy may be different whether the RA is being used only within a company or for public use. The policy will have to take into account national legislation and in particular any data protection and privacy legislation ๐ŸŒธ

Currently, the provision of access to registration is a local matter for the RA. However, if open access is required, standard protocols, such as HTTP -- RFC 2068 (Internet Web Access Protocol), may be employed with the addition of security mechanisms necessary to meet the data protection requirements (e.g., Transport Layer Security -- RFC 4346 [RFC4346]) with client authentication ๐Ÿงš

J.3. Naming Schemes

J.3.1. Naming Schemes for Individual Citizens โœจ

okay so sometimes the subject name in a public key certificate just isn't specific enough ๐Ÿฅบ two people can share the same name (homonyms), or someone might go by a pseudonym. adding more attributes would help tell them apart, BUT stuffing more info into a certificate that sits in a public repository goes straight against the privacy protection requirements ๐Ÿ™…โ€โ™€๏ธ

the Registration Authority does learn more stuff at registration time, but not all of it ends up in the certificate. to balance these two opposite needs, the hash values of some extra attributes can go in the certificate instead ๐Ÿซถ when the certificate owner provides those attributes, they can be verified. biometric attributes can unambiguously identify a person ๐Ÿ˜ญ examples include a picture or a manual signature from the certificate owner ๐Ÿ“ธ

NOTE: hashing only protects privacy if the possible inputs are big enough ๐Ÿ™ˆ hashing someone's social security number usually isn't enough, because it can be reversed really easily.

a picture works if the verifier already met the person and later wants to check that the certificate they received belongs to that same person ๐ŸŽ€ at the first exchange, the picture is sent, and the hash in the certificate can be used by the verifier to confirm it's the right person. at the next exchange, the picture doesn't need to be sent again ๐Ÿ’–

a manual signature can work if the verifier already received a signed document beforehand โœ๏ธ at the first exchange, the drawing of the manual signature is sent, and the hash in the certificate can be used to verify it's the right manual signature. next time, the manual signature doesn't need to be sent again ๐ŸŒธ

J.3.2. Naming Schemes for Employees of an Organization ๐Ÿ’ผ

okay so an employee's name inside an organization is probably some mix of the organization's name and the employee's identifier within it ๐Ÿงš

an organization name is usually a registered name, meaning the business or trading name used in day-to-day business ๐Ÿ“ a Naming Authority registers it, and that Naming Authority guarantees the registered name is unambiguous and can't be confused with another organization ๐Ÿ‘‘

if you want more info about a given registered organization name, you have to go back to a publicly available directory maintained by the Naming Authority ๐Ÿ“–

the identifier can be a name or a pseudonym (like a nickname or an employee number) ๐Ÿ’… when it's a name, it's supposed to be descriptive enough to unambiguously identify the person. when it's a pseudonym, the certificate doesn't reveal who the person is. however, it does ensure the person was correctly authenticated at registration, so they may be eligible for certain advantages that are implicitly or explicitly obtained by having the certificate ๐Ÿ”ฅ either way, this can still be insufficient because of homonyms ๐Ÿ˜ฌ

putting more attributes in the certificate could fix that, like the person's organization unit or the name of the city where their office is ๐Ÿข BUT the more info you cram into the certificate, the more problems pop up if the organization structure or place of work changes, so this might not be the best solution ๐Ÿ™ƒ an alternative is to provide more attributes (like organization unit and place of work) through access to a directory the company maintains ๐Ÿ—‚๏ธ it's likely that the Registration Authority got more info at registration than what ended up in the certificate, if that extra info is placed in a repository that's accessible only to the organization ๐Ÿ”


Acknowledgments ๐Ÿซถ

Special thanks to Russ Housley for reviewing the document ๐Ÿ’œ


Authors' Addresses ๐Ÿฆ‹

Denis Pinkas
Bull SAS
Rue Jean-Jaures
78340 Les Clayes sous Bois CEDEX
FRANCE
EMail: Denis.Pinkas@bull.net

Nick Pope
Thales eSecurity
Meadow View House
Long Crendon
Aylesbury
Buck
HP18 9EQ
United Kingdom
EMail: nick.pope@thales-esecurity.com

John Ross
Security & Standards Consultancy Ltd
The Waterhouse Business Centre
2 Cromer Way
Chelmsford
Essex
CM1 2QE
United Kingdom
EMail: ross@secstan.com

Copyright (C) The IETF Trust (2008). โœจ

okay so this document is subject to the rights, licenses and restrictions in BCP 78, and except as stated there, the authors keep all their rights ๐Ÿ“œ

this document and the info in it are provided on an "AS IS" basis, and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ๐Ÿ’€


Intellectual Property ๐Ÿง 

ngl this part is all about who owns what ๐Ÿ™ˆ the IETF takes no position on the validity or scope of any Intellectual Property Rights or other rights that someone might claim to cover the implementation or use of the technology in this document, or on whether any license under those rights might or might not be available. it also doesn't claim to have made any independent effort to identify such rights. info on the procedures for rights in RFC documents can be found in BCP 78 and BCP 79 ๐Ÿ“š

copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, or the result of an attempt to get a general license or permission to use such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr ๐ŸŒˆ

the IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology required to implement this standard ๐Ÿ™Œ just send the info to ietf-ipr@ietf.org ๐Ÿ’Œ

๐Ÿ“ฆ where this page comes from