Network Working Group D. Pinkas Request for Comments: 5126 Bull SAS Obsoletes: 3126 N. Pope Category: Informational Thales eSecurity J. Ross Security and Standards February 2008 CMS Advanced Electronic Signatures (CAdES) 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. This includes evidence as to its validity even if the signer or verifying party later attempts to deny (i.e., repudiates) the validity of the signature. The format can be considered as an extension to RFC 3852 and RFC 2634, where, when appropriate, additional signed and unsigned attributes have been defined. The contents of this Informational RFC amount to a transposition of the ETSI Technical Specification (TS) 101 733 V.1.7.4 (CMS Advanced Electronic Signatures -- CAdES) and is 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 Pinkas, et al. Informational [Page 1] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 Pinkas, et al. Informational [Page 2] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 Pinkas, et al. Informational [Page 3] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 Pinkas, et al. Informational [Page 4] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 Pinkas, et al. Informational [Page 5] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 This document is intended to cover electronic signatures for various types of transactions, including business transactions (e.g., purchase requisition, contract, and invoice applications) where long-term validity of such signatures is important. This includes evidence as to its validity even if the signer or verifying party later attempts to deny (i.e., repudiates; see ISO/IEC 10181-5 [ISO10181-5]) the validity of the signature. Thus, the present document can be used for any transaction between an individual and a company, between two companies, between an individual and a governmental body, etc. The present document is independent of any environment; it can be applied to any environment, e.g., 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". An electronic signature, as used in the present document, is a form of advanced electronic signature, as defined in the Directive. 2. Scope The scope of the present document covers electronic signature formats only. The aspects of Electronic Signature Policies are defined in RFC 3125 [RFC3125] and ETSI TR 102 272 [TR102272]. The present document defines a number of electronic signature formats, including electronic signatures that can remain valid over long periods. This includes evidence as to its validity even if the Pinkas, et al. Informational [Page 6] RFC 5126 CMS Advanced Electronic Signatures February 2008 signer or verifying party later attempts to deny (repudiates) the validity of the electronic signature. The present document specifies 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 the present document, can be used for arbitration in case of a dispute between the signer and verifier, which may occur at some later time, even years later. The present 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. The present document is based on the use of public key cryptography to produce digital signatures, supported by public key certificates. The present document 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. This document also, as an option, defines ways to provide very long-term protection against key compromise or weakened algorithms. The present 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. The present 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]. These electronic signatures are thus called CAdES, for "CMS Advanced Electronic Signatures". Pinkas, et al. Informational [Page 7] RFC 5126 CMS Advanced Electronic Signatures February 2008 Another document, TS 101 903 [TS101903], describes formats for XML advanced electronic signatures (XAdES) built on XMLDSIG as specified in [XMLDSIG]. In addition, the present document identifies other documents that define formats for Public Key Certificates, Attribute Certificates, and Certificate Revocation Lists and 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 the present document, giving a rationale for normative parts of the present 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 the present 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 For the purposes of the present document, the following terms and definitions apply: 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. Pinkas, et al. Informational [Page 8] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. Pinkas, et al. Informational [Page 9] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. Pinkas, et al. Informational [Page 10] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 the present document, this is an entity that validates an electronic signature. 3.2. Abbreviations For the purposes of the present document, the following 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 Pinkas, et al. Informational [Page 11] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 The present document defines a number of Electronic Signature (ES) formats that build on CMS (RFC 3852 [4]) by adding signed and unsigned attributes. This section: - provides an introduction to the major parties involved (Section 4.1), Pinkas, et al. Informational [Page 12] RFC 5126 CMS Advanced Electronic Signatures February 2008 - introduces the concept of signature policies (Section 4.2), - provides an overview of the various ES formats (Section 4.3), - introduces the concept of validation data, and provides an overview of formats that incorporate validation data (Section 4.4), and - presents relevant considerations on arbitration (Section 4.5) and for the validation process (Section 4.6). The formal specifications of the attributes are specified in Sections 5 and 6; Annexes C and D provide rationale for the definitions of the different ES forms. 4.1. Major Parties The major parties involved in a business transaction supported by electronic signatures, as defined in the present 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 over data using the prescribed format, this represents a commitment on behalf of the signing entity to the data being signed. The verifier is the entity that validates the electronic signature; it may be a single entity or multiple entities. The Trusted Service Providers (TSPs) are one or more entities that help to build trust relationships between the signer and verifier. They support the signer and verifier by means of supporting services including: user certificates, cross-certificates, time-stamp tokens, CRLs, ARLs, and OCSP responses. The following TSPs are used to support the functions defined in the present 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. Pinkas, et al. Informational [Page 13] RFC 5126 CMS Advanced Electronic Signatures February 2008 Certification Authorities provide users with public key certificates and a revocation service. Registration Authorities allow the identification and registration of entities before a CA generates certificates. Repository Authorities publish CRLs issued by CAs, signature policies issued by Signature Policy Issuers, and optionally public key certificates. 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. Signature Policy Issuers define the signature policies to be used by signers and verifiers. In some cases, the following additional TSPs are needed: - Attribute Authorities. Attributes Authorities provide users with attributes linked to public key certificates. An Arbitrator is an entity that arbitrates in disputes between a signer and a verifier. 4.2. Signature Policies The present document includes the concept of signature policies that can be used to establish technical consistency when validating electronic signatures. 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 being used by the verifier is neither indicated by the signer nor can be derived from other data, or the signature policy is incomplete, then verifiers, including arbitrators, may obtain different results when validating an electronic signature. Therefore, comprehensive signature policies that ensure consistency of signature validation are recommended from both the signer's and verifier's point of view. Pinkas, et al. Informational [Page 14] RFC 5126 CMS Advanced Electronic Signatures February 2008 Further information on signature policies is provided in: - TR 102 038 [TR102038]; - Sections 5.8.1, C.1, and C.3.1 of the present document; - RFC 3125 [RFC3125]; and - TR 102 272 [TR102272]. 4.3. Electronic Signature Formats The current section provides an overview for two forms of CMS advanced electronic signature specified in the present document, namely, the CAdES Basic Electronic Signature (CAdES-BES) and the CAdES Explicit Policy-based Electronic Signature (CAdES-EPES). Conformance to the present document mandates that the signer create one of these formats. 4.3.1. CAdES Basic Electronic Signature (CAdES-BES) A CAdES Basic Electronic Signature (CAdES-BES), in accordance with the present document, contains: - The signed user data (e.g., 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 in the present document; and - The digital signature value computed on the user data and, when present, on the signed attributes, as defined in CMS (RFC 3852 [4]). A CAdES Basic Electronic Signature (CAdES-BES), in accordance with the present document, may contain: - a collection of additional signed attributes; and - a collection of optional unsigned attributes. The mandatory signed attributes are: - Content-type. It is defined in RFC 3852 [4] and specifies the type of the EncapsulatedContentInfo value being signed. Details are provided in Section 5.7.1 of the present document. Rationale for its inclusion is provided in Annex C.3.7; Pinkas, et al. Informational [Page 15] RFC 5126 CMS Advanced Electronic Signatures February 2008 - Message-digest. It is defined in RFC 3852 [4] and specifies the message digest of the eContent OCTET STRING within encapContentInfo being signed. Details are provided 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 only allows for the use of SHA-1 as a digest algorithm. The ESS signing-certificate-v2 attribute is defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], and allows for the use of any digest algorithm. A CAdES-BES claiming compliance with the present document must include one of them. Section 5.7.3 provides the details of these attributes. Rationale for its inclusion is provided in Annex C.3.3. Optional signed attributes may be added to the CAdES-BES, including optional signed attributes defined in CMS (RFC 3852 [4]), ESS (RFC 2634 [5]), and the present document. Listed below are optional attributes that are defined in Section 5 and have a rationale provided in Annex C: - Signing-time: as defined in CMS (RFC 3852 [4]), indicates the time of the signature, as claimed by the signer. Details and short rationale are provided in Section 5.9.1. Annex C.3.6 provides the rationale. - content-hints: as defined in ESS (RFC 2634 [5]), provides information that describes the innermost signed content of a multi-layer message where one content is encapsulated in another. Section 5.10.1 provides the specification details. Annex C.3.8 provides the rationale. - content-reference: as defined in ESS (RFC 2634 [5]), can be incorporated as a way to link request and reply messages in an exchange between two parties. Section 5.10.1 provides the specification details. Annex C.3.9 provides the rationale. - content-identifier: as defined in ESS (RFC 2634 [5]), contains an identifier that may be used later on in the previous content-reference attribute. Section 5.10.2 provides the specification details. - commitment-type-indication: this attribute is defined by the present document as a way to indicate the commitment endorsed by the signer when producing the signature. Section 5.11.1 provides the specification details. Annex C.3.2 provides the rationale. Pinkas, et al. Informational [Page 16] RFC 5126 CMS Advanced Electronic Signatures February 2008 - signer-location: this attribute is defined by the present document. It allows the signer to indicate the place where the signer purportedly produced the signature. Section 5.11.2 provides the specification details. Annex C.3.5 provides the rationale. - signer-attributes: this attribute is defined by the present document. It allows a claimed or certified role to be incorporated into the signed information. Section 5.11.3 provides the specification details. Annex C.3.4 provides the rationale. - content-time-stamp: this attribute is defined by the present document. It allows a time-stamp token of the data to be signed to be incorporated into the signed information. It provides proof of the existence of the data before the signature was created. Section 5.11.4 provides the specification details. Annex C.3.6 provides the rationale. A CAdES-BES form can also incorporate instances of 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 incorporated wherever embedded signatures (i.e., a signature on a previous signature) are needed. Section 5.9.2 provides the specification details. Annex C.5 in Annex C provides the rationale. The structure of the CAdES-BES is 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 of a CAdES-BES are defined in Section 8.1. Pinkas, et al. Informational [Page 17] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 further discussion on the relationship of the present document 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. Specification of the contents of signature policies is outside the scope of the present document. However, further information on signature policies is provided in TR 102 038 [TR102038], RFC 3125 [RFC3125], and Sections 5.8.1, C.1, and C.3.1 of the present document. 4.3.2. CAdES Explicit Policy-based Electronic Signatures (CAdES-EPES) A CAdES Explicit Policy-based Electronic Signature (CAdES-EPES), in accordance with the present document, extends the definition of an electronic signature to conform to the identified signature policy. A CAdES Explicit Policy-based Electronic Signature (CAdES-EPES) incorporates a signed attribute (sigPolicyID attribute) indicating 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 provides the details on the specification of signature-policy-identifier attribute. Annex C.1 provides a short rationale. Specification of the contents of signature policies is outside the scope of the present document. Further information on signature policies is provided in TR 102 038 [TR102038] and Sections 5.8.1, C.1, and C.3.1 of the present document. Pinkas, et al. Informational [Page 18] RFC 5126 CMS Advanced Electronic Signatures February 2008 The structure of the CAdES-EPES is 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 of CAdES-EPES are defined in Section 8.2. 4.4. Electronic Signature Formats with Validation Data Validation of an electronic signature, in accordance with the present document, requires additional data needed to validate the electronic signature. This additional data is called validation data, and 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. Pinkas, et al. Informational [Page 19] RFC 5126 CMS Advanced Electronic Signatures February 2008 Validation data includes CA certificates as well as revocation status information in the form of Certificate Revocation Lists (CRLs) or certificate status information (OCSP) provided by an online service. Validation data also includes evidence that the signature was created before a particular point in time; this may be either a time-stamp token or time-mark. The present document defines unsigned attributes able to contain validation data that can be added to CAdES-BES and CAdES-EPES, leading to electronic signature formats that include validation data. The sections below summarize these formats and their most relevant characteristics. 4.4.1. Electronic Signature with Time (CAdES-T) An electronic signature with time (CAdES-T), in accordance with the present document, is when there exits trusted time associated with the ES. The trusted time may be provided by: - a time-stamp attribute as an unsigned attribute added to the ES; and - a time-mark of the ES provided by a Trusted Service Provider. The time-stamp attribute contains a time-stamp token of the electronic signature value. Section 6.1.1 provides the specification details. Annex C.4.3 provides the rationale. A time-mark provided by a Trusted Service would have a similar effect to the signature-time-stamp attribute, but in this case, no attribute is added to the ES, as it is the responsibility of the TSP to provide evidence of a time-mark when required to do so. The management of time marks is outside the scope of the present document. Trusted time provides the initial steps towards providing long-term validity. Electronic signatures with the time-stamp attribute or a time-marked BES/EPES, forming the CAdES-T are illustrated in Figure 3. Pinkas, et al. Informational [Page 20] RFC 5126 CMS Advanced Electronic Signatures February 2008 +-------------------------------------------------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 is added to the CAdES-BES or CAdES-EPES as an unsigned attribute. NOTE 2: Time-stamp tokens that may themselves include unsigned attributes required to validate the time-stamp token, such as the complete-certificate-references and complete-revocation-references attributes, as defined by the present document. 4.4.2. ES with Complete Validation Data References (CAdES-C) Electronic Signature with Complete validation data references (CAdES-C), in accordance with the present document, adds to the CAdES-T the complete-certificate-references and complete-revocation-references attributes, as defined by the present document. The complete-certificate-references attribute contains references to all the certificates present in the certification path used for verifying the signature. The complete-revocation-references attribute contains references to the CRLs and/or OCSPs responses used for verifying the signature. Section 6.2 provides the specification details. Storing the references allows the values of the certification path and the CRLs or OCSPs responses to be stored elsewhere, reducing the size of a stored electronic signature format. Pinkas, et al. Informational [Page 21] RFC 5126 CMS Advanced Electronic Signatures February 2008 Sections C.4.1 to C.4.2 provide rationale on the usage of validation data and when it is suitable to generate the CAdES-C form. Electronic signatures, with the additional validation data forming the CAdES-C, are illustrated 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: As a minimum, the signer will provide the CAdES-BES or, when indicating that the signature conforms to an explicit signing policy, the CAdES-EPES. NOTE 3: To reduce 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 not, the verifier should create the CAdES-T on first receipt of an electronic signature because the CAdES-T provides independent evidence of the existence of the signature prior to 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 minimize this risk, and when the signer does not provide the CAdES-C, the verifier should create the CAdES-C when the required component of revocation and validation data become available; this may require a grace period. Pinkas, et al. Informational [Page 22] RFC 5126 CMS Advanced Electronic Signatures February 2008 NOTE 6: A grace period permits certificate revocation information to propagate through the revocation processes. This period could extend from the time an authorized entity requests certificate revocation to when the information is available for the relying party to use. In order to make sure that the certificate was not revoked at the time the signature was time-marked or time-stamped, verifiers should wait until the end of the grace period. A signature policy may define specific values for grace periods. An illustration of a grace period is provided 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 provides example validation processes. Annex C.4 provides additional information about applying grace periods during the validation process. The verifier's conformance requirements are defined in Section 8.3 for time-stamped CAdES-C, and Section 8.4 for time-marked CAdES-C. The present document only defines conformance requirements for the verifier up to an ES with Complete validation data (CAdES-C). This means that none of the extended and archive forms of electronic signatures, as defined in Sections 4.4.3 to 4.4.4, need to be implemented to achieve conformance to the present document. 4.4.3. Extended Electronic Signature Formats CAdES-C can be extended by adding unsigned attributes to the electronic signature. The present document defines various unsigned attributes that are applicable for very long-term verification, and Pinkas, et al. Informational [Page 23] RFC 5126 CMS Advanced Electronic Signatures February 2008 for preventing some disaster situations that are discussed in Annex C. Annex B provides the details of the various extended formats, all the required unsigned attributes for each type, and how they can be used within the electronic signature validation process. The sections below give an overview of the various forms of extended signature formats in the present document. 4.4.3.1. EXtended Long Electronic Signature (CAdES-X Long) Extended Long format (CAdES-X Long), in accordance with the present document, adds the certificate-values and revocation-values attributes to the CAdES-C format. The first one contains the whole certificate path required for verifying the signature; the second one contains the CRLs and/OCSP responses required for the validation of the signature. This provides a known repository of certificate and revocation information required to validate a CAdES-C and prevents such information from getting lost. Sections 6.3.3 and 6.3.4 give specification details. Annex B.1.1 gives details on the production of the format. Annexes C4.1 to C.4.2 provide the rationale. The structure of the CAdES-X Long format is illustrated 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 Pinkas, et al. Informational [Page 24] RFC 5126 CMS Advanced Electronic Signatures February 2008 4.4.3.2. EXtended Electronic Signature with Time Type 1 (CAdES-X Type 1) Extended format with time type 1 (CAdES-X Type 1), in accordance with the present document, adds the CAdES-C-time-stamp attribute, whose content is a time-stamp token on the CAdES-C itself, to the CAdES-C format. This provides an integrity and trusted time protection over all the elements and references. It may protect the certificates, CRLs, and OCSP responses in case of a later compromise of a CA key, CRL key, or OCSP issuer key. Section 6.3.5 provides the specification details. Annex B.1.2 gives details on the production of the time-stamping process. Annex C.4.4.1 provides the rationale. The structure of the CAdES-X Type 1 format is illustrated in 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 Pinkas, et al. Informational [Page 25] RFC 5126 CMS Advanced Electronic Signatures February 2008 4.4.3.3. EXtended Electronic Signature with Time Type 2 (CAdES-X Type 2) Extended format with time type 2 (CAdES-X Type 2), in accordance with the present document, adds to the CAdES-C format the CAdES-C-time-stamped-certs-crls-references attribute, whose content is a time-stamp token on the certification path and revocation information references. This provides an integrity and trusted time protection over all the references. It may protect the certificates, CRLs and OCSP responses in case of a later compromise of a CA key, CRL key or OCSP issuer key. Both CAdES-X Type 1 and CAdES-X Type 2 counter the same threats, and the usage of one or the other depends on the environment. Section 6.3.5 provides the specification details. Annex B.1.3 gives details on the production of the time-stamping process. Annex C.4.4.2 provides the rationale. The structure of the CAdES-X Type 2 format is illustrated in 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 Pinkas, et al. Informational [Page 26] RFC 5126 CMS Advanced Electronic Signatures February 2008 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), in accordance with the present document, is a combination of CAdES-X Long and one of the two former types (CAdES-X Type 1 and CAdES-X Type 2). Annex B.1.4 gives details on the production of the time-stamping process. Annex C.4.8 in Annex C provides the rationale. The structure of the CAdES-X Long Type 1 and CAdES-X Long Type 2 format is illustrated 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), in accordance with the present document, builds on a CAdES-X Long or a CAdES-X Long Type 1 or 2 by adding one or more archive-time-stamp attributes. This form is used for archival of long-term signatures. Successive time-stamps protect the whole material against vulnerable hashing algorithms or the breaking Pinkas, et al. Informational [Page 27] RFC 5126 CMS Advanced Electronic Signatures February 2008 of the cryptographic material or algorithms. Section 6.4 contains the specification details. Sections C.4.5 and C.4.8 provide the rationale. The structure of the CAdES-A form is illustrated in 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 The CAdES-C may be used for arbitration should there be a dispute between the signer and verifier, provided that: - 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; Pinkas, et al. Informational [Page 28] RFC 5126 CMS Advanced Electronic Signatures February 2008 - 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 The validation process validates an electronic signature; the output status of the validation process can be: - invalid; - incomplete validation; or - valid. An invalid response indicates that either the signature format is incorrect or that the digital signature value fails verification (e.g., the integrity check on the digital signature value fails, or any of the certificates on which the digital signature verification depends is known to be invalid or revoked). An incomplete validation response indicates that the signature validation status is currently unknown. In the case of incomplete validation, additional information may be made available to the application or user, thus allowing them to decide what to do with the electronic signature. In the case of incomplete validation, the electronic signature may be checked again at some later time when additional information becomes available. Pinkas, et al. Informational [Page 29] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 indicates that the signature has passed verification, and it complies with the signature validation policy. Example validation sequences are illustrated in Annex B. 5. Electronic Signature Attributes This section builds upon the existing Cryptographic Message Syntax (CMS), as defined in RFC 3852 [4], and Enhanced Security Services (ESS), as 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 the present document. The present document defines ES attributes that it uses and that are not defined elsewhere. The mandated set of attributes and the digital signature value is defined as the minimum Electronic Signature (ES) required by the present document. A signature policy may mandate that other signed attributes be present. 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. The present 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]). Pinkas, et al. Informational [Page 30] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 the present document. 5.5. EncapsulatedContentInfo Type The syntax of the EncapsulatedContentInfo type ES is as defined in CMS (RFC 3852 [4]). For the purpose of long-term validation, as defined by the present 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. 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 the present document. 5.6. SignerInfo Type The syntax of the SignerInfo type ES is as defined in CMS (RFC 3852 [4]). Pinkas, et al. Informational [Page 31] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. 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 the present 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, i.e., 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. 5.7. Basic ES Mandatory Present Attributes The following attributes shall be present with the signed-data defined by the present 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. Pinkas, et al. Informational [Page 32] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 are designed to prevent simple substitution and reissue attacks and to allow for a restricted set of certificates to be used in verifying a signature. They have a compact form (much shorter than the full certificate) that allows for a certificate to be unambiguously identified. One, and only one, of the following alternative attributes shall be present with the signedData, defined by the present 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 that may include all the certificates up to the trust anchor. Pinkas, et al. Informational [Page 33] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 the present document. The sequence of the policy information field is not used in the present 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. 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 The ESS signing-certificate-v2 attribute is similar to the ESS signing-certificate defined above, except that this attribute 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 } Pinkas, et al. Informational [Page 34] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. 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. 5.7.3.3. Other signing-certificate Attribute Definition 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. 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 Pinkas, et al. Informational [Page 35] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 Pinkas, et al. Informational [Page 36] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 } Pinkas, et al. Informational [Page 37] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. Pinkas, et al. Informational [Page 38] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. 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 Pinkas, et al. Informational [Page 39] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. 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 This section defines a number of attributes that may be used to indicate additional information to a verifier: a) the type of commitment from the signer, and/or b) the claimed location where the signature is performed, and/or Pinkas, et al. Informational [Page 40] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 There may be situations where a signer wants to explicitly indicate to a verifier that by signing the data, it illustrates a type of commitment on behalf of the signer. The commitment-type-indication attribute conveys such information. The commitment-type-indication attribute shall be a signed attribute. The commitment type may be: - defined as part of the signature policy, in which case, the commitment type has precise semantics that are defined as part of the signature policy; and - be a registered type, in which case, the commitment type has precise semantics defined by registration, under the rules of the registration authority. Such a registration authority may be a trading association or a legislative authority. The signature policy specifies a set of attributes that it "recognizes". This "recognized" set includes all those commitment types defined as part of the signature policy, as well as any externally defined commitment types that the policy may choose to recognize. Only recognized commitment types are allowed in this field. 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 Pinkas, et al. Informational [Page 41] RFC 5126 CMS Advanced Electronic Signatures February 2008 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} These generic commitment types have the following meanings: Proof of origin indicates that the signer recognizes to have created, approved, and sent the message. Proof of receipt indicates that signer recognizes to have received the content of the message. Proof of delivery indicates that the TSP providing that indication has delivered a message in a local store accessible to the recipient of the message. Proof of sender indicates that the entity providing that indication has sent the message (but not necessarily created it). Proof of approval indicates that the signer has approved the content of the message. Pinkas, et al. Informational [Page 42] RFC 5126 CMS Advanced Electronic Signatures February 2008 Proof of creation indicates that the signer has created the message (but not necessarily approved, nor sent it). 5.11.2. signer-location Attribute The signer-location attribute specifies a mnemonic for an address associated with the signer at a particular geographical (e.g., city) location. The mnemonic is registered in the country in which the signer is located and is used in the provision of the Public Telegram Service (according to ITU-T Recommendation F.1 [11]). 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 specifies additional attributes of the signer (e.g., role). It may 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} Pinkas, et al. Informational [Page 43] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 an attribute that is the time-stamp token of the signed data content before it is 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 value of messageImprint of TimeStampToken (as described in RFC 3161 [7]) shall be a hash of the value of the eContent field within encapContentInfo in the signedData. For further information and definition of TimeStampToken, 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 by independent SignerInfo from each signer. Pinkas, et al. Informational [Page 44] RFC 5126 CMS Advanced Electronic Signatures February 2008 Each SignerInfo shall include all the attributes required under the present document and shall be processed independently by the verifier. 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 countersignature held as an unsigned attribute to the SignerInfo to which the counter-signature is applied. 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 This section specifies attributes that contain different types of validation data. These attributes build on the electronic signature specified in Section 5. This includes: - Signature-time-stamp applied to the electronic signature value or a Time-Mark in an audit trail. This is defined as the Electronic Signature with Time (CAdES-T); and - Complete validation data references that comprise the time-stamp of the signature value, plus references to all the certificates (complete-certificate-references) and revocation (complete- revocation-references) information used for full validation of the electronic signature. This is defined as 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. Pinkas, et al. Informational [Page 45] RFC 5126 CMS Advanced Electronic Signatures February 2008 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; optional attributes are defined in Sections 6.2.3 and 6.2.4. In addition, the following optional extended forms of validation data are also defined; see Annex B for an overview of the extended forms of validation data: - CAdES-X with time-stamp: there are two types of time-stamps used in extended validation data defined by the present document; - Type 1(CAdES-X Type 1): comprises a time-stamp over the ES with Complete validation data (CAdES-C); and - Type 2 (CAdES-X Type2): comprises 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: comprises 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: comprises 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 as per CAdES-X Long. This section also specifies the data structures used in Archive validation data format (CAdES-A)of extended forms: - Archive form of electronic signature (CAdES-A) 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. Pinkas, et al. Informational [Page 46] RFC 5126 CMS Advanced Electronic Signatures February 2008 An archive time-stamp may be repeatedly applied after long periods to maintain validity when electronic signature and time-stamping algorithms weaken. The additional data required to create the forms of electronic signature identified above is carried as unsigned attributes associated with an individual signature by being placed in the unsignedAttrs field of SignerInfo. Thus, all the attributes defined in Section 6 are unsigned attributes. NOTE 5: Where multiple signatures are to be supported, as described in Section 5.12, each signature has a separate SignerInfo. Thus, each signature requires its own unsigned attribute values to create CAdES-T, CAdES-C, etc. 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 for which part, but not all, of the additional data required for validation is available (i.e., some certificates and revocation information are available, but not all). The minimum structure 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 is an unsigned attribute. Several instances of this attribute may occur with an electronic signature, 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 ASN.1 type SignatureTimeStampToken: SignatureTimeStampToken ::= TimeStampToken Pinkas, et al. Informational [Page 47] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. For further information and definition of 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]). 6.2. Complete Validation Data References (CAdES-C) An electronic signature with Complete validation data references (CAdES-C) is an electronic signature for which all the additional data required for validation (i.e., all certificates and revocation information) is available. This form is built on the CAdES-T form defined above. 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 have been 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. Pinkas, et al. Informational [Page 48] RFC 5126 CMS Advanced Electronic Signatures February 2008 NOTE 1: The signer's certificate is referenced in the signing certificate attribute (see Section 5.7.3). 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 that shall be present in OtherCertID. The certHash shall match the hash of the certificate referenced. 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 provides 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. 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 have been used in the validation of the signer, and CA certificates used in ES with Complete validation data. This attribute indicates that the verifier has taken due diligence to gather the available revocation information. The references stored in this attribute can be used to retrieve the referenced information, if not stored in the CMS structure, but somewhere else. 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} Pinkas, et al. Informational [Page 49] RFC 5126 CMS Advanced Electronic Signatures February 2008 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. 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 } Pinkas, et al. Informational [Page 50] RFC 5126 CMS Advanced Electronic Signatures February 2008 When creating a crlValidatedID, the crlHash is computed over the entire DER encoded CRL including the signature. The crlIdentifier would normally be present unless the CRL can be inferred from other information. The crlIdentifier is to identify the CRL using the issuer name and the CRL issued time, which shall correspond to the time thisUpdate contained in the issued CRL, and if present, the crlNumber. The crlListID attribute is an unsigned attribute. In the case that the identified CRL is a Delta CRL, then references to the set of CRLs to provide a complete revocation list shall be included. The OcspIdentifier is to identify the OCSP response using the issuer name and the time of issue of the OCSP response, which shall correspond to the time produced as contained in the issued OCSP response. Since it may be needed to make the difference between two OCSP responses received within the same second, the hash of the response contained in the OcspResponsesID may be needed to solve the ambiguity. NOTE 1: Copies of the CRL and OCSP responses 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 the present document. The definition of the syntax of the other form of revocation information is as identified by OtherRevRefType. This attribute may include the references to the full set of the CRL, ACRL, or OCSP responses that have been used to verify 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. 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 have Pinkas, et al. Informational [Page 51] RFC 5126 CMS Advanced Electronic Signatures February 2008 been 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 have been used in the validation of the attribute certificate. This attribute can be used to illustrate that the verifier has taken due diligence of the available revocation information. 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). Pinkas, et al. Informational [Page 52] RFC 5126 CMS Advanced Electronic Signatures February 2008 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), to provide additional protection against later CA compromise and provide integrity of 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 provides additional protection against later CA compromise and provides integrity of the validation data used. NOTE 1: The CAdES-X-Long signature provides 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; that having been found once to be valid, it shall continue to be so months or years Pinkas, et al. Informational [Page 53] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 this 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 Pinkas, et al. Informational [Page 54] RFC 5126 CMS Advanced Electronic Signatures February 2008 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 the present document. The definition of the syntax of the other form of revocation information is as 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 this case, the unsigned attribute shall be added to the signedData of the relevant time-stamp token. Pinkas, et al. Informational [Page 55] RFC 5126 CMS Advanced Electronic Signatures February 2008 6.3.5. CAdES-C-time-stamp Attribute Definition This attribute is used to protect against CA key compromise. This attribute is used for the time-stamping of the complete electronic signature (CAdES-C). It is 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 is a time-stamp token of the hash of the electronic signature and the complete validation data (CAdES-C). It is a special-purpose TimeStampToken Attribute that time-stamps the CAdES-C. Several instances of this attribute may occur with an electronic signature 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 Pinkas, et al.