RFC 5126
CMS Advanced Electronic Signatures (CAdES)
Part 1 of 28 ๐ more parts are coming, so don't go anywhere! ๐
Title Block ๐ฆ
Okay bestie, this RFC is RFC 5126 and it's called CMS Advanced Electronic Signatures (CAdES) โจ. It's giving "signature that doesn't expire," which is iconic.
- Network Working Group: the group that put it out ๐
- Authors: D. Pinkas (Bull SAS), N. Pope (Thales eSecurity), and J. Ross (Security and Standards) ๐
- Category: Informational ๐ธ
- Date: February 2008 ๐
- Obsoletes: RFC 3126 ๐
- Updates: nothing is listed in the header ๐
Status of This Memo ๐
This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited. ๐ซถ
Abstract ๐ฎ
This document defines the format of an electronic signature that can remain valid over long periods. That includes evidence of its validity, even if the signer or the verifying party later tries to deny (i.e., repudiates) the signature. Not me trying to disown my own signature ๐
The format can be considered as an extension to RFC 3852 and RFC 2634. Where it makes sense, extra signed and unsigned attributes have been defined. โจ
The contents of this Informational RFC are basically a transposition of the ETSI Technical Specification (TS) 101 733 V.1.7.4 (CMS Advanced Electronic Signatures -- CAdES), and they're technically equivalent to it. ๐ง
The technical contents of this specification are maintained by ETSI. The ETSI TS and further updates are available free of charge at: http://www.etsi.org/WebSite/Standards/StandardsDownload.aspx ๐
Table of Contents ๐๏ธ
1. Introduction ....................................................6
2. Scope ...........................................................6
3. Definitions and Abbreviations ...................................8
3.1. Definitions ................................................8
3.2. Abbreviations .............................................11
4. Overview .......................................................12
4.1. Major Parties .............................................13
4.2. Signature Policies ........................................14
4.3. Electronic Signature Formats ..............................15
4.3.1. CAdES Basic Electronic Signature (CAdES-BES) .......15
4.3.2. CAdES Explicit Policy-based Electronic
Signatures (CAdES-EPES) ............................18
4.4. Electronic Signature Formats with Validation Data .........19
4.4.1. Electronic Signature with Time (CAdES-T) ...........20
4.4.2. ES with Complete Validation Data References
(CAdES-C) ..........................................21
4.4.3. Extended Electronic Signature Formats ..............23
4.4.3.1. EXtended Long Electronic Signature
(CAdES-X Long) ............................24
4.4.3.2. EXtended Electronic Signature with
Time Type 1 ...............................25
4.4.3.3. EXtended Electronic Signature with
Time Type 2 ...............................26
4.4.3.4. EXtended Long Electronic Signature
with Time (CAdES-X Long ...................27
4.4.4. Archival Electronic Signature (CAdES-A) ............27
4.5. Arbitration ...............................................28
4.6. Validation Process ........................................29
5. Electronic Signature Attributes ................................30
5.1. General Syntax ............................................30
5.2. Data Content Type .........................................30
5.3. Signed-data Content Type ..................................30
5.4. SignedData Type ...........................................31
5.5. EncapsulatedContentInfo Type ..............................31
5.6. SignerInfo Type ...........................................31
5.6.1. Message Digest Calculation Process .................32
5.6.2. Message Signature Generation Process ...............32
5.6.3. Message Signature Verification Process .............32
5.7. Basic ES Mandatory Present Attributes .....................32
5.7.1. content-type .......................................32
5.7.2. Message Digest .....................................33
5.7.3. Signing Certificate Reference Attributes ...........33
5.7.3.1. ESS signing-certificate Attribute
Definition ................................34
5.7.3.2. ESS signing-certificate-v2
Attribute Definition ......................34
okay bestie, here's the rest of the map ๐บ๏ธโจ the TOC keeps going, and every number and page is exactly where it should be ๐
5.7.3.3. Other signing-certificate
Attribute Definition ......................35
5.8. Additional Mandatory Attributes for Explicit
Policy-based Electronic Signatures ........................36
5.8.1. signature-policy-identifier ........................36
5.9. CMS Imported Optional Attributes ..........................38
5.9.1. signing-time .......................................38
5.9.2. countersignature ...................................39
5.10. ESS-Imported Optional Attributes .........................39
5.10.1. content-reference Attribute .......................39
5.10.2. content-identifier Attribute ......................39
5.10.3. content-hints Attribute ...........................40
5.11. Additional Optional Attributes Defined in the
Present Document .........................................40
5.11.1. commitment-type-indication Attribute ..............41
5.11.2. signer-location Attribute .........................43
5.11.3. signer-attributes Attribute .......................43
5.11.4. content-time-stamp Attribute ......................44
5.12. Support for Multiple Signatures ..........................44
5.12.1. Independent Signatures ............................44
5.12.2. Embedded Signatures ...............................45
6. Additional Electronic Signature Validation Attributes ..........45
6.1. signature time-stamp Attribute (CAdES-T) ..................47
6.1.1. signature-time-stamp Attribute Definition ..........47
6.2. Complete Validation Data References (CAdES-C) .............48
6.2.1. complete-certificate-references Attribute
Definition .........................................48
6.2.2. complete-revocation-references Attribute
Definition .........................................49
6.2.3. attribute-certificate-references Attribute
Definition .........................................51
6.2.4. attribute-revocation-references Attribute
Definition .........................................52
6.3. Extended Validation Data (CAdES-X) ........................52
6.3.1. Time-Stamped Validation Data (CAdES-X Type
1 or Type 2) .......................................53
6.3.2. Long Validation Data (CAdES-X Long, CAdES-X
Long Type 1 or 2) ..................................53
6.3.3. certificate-values Attribute Definition ............54
6.3.4. revocation-values Attribute Definition .............54
6.3.5. CAdES-C-time-stamp Attribute Definition ............56
6.3.6. time-stamped-certs-crls-references
Attribute Definition ...............................57
6.4. Archive Validation Data ...................................58
6.4.1. archive-time-stamp Attribute Definition ............58
7. Other Standard Data Structures .................................60
7.1. Public Key Certificate Format .............................60
7.2. Certificate Revocation List Format ........................60
7.3. OCSP Response Format ......................................60
7.4. Time-Stamp Token Format ...................................60
7.5. Name and Attribute Formats ................................60
7.6. AttributeCertificate ......................................61
8. Conformance Requirements .......................................61
8.1. CAdES-Basic Electronic Signature (CAdES-BES) ..............62
8.2. CAdES-Explicit Policy-based Electronic Signature ..........63
8.3. Verification Using Time-Stamping ..........................63
8.4. Verification Using Secure Records .........................63
9. References .....................................................64
9.1. Normative References ......................................64
9.2. Informative References ....................................65
Annex A (normative): ASN.1 Definitions ............................69
A.1. Signature Format Definitions Using
X.208 ASN.1 Syntax ...................................69
A.2. Signature Format Definitions Using
X.680 ASN.1 Syntax ...................................77
Annex B (informative): Extended Forms of Electronic Signatures ....86
B.1. Extended Forms of Validation Data ....................86
B.1.1. CAdES-X Long ..................................87
B.1.2. CAdES-X Type 1 ................................88
B.1.3. CAdES-X Type 2 ................................90
B.1.4. CAdES-X Long Type 1 and CAdES-X Long Type 2 ...91
B.2. Time-Stamp Extensions ................................93
B.3. Archive Validation Data (CAdES-A) ....................94
B.4. Example Validation Sequence ..........................97
B.5. Additional Optional Features ........................102
Annex C (informative): General Description .......................103
C.1. The Signature Policy ................................103
C.2. Signed Information ..................................104
C.3. Components of an Electronic Signature ...............104
C.3.1. Reference to the Signature Policy ............104
C.3.2. Commitment Type Indication ...................105
C.3.3. Certificate Identifier from the Signer .......106
C.3.4. Role Attributes ..............................106
C.3.4.1. Claimed Role .......................107
C.3.4.2. Certified Role .....................107
C.3.5. Signer Location ..............................108
C.3.6. Signing Time .................................108
C.3.7. Content Format ...............................108
C.3.8. content-hints ................................109
C.3.9. Content Cross-Referencing ....................109
C.4. Components of Validation Data .......................109
C.4.1. Revocation Status Information ................109
C.4.1.1. CRL Information .....................110
C.4.1.2. OCSP Information ....................110
C.4.2. Certification Path ...........................111
C.4.3. Time-stamping for Long Life of Signatures ....111
C.4.4. Time-stamping for Long Life of Signature
before CA key Compromises ....................113
C.4.4.1. Time-stamping the ES with
Complete Validation Data ...........113
C.4.4.2. Time-Stamping Certificates and
Revocation Information References ..114
C.4.5. Time-stamping for Archive of Signature .......115
C.4.6. Reference to Additional Data .................116
C.4.7. Time-Stamping for Mutual Recognition .........116
C.4.8. TSA Key Compromise ...........................117
C.5. Multiple Signatures .................................118
Annex D (informative): Data Protocols to Interoperate with TSPs ..118
D.1. Operational Protocols ...............................118
D.1.1. Certificate Retrieval ........................118
D.1.2. CRL Retrieval ................................118
D.1.3. Online Certificate Status ....................119
D.1.4. Time-Stamping ................................119
D.2. Management Protocols ................................119
D.2.1. Request for Certificate Revocation ...........119
Annex E (informative): Security Considerations ...................119
E.1. Protection of Private Key ...........................119
E.2. Choice of Algorithms ................................119
Annex F (informative): Example Structured Contents and MIME ......120
F.1. General Description .................................120
F.1.1. Header Information ...........................120
F.1.2. Content Encoding .............................121
F.1.3. Multi-Part Content ...........................121
F.2. S/MIME ..............................................122
F.2.1. Using application/pkcs7-mime .................123
F.2.2. Using application/pkcs7-signature ............124
Annex G (informative): Relationship to the European Directive
and EESSI .................................125
G.1. Introduction ........................................125
G.2. Electronic Signatures and the Directive .............126
G.3. ETSI Electronic Signature Formats and the Directive .127
G.4. EESSI Standards and Classes of Electronic Signature .127
G.4.1. Structure of EESSI Standardization ...........127
G.4.2. Classes of Electronic Signatures .............128
G.4.3. Electronic Signature Classes and the ETSI
Electronic Signature Format ..................128
Annex H (informative): APIs for the Generation and Verification
of Electronic Signatures Tokens ...........129
H.1. Data Framing ........................................129
H.2. IDUP-GSS-APIs Defined by the IETF ...................131
H.3. CORBA Security Interfaces Defined by the OMG ........132
Annex I (informative): Cryptographic Algorithms ..................133
I.1. Digest Algorithms ...................................133
I.1.1. SHA-1 ........................................133
I.1.2. General ......................................133
I.2. Digital Signature Algorithms ........................134
I.2.1. DSA ..........................................134
I.2.2. RSA ..........................................135
I.2.3. General ......................................135
Annex J (informative): Guidance on Naming ........................137
J.1. Allocation of Names .................................137
J.2. Providing Access to Registration Information ........138
J.3. Naming Schemes ......................................138
J.3.1. Naming Schemes for Individual Citizens .......138
J.3.2. Naming Schemes for Employees of an
Organization .................................139
1. Introduction โจ
Okay bestie, this doc is all about electronic signatures for every kind of transaction ๐ like business stuff (purchase requisitions, contracts, invoices) where the signature needs to stay valid for ages ๐. It covers evidence that the signature is still good even if the signer or the verifying party later tries to deny it (repudiate, see ISO/IEC 10181-5 [ISO10181-5]) ๐ โโ๏ธ literally iconic protection.
So this can be used for any transaction between an individual and a company, between two companies, between an individual and a governmental body, etc. ๐ It's independent of any environment, so it works with smart cards, Global System for Mobile Communication Subscriber Identity Module (GSM SIM) cards, special programs for electronic signatures, etc. ๐ง
The European Directive on a community framework for Electronic Signatures defines an electronic signature as: "Data in electronic form which is attached to or logically associated with other electronic data and which serves as a method of authentication". ๐
And an electronic signature, as used in this document, is a form of advanced electronic signature, as defined in the Directive ๐ฅ that's the main character energy right there.
2. Scope
Okay so the scope is ONLY electronic signature formats ๐ no more, no less. The aspects of Electronic Signature Policies are defined in RFC 3125 [RFC3125] and ETSI TR 102 272 [TR102272], so those are a different story ๐ฆ
This document defines a number of electronic signature formats, including ones that can remain valid over long periods โณ and it includes evidence that the signature is valid even if the signer or verifying party later tries to deny (repudiate) the validity of the electronic signature. Not me doubting it ๐
It also specifies the use of Trusted Service Providers (e.g., Time-Stamping Authorities) and the data that needs to be archived (e.g., cross-certificates and revocation lists) to meet the requirements of long-term electronic signatures ๐ซถ
An electronic signature, as defined by this document, can be used for arbitration in case of a dispute between the signer and verifier, which may happen at some later time, even years later ๐ yes, years.
The document includes the concept of signature policies that can be used to establish technical consistency when validating electronic signatures, but it does not mandate their use ๐ธ totally optional, no pressure.
This document is based on the use of public key cryptography to produce digital signatures, supported by public key certificates ๐ It also specifies the use of time-stamping and time-marking services to prove the validity of a signature long after the normal lifetime of critical elements of an electronic signature โจ And as an option, it also defines ways to provide very long-term protection against key compromise or weakened algorithms ๐ก๏ธ extra protection, lowkey genius.
This document builds on existing standards that are widely adopted. These include:
- RFC 3852 [4]: "Cryptographic Message Syntax (CMS)";
- ISO/IEC 9594-8/ITU-T Recommendation X.509 [1]: "Information technology - Open Systems Interconnection - The Directory: Authentication framework";
- RFC 3280 [2]: "Internet X.509 Public Key Infrastructure (PKIX) Certificate and Certificate Revocation List (CRL) Profile";
- RFC 3161 [7]: "Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)".
NOTE: See Section 11 for a full set of references. ๐
This document describes formats for advanced electronic signatures using ASN.1 (Abstract Syntax Notation 1) [14]. ASN.1 is encoded using X.690 [16] ๐ค
These formats are based on CMS (Cryptographic Message Syntax) defined in RFC 3852 [4]. That's why these electronic signatures are called CAdES, for "CMS Advanced Electronic Signatures" ๐ the naming is giving organized.
Another document, TS 101 903 [TS101903], describes formats for XML advanced electronic signatures (XAdES) built on XMLDSIG as specified in [XMLDSIG] ๐
This document also identifies other documents that define formats for Public Key Certificates, Attribute Certificates, and Certificate Revocation Lists, plus supporting protocols, including protocols for use by trusted third parties to support the operation of electronic signature creation and validation ๐งโโ๏ธ
Informative annexes include:
- illustrations of extended forms of Electronic Signature formats that protect against various vulnerabilities and examples of validation processes (Annex B);
- descriptions and explanations of some of the concepts used in this document, giving a rationale for normative parts of this document (Annex C);
- information on protocols to interoperate with Trusted Service Providers (Annex D);
- guidance on naming (Annex E);
- an example structured content and MIME (Annex F);
- the relationship between this document and the directive on electronic signature and associated standardization initiatives (Annex G);
- APIs to support the generation and verification of electronic signatures (Annex H);
- cryptographic algorithms that may be used (Annex I); and
- naming schemes (see Annex J). ๐
3. Definitions and Abbreviations
3.1. Definitions
Here are the terms and definitions that apply for this document. Read these, they're the vocab list ๐โจ
Arbitrator: an arbitrator entity may be used to arbitrate a dispute between a signer and verifier when there is a disagreement on the validity of a digital signature.
Attribute Authority (AA): an authority that assigns privileges by issuing attribute certificates.
Authority Certificate: a certificate issued to an authority (e.g., either to a certification authority or an attribute authority).
Attribute Authority Revocation List (AARL): a revocation list containing a list of references to certificates issued to AAs that are no longer considered valid by the issuing authority.
Attribute Certificate Revocation List (ACRL): a revocation list containing a list of references to attribute certificates that are no longer considered valid by the issuing authority.
Certification Authority Revocation List (CARL): a revocation list containing a list of public key certificates issued to certification authorities that are no longer considered valid by the certificate issuer.
Certification Authority (CA): an authority trusted by one or more users to create and assign public key certificates; optionally, the certification authority may create the users' keys.
NOTE: See ITU-T Recommendation X.509 [1].
Certificate Revocation List (CRL): a signed list indicating a set of public key certificates that are no longer considered valid by the certificate issuer.
Digital Signature: data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery, e.g., by the recipient.
NOTE: See ISO 7498-2 [ISO7498-2].
Electronic Signature: data in electronic form that is attached to or logically associated with other electronic data and that serves as a method of authentication.
NOTE: See Directive 1999/93/EC of the European Parliament and of the Council of 13 December 1999 on a Community framework for electronic signatures [EUDirective].
Extended Electronic Signatures: electronic signatures enhanced by complementing the baseline requirements with additional data, such as time-stamp tokens and certificate revocation data, to address commonly recognized threats. ๐ก๏ธ
Explicit Policy-based Electronic Signature (EPES): an electronic signature where the signature policy that shall be used to validate it is explicitly specified.
Grace Period: a time period that permits the certificate revocation information to propagate through the revocation process to relying parties. โฐ
Initial Verification: a process performed by a verifier done after an electronic signature is generated in order to capture additional information that could make it valid for long-term verification.
Public Key Certificate (PKC): public keys of a user, together with some other information, rendered unforgeable by encipherment with the private key of the certification authority that issued it.
NOTE: See ITU-T Recommendation X.509 [1].
Rivest-Shamir-Adleman (RSA): an asymmetric cryptography algorithm based on the difficulty to factor very large numbers using a key pair: a private key and a public key. ๐
Signature Policy: a set of rules for the creation and validation of an electronic signature that defines the technical and procedural requirements for electronic signature creation and validation, in order to meet a particular business need, and under which the signature can be determined to be valid.
Signature Policy Issuer: an entity that defines and issues a signature policy.
Signature Validation Policy: part of the signature policy that specifies the technical requirements on the signer in creating a signature and verifier when validating a signature.
Signer: an entity that creates an electronic signature. โ๏ธ
Subsequent Verification: a process performed by a verifier to assess the signature validity.
NOTE: Subsequent verification may be done even years after the electronic signature was produced by the signer and completed by the initial verification, and it might not need to capture more data than those captured at the time of initial verification.
Time-Stamp Token: a data object that binds a representation of a datum to a particular time, thus establishing evidence that the datum existed before that time. ๐ฐ๏ธ
Time-Mark: information in an audit trail from a Trusted Service Provider that binds a representation of a datum to a particular time, thus establishing evidence that the datum existed before that time.
Time-Marking Authority: a trusted third party that creates records in an audit trail in order to indicate that a datum existed before a particular point in time.
Time-Stamping Authority (TSA): a trusted third party that creates time-stamp tokens in order to indicate that a datum existed at a particular point in time.
Time-Stamping Unit (TSU): a set of hardware and software that is managed as a unit and has a single time-stamp token signing key active at a time.
Trusted Service Provider (TSP): an entity that helps to build trust relationships by making available or providing some information upon request. ๐ค
Validation Data: additional data that may be used by a verifier of electronic signatures to determine that the signature is valid.
Valid Electronic Signature: an electronic signature that passes validation. โ
Verifier: an entity that verifies evidence.
NOTE 1: See ISO/IEC 13888-1 [ISO13888-1].
NOTE 2: Within the context of this document, this is an entity that validates an electronic signature. ๐
3.2. Abbreviations โจ
Okay bestie, here's the full acronym line-up for this doc ๐ For the purposes of this document, these abbreviations apply:
AA Attribute Authority
AARL Attribute Authority Revocation List
ACRL Attribute Certificate Revocation List
API Application Program Interface
ASCII American Standard Code for Information Interchange
ASN.1 Abstract Syntax Notation 1
CA Certification Authority
CAD Card Accepting Device
CAdES CMS Advanced Electronic Signature
CAdES-A CAdES with Archive validation data
CAdES-BES CAdES Basic Electronic Signature
CAdES-C CAdES with Complete validation data
CAdES-EPES CAdES Explicit Policy Electronic Signature
CAdES-T CAdES with Time
CAdES-X CAdES with eXtended validation data
CAdES-X Long CAdES with EXtended Long validation data
CARL Certification Authority Revocation List
CMS Cryptographic Message Syntax
CRL Certificate Revocation List
CWA CEN (European Committee for Standardization) Workshop
Agreement
DER Distinguished Encoding Rules (for ASN.1)
DSA Digital Signature Algorithm
EDIFACT Electronic Data Interchange For Administration,
Commerce and Transport
EESSI European Electronic Signature Standardization
Initiative
EPES Explicit Policy-based Electronic Signature
ES Electronic Signature
ESS Enhanced Security Services (enhances CMS)
IDL Interface Definition Language
MIME Multipurpose Internet Mail Extensions
OCSP Online Certificate Status Provider
OID Object IDentifier
PKC Public Key Certificate
PKIX Public Key Infrastructure using X.509
(IETF Working Group)
RSA Rivest-Shamir-Adleman
SHA-1 Secure Hash Algorithm 1
TSA Time-Stamping Authority
TSP Trusted Service Provider
TST Time-Stamp Token
TSU Time-Stamping Unit
URI Uniform Resource Identifier
URL Uniform Resource Locator
XML Extensible Markup Language
XMLDSIG XML Digital Signature
4. Overview ๐ฆ
okay so this section is basically the tour guide ๐บ๏ธ The present document defines a bunch of Electronic Signature (ES) formats that build on CMS (RFC 3852 [4]) by adding signed and unsigned attributes. Iconic architecture, no notes โจ
This section:
- gives you an intro to the major parties involved (Section 4.1),
- introduces the concept of signature policies (Section 4.2),
- gives an overview of the various ES formats (Section 4.3),
- introduces the concept of validation data, and gives an overview of formats that include validation data (Section 4.4), and
- shares relevant considerations on arbitration (Section 4.5) and for the validation process (Section 4.6).
The formal specs for the attributes live in Sections 5 and 6, and Annexes C and D explain the reasoning behind the different ES forms ๐ง
4.1. Major Parties ๐
The major parties in a business transaction supported by electronic signatures, as defined in this document, are:
- the signer;
- the verifier;
- Trusted Service Providers (TSP); and
- the arbitrator.
The signer is the entity that creates the electronic signature. When the signer digitally signs data using the prescribed format, that's a commitment from the signing entity to the data being signed. Literally a promise in code ๐ซถ
The verifier is the entity that validates the electronic signature. It can be one entity or several, no judgement ๐
The Trusted Service Providers (TSPs) are one or more entities that help build trust between the signer and verifier. They back up the signer and verifier with supporting services, like user certificates, cross-certificates, time-stamp tokens, CRLs, ARLs, and OCSP responses. These TSPs support the functions defined in this document:
- Certification Authorities;
- Registration Authorities;
- CRL Issuers;
- OCSP Responders;
- Repository Authorities (e.g., a Directory);
- Time-Stamping Authorities;
- Time-Marking Authorities; and
- Signature Policy Issuers.
Certification Authorities hand out public key certificates and run a revocation service ๐
Registration Authorities handle identifying and registering entities before a CA generates certificates. Gatekeepers, but make it cute ๐ธ
Repository Authorities publish CRLs issued by CAs, signature policies issued by Signature Policy Issuers, and optionally public key certificates. The "optionally" is doing a lot of work here ๐
Time-Stamping Authorities attest that some data was formed before a given trusted time โฐ
Time-Marking Authorities record that some data was formed before a given trusted time. Super similar vibes to the stamping ones, just a different job title โจ
Signature Policy Issuers define the signature policies that signers and verifiers use ๐
In some cases, the following extra TSP is needed:
- Attribute Authorities.
Attributes Authorities hand out attributes linked to public key certificates ๐งโโ๏ธ
An Arbitrator is an entity that settles disputes between a signer and a verifier. The referee of the group chat โ๏ธ
4.2. Signature Policies ๐
This document includes the concept of signature policies, which can be used to establish technical consistency when validating electronic signatures. It's giving "everyone reads the same rulebook" ๐
When a comprehensive signature policy used by the verifier is either explicitly indicated by the signer or implied by the data being signed, then a consistent result can be obtained when validating an electronic signature. โจ
When the signature policy the verifier uses is neither indicated by the signer nor derivable from other data, or the signature policy is incomplete, then verifiers, including arbitrators, may get different results when validating an electronic signature. Ngl that's the chaos scenario ๐ So comprehensive signature policies that keep signature validation consistent are recommended from both the signer's and the verifier's point of view ๐ฅ
Further info on signature policies is in:
- TR 102 038 [TR102038];
- Sections 5.8.1, C.1, and C.3.1 of this document;
- RFC 3125 [RFC3125]; and
- TR 102 272 [TR102272].
4.3. Electronic Signature Formats ๐
This section gives an overview of two forms of CMS advanced electronic signature specified in this document: the CAdES Basic Electronic Signature (CAdES-BES) and the CAdES Explicit Policy-based Electronic Signature (CAdES-EPES). Conformance to this document mandates that the signer create one of these formats ๐ฆ Main character energy for both of them!
4.3.1. CAdES Basic Electronic Signature (CAdES-BES) ๐
okay so a CAdES Basic Electronic Signature (CAdES-BES) ๐, per this doc, has four must-have parts:
- the signed user data (aka the signer's document), as defined in CMS (RFC 3852 [4]);
- a collection of mandatory signed attributes, as defined in CMS (RFC 3852 [4]) and in ESS (RFC 2634 [5]);
- additional mandatory signed attributes, defined right here in this doc; and
- the digital signature value, computed on the user data and, when present, on the signed attributes, as defined in CMS (RFC 3852 [4]).
it can also have extras: ๐ธ
- a collection of additional signed attributes; and
- a collection of optional unsigned attributes.
the mandatory signed attributes are:
- Content-type ๐ง. it's defined in RFC 3852 [4] and says what type the EncapsulatedContentInfo value being signed is. the details are in Section 5.7.1 of this doc, and the reasoning for including it is in Annex C.3.7.
- Message-digest ๐ . defined in RFC 3852 [4], it specifies the message digest of the eContent OCTET STRING within encapContentInfo being signed. details are in Section 5.7.2.
- ESS signing-certificate OR ESS signing-certificate-v2 ๐. the ESS signing-certificate attribute is defined in Enhanced Security Services (ESS), RFC 2634 [5], and it only allows SHA-1 as a digest algorithm (ew ๐ญ). the ESS signing-certificate-v2 attribute is defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], and it allows any digest algorithm (much better โจ). a CAdES-BES claiming compliance with this doc must include one of them. Section 5.7.3 has the details, and the rationale is in Annex C.3.3.
optional signed attributes can be added to the CAdES-BES, including ones defined in CMS (RFC 3852 [4]), ESS (RFC 2634 [5]), and this doc. here are the optional ones that are defined in Section 5 and have a rationale in Annex C, iykyk ๐ฆ:
- Signing-time โฐ: as defined in CMS (RFC 3852 [4]), it shows the time of the signature, as claimed by the signer. details and a short rationale are in Section 5.9.1, and Annex C.3.6 has the full rationale.
- content-hints ๐: as defined in ESS (RFC 2634 [5]), it gives info describing the innermost signed content of a multi-layer message, where one content is encapsulated in another. Section 5.10.1 has the specification details, and Annex C.3.8 has the rationale.
- content-reference ๐: as defined in ESS (RFC 2634 [5]), it can be used to link request and reply messages in an exchange between two parties. Section 5.10.1 has the specification details, and Annex C.3.9 has the rationale.
- content-identifier ๐ชช: as defined in ESS (RFC 2634 [5]), it contains an identifier that may be used later on in the previous content-reference attribute. Section 5.10.2 has the specification details.
- commitment-type-indication ๐ค: this one is defined by this doc as a way to indicate the commitment the signer endorses when producing the signature. Section 5.11.1 has the specification details, and Annex C.3.2 has the rationale.
- signer-location ๐: defined by this doc. it lets the signer indicate the place where the signer purportedly produced the signature. Section 5.11.2 has the specification details, and Annex C.3.5 has the rationale.
- signer-attributes ๐ญ: also defined by this doc. it lets a claimed or certified role be incorporated into the signed information. Section 5.11.3 has the specification details, and Annex C.3.4 has the rationale.
- content-time-stamp โณ: defined by this doc too. it lets a time-stamp token of the data to be signed be incorporated into the signed information, which gives proof that the data existed before the signature was created. Section 5.11.4 has the specification details, and Annex C.3.6 has the rationale.
a CAdES-BES form can also include unsigned attributes, as defined in CMS (RFC 3852 [4]) and ESS (RFC 2634 [5]):
- CounterSignature ๐ช, as defined in CMS (RFC 3852 [4]). it can be used wherever embedded signatures (that's a signature on a previous signature) are needed. Section 5.9.2 has the specification details, and Annex C.5 in Annex C has the rationale.
here's the structure of the CAdES-BES, illustrated in Figure 1 ๐ฆ:
+------Elect.Signature (CAdES-BES)------+
|+----------------------------------- + |
||+---------+ +----------+ | |
|||Signer's | | Signed | Digital | |
|||Document | |Attributes| Signature | |
||| | | | | |
||+---------+ +----------+ | |
|+------------------------------------+ |
+---------------------------------------+
Figure 1: Illustration of a CAdES-BES
the signer's conformance requirements for a CAdES-BES are defined in Section 8.1. ๐
NOTE: The CAdES-BES is the minimum format for an electronic signature to be generated by the signer. On its own, it does not provide enough information for it to be verified in the longer term. For example, revocation information issued by the relevant certificate status information issuer needs to be available for long-term validation (see Section 4.4.2).
the CAdES-BES satisfies the legal requirements for electronic signatures, as defined in the European Directive on Electronic Signatures (see Annex C for more on how this doc relates to the Directive). it provides basic authentication and integrity protection. ๐
the semantics of the signed data of a CAdES-BES, or its context, may implicitly indicate a signature policy to the verifier. ๐ง
specifying the contents of signature policies is outside the scope of this doc. still, more info on signature policies is in TR 102 038 [TR102038], RFC 3125 [RFC3125], and Sections 5.8.1, C.1, and C.3.1 of this doc. ๐
4.3.2. CAdES Explicit Policy-based Electronic Signatures (CAdES-EPES) ๐
a CAdES Explicit Policy-based Electronic Signature (CAdES-EPES), per this doc, takes the electronic signature definition and extends it so it conforms to an identified signature policy. ๐
a CAdES-EPES includes a signed attribute (the sigPolicyID attribute) that indicates the signature policy that shall be used to validate the electronic signature. this signed attribute is protected by the signature. the signature may also have other signed attributes required to conform to the mandated signature policy. ๐ก๏ธ
Section 5.7.3 has the details on the signature-policy-identifier attribute spec. Annex C.1 has a short rationale. again, specifying the contents of signature policies is outside the scope of this doc. โ
more info on signature policies is in TR 102 038 [TR102038] and Sections 5.8.1, C.1, and C.3.1 of this doc.
here's the structure of the CAdES-EPES, illustrated in Figure 2 ๐ง:
+------------- Elect.Signature (CAdES-EPES) ---------------+
| |
|+-------------------------------------------------------+ |
|| +-----------+ | |
|| | | +---------------------------+ | |
|| | | | +----------+ | | |
|| | Signer's | | |Signature | Signed | Digital | |
|| | Document | | |Policy ID | Attributes |Signature| |
|| | | | +----------+ | | |
|| | | +---------------------------+ | |
|| +-----------+ | |
|+-------------------------------------------------------+ |
| |
+----------------------------------------------------------+
Figure 2: Illustration of a CAdES-EPES
the signer's conformance requirements for CAdES-EPES are defined in Section 8.2. ๐
4.4. Electronic Signature Formats with Validation Data ๐ซถ
validating an electronic signature, per this doc, needs extra data to do the job. this is called validation data, and it includes: ๐
- Public Key Certificates (PKCs);
- revocation status information for each PKC;
- trusted time-stamps applied to the digital signature, otherwise a time-mark shall be available in an audit log.
- when appropriate, the details of a signature policy to be used to verify the electronic signature.
the validation data may be collected by the signer and/or the verifier. when the signature-policy-identifier signed attribute is present, it shall meet the requirements of the signature policy. ๐งพ
validation data includes CA certificates, plus revocation status information in the form of Certificate Revocation Lists (CRLs) or certificate status information (OCSP) provided by an online service. it also includes evidence that the signature was created before a particular point in time, which can be either a time-stamp token or a time-mark. โฑ๏ธ
this doc defines unsigned attributes that can hold validation data and be added to CAdES-BES and CAdES-EPES, which leads to electronic signature formats that include validation data. the sections below summarize these formats and their most relevant characteristics, so keep reading bestie ๐โจ
4.4.1. Electronic Signature with Time (CAdES-T) โฐโจ
okay so a CAdES-T (electronic signature with time) ๐ฐ๏ธ is basically a CAdES-BES or CAdES-EPES that has trusted time attached to it. It's giving "I can prove when I signed this" ๐
The trusted time can come from either of these:
- a time-stamp attribute, added to the ES as an unsigned attribute ๐; and
- a time-mark of the ES, provided by a Trusted Service Provider ๐ฆ
The time-stamp attribute holds a time-stamp token of the electronic signature value ๐ธ. The specification details are in Section 6.1.1, and the reasoning behind it lives in Annex C.4.3 ๐ง
A time-mark from a Trusted Service gives you a similar effect to the signature-time-stamp attribute, but no attribute gets added to the ES ๐ That's because it's the TSP's job to produce evidence of a time-mark when it's needed. Managing time marks is outside the scope of this document, so we're not going there ๐
Trusted time is the first step toward long-term validity ๐ A signature with the time-stamp attribute, or a time-marked BES/EPES, is what forms the CAdES-T. Check out Figure 3 for the visual ๐
+-------------------------------------------------CAdES-T ---------+
|+------ CAdES-BES or CAdES-EPES -------+ |
||+-----------------------------------+ | +----------------------+ |
|||+---------+ +----------+ | | | | |
||||Signer's | | Signed | Digital | | | Signature-time-stamp | |
||||Document | |Attributes| Signature | | | attribute required | |
|||| | | | | | | when using time | |
|||+---------+ +----------+ | | | stamps. | |
||+-----------------------------------+ | | | |
|+--------------------------------------+ | or the BES/EPES | |
| | shall be time-marked | |
| | | |
| | Management and | |
| | provision of time | |
| | mark is the | |
| | responsibility of | |
| | the TSP. | |
| +----------------------+ |
+------------------------------------------------------------------+
Figure 3: Illustration of CAdES-T formats
๐ NOTE 1: A time-stamp token gets added to the CAdES-BES or CAdES-EPES as an unsigned attribute.
๐ NOTE 2: Time-stamp tokens can themselves include unsigned attributes that are needed to validate the time-stamp token, like the complete-certificate-references and complete-revocation-references attributes, as defined by this document. ๐ซถ
4.4.2. ES with Complete Validation Data References (CAdES-C) ๐
Electronic Signature with Complete validation data references (CAdES-C) ๐, in accordance with this document, takes a CAdES-T and adds the complete-certificate-references and complete-revocation-references attributes, as defined by this document. The complete-certificate-references attribute holds references to every certificate in the certification path used to verify the signature ๐ The complete-revocation-references attribute holds references to the CRLs and/or OCSP responses used to verify the signature ๐ Section 6.2 has the specification details. Storing these references means the certification path values and the CRL or OCSP responses can be kept somewhere else, which shrinks the size of a stored electronic signature format ๐งณ
Sections C.4.1 to C.4.2 explain why you'd use validation data and when it makes sense to generate the CAdES-C form โจ The electronic signature with the extra validation data (the CAdES-C) is shown in Figure 4 ๐ฆ
+------------------------- CAdES-C --------------------------------+
|+----------------------------- CAdES-T ---------+ |
|| +----------+ | +-------------+ |
|| |Timestamp | | | | |
|| |attribute | | | | |
||+- CAdES-BES or CAdES-EPES ------+|over | | | | |
||| ||digital | | | Complete | |
|||+---------++----------+ ||signature | | | certificate | |
||||Signer's || Signed | Digital ||is | | | and | |
||||Document ||Attributes|Signature||mandatory | | | revocation | |
|||| || | ||if is not | | | references | |
|||+---------++----------+ ||timemarked| | | | |
||+--------------------------------++----------+ | | | |
|+-----------------------------------------------+ +-------------+ |
+------------------------------------------------------------------+
Figure 4: Illustration of CAdES-C format
๐ NOTE 1: The complete certificate and revocation references are added to the CAdES-T as an unsigned attribute.
๐ NOTE 2: At minimum, the signer provides the CAdES-BES or, when the signature is meant to conform to an explicit signing policy, the CAdES-EPES. ๐
๐ NOTE 3: To cut down on the risk of repudiating signature creation, the trusted time indication needs to be as close as possible to the time the signature was created โฑ๏ธ The signer or a TSP could provide the CAdES-T. If they don't, the verifier should create the CAdES-T on first receipt of an electronic signature, because the CAdES-T gives independent evidence that the signature existed before the trusted time indication ๐ต๏ธโโ๏ธ
๐ NOTE 4: A CAdES-T trusted time indication must be created before a certificate has been revoked or expired. โ ๏ธ
๐ NOTE 5: The signer and TSP could provide the CAdES-C to minimise this risk. When the signer doesn't provide the CAdES-C, the verifier should create it once the required components of revocation and validation data become available, which may take a grace period โณ
๐ NOTE 6: A grace period lets certificate revocation information spread through the revocation processes ๐ It can run from the moment an authorised entity asks for a certificate to be revoked until the information is ready for the relying party to use. To make sure the certificate wasn't revoked at the time the signature was time-marked or time-stamped, verifiers should wait until the grace period is over ๐ A signature policy may define specific values for grace periods ๐
A grace period is illustrated in Figure 5 ๐ธ
+<--------------Grace Period --------->+
----+-------+-------+--------+---------------------+----------+
^ ^ ^ ^ ^ ^
| | | | | |
| | | | | |
Signature | First | Second |
creation | revocation | revocation |
time | status | status |
| checking | checking |
| | |
Time-stamp Certification Build
or path CAdES-C
time-mark construction
over & verification
signature
Figure 5: Illustration of a grace period
๐ NOTE 7: CWA 14171 [CWA14171] specifies a signature validation process using CAdES-T, CAdES-C, and a grace period ๐ง Annex B has example validation processes, and Annex C.4 has more info on applying grace periods during validation ๐
The verifier's conformance requirements are defined in Section 8.3 for time-stamped CAdES-C, and in Section 8.4 for time-marked CAdES-C ๐ฏ This document only defines conformance requirements for the verifier up to an ES with Complete validation data (CAdES-C). So none of the extended and archive forms of electronic signatures (defined in Sections 4.4.3 to 4.4.4) need to be implemented to hit conformance with this document ๐ฆ
4.4.3. Extended Electronic Signature Formats ๐
CAdES-C can be extended by adding unsigned attributes to the electronic signature โจ This document defines various unsigned attributes that apply to very long-term verification, and to preventing some disaster situations discussed in Annex C ๐ง Annex B has the details of the extended formats, all the required unsigned attributes for each type, and how they're used in the electronic signature validation process ๐ The sections below give an overview of the extended signature formats in this document ๐
4.4.3.1. EXtended Long Electronic Signature (CAdES-X Long) ๐
Extended Long format (CAdES-X Long), in accordance with this document, adds the certificate-values and revocation-values attributes to the CAdES-C format ๐ The first one holds the whole certificate path needed to verify the signature. The second one holds the CRLs and/OCSP responses needed to validate the signature ๐ Together they form a known repository of certificate and revocation information for validating a CAdES-C, so that information can't get lost ๐ Sections 6.3.3 and 6.3.4 give the specification details. Annex B.1.1 explains how the format gets produced, and Annexes C4.1 to C.4.2 cover the rationale ๐ซถ
The structure of the CAdES-X Long format is shown in Figure 6 ๐ฆ
+----------------------- CAdES-X-Long -----------------------------+
|+------------------------------------ CadES-C --+ |
|| +----------+ | +-------------+ |
||+------ CAdES -------------------+|Timestamp | | | | |
||| || over | | | Complete | |
|||+---------++----------+ ||digital | | | certificate | |
||||Signer's || Signed | Digital ||signature | | | and | |
||||Document ||Attributes|Signature|| | | | revocation | |
|||| || | ||Optional | | | data | |
|||+---------++----------+ ||when | | | | |
||+--------------------------------+|timemarked| | | | |
|| +----------+ | | | |
|| +-------------+ | +-------------+ |
|| | Complete | | |
|| | certificate | | |
|| | and | | |
|| | revocation | | |
|| | references | | |
|| +-------------+ | |
|+-----------------------------------------------+ |
| |
+------------------------------------------------------------------+
Figure 6: Illustration of CAdES-X-Long
4.4.3.2. EXtended Electronic Signature with Time Type 1 (CAdES-X Type 1) โจ
okay bestie, CAdES-X Type 1 ๐ฆ this one adds the CAdES-C-time-stamp attribute to the CAdES-C format. That attribute holds a time-stamp token that covers the CAdES-C itself, so it's basically a time stamp on the whole bundle ๐ฆ
It gives you integrity and trusted-time protection over all the elements and references ๐ It may also protect the certificates, CRLs, and OCSP responses if a CA key, CRL key, or OCSP issuer key gets compromised later on. The full specs are in Section 6.3.5 ๐
Annex B.1.2 explains how the time-stamping process gets produced, and Annex C.4.4.1 has the rationale ๐ธ
Here's how the CAdES-X Type 1 format is laid out, Figure 7 ๐
+----------------------- CAdES-X-Type 1 ------------------------------+
|+-------------------------------------- CAdES-C -----+ |
|| +-------------+ | +-----------+ |
||+--------- CAdES ------------------+| Timestamp | | | | |
||| || over | | | | |
|||+---------++----------+ || digital | | | | |
||||Signer's || Signed | Digital || signature | | | Timestamp | |
||||Document ||Attributes| Signature || | | | over | |
|||| || | || Optional | | | CAdES-C | |
|||+---------++----------+ || when | | | | |
||+----------------------------------+| time-marked | | | | |
|| +-------------+ | | | |
|| +-------------+ | +-----------+ |
|| | Complete | | |
|| | certificate | | |
|| | and | | |
|| | revocation | | |
|| | references | | |
|| +-------------+ | |
|+----------------------------------------------------+ |
+---------------------------------------------------------------------+
Figure 7: Illustration of CAdES-X Type 1
4.4.3.3. EXtended Electronic Signature with Time Type 2 (CAdES-X Type 2) ๐ง
Type 2 ๐ this one adds the CAdES-C-time-stamped-certs-crls-references attribute to the CAdES-C format. Its content is a time-stamp token on the certification path and the revocation information references. Basically it gives integrity and trusted-time protection over all the references ๐ซถ
It may protect the certificates, CRLs and OCSP responses if a CA key, CRL key or OCSP issuer key gets compromised later.
Both CAdES-X Type 1 and CAdES-X Type 2 counter the same threats ๐ญ Which one you pick depends on your environment. Section 6.3.5 has the specification details, Annex B.1.3 explains how the time-stamping process gets produced, and Annex C.4.4.2 has the rationale ๐
Here's the CAdES-X Type 2 structure, Figure 8 โจ
+------------------------- CAdES-X-Type 2 ----------------------------+
|+----------------------------------------CAdES-C ---+ |
|| +------------+| |
||+----- CAdES -----------------------+| Timestamp || |
||| || over || |
|||+---------+ +----------+ || digital || +-------------+|
||||Signer's | | Signed | Digital || signature || | Time-stamp ||
||||Document | |Attributes| signature || || | only over ||
|||| | | | || optional || | complete ||
|||+---------+ +----------+ || when || | certificate ||
||+-----------------------------------+| timemarked || | and ||
|| +------------+| | revocation ||
|| +-------------+ | | references ||
|| | Complete | | +-------------+|
|| | certificate | | |
|| | and | | |
|| | revocation | | |
|| | references | | |
|| +-------------+ | |
|+---------------------------------------------------+ |
+---------------------------------------------------------------------+
Figure 8: Illustration of CAdES-X Type 2
4.4.3.4. EXtended Long Electronic Signature with Time (CAdES-X Long Type 1 or 2) ๐
Extended Long with Time (CAdES-X Long Type 1 or 2) is a combo ๐ค It's CAdES-X Long plus one of the two types we just covered (CAdES-X Type 1 or CAdES-X Type 2). Annex B.1.4 gives the details on how the time-stamping process gets produced, and Annex C.4.8 in Annex C has the rationale ๐
The structure of CAdES-X Long Type 1 and CAdES-X Long Type 2 is in Figure 9 ๐
+------------------ CAdES-X Long Type 1 or 2 -----------------------+
| +--------------+|
|+-------------------------------------- CAdES-C --+|+------------+||
|| ||| Timestamp |||
||+------- CAdES --------------------++----------+ ||| over |||
||| ||Timestamp | ||| CAdES-C |||
||| ||over | ||+------------+||
|||+---------++----------+ ||digital | || OR ||
||||Signer's || Signed | Digital ||signature | ||+------------+||
||||Document ||Attributes| signature || | ||| Timestamp |||
|||| || | ||Optional | ||| only over |||
|||+---------++----------+ ||when | ||| complete |||
||+----------------------------------+|timemarked| ||| certificate|||
|| +----------+ ||| and |||
|| ||| Revocation |||
|| +-------------+ ||| References |||
|| | Complete | ||+------------+||
|| | certificate | |+--------------+|
|| | and | | +------------+ |
|| | revocation | | | Complete | |
|| | references | | |certificate | |
|| +-------------+ | | and | |
|+-------------------------------------------------+ |revocation | |
| | value | |
| +------------+ |
+-------------------------------------------------------------------+
Figure 9: Illustration of CAdES-X Long Type 1 and CAdES Long Type 2
4.4.4. Archival Electronic Signature (CAdES-A) ๐๏ธ
Archival Form (CAdES-A) ๐พ builds on a CAdES-X Long, or on a CAdES-X Long Type 1 or 2, by adding one or more archive-time-stamp attributes. It's made for archiving long-term signatures. Successive time-stamps protect the whole material against vulnerable hashing algorithms, or against the breaking of the cryptographic material or algorithms ๐ The specs are in Section 6.4, and Sections C.4.5 and C.4.8 have the rationale ๐ฆ
Here's how CAdES-A is structured, Figure 10 ๐ธ
+---------------------------CAdES-A ---------------------------------+
|+----------------------------------------------------+ |
|| +--------------+| +----------+ |
||+----------------------CAdES-C ----+|+------------+|| | | |
||| +----------+ ||| Timestamp ||| | | |
|||+---- CAdES-BES ----+|Timestamp | ||| over ||| | | |
|||| or CAdeS-EPES || over | ||| CAdES-C ||| | Archive | |
|||| ||digital | ||+------------+|| | | |
|||| ||signature | || or || |Timestamp | |
|||| || | ||+------------+|| | | |
|||| ||Optional | ||| Timestamp ||| | | |
|||| ||when | ||| only over ||| | | |
|||| ||Timemarked| ||| complete ||| | | |
|||+-------------------+| | ||| certificate||| +----------+ |
||| +----------+ ||| and ||| |
||| +-------------+ ||| revocation ||| |
||| | Complete | ||| references ||| |
||| | certificate | ||+------------+|| |
||| | and | |+--------------+| |
||| | revocation | | +------------+ | |
||| | references | | | Complete | | |
||| +-------------+ | |certificate | | |
||| | | and | | |
||+----------------------------------+ |revocation | | |
|| | values | | |
|| +------------+ | |
|+----------------------------------------------------+ |
+--------------------------------------------------------------------+
Figure 10: Illustration of CAdES-A
4.5. Arbitration โ๏ธ
Okay, the CAdES-C can be used for arbitration if the signer and verifier ever end up in a dispute ๐ค But only if all of these are true:
- the arbitrator knows where to retrieve the signer's certificate (if not already present), all the cross-certificates and the required CRLs, ACRLs, or OCSP responses referenced in the CAdES-C;
- when time-stamping in the CAdES-T is being used, the certificate from the TSU that has issued the time-stamp token in the CAdES-T format is still within its validity period;
- when time-stamping in the CAdES-T is being used, the certificate from the TSU that has issued the time-stamp token in the CAdES-T format is not revoked at the time of arbitration;
- when time-marking in the CAdES-T is being used, a reliable audit trail from the Time-Marking Authority is available for examination regarding the time;
- none of the private keys corresponding to the certificates used to verify the signature chain have ever been compromised;
- the cryptography used at the time the CAdES-C was built has not been broken at the time the arbitration is performed; and
- if the signature policy can be explicitly or implicitly identified, then an arbitrator is able to determine the rules required to validate the electronic signature.
4.6. Validation Process ๐โจ
Okay bestie, the validation process is how we check an electronic signature, and the output status can be one of three things ๐
- invalid;
- incomplete validation; or
- valid.
An invalid response means either the signature format is wrong, or the digital signature value fails verification. That could be the integrity check on the digital signature value failing, or any certificate the verification depends on being known to be invalid or revoked. Big ๐ energy, no cap.
An incomplete validation response means the signature validation status is currently unknown ๐คทโโ๏ธ In that case, extra info may be made available to the application or user, so they can decide what to do with the electronic signature. The signature can also be checked again later, once more info shows up. Patience is a whole vibe ๐ฐ๏ธ
NOTE: For example, an incomplete validation may be because all the required certificates are not available or the grace period is not completed.
A valid response means the signature passed verification and complies with the signature validation policy. Iconic ๐
Example validation sequences are illustrated in Annex B. ๐ฆ
5. Electronic Signature Attributes ๐
This section builds on the Cryptographic Message Syntax (CMS), which is defined in RFC 3852 [4], and Enhanced Security Services (ESS), which is defined in RFC 2634 [5]. The overall structure of an Electronic Signature is as defined in CMS. The Electronic Signature (ES) uses attributes defined in CMS, ESS, and this document. This document only defines the ES attributes it uses that aren't defined anywhere else โจ
The mandated set of attributes and the digital signature value make up the minimum Electronic Signature (ES) required by this document. A signature policy may mandate that other signed attributes be present too ๐
5.1. General Syntax ๐งฉ
The general syntax of the ES is as defined in CMS (RFC 3852 [4]).
NOTE: CMS defines content types for id-data, id-signedData, id-envelopedData, id-digestedData, id-encryptedData, and id-authenticatedData. Although CMS permits other documents to define other content types, the ASN.1 type defined should not be a CHOICE type. This document does not define other content types.
5.2. Data Content Type ๐ฆ
The data content type of the ES is as defined in CMS (RFC 3852 [4]).
NOTE: If the content type is id-data, it is recommended that the content be encoded using MIME, and that the MIME type is used to identify the presentation format of the data. See Annex F.1 for an example of using MIME to identify the encoding type. ๐ธ
5.3. Signed-data Content Type ๐๏ธ
The Signed-data content type of the ES is as defined in CMS (RFC 3852 [4]).
5.4. SignedData Type ๐
The syntax of the SignedData of the ES is as defined in CMS (RFC 3852 [4]).
The fields of type SignedData are as defined in CMS (RFC 3852 [4]).
The identification of a signer's certificate used to create the signature is always signed (see Section 5.7.3). The validation policy may specify requirements for the presence of certain certificates. The degenerate case, where there are no signers, is not valid in this document. Zero signers? Not it ๐ โโ๏ธ
5.5. EncapsulatedContentInfo Type ๐
The syntax of the EncapsulatedContentInfo type ES is as defined in CMS (RFC 3852 [4]).
For long-term validation, as defined by this document, it is advisable that either the eContent is present, or the data that is signed is archived in such as way as to preserve any data encoding. It is important that the OCTET STRING used to generate the signature remains the same every time either the verifier or an arbitrator validates the signature. Consistency is everything ๐ง
NOTE: The eContent is optional in CMS:
- When it is present, this allows the signed data to be encapsulated in the SignedData structure, which then contains both the signed data and the signature. However, the signed data may only be accessed by a verifier able to decode the ASN.1 encoded SignedData structure.
- When it is missing, this allows the signed data to be sent or stored separately from the signature, and the SignedData structure only contains the signature. It is, in the case of the signature, only the data that is signed that needs to be stored and distributed in such as way as to preserve any data encoding.
The degenerate case where there are no signers is not valid in this document. ๐
5.6. SignerInfo Type ๐ชช
The syntax of the SignerInfo type ES is as defined in CMS (RFC 3852 [4]).
Per-signer information is represented in the type SignerInfo. In the case of multiple independent signatures (see Annex B.5), there is an instance of this field for each signer. Everyone gets their own card ๐
The fields of type SignerInfo have the meanings defined in CMS (RFC 3852 [4]), but the signedAttrs field shall contain the following attributes:
- content-type, as defined in Section 5.7.1; and
- message-digest, as defined in Section 5.7.2;
- signing-certificate, as defined in Section 5.7.3.
5.6.1. Message Digest Calculation Process ๐งฎ
The message digest calculation process is as defined in CMS (RFC 3852 [4]).
5.6.2. Message Signature Generation Process โ๏ธ
The input to the message signature generation process is as defined in CMS (RFC 3852 [4]).
5.6.3. Message Signature Verification Process ๐ต๏ธโโ๏ธ
The procedures for message signature verification are defined in CMS (RFC 3852 [4]) and enhanced in this document. The input to the signature verification process must be the signer's public key, which shall be verified as correct using the signing certificate reference attribute containing a reference to the signing certificate. That means when SigningCertificateV2 from RFC 5035 [16] or SigningCertificate from ESS [5] is used, the public key from the first certificate identified in the sequence of certificate identifiers from SigningCertificate must be the key used to verify the digital signature. Key matching is non-negotiable ๐
5.7. Basic ES Mandatory Present Attributes ๐
The following attributes shall be present with the signed-data defined by this document. The attributes are defined in CMS (RFC 3852 [4]).
5.7.1. content-type ๐ท๏ธ
The content-type attribute indicates the type of the signed content. The syntax of the content-type attribute type is as defined in CMS (RFC 3852 [4]) Section 11.1.
NOTE 1: As stated in RFC 3852 [4], the content-type attribute must have its value (i.e., ContentType) equal to the eContentType of the EncapsulatedContentInfo value being signed.
NOTE 2: For implementations supporting signature generation, if the content-type attribute is id-data, then it is recommended that the eContent be encoded using MIME. For implementations supporting signature verification, if the signed data (i.e., eContent) is MIME-encoded, then the OID of the content-type attribute must be id-data. In both cases, the MIME content-type(s) must be used to identify the presentation format of the data. See Annex F for further details about the use of MIME. ๐ฌ
5.7.2. Message Digest ๐
The syntax of the message-digest attribute type of the ES is as defined in CMS (RFC 3852 [4]).
5.7.3. Signing Certificate Reference Attributes ๐
The Signing certificate reference attributes are supported by using either the ESS signing-certificate attribute or the ESS-signing-certificate-v2 attribute.
These attributes shall contain a reference to the signer's certificate. They're designed to prevent simple substitution and reissue attacks, and to allow a restricted set of certificates to be used in verifying a signature. They have a compact form (much shorter than the full certificate) that lets a certificate be unambiguously identified. Compact and secure, the dream ๐ฆ
One, and only one, of the following alternative attributes shall be present with the signedData, defined by this document:
- The ESS signing-certificate attribute, defined in ESS [5], must be used if the SHA-1 hashing algorithm is used.
- The ESS signing-certificate-v2 attribute, defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], which shall be used when other hashing algorithms are to be used.
The certificate to be used to verify the signature shall be identified in the sequence (i.e., the certificate from the signer), and the sequence shall not be empty. The signature validation policy may mandate other certificates be present, which may include all the certificates up to the trust anchor. ๐
5.7.3.1. ESS signing-certificate Attribute Definition ๐
The syntax of the signing-certificate attribute type of the ES is as defined in Enhanced Security Services (ESS), RFC 2634 [5], and further qualified in this document.
The sequence of the policy information field is not used in this document.
The ESS signing-certificate attribute shall be a signed attribute. The encoding of the ESSCertID for this certificate shall include the issuerSerial field.
If present, the issuerAndSerialNumber in SignerIdentifier field of the SignerInfo shall match the issuerSerial field present in ESSCertID. In addition, the certHash from ESSCertID shall match the SHA-1 hash of the certificate. The certificate identified shall be used during the signature verification process. If the hash of the certificate does not match the certificate used to verify the signature, the signature shall be considered invalid. Hash mismatch = instant โ
NOTE: Where an attribute certificate is used by the signer to associate a role, or other attributes of the signer, with the electronic signature; this is placed in the signer-attributes attribute as defined in Section 5.8.3. ๐ง
5.7.3.2. ESS signing-certificate-v2 Attribute Definition ๐
okay so the ESS signing-certificate-v2 attribute is basically the older ESS signing-certificate attribute we just covered, but with a glow-up ๐ . The big difference is that it can be used with hashing algorithms other than SHA-1 ๐
The syntax of the signing-certificate-v2 attribute type of the ES is as defined in "ESS Update: Adding CertID Algorithm Agility", RFC 5035 [15], and further qualified in the present document ๐
The sequence of the policy information field is not used in the present document โ
This attribute shall be used in the same manner as defined above for the ESS signing-certificate attribute โจ
The object identifier for this attribute is:
id-aa-signingCertificateV2 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 47 }
If present, the issuerAndSerialNumber in SignerIdentifier field of the SignerInfo shall match the issuerSerial field present in ESSCertIDv2. In addition, the certHash from ESSCertIDv2 shall match the hash of the certificate computed using the hash function specified in the hashAlgorithm field. The certificate identified shall be used during the signature verification process. If the hash of the certificate does not match the certificate used to verify the signature, the signature shall be considered invalid ๐ โโ๏ธ no exceptions, bestie ๐ญ
NOTE 1: Where an attribute certificate is used by the signer to associate a role, or other attributes of the signer, with the electronic signature; this is placed in the signer-attributes attribute as defined in Section 5.8.3. ๐ง
NOTE 2: RFC 3126 was using the other signing-certificate attribute (see Section 5.7.3.3) for the same purpose. Its use is now deprecated, since this structure is simpler ๐ the old one is literally being retired lol
5.7.3.3. Other signing-certificate Attribute Definition ๐ฆ
okay so RFC 3126 was using the other signing-certificate attribute as an alternative to the ESS signing-certificate when hashing algorithms other than SHA-1 were being used. Its use is now deprecated, since the structure of the signing-certificate-v2 attribute is simpler. Its description is however still present in this version for backwards compatibility ๐ซถ we're keeping it around for the old-school crowd
id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 19 }
The other-signing-certificate attribute value has the ASN.1 syntax OtherSigningCertificate:
OtherSigningCertificate ::= SEQUENCE {
certs SEQUENCE OF OtherCertID,
policies SEQUENCE OF PolicyInformation OPTIONAL
-- NOT USED IN THE PRESENT DOCUMENT }
OtherCertID ::= SEQUENCE {
otherCertHash OtherHash,
issuerSerial IssuerSerial OPTIONAL }
OtherHash ::= CHOICE {
sha1Hash OtherHashValue, -- This contains a SHA-1 hash
otherHash OtherHashAlgAndValue}
OtherHashValue ::= OCTET STRING
OtherHashAlgAndValue ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
hashValue OtherHashValue }
5.8. Additional Mandatory Attributes for Explicit Policy-based Electronic Signatures ๐
5.8.1. signature-policy-identifier ๐
The present document mandates that for CAdES-EPES, a reference to the signature policy is included in the signedData. This reference is explicitly identified. A signature policy defines the rules for creation and validation of an electronic signature, and is included as a signed attribute with every Explicit Policy-based Electronic Signature. The signature-policy-identifier shall be a signed attribute ๐๏ธ
The following object identifier identifies the signature-policy-identifier attribute:
id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 15 }
signature-policy-identifier attribute values have ASN.1 type SignaturePolicyIdentifier:
SignaturePolicyIdentifier ::= CHOICE {
signaturePolicyId SignaturePolicyId,
signaturePolicyImplied SignaturePolicyImplied
-- not used in this version
}
SignaturePolicyId ::= SEQUENCE {
sigPolicyId SigPolicyId,
sigPolicyHash SigPolicyHash,
sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF
SigPolicyQualifierInfo OPTIONAL}
SignaturePolicyImplied ::= NULL
The sigPolicyId field contains an object-identifier that uniquely identifies a specific version of the signature policy. The syntax of this field is as follows:
SigPolicyId ::= OBJECT IDENTIFIER
The sigPolicyHash field optionally contains the identifier of the hash algorithm and the hash of the value of the signature policy. The hashValue within the sigPolicyHash may be set to zero to indicate that the policy hash value is not known ๐คทโโ๏ธ
NOTE: The use of a zero sigPolicyHash value is to ensure backwards compatibility with earlier versions of the current document. If sigPolicyHash is zero, then the hash value should not be checked against the calculated hash value of the signature policy ๐ง
If the signature policy is defined using ASN.1, then the hash is calculated on the value without the outer type and length fields, and the hashing algorithm shall be as specified in the field sigPolicyHash ๐งฎ
If the signature policy is defined using another structure, the type of structure and the hashing algorithm shall be either specified as part of the signature policy, or indicated using a signature policy qualifier ๐
SigPolicyHash ::= OtherHashAlgAndValue
OtherHashAlgAndValue ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
hashValue OtherHashValue }
OtherHashValue ::= OCTET STRING
A Signature Policy Identifier may be qualified with other information about the qualifier. The semantics and syntax of the qualifier is as associated with the object-identifier in the sigPolicyQualifierId field. The general syntax of this qualifier is as follows:
SigPolicyQualifierInfo ::= SEQUENCE {
sigPolicyQualifierId SigPolicyQualifierId,
sigQualifier ANY DEFINED BY sigPolicyQualifierId }
The present document specifies the following qualifiers:
- spuri: this contains the web URI or URL reference to the signature policy, and
- sp-user-notice: this contains a user notice that should be displayed whenever the signature is validated.
sigpolicyQualifierIds defined in the present document:
SigPolicyQualifierId ::= OBJECT IDENTIFIER
id-spq-ets-uri OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 1 }
SPuri ::= IA5String
id-spq-ets-unotice OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 2 }
SPUserNotice ::= SEQUENCE {
noticeRef NoticeReference OPTIONAL,
explicitText DisplayText OPTIONAL}
NoticeReference ::= SEQUENCE {
organization DisplayText,
noticeNumbers SEQUENCE OF INTEGER }
DisplayText ::= CHOICE {
visibleString VisibleString (SIZE (1..200)),
bmpString BMPString (SIZE (1..200)),
utf8String UTF8String (SIZE (1..200)) }
5.9. CMS Imported Optional Attributes ๐ธ
The following attributes may be present with the signed-data; the attributes are defined in CMS (RFC 3852 [4]) and are imported into the present document. Where appropriate, the attributes are qualified and profiled by the present document ๐
5.9.1. signing-time โฐ
The signing-time attribute specifies the time at which the signer claims to have performed the signing process ๐ฐ๏ธ
Signing-time attribute values for ES have the ASN.1 type SigningTime as defined in CMS (RFC 3852 [4]).
NOTE: RFC 3852 [4] states that dates between January 1, 1950 and December 31, 2049 (inclusive) must be encoded as UTCTime. Any dates with year values before 1950 or after 2049 must be encoded as GeneralizedTime ๐ date formatting is serious business, fr fr
5.9.2. countersignature โ๏ธ
The countersignature attribute values for ES have ASN.1 type CounterSignature, as defined in CMS (RFC 3852 [4]). A countersignature attribute shall be an unsigned attribute ๐
5.10. ESS-Imported Optional Attributes ๐
The following attributes may be present with the signed-data defined by the present document. The attributes are defined in ESS and are imported into the present document and are appropriately qualified and profiled by the present document ๐งโโ๏ธ
5.10.1. content-reference Attribute ๐
The content-reference attribute is a link from one SignedData to another. It may be used to link a reply to the original message to which it refers, or to incorporate by reference one SignedData into another. The content-reference attribute shall be a signed attribute ๐
content-reference attribute values for ES have ASN.1 type ContentReference, as defined in ESS (RFC 2634 [5]).
The content-reference attribute shall be used as defined in ESS (RFC 2634 [5]).
5.10.2. content-identifier Attribute ๐ชช
The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later. The content-identifier shall be a signed attribute โจ
content-identifier attribute type values for the ES have an ASN.1 type ContentIdentifier, as defined in ESS (RFC 2634 [5]).
The minimal content-identifier attribute should contain a concatenation of user-specific identification information (such as a user name or public keying material identification information), a GeneralizedTime string, and a random number ๐ฒ
5.10.3. content-hints Attribute ๐ก
The content-hints attribute provides information on the innermost signed content of a multi-layer message where one content is encapsulated in another. Think of it as a little hint note for the layers inside ๐ซ
The syntax of the content-hints attribute type of the ES is as defined in ESS (RFC 2634 [5]).
When used to indicate the precise format of the data to be presented to the user, the following rules apply:
- the contentType indicates the type of the associated content. It is an object identifier (i.e., a unique string of integers) assigned by an authority that defines the content type; and
- when the contentType is id-data, the contentDescription shall define the presentation format; the format may be defined by MIME types.
When the format of the content is defined by MIME types, the following rules apply:
- the contentType shall be id-data, as defined in CMS (RFC 3852 [4]);
- the contentDescription shall be used to indicate the encoding of the data, in accordance with the rules defined RFC 2045 [6]; see Annex F for an example of structured contents and MIME.
NOTE 1:
id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
rsadsi(113549) pkcs(1) pkcs7(7) 1 }
NOTE 2: contentDescription is optional in ESS (RFC 2634 [5]). It may be used to complement contentTypes defined elsewhere; such definitions are outside the scope of the present document ๐
5.11. Additional Optional Attributes Defined in the Present Document โจ
okay so this section adds a bunch of optional attributes that tell the verifier extra stuff ๐ง there are four kinds of info:
- a) the type of commitment from the signer, and/or
- b) the claimed location where the signature is performed, and/or
- c) claimed attributes or certified attributes of the signer, and/or
- d) a content time-stamp applied before the content was signed.
5.11.1. commitment-type-indication Attribute
so sometimes a signer wants to be like "hey, by signing this, I'm making a commitment on my behalf" ๐ the commitment-type-indication attribute is how they say that to the verifier ๐
the commitment-type-indication attribute shall be a signed attribute. the commitment type can be:
- defined as part of the signature policy, which means the commitment type has precise semantics that are spelled out in that policy; and
- a registered type, which means the commitment type has precise semantics defined by a registration, under the rules of whoever runs the registration. that registration authority could be a trading association or a legislative authority ๐
the signature policy lists a set of attributes it "recognizes" ๐ซถ this "recognized" set has every commitment type defined in the policy, plus any externally defined commitment types the policy decides to recognize. only recognized commitment types are allowed in this field. no cap, that's the rule ๐
the following object identifier identifies the commitment-type-indication attribute:
id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}
commitment-type-indication attribute values have ASN.1 type CommitmentTypeIndication.
CommitmentTypeIndication ::= SEQUENCE {
commitmentTypeId CommitmentTypeIdentifier,
commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
CommitmentTypeQualifier OPTIONAL}
CommitmentTypeIdentifier ::= OBJECT IDENTIFIER
CommitmentTypeQualifier ::= SEQUENCE {
commitmentTypeIdentifier CommitmentTypeIdentifier,
qualifier ANY DEFINED BY commitmentTypeIdentifier }
the use of any qualifiers to the commitment type is outside the scope of the present document ๐
the following generic commitment types are defined in the present document ๐
id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}
id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}
id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 3}
id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}
id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 5}
id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 6}
so here's what each generic type means ๐ฆ
- proof of origin: the signer recognizes that they created, approved, and sent the message โจ
- proof of receipt: the signer recognizes that they received the content of the message ๐ฌ
- proof of delivery: the TSP providing that indication has delivered a message into a local store that the recipient of the message can access ๐งบ
- proof of sender: the entity providing that indication has sent the message, but not necessarily created it ๐ค
- proof of approval: the signer has approved the content of the message ๐
- proof of creation: the signer has created the message, but not necessarily approved it or sent it ๐ ๏ธ
5.11.2. signer-location Attribute
the signer-location attribute is a mnemonic for an address linked to the signer at a particular geographical location, like a city ๐ธ the mnemonic is registered in the country where the signer is located, and it's used in the Public Telegram Service (according to ITU-T Recommendation F.1 [11]). iykyk, it's very official ๐
the signer-location attribute shall be a signed attribute. the following object identifier identifies the signer-location attribute:
id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}
signer-location attribute values have ASN.1 type SignerLocation:
SignerLocation ::= SEQUENCE {
-- at least one of the following shall be present:
countryName [0] DirectoryString OPTIONAL,
-- As used to name a Country in X.500
localityName [1] DirectoryString OPTIONAL,
-- As used to name a locality in X.500
postalAdddress [2] PostalAddress OPTIONAL }
PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
5.11.3. signer-attributes Attribute
the signer-attributes attribute gives extra info about the signer, like their role ๐ it can be either:
- claimed attributes of the signer; or
- certified attributes of the signer.
the signer-attributes attribute shall be a signed attribute. the following object identifier identifies the signer-attribute attribute:
id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}
signer-attributes values have ASN.1 type SignerAttribute:
SignerAttribute ::= SEQUENCE OF CHOICE {
claimedAttributes [0] ClaimedAttributes,
certifiedAttributes [1] CertifiedAttributes }
ClaimedAttributes ::= SEQUENCE OF Attribute
CertifiedAttributes ::= AttributeCertificate
-- as defined in RFC 3281: see Section 4.1.
NOTE 1: Only a single signer-attributes can be used. NOTE 2: Attribute and AttributeCertificate are as defined respectively in ITU-T Recommendations X.501 [9] and X.509 [1].
5.11.4. content-time-stamp Attribute
the content-time-stamp attribute is a time-stamp token of the signed data content, taken before it gets signed โฐ the content-time-stamp attribute shall be a signed attribute.
the following object identifier identifies the content-time-stamp attribute:
id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member- body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}
content-time-stamp attribute values have ASN.1 type ContentTimestamp:
ContentTimestamp ::= TimeStampToken
the messageImprint value of the TimeStampToken (as described in RFC 3161 [7]) shall be a hash of the value of the eContent field within encapContentInfo in the signedData ๐งพ
for more on the TimeStampToken and how it's defined, see Section 7.4 ๐ฆ
NOTE: content-time-stamp indicates that the signed information was formed before the date included in the content-time-stamp.
5.12. Support for Multiple Signatures ๐
5.12.1. Independent Signatures
multiple independent signatures (see Annex B.5) are supported, with each signer contributing their own independent SignerInfo ๐ซถ
each SignerInfo shall include all the attributes required under the present document, and the verifier shall process each one independently ๐
NOTE: Independent signatures may be used to provide independent signatures from different parties with different signed attributes, or to provide multiple signatures from the same party using alternative signature algorithms, in which case the other attributes, excluding time values and signature policy information, will generally be the same.
5.12.2. Embedded Signatures
multiple embedded signatures (see Annex C.5) are supported using the countersignature unsigned attribute (see Section 5.9.2) ๐ each counter signature is carried in a countersignature held as an unsigned attribute on the SignerInfo that the counter-signature is applied to ๐
NOTE: Counter signatures may be used to provide signatures from different parties with different signed attributes, or to provide multiple signatures from the same party using alternative signature algorithms, in which case the other attributes, excluding time values and signature policy information, will generally be the same.
6. Additional Electronic Signature Validation Attributes โจ
okay bestie, this section is where we pile on the extra validation data ๐ All of these attributes build on the electronic signature from Section 5, so you know we're going somewhere cute. Here's what's on the list:
- Signature-time-stamp applied to the electronic signature value, or a Time-Mark in an audit trail. This is the Electronic Signature with Time (CAdES-T) ๐ฐ๏ธ; and
- Complete validation data references, which bundle the time-stamp of the signature value with references to all the certificates (complete-certificate-references) and revocation (complete-revocation-references) information needed for full validation. This is the Electronic Signature with Complete data references (CAdES-C) ๐.
NOTE 1: Formats for CAdES-T are illustrated in Section 4.4, and the attributes are defined in Section 6.1.1.
NOTE 2: Formats for CAdES-C are illustrated in Section 4.4. The required attributes for the CAdES-C signature format are defined in Sections 6.2.1 to 6.2.2, and the optional attributes are defined in Sections 6.2.3 and 6.2.4. ๐ธ
Then there are the optional extended forms of validation data too. Annex B has the overview if you want the full tour ๐ฆ
- CAdES-X with time-stamp: the extended validation data here uses two types of time-stamps:
- Type 1 (CAdES-X Type 1): a time-stamp over the ES with Complete validation data (CAdES-C); and
- Type 2 (CAdES-X Type2): a time-stamp over the certification path references and the revocation information references used to support the CAdES-C.
NOTE 3: Formats for CAdES-X Type 1 and CAdES-X Type 2 are illustrated in Sections B.1.2 and B.1.3, respectively.
- CAdES-X Long: the Complete validation data references (CAdES-C), plus the actual values of all the certificates and revocation information used in the CAdES-C. ๐
NOTE 4: Formats for CAdES-X Long are illustrated in Annex B.1.1.
- CAdES-X Long Type 1 or CAdES-X Long Type 2: an X-Time-Stamp (Type 1 or Type 2), plus the actual values of all the certificates and revocation information used in the CAdES-C, same as CAdES-X Long. ๐ง
This section also defines the data structures for the Archive validation data format (CAdES-A) of the extended forms. This one is the big boss ๐
- Archive form of electronic signature (CAdES-A), which comprises:
- the Complete validation data references (CAdES-C),
- the certificate and revocation values (as in a CAdES-X Long),
- any existing extended electronic signature time-stamps (CAdES-X Type 1 or CAdES-X Type 2), if present, and
- the signed user data and an additional archive time-stamp applied over all that data.
An archive time-stamp may be repeatedly applied after long periods to maintain validity when electronic signature and time-stamping algorithms weaken. Basically, it's a glow-up you can keep giving it ๐
The extra data needed to create the forms above is carried as unsigned attributes tied to one individual signature. They go in the unsignedAttrs field of SignerInfo, so every attribute defined in Section 6 is an unsigned attribute. Periodt ๐
NOTE 5: Where multiple signatures are to be supported, as described in Section 5.12, each signature has a separate SignerInfo. So each signature needs its own unsigned attribute values to create CAdES-T, CAdES-C, and so on. Main character energy for every signer ๐
NOTE 6: The optional attributes of the extended validation data are defined in Sections 6.3 and 6.4. โญ
6.1. signature time-stamp Attribute (CAdES-T) ๐ฐ๏ธ
An electronic signature with time-stamp is an electronic signature where part, but not all, of the extra data needed for validation is available. Some certificates and revocation information are there, but not all of it ๐ฅฒ
The minimum structure for time-stamp validation data is:
- the signature time-stamp attribute, as defined in Section 6.1.1, over the ES signature value.
6.1.1. signature-time-stamp Attribute Definition
The signature-time-stamp attribute is a TimeStampToken computed on the signature value for a specific signer. It's an unsigned attribute. More than one instance of this attribute can show up with an electronic signature, coming from different TSAs ๐ฆ
The following object identifier identifies the signature-time-stamp attribute:
id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}
The signature-time-stamp attribute value has the ASN.1 type SignatureTimeStampToken:
SignatureTimeStampToken ::= TimeStampToken
The value of the messageImprint field within TimeStampToken shall be a hash of the value of the signature field within SignerInfo for the signedData being time-stamped. That's the hash lock ๐
For more on TimeStampToken, see Section 7.4.
NOTE 1: In the case of multiple signatures, it is possible to have a:
- TimeStampToken computed for each and all signers; or
- TimeStampToken computed on one signer's signature; and no
- TimeStampToken on another signer's signature.
NOTE 2: In the case of multiple signatures, several TSTs, issued by different TSAs, may be present within the same signerInfo (see RFC 3852 [4]). The more the merrier ๐
6.2. Complete Validation Data References (CAdES-C) ๐
An electronic signature with Complete validation data references (CAdES-C) is one where all the extra data needed for validation (every certificate and all the revocation information) is available. This form is built on the CAdES-T form we just covered ๐ซถ
As a minimum, the Complete validation data shall include the following:
- a time, which shall either be a signature-timestamp attribute, as defined in Section 6.1.1, or a time-mark operated by a Time-Marking Authority;
- complete-certificate-references, as defined in Section 6.2.1;
- complete-revocation-references, as defined in Section 6.2.2.
6.2.1. complete-certificate-references Attribute Definition
The complete-certificate-references attribute is an unsigned attribute. It references the full set of CA certificates that were used to validate an ES with Complete validation data, up to but not including the signer's certificate. Only a single instance of this attribute shall occur with an electronic signature. One and done ๐
NOTE 1: The signer's certificate is referenced in the signing certificate attribute (see Section 5.7.3).
The following object identifier identifies the complete-certificate-references attribute:
id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}
The complete-certificate-references attribute value has the ASN.1 syntax CompleteCertificateRefs:
CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
OtherCertID is defined in Section 5.7.3.3.
The IssuerSerial shall be present in OtherCertID. The certHash shall match the hash of the certificate referenced. Matching hashes only, no vibes-based verification ๐
NOTE 2: Copies of the certificate values may be held using the certificate-values attribute, defined in Section 6.3.3.
This attribute may include references to the certification chain for any TSUs that provide time-stamp tokens. In this case, the unsigned attribute shall be added to the signedData of the relevant time-stamp token as an unsignedAttrs in the signerInfos field. The chain of custody goes all the way down ๐ง
6.2.2. complete-revocation-references Attribute Definition
The complete-revocation-references attribute is an unsigned attribute. Only a single instance of this attribute shall occur with an electronic signature. It references the full set of the CRL, ACRL, or OCSP responses that were used in validating the signer, plus the CA certificates used in ES with Complete validation data. ๐
This attribute shows that the verifier did their due diligence and gathered the available revocation information. The references stored in this attribute can be used to retrieve the referenced information if it isn't stored in the CMS structure, but somewhere else. Receipts, bestie ๐งพ
The following object identifier identifies the complete-revocation-references attribute:
id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}
The complete-revocation-references attribute value has the ASN.1 syntax CompleteRevocationRefs:
CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
CrlOcspRef ::= SEQUENCE {
crlids [0] CRLListID OPTIONAL,
ocspids [1] OcspListID OPTIONAL,
otherRev [2] OtherRevRefs OPTIONAL
}
CompleteRevocationRefs shall contain one CrlOcspRef for the signing-certificate, followed by one for each OtherCertID in the CompleteCertificateRefs attribute. The second and subsequent CrlOcspRef fields shall be in the same order as the OtherCertID to which they relate. At least one of CRLListID or OcspListID or OtherRevRefs should be present for all but the "trusted" CA of the certificate path. Order matters, lowkey a lot ๐
CRLListID ::= SEQUENCE {
crls SEQUENCE OF CrlValidatedID }
CrlValidatedID ::= SEQUENCE {
crlHash OtherHash,
crlIdentifier CrlIdentifier OPTIONAL }
CrlIdentifier ::= SEQUENCE {
crlissuer Name,
crlIssuedTime UTCTime,
crlNumber INTEGER OPTIONAL }
OcspListID ::= SEQUENCE {
ocspResponses SEQUENCE OF OcspResponsesID }
OcspResponsesID ::= SEQUENCE {
ocspIdentifier OcspIdentifier,
ocspRepHash OtherHash OPTIONAL
}
OcspIdentifier ::= SEQUENCE {
ocspResponderID ResponderID,
-- As in OCSP response data
producedAt GeneralizedTime
-- As in OCSP response data
When you make a crlValidatedID, the crlHash gets computed over the ENTIRE DER encoded CRL, signature and all ๐ (no skipping the sig, bestie). The crlIdentifier is usually included too, unless the CRL can be figured out from other info ๐ง .
The crlIdentifier is how you point at a CRL. It uses the issuer name and the CRL issued time, which SHALL correspond to the time thisUpdate contained in the issued CRL ๐. If there's a crlNumber, you add that too. The crlListID attribute is an unsigned attribute ๐ฆ. If the CRL you're pointing at is a Delta CRL, you SHALL include references to the set of CRLs that together give you a complete revocation list ๐
.
The OcspIdentifier identifies an OCSP response using the issuer name and the time of issue, which SHALL correspond to the time produced as contained in the issued OCSP response โฐ. Two OCSP responses can land in the same second, so the hash of the response in the OcspResponsesID may be needed to break the tie ๐.
NOTE 1: Copies of the CRL and OCSP response values MAY be held using the revocation-values attribute defined in Section 6.3.4 ๐ธ.
NOTE 2: It is RECOMMENDED that this attribute be used in preference to the OtherRevocationInfoFormat specified in RFC 3852, to maintain backwards compatibility with the earlier version of this specification ๐.
The syntax and semantics of other revocation references are outside the scope of this document ๐ง. The syntax of the other form of revocation information is identified by OtherRevRefType.
This attribute MAY include references to the full set of CRLs, ACRLs, or OCSP responses that were used to verify the certification chain for any TSUs that provide time-stamp tokens ๐ฅ. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token, as an unsignedAttrs in the signerInfos field โจ.
6.2.3. attribute-certificate-references Attribute Definition ๐
This attribute is only used when a user attribute certificate is present in the electronic signature ๐.
The attribute-certificate-references attribute is an unsigned attribute. It references the full set of AA certificates that were used to validate the attribute certificate. Only a single instance of this attribute SHALL occur with an electronic signature ๐.
id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}
The attribute-certificate-references attribute value has the ASN.1 syntax AttributeCertificateRefs:
AttributeCertificateRefs ::= SEQUENCE OF OtherCertID
OtherCertID is defined in Section 5.7.3.3 ๐.
NOTE: Copies of the certificate values MAY be held using the certificate-values attribute defined in Section 6.3.3 ๐ซถ.
6.2.4. attribute-revocation-references Attribute Definition ๐
This attribute is only used when a user attribute certificate is present in the electronic signature and when that attribute certificate can be revoked ๐.
The attribute-revocation-references attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It references the full set of the ACRL or OCSP responses that were used in validating the attribute certificate. This attribute MAY be used to show that the verifier did their due diligence on the revocation info that was available ๐ฆ.
The following object identifier identifies the attribute-revocation-references attribute:
id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
id-aa(2) 45}
The attribute-revocation-references attribute value has the ASN.1 syntax AttributeRevocationRefs:
AttributeRevocationRefs ::= SEQUENCE OF CrlOcspRef
6.3. Extended Validation Data (CAdES-X) ๐ธ
This section specifies a number of OPTIONAL attributes that are used by extended forms of electronic signatures (see Annex B for an overview of these forms of validation data) ๐ง.
6.3.1. Time-Stamped Validation Data (CAdES-X Type 1 or Type 2) โญ
The extended validation data MAY include one of the following additional attributes, forming a CAdES-X Time-Stamp validation data (CAdES-X Type 1 or CAdES-X Type 2). This adds extra protection against later CA compromise and gives integrity for the validation data used ๐:
- CAdES-C Time-stamp, as defined in Section 6.3.5 (CAdES-X Type 1); or
- Time-Stamped Certificates and CRLs references, as defined in Section 6.3.6 (CAdES-X Type 2).
6.3.2. Long Validation Data (CAdES-X Long, CAdES-X Long Type 1 or 2) ๐
The extended validation data MAY also include the following additional information, forming a CAdES-X Long, for use if later validation processes may not have access to this information ๐:
- certificate-values, as defined in Section 6.3.3; and
- revocation-values, as defined in Section 6.3.4.
The extended validation data MAY, in addition to certificate-values and revocation-values as defined in Sections 6.3.3 and 6.3.4, include one of the following additional attributes, forming a CAdES-X Long Type 1 or CAdES-X Long Type 2 ๐:
- CAdES-C Time-stamp, as defined in Section 6.3.3 (CAdES-X long Type 1); or
- Time-Stamped Certificates and CRLs references, as defined in Section 6.3.4 (CAdES-X Long Type 2).
The CAdES-X Long Type 1 or CAdES-X Long Type 2 gives extra protection against later CA compromise and integrity for the validation data used ๐ก๏ธ.
NOTE 1: The CAdES-X-Long signature gives long-term proof of the validity of the signature, for as long as the CA keys, CRL Issuers keys, and OCSP responder keys are not compromised and are resistant to cryptographic attacks ๐.
NOTE 2: As long as the time-stamp data remains valid, the CAdES-X Long Type 1 and the CAdES-X Long Type 2 provide the following important property for long-standing signatures: once found valid, it SHALL continue to be valid months or years later, long after the validity period of the certificates has expired, or after the user key has been compromised ๐ญ.
6.3.3. certificate-values Attribute Definition ๐ง
This attribute MAY be used to contain the certificate information required for the following forms of extended electronic signature: CAdES-X Long, ES X-Long Type 1, and CAdES-X Long Type 2. See Annex B.1.1 for an illustration of this form of electronic signature โจ.
The certificate-values attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It holds the values of certificates referenced in the complete-certificate-references attribute ๐.
NOTE: If an attribute certificate is used, it is not provided in this structure but SHALL be provided by the signer as a signer-attributes attribute (see Section 5.11.3) ๐.
The following object identifier identifies the certificate-values attribute:
id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}
The certificate-values attribute value has the ASN.1 syntax CertificateValues.
CertificateValues ::= SEQUENCE OF Certificate
Certificate is defined in Section 7.1. (which is as defined in ITU-T Recommendation X.509 [1]) ๐.
This attribute MAY include the certification information for any TSUs that have provided the time-stamp tokens, if these certificates are not already included in the TSTs as part of the TSUs signatures. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token ๐ฆ.
6.3.4. revocation-values Attribute Definition ๐ธ
This attribute is used to contain the revocation information required for the following forms of extended electronic signature: CAdES-X Long, ES X-Long Type 1, and CAdES-X Long Type 2. See Annex B.1.1 for an illustration of this form of electronic signature ๐ฅ.
The revocation-values attribute is an unsigned attribute. Only a single instance of this attribute SHALL occur with an electronic signature. It holds the values of CRLs and OCSP referenced in the complete-revocation-references attribute ๐.
NOTE: It is RECOMMENDED that this attribute be used in preference to the OtherRevocationInfoFormat specified in RFC 3852, to maintain backwards compatibility with the earlier version of this specification ๐ซถ.
The following object identifier identifies the revocation-values attribute:
id-aa-ets-revocationValues OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}
The revocation-values attribute value has the ASN.1 syntax RevocationValues
RevocationValues ::= SEQUENCE {
crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
otherRevVals [2] OtherRevVals OPTIONAL }
OtherRevVals ::= SEQUENCE {
OtherRevValType OtherRevValType,
OtherRevVals ANY DEFINED BY OtherRevValType }
OtherRevValType ::= OBJECT IDENTIFIER
The syntax and semantics of the other revocation values (OtherRevVals) are outside the scope of this document ๐. The syntax of the other form of revocation information is identified by OtherRevRefType.
CertificateList is defined in Section 7.2. (which is as defined in ITU-T Recommendation X.509 [1]) ๐งพ.
BasicOCSPResponse is defined in Section 7.3. (which is as defined in RFC 2560 [3]) ๐.
This attribute MAY include the values of revocation data, including CRLs and OCSPs, for any TSUs that have provided the time-stamp tokens, if these certificates are not already included in the TSTs as part of the TSUs signatures. In that case, the unsigned attribute SHALL be added to the signedData of the relevant time-stamp token ๐ .
6.3.5. CAdES-C-time-stamp Attribute Definition โฐ
okay so this attribute is all about protecting against CA key compromise ๐ก๏ธ it's giving "backup plan for when things go wrong" ๐
This attribute time-stamps the complete electronic signature (CAdES-C) ๐ It's used in the following forms of extended electronic signature: CAdES-X Type 1 and CAdES-X Long Type 1. See Annex B.1.2 for an illustration of this form of electronic signature ๐
The CAdES-C-time-stamp attribute is an unsigned attribute ๐ธ It's a time-stamp token of the hash of the electronic signature and the complete validation data (CAdES-C). It's a special-purpose TimeStampToken Attribute that time-stamps the CAdES-C โจ You can have several instances of this attribute on one electronic signature, as long as they come from different TSAs ๐
NOTE 1: It is recommended that the attributes being time-stamped be encoded in DER. If DER is not employed, then the binary encoding of the ASN.1 structures being time-stamped should be preserved to ensure that the recalculation of the data hash is consistent. ๐ซถ
NOTE 2: Each attribute is included in the hash with the attrType and attrValues (including type and length) but without the type and length of the outer SEQUENCE. ๐ง
The following object identifier identifies the CAdES-C-Timestamp attribute ๐ฆ
id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}
The CAdES-C-timestamp attribute value has the ASN.1 syntax ESCTimeStampToken:
ESCTimeStampToken ::= TimeStampToken
The value of the messageImprint field within TimeStampToken shall be a hash of the concatenated values (without the type or length encoding for that value) of the following data objects:
OCTETSTRINGof theSignatureValuefield withinSignerInfo;- signature-time-stamp, or a time-mark operated by a Time-Marking Authority;
- complete-certificate-references attribute; and
- complete-revocation-references attribute.
For further information and definition of the TimeStampToken, see Section 7.4 ๐
6.3.6. time-stamped-certs-crls-references Attribute Definition ๐
This one's also for protecting against CA key compromise ๐ It time-stamps the certificate and revocation references, and it's used in the following forms of extended electronic signature: CAdES-X Type 2 and CAdES-X Long Type 2. See Annex B.1.3 for an illustration of this form of electronic signature ๐
A time-stamped-certs-crls-references attribute is an unsigned attribute ๐ It's a time-stamp token issued for a list of referenced certificates and OCSP responses and/or CRLs, which protects against certain CA compromises. Its syntax is as follows:
NOTE 1: It is recommended that the attributes being time-stamped be encoded in DER. If DER is not employed, then the binary encoding of the ASN.1 structures being time-stamped should be preserved to ensure that the recalculation of the data hash is consistent. ๐
NOTE 2: Each attribute is included in the hash with the attrType and attrValues (including type and length) but without the type and length of the outer SEQUENCE. ๐
The following object identifier identifies the time-stamped-certs-crls-references attribute ๐ฆ
id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}
The attribute value has the ASN.1 syntax TimestampedCertsCRLs:
TimestampedCertsCRLs ::= TimeStampToken
The value of the messageImprint field within the TimeStampToken shall be a hash of the concatenated values (without the type or length encoding for that value) of the following data objects, as present in the ES with Complete validation data (CAdES-C):
- complete-certificate-references attribute; and
- complete-revocation-references attribute.
6.4. Archive Validation Data ๐๏ธ
okay this is the "my signature needs to last FOREVER" section ๐ญ Where an electronic signature has to last for a very long time, the time-stamp token on it can end up in danger of being invalidated, because of algorithm weakness or limits in the validity period of the TSA certificate. When that happens, it may be required to time-stamp the electronic signature several times ๐ฐ๏ธ In that case, an archive time-stamp attribute may be required for the archive form of the electronic signature (CAdES-A), and this archive time-stamp attribute may be repeatedly applied over a period of time ๐โจ
6.4.1. archive-time-stamp Attribute Definition ๐
The archive-time-stamp attribute is a time-stamp token of many of the elements of the signedData in the electronic signature ๐ If the certificate-values and revocation-values attributes are not present in the CAdES-BES or CAdES-EPES, then they shall be added to the electronic signature prior to computing the archive time-stamp token ๐
The archive-time-stamp attribute is an unsigned attribute ๐ธ Several instances of this attribute may occur with an electronic signature, both over time and from different TSUs โญ
The following object identifier identifies the nested archive-time-stamp attribute ๐ง
id-aa-ets-archiveTimestampV2 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}
Archive-time-stamp attribute values have the ASN.1 syntax ArchiveTimeStampToken:
ArchiveTimeStampToken ::= TimeStampToken
The value of the messageImprint field within TimeStampToken shall be a hash of the concatenation of:
- the encapContentInfo element of the SignedData sequence;
- any external content being protected by the signature, if the eContent element of the encapContentInfo is omitted;
- the Certificates and crls elements of the SignedData sequence, when present, and;
- all data elements in the SignerInfo sequence including all signed and unsigned attributes.
NOTE 1: An alternative archiveTimestamp attribute, identified by an object identifier { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 27 }, is defined in prior versions of TS 101 733 [TS101733] and in RFC 3126.
The archiveTimestamp attribute, defined in versions of TS 101 733 prior to 1.5.1 and in RFC 3126, is not compatible with the attribute defined in the current document. The archiveTimestamp attribute, defined in versions 1.5.1 to 1.6.3 of TS 101 733, is compatible with the current document if the content is internal to encapContentInfo. Unless the version of TS 101 733 employed by the signing party is known by all recipients, use of the archiveTimestamp attribute defined in prior versions of TS 101 733 is deprecated. ๐ โโ๏ธ
NOTE 2: Counter signatures held as countersignature attributes do not require independent archive time-stamps, as they are protected by the archive time-stamp against the containing SignedData structure. ๐
NOTE 3: Unless DER is used throughout, it is recommended that the binary encoding of the ASN.1 structures being time-stamped be preserved when being archived to ensure that the recalculation of the data hash is consistent. ๐ซถ
NOTE 4: The hash is calculated over the concatenated data elements as received/stored, including the Type and Length encoding. ๐
NOTE 5: Whilst it is recommended that unsigned attributes be DER encoded, it cannot generally be so guaranteed except by prior arrangement. For further information and definition of TimeStampToken, see Section 7.4. The timestamp should be created using stronger algorithms (or longer key lengths) than in the original electronic signatures and weak algorithm (key length) timestamps. ๐ช
NOTE 6: This form of ES also provides protection against a TSP key compromise. ๐ก๏ธ
The ArchiveTimeStamp will be added as an unsigned attribute in the SignerInfo sequence. For the validation of one ArchiveTimeStamp, the data elements of the SignerInfo must be concatenated, excluding all later ArchivTimeStampToken attributes ๐งฉ
Certificates and revocation information required to validate the ArchiveTimeStamp shall be provided by one of the following methods:
- The TSU provides the information in the SignedData of the timestamp token;
- Adding the complete-certificate-references attribute and the complete-revocation-references attribute of the TSP as an unsigned attribute within TimeStampToken, when the required information is stored elsewhere; or
- Adding the certificate-values attribute and the revocation-values attribute of the TSP as an unsigned attribute within TimeStampToken, when the required information is stored elsewhere.
7. Other Standard Data Structures ๐งธ
7.1. Public Key Certificate Format ๐
The X.509 v3 certificate basis syntax is defined in ITU-T Recommendation X.509 [1]. A profile of the X.509 v3 certificate is defined in RFC 3280 [2] โจ
7.2. Certificate Revocation List Format ๐
The X.509 v2 CRL syntax is defined in ITU-T Recommendation X.509 [1]. A profile of the X.509 v2 CRL is defined in RFC 3280 [2] ๐ท
7.3. OCSP Response Format ๐
The format of an OCSP token is defined in RFC 2560 [3] ๐ซ
7.4. Time-Stamp Token Format โฑ๏ธ
The format of a TimeStampToken type is defined in RFC 3161 [7] and profiled in ETSI TS 101 861 [TS101861] ๐ฆ
7.5. Name and Attribute Formats ๐ท๏ธ
The syntax of the naming and other attributes is defined in ITU-T Recommendation X.509 [1] ๐
NOTE: The name used by the signer, held as the subject in the signer's certificate, is allocated and verified on registration with the Certification Authority, either directly or indirectly through a Registration Authority, before being issued with a Certificate. ๐
The present document places no restrictions on the form of the name ๐ The subject's name may be a distinguished name, as defined in ITU-T Recommendation X.500 [12], held in the subject field of the certificate, or any other name form held in the subjectAltName certificate extension field, as defined in ITU-T Recommendation X.509 [1]. In the case that the subject has no distinguished name, the subject name can be an empty sequence and the subjectAltName extension shall be critical ๐ซถ
All Certification Authorities, Attribute Authorities, and Time-Stamping Authorities shall use distinguished names in the subject field of their certificate ๐
The distinguished name shall include identifiers for the organization providing the service and the legal jurisdiction (e.g., country) under which it operates ๐
Where a signer signs as an individual, but wishes to also identify him/herself as acting on behalf of an organization, it may be necessary to provide two independent forms of identification ๐ The first identity, which is directly associated with the signing key, identifies him/her as an individual. The second, which is managed independently, identifies that person acting as part of the organization, possibly with a given role. In this case, one of the two identities is carried in the subject/subjectAltName field of the signer's certificate as described above ๐ง
The present document does not specify the format of the signer's attribute that may be included in public key certificates ๐ค
NOTE: The signer's attribute may be supported by using a claimed role in the CMS signed attributes field or by placing an attribute certificate containing a certified role in the CMS signed attributes field; see Section 7.6. ๐
7.6. AttributeCertificate
okay so this one is short and sweet ๐ the AttributeCertificate type's syntax is just defined in RFC 3281 [13], so go read that one for the actual structure โจ
8. Conformance Requirements ๐
okay bestie, conformance is where we figure out what you actually have to build to count as a legit CAdES implementation ๐ซถ there are a few layers here, so let's go slow
if your system does signature generation, this doc sets conformance requirements for two forms of basic electronic signature, and you must implement one of the two ๐ฅ same deal for verification: two forms are defined, and one of them must be implemented ๐
the doc only goes up to an ES with Complete validation data (CAdES-C) ๐ฆ that means you don't need the extended and archive forms (CAdES-X, CAdES-A) to be conformant with this document. no cap, that's a big relief ๐ญ
one more thing: when verifying, optional signed and unsigned attributes must be supported only to the extent that the signature is verifiable ๐ธ and the semantics of optional attributes may be unsupported, unless a signature policy says otherwise ๐ง
8.1. CAdES-Basic Electronic Signature (CAdES-BES)
so a system that supports CAdES-BES signers, under this document, shall, at a minimum, support generating an electronic signature made of these components ๐
- The general CMS syntax and content type, as defined in RFC 3852 [4] (see Sections 5.1 and 5.2);
- CMS SignedData, as defined in RFC 3852 [4], with the version set to 3 and at least one SignerInfo present (see Sections 5.3 to 5.6);
- The following CMS attributes, as defined in RFC 3852 [4]:
- content-type; this shall always be present (see Section 5.7.1); and
- message-digest; this shall always be present (see Section 5.7.2).
- One of the following attributes, as defined in the present document:
- signing-certificate: as defined in Section 5.7.3.1; or
- signing-certificate v2 : as defined in Section 5.7.3.2.
NOTE: RFC 3126 was using the other signing-certificate attribute (see Section 5.7.3.3). Its use is now deprecated, since the structure of the signing-certificate v2 attribute is simpler than the other signing-certificate attribute. ๐
8.2. CAdES-Explicit Policy-based Electronic Signature
a system that supports Policy-based signers, under this document, shall, at a minimum, support generating an electronic signature with the previous components from the basic signer, plus this one ๐
- The following attributes, as defined in Section 5.9:
- signature-policy-identifier; this shall always be present (see Section 5.8.1).
8.3. Verification Using Time-Stamping
a system that supports verifiers with time-stamping facilities, under this document, shall, at a minimum, support these things โฐโจ
- verification of the mandated components of an electronic signature, as defined in Section 8.1;
- signature-time-stamp attribute, as defined in Section 6.1.1;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2;
- Public Key Certificates, as defined in ITU-T Recommendation X.509 [1] (see Section 8.1); and
- either of:
- Certificate Revocation Lists, as defined in ITU-T Recommendation X.509 [1] (see Section 8.2); or
- Online Certificate Status Protocol, as defined in RFC 2560 [3] (see Section 8.3).
8.4. Verification Using Secure Records
a system that supports verifiers, under this document, shall, at a minimum, support these things ๐๐
- verification of the mandated components of an electronic signature, as defined in Section 8.1;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2;
- a record of the electronic signature and the time when the signature was first validated, using the referenced certificates and revocation information, must be maintained, such that records cannot be undetectably modified;
- Public Key Certificates, as defined in ITU-T Recommendation X.509 [1] (see Section 8.1); and
- either of:
- Certificate Revocation Lists, as defined in ITU-T Recommendation X.509 [1] (see Section 8.2); or
- online Certificate Status Protocol, as defined in RFC 2560 [3] (see Section 8.3).
- either of:
9. References ๐
9.1. Normative References
[1] ITU-T Recommendation X.509 (2000)/ISO/IEC 9594-8 (2001): "Information technology - Open Systems Interconnection - The Directory: Public key and Attribute Certificate framework".
[2] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3280, April 2002.
[3] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. Adams, "X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP", RFC 2560, June 1999.
[4] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, July 2004.
[5] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", RFC 2634, June 1999.
[6] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.
[7] Adams, C., Cain, P., Pinkas, D., and R. Zuccherato, "Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)", RFC 3161, August 2001.
[8] ITU-T Recommendation X.680 (1997): "Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation".
[9] ITU-T Recommendation X.501 (2000)/ISO/IEC 9594-1 (2001): "Information technology - Open Systems Interconnection - Directory models".
[10] Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, August 2002.
[11] ITU-T Recommendation F.1: "Operational provisions for the international public telegram service".
[12] ITU-T Recommendation X.500: "Information technology - Open Systems Interconnection - The Directory: Overview of concepts, models and services".
[13] Farrell, S. and R. Housley, "An Internet Attribute Certificate Profile for Authorization", RFC 3281, April 2002.
[14] ITU-T Recommendation X.208 (1988): "Specification of Abstract Syntax Notation One (ASN.1)".
[15] Schaad, J., "Enhanced Security Services (ESS) Update: Adding CertID Algorithm Agility", RFC 5035, August 2007.
[16] ITU-T Recommendation X.690 (2002): "Information technology ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)".
9.2. Informative References โจ
okay bestie, these are the informative refs ๐ they're not strictly required reading, but they're the background drama behind everything ๐ซถ
- [EUDirective] Directive 1999/93/EC of the European Parliament and of the Council of 13 December 1999 on a community framework for Electronic Signatures.
- [TS101733] ETSI Standard TS 101 733 V.1.7.3 (2005-06) Electronic Signature Formats.
- [TS101861] ETSI TS 101 861: "Time stamping profile".
- [TS101903] ETSI TS 101 903: "XML Advanced Electronic Signatures (XAdES)".
- [TR102038] ETSI TR 102 038: "Electronic Signatures and Infrastructures (ESI); XML format for signature policies".
- [TR102272] ETSI TR 102 272 V1.1.1 (2003-12). "Electronic Signatures and Infrastructures (ESI); ASN.1 format for signature policies".
- [RFC2479] Adams, C., "Independent Data Unit Protection Generic Security Service Application Program Interface (IDUP-GSS-API)", RFC 2479, December 1998.
- [RFC2743] Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, January 2000.
- [RFC3125] Ross, J., Pinkas, D., and N. Pope, "Electronic Signature Policies", RFC 3125, September 2001.
- [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC 3447, February 2003.
- [RFC3494] Zeilenga, K., "Lightweight Directory Access Protocol version 2 (LDAPv2) to Historic Status", RFC 3494, March 2003.
- [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, July 2004.
- [RFC4210] Adams, C., Farrell, S., Kause, T., and T. Mononen, "Internet X.509 Public Key Infrastructure Certificate Management Protocol (CMP)", RFC 4210, September 2005.
- [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.1", RFC 4346, April 2006.
- [RFC4523] Zeilenga, K., "Lightweight Directory Access Protocol (LDAP) Schema Definitions for X.509 Certificates", RFC 4523, June 2006.
- [ISO7498-2] ISO 7498-2 (1989): "Information processing systems - Open Systems Interconnection - Basic Reference Model - Part 2: Security Architecture".
- [ISO9796-2] ISO/IEC 9796-2 (2002): "Information technology - Security techniques - Digital signature schemes giving message recovery - Part 2: Integer factorization based mechanisms".
- [ISO9796-4] ISO/IEC 9796-4 (1998): "Digital signature schemes giving message recovery - Part 4: Discrete logarithm based mechanisms".
- [ISO10118-1] ISO/IEC 10118-1 (2000): "Information technology - Security techniques - Hash-functions - Part 1: General".
- [ISO10118-2] ISO/IEC 10118-2 (2000): "Information technology - Security techniques - Hash-functions - Part 2: Hash-functions using an n-bit block cipher algorithm".
- [ISO10118-3] ISO/IEC 10118-3 (2004): "Information technology - Security techniques - Hash-functions - Part 3: Dedicated hash-functions".
- [ISO10118-4] ISO/IEC 10118-4 (1998): "Information technology - Security techniques - Hash-functions - Part 4: Hash-functions using modular arithmetic".
- [ISO10181-5] ISO/IEC 10181-5: Security Frameworks in Open Systems. Non-Repudiation Framework. April 1997.
- [ISO13888-1] ISO/IEC 13888-1 (2004): "IT security techniques - Non-repudiation - Part 1: General".
- [ISO14888-1] ISO/IEC 14888-1 (1998): "Information technology - Security techniques - Digital signatures with appendix - Part 1: General".
- [ISO14888-2] ISO/IEC 14888-2 (1999): "Information technology - Security techniques - Digital signatures with appendix - Part 2: Identity-based mechanisms".
- [ISO14888-3] ISO/IEC 14888-3 (1998): "Information technology - Security techniques - Digital signatures with appendix - Part 3: Certificate-based mechanisms".
- [ISO15946-2] ISO/IEC 15946-2 (2002): "Information technology - Security techniques - Cryptographic techniques based on elliptic curves - Part 2: Digital signatures".
- [CWA14171] CWA 14171 CEN Workshop Agreement: "General Guidelines for Electronic Signature Verification".
- [XMLDSIG] XMLDSIG: W3C/IETF Recommendation (February 2002): "XML-Signature Syntax and Processing".
- [X9.30-1] ANSI X9.30-1 (1997): "Public Key Cryptography for the Financial Services Industry - Part 1: The Digital Signature Algorithm (DSA)".
- [X9.30-2] ANSI X9.30-2 (1997): "Public Key Cryptography for the Financial Services Industry - Part 2: The Secure Hash Algorithm (SHA-1)".
- [X9.31-1] ANSI X9.31-1 (1997): "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 1: The RSA Signature Algorithm".
- [X9.31-2] ANSI X9.31-2 (1996): "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 2: Hash Algorithms".
- [X9.62] ANSI X9.62 (1998): "Public Key Cryptography for the Financial Services Industry - The Elliptic Curve Digital Signature Algorithm (ECDSA)".
- [P1363] IEEE P1363 (2000): "Standard Specifications for Public-Key Cryptography".
ETSI technical specifications can be downloaded free of charge via the Services and Products Download Area at: http://www.etsi.org/WebSite/Standards/StandardsDownload.aspx
Annex A (Normative): ASN.1 Definitions โจ
this annex is the ASN.1 cheat sheet ๐ it gathers up every new syntax definition from the document in one place, so you can find everything without scrolling forever ๐ง
A.1. Signature Format Definitions Using X.208 ASN.1 Syntax
NOTE: The ASN.1 module defined in Annex A.1 using syntax defined in ITU-T Recommendation X.208 [14] has precedence over that defined in Annex A.2 in the case of any conflict.
ETS-ElectronicSignatureFormats-ExplicitSyntax88 { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-mod(0)
eSignature-explicit88(28)}
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
-- EXPORTS All
IMPORTS
-- Cryptographic Message Syntax (CMS): RFC 3852
ContentInfo, ContentType, id-data, id-signedData, SignedData,
EncapsulatedContentInfo, SignerInfo, id-contentType,
id-messageDigest, MessageDigest, id-signingTime, SigningTime,
id-countersignature, Countersignature
FROM CryptographicMessageSyntax2004
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) modules(0) cms-2004(24) }
-- ESS Defined attributes: ESS Update
-- RFC 5035 (Adding CertID Algorithm Agility)
id-aa-signingCertificate, SigningCertificate, IssuerSerial,
id-aa-contentReference, ContentReference, id-aa-contentIdentifier,
ContentIdentifier, id-aa-signingCertificateV2
FROM ExtendedSecurityServices-2006
{ iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0) id-mod-ess-2006(30) }
-- Internet X.509 Public Key Infrastructure - Certificate and CRL
-- Profile: RFC 3280
Certificate, AlgorithmIdentifier, CertificateList, Name,
DirectoryString, Attribute, BMPString, UTF8String
FROM PKIX1Explicit88
{iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-explicit(18)}
GeneralNames, GeneralName, PolicyInformation
FROM PKIX1Implicit88
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit (19)}
-- Internet Attribute Certificate Profile for Authorization - RFC 3281
AttributeCertificate
FROM PKIXAttributeCertificate {iso(1) identified-organization(3)
dod(6) internet(1) security(5) mechanisms(5) pkix(7)
id-mod(0) id-mod-attribute-cert(12)}
-- OCSP - RFC 2560
BasicOCSPResponse, ResponderID
FROM OCSP {iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-ocsp(14)}
-- Time Stamp Protocol RFC 3161
TimeStampToken
FROM PKIXTSP
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-mod-tsp(13)}
;
-- Definitions of Object Identifier arcs used in the present document
-- ==================================================================
-- OID used referencing electronic signature mechanisms based on
-- the present document for use with the Independent Data Unit
-- Protection (IDUP) API (see Annex D)
id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
{ itu-t(0) identified-organization(4) etsi(0)
electronic-signature-standard (1733) part1 (1) idupMechanism (4)
etsiESv1(1) }
-- Basic ES CMS Attributes Defined in the present document
-- =======================================================
-- OtherSigningCertificate - deprecated
id-aa-ets-otherSigCert OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 19 }
OtherSigningCertificate ::= SEQUENCE {
certs SEQUENCE OF OtherCertID,
policies SEQUENCE OF PolicyInformation OPTIONAL
-- NOT USED IN THE PRESENT DOCUMENT
}
OtherCertID ::= SEQUENCE {
otherCertHash OtherHash,
issuerSerial IssuerSerial OPTIONAL }
OtherHash ::= CHOICE {
sha1Hash OtherHashValue,
-- This contains a SHA-1 hash
otherHash OtherHashAlgAndValue}
-- Policy ES Attributes Defined in the present document
-- ====================================================
-- Mandatory Basic Electronic Signature Attributes as above,
-- plus in addition.
okay bestie, the signature-policy-identifier attribute is up first ๐
-- Signature-policy-identifier attribute
id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 15 }
SignaturePolicy ::= CHOICE {
signaturePolicyId SignaturePolicyId,
signaturePolicyImplied SignaturePolicyImplied
-- not used in this version
}
SignaturePolicyId ::= SEQUENCE {
sigPolicyId SigPolicyId,
sigPolicyHash SigPolicyHash,
sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF
SigPolicyQualifierInfo OPTIONAL
}
SignaturePolicyImplied ::= NULL
SigPolicyId ::= OBJECT IDENTIFIER
SigPolicyHash ::= OtherHashAlgAndValue
OtherHashAlgAndValue ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
hashValue OtherHashValue }
OtherHashValue ::= OCTET STRING
SigPolicyQualifierInfo ::= SEQUENCE {
sigPolicyQualifierId SigPolicyQualifierId,
sigQualifier ANY DEFINED BY sigPolicyQualifierId }
SigPolicyQualifierId ::= OBJECT IDENTIFIER
id-spq-ets-uri OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 1 }
SPuri ::= IA5String
id-spq-ets-unotice OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 2 }
SPUserNotice ::= SEQUENCE {
noticeRef NoticeReference OPTIONAL,
explicitText DisplayText OPTIONAL}
NoticeReference ::= SEQUENCE {
organization DisplayText,
noticeNumbers SEQUENCE OF INTEGER }
DisplayText ::= CHOICE {
visibleString VisibleString (SIZE (1..200)),
bmpString BMPString (SIZE (1..200)),
utf8String UTF8String (SIZE (1..200)) }
-- Optional Electronic Signature Attributes
-- Commitment-type attribute
id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}
CommitmentTypeIndication ::= SEQUENCE {
commitmentTypeId CommitmentTypeIdentifier,
commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
CommitmentTypeQualifier OPTIONAL}
CommitmentTypeIdentifier ::= OBJECT IDENTIFIER
CommitmentTypeQualifier ::= SEQUENCE {
commitmentTypeIdentifier CommitmentTypeIdentifier,
qualifier ANY DEFINED BY commitmentTypeIdentifier }
id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}
id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}
id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 3}
id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}
id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 5}
id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 6}
-- Signer-location attribute
id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}
SignerLocation ::= SEQUENCE {
-- at least one of the following shall be present
countryName [0] DirectoryString OPTIONAL,
-- As used to name a Country in X.500
localityName [1] DirectoryString OPTIONAL,
-- As used to name a locality in X.500
postalAdddress [2] PostalAddress OPTIONAL }
PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
-- Signer-attributes attribute
id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}
SignerAttribute ::= SEQUENCE OF CHOICE {
claimedAttributes [0] ClaimedAttributes,
certifiedAttributes [1] CertifiedAttributes }
ClaimedAttributes ::= SEQUENCE OF Attribute
CertifiedAttributes ::= AttributeCertificate
-- as defined in RFC 3281: see Section 4.1
-- Content-time-stamp attribute
id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}
ContentTimestamp ::= TimeStampToken
-- Signature-time-stamp attribute
id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}
SignatureTimeStampToken ::= TimeStampToken
-- Complete-certificate-references attribute
id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}
CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
-- Complete-revocation-references attribute
id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}
CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
CrlOcspRef ::= SEQUENCE {
crlids [0] CRLListID OPTIONAL,
ocspids [1] OcspListID OPTIONAL,
otherRev [2] OtherRevRefs OPTIONAL
}
CRLListID ::= SEQUENCE {
crls SEQUENCE OF CrlValidatedID}
CrlValidatedID ::= SEQUENCE {
crlHash OtherHash,
crlIdentifier CrlIdentifier OPTIONAL}
CrlIdentifier ::= SEQUENCE {
crlissuer Name,
crlIssuedTime UTCTime,
crlNumber INTEGER OPTIONAL }
OcspListID ::= SEQUENCE {
ocspResponses SEQUENCE OF OcspResponsesID}
OcspResponsesID ::= SEQUENCE {
ocspIdentifier OcspIdentifier,
ocspRepHash OtherHash OPTIONAL
}
OcspIdentifier ::= SEQUENCE {
ocspResponderID ResponderID,
-- As in OCSP response data
producedAt GeneralizedTime
-- As in OCSP response data
}
OtherRevRefs ::= SEQUENCE {
otherRevRefType OtherRevRefType,
otherRevRefs ANY DEFINED BY otherRevRefType
}
OtherRevRefType ::= OBJECT IDENTIFIER
-- Certificate-values attribute
id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}
CertificateValues ::= SEQUENCE OF Certificate
-- Certificate-revocation-values attribute
id-aa-ets-revocationValues OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}
RevocationValues ::= SEQUENCE {
crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
otherRevVals [2] OtherRevVals OPTIONAL}
OtherRevVals ::= SEQUENCE {
otherRevValType OtherRevValType,
otherRevVals ANY DEFINED BY otherRevValType
}
OtherRevValType ::= OBJECT IDENTIFIER
-- CAdES-C time-stamp attribute
id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}
ESCTimeStampToken ::= TimeStampToken
-- Time-Stamped Certificates and CRLs
id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}
TimestampedCertsCRLs ::= TimeStampToken
-- Archive time-stamp attribute
id-aa-ets-archiveTimestampV2 OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}
ArchiveTimeStampToken ::= TimeStampToken
-- Attribute-certificate-references attribute
id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}
AttributeCertificateRefs ::= SEQUENCE OF OtherCertID
-- Attribute-revocation-references attribute
id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 45}
AttributeRevocationRefs ::= SEQUENCE OF CrlOcspRef
END
A.2. Signature Format Definitions Using X.680 ASN.1 Syntax โจ
Heads up, bestie ๐จ The ASN.1 module in Annex A.1 wins over the one in Annex A.2 if they ever clash. That A.2 one uses X.680 (1997) [8] syntax, so the A.1 version is the boss.
ETS-ElectronicSignatureFormats-ExplicitSyntax97 { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-mod(0)
eSignature-explicit97(29)}
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
-- EXPORTS All -
IMPORTS
-- Cryptographic Message Syntax (CMS): RFC 3852
ContentInfo, ContentType, id-data, id-signedData, SignedData,
EncapsulatedContentInfo, SignerInfo,
id-contentType, id-messageDigest, MessageDigest, id-signingTime,
SigningTime, id-countersignature, Countersignature
FROM CryptographicMessageSyntax2004
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) modules(0) cms-2004(24) }
-- ESS Defined attributes: ESS Update
-- RFC 5035 (Adding CertID Algorithm Agility)
id-aa-signingCertificate, SigningCertificate, IssuerSerial,
id-aa-contentReference, ContentReference, id-aa-contentIdentifier,
ContentIdentifier, id-aa-signingCertificateV2
FROM ExtendedSecurityServices-2006
{ iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0) id-mod-ess-2006(30) }
-- Internet X.509 Public Key Infrastructure
-- Certificate and CRL Profile: RFC 3280
Certificate, AlgorithmIdentifier, CertificateList, Name,
Attribute
FROM PKIX1Explicit88
{iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-pkix1-explicit(18)}
GeneralNames, GeneralName, PolicyInformation
FROM PKIX1Implicit88 {iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-pkix1-implicit(19)}
-- Internet Attribute Certificate Profile for Authorization - RFC 3281
AttributeCertificate
FROM PKIXAttributeCertificate {iso(1) identified-organization(3)
dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-attribute-cert(12)}
-- OCSP RFC 2560
BasicOCSPResponse, ResponderID
FROM OCSP {iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-ocsp(14)}
-- RFC 3161 Internet X.509 Public Key Infrastructure
-- Time-Stamp Protocol
TimeStampToken
FROM PKIXTSP {iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-tsp(13)}
-- X.520
DirectoryString {}
FROM SelectedAttributeTypes
{joint-iso-itu-t ds(5) module(1) selectedAttributeTypes(5) 4}
;
-- Definitions of Object Identifier arcs used in the present document
-- ==================================================================
-- OID used referencing electronic signature mechanisms based
-- on the present document for use with the IDUP API (see Annex D)
id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
{ itu-t(0) identified-organization(4) etsi(0)
electronic-signature-standard (1733) part1 (1) idupMechanism (4)
etsiESv1(1) }
-- Basic ES Attributes Defined in the present document
-- ===================================================
-- CMS Attributes defined in the present document
-- OtherSigningCertificate - deprecated
id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 19 }
OtherSigningCertificate ::= SEQUENCE {
certs SEQUENCE OF OtherCertID,
policies SEQUENCE OF PolicyInformation OPTIONAL
-- NOT USED IN THE PRESENT DOCUMENT
}
OtherCertID ::= SEQUENCE {
otherCertHash OtherHash,
issuerSerial IssuerSerial OPTIONAL }
OtherHash ::= CHOICE {
sha1Hash OtherHashValue,
-- This contains a SHA-1 hash
otherHash OtherHashAlgAndValue}
-- Policy ES Attributes Defined in the present document
-- ====================================================
-- Mandatory Basic Electronic Signature Attributes, plus in addition.
-- Signature Policy Identifier
id-aa-ets-sigPolicyId OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-aa(2) 15 }
SignaturePolicy ::= CHOICE {
signaturePolicyId SignaturePolicyId,
signaturePolicyImplied SignaturePolicyImplied
-- not used in this version
}
SignaturePolicyId ::= SEQUENCE {
sigPolicyId SigPolicyId,
sigPolicyHash SigPolicyHash,
sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF
SigPolicyQualifierInfo OPTIONAL
}
SignaturePolicyImplied ::= NULL
SigPolicyId ::= OBJECT IDENTIFIER
SigPolicyHash ::= OtherHashAlgAndValue
OtherHashAlgAndValue ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
hashValue OtherHashValue
}
OtherHashValue ::= OCTET STRING
SigPolicyQualifierInfo ::= SEQUENCE {
sigPolicyQualifierId SIG-POLICY-QUALIFIER.&id
({SupportedSigPolicyQualifiers}),
qualifier SIG-POLICY-QUALIFIER.&Qualifier
({SupportedSigPolicyQualifiers}
{@sigPolicyQualifierId})OPTIONAL }
SupportedSigPolicyQualifiers SIG-POLICY-QUALIFIER ::=
{ noticeToUser | pointerToSigPolSpec }
SIG-POLICY-QUALIFIER ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&Qualifier OPTIONAL }
WITH SYNTAX {
SIG-POLICY-QUALIFIER-ID &id
[SIG-QUALIFIER-TYPE &Qualifier] }
noticeToUser SIG-POLICY-QUALIFIER ::= {
SIG-POLICY-QUALIFIER-ID id-spq-ets-unotice SIG-QUALIFIER-TYPE
SPUserNotice }
pointerToSigPolSpec SIG-POLICY-QUALIFIER ::= {
SIG-POLICY-QUALIFIER-ID id-spq-ets-uri SIG-QUALIFIER-TYPE SPuri }
id-spq-ets-uri OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 1 }
SPuri ::= IA5String
id-spq-ets-unotice OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) id-spq(5) 2 }
SPUserNotice ::= SEQUENCE {
noticeRef NoticeReference OPTIONAL,
explicitText DisplayText OPTIONAL}
NoticeReference ::= SEQUENCE {
organization DisplayText,
noticeNumbers SEQUENCE OF INTEGER }
DisplayText ::= CHOICE {
visibleString VisibleString (SIZE (1..200)),
bmpString BMPString (SIZE (1..200)),
utf8String UTF8String (SIZE (1..200)) }
-- Optional Electronic Signature Attributes
-- Commitment Type
id-aa-ets-commitmentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 16}
CommitmentTypeIndication ::= SEQUENCE {
commitmentTypeId CommitmentTypeIdentifier,
commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
CommitmentTypeQualifier OPTIONAL}
CommitmentTypeIdentifier ::= OBJECT IDENTIFIER
CommitmentTypeQualifier ::= SEQUENCE {
commitmentQualifierId COMMITMENT-QUALIFIER.&id,
qualifier COMMITMENT-QUALIFIER.&Qualifier OPTIONAL }
COMMITMENT-QUALIFIER ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&Qualifier OPTIONAL }
WITH SYNTAX {
COMMITMENT-QUALIFIER-ID &id
[COMMITMENT-TYPE &Qualifier] }
id-cti-ets-proofOfOrigin OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 1}
id-cti-ets-proofOfReceipt OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 2}
id-cti-ets-proofOfDelivery OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
cti(6) 3}
id-cti-ets-proofOfSender OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6) 4}
id-cti-ets-proofOfApproval OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 5}
id-cti-ets-proofOfCreation OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) cti(6) 6}
-- Signer Location
id-aa-ets-signerLocation OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 17}
SignerLocation ::= SEQUENCE {
-- at least one of the following shall be present
countryName [0] DirectoryString{maxSize} OPTIONAL,
-- as used to name a Country in X.520
localityName [1] DirectoryString{maxSize} OPTIONAL,
-- as used to name a locality in X.520
postalAdddress [2] PostalAddress OPTIONAL }
PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString{maxSize}
-- maxSize parametrization as specified in X.683
-- Signer Attributes
id-aa-ets-signerAttr OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 18}
SignerAttribute ::= SEQUENCE OF CHOICE {
claimedAttributes [0] ClaimedAttributes,
certifiedAttributes [1] CertifiedAttributes }
ClaimedAttributes ::= SEQUENCE OF Attribute
CertifiedAttributes ::= AttributeCertificate
-- as defined in RFC 3281: see Section 4.1
-- Content Timestamp
id-aa-ets-contentTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 20}
ContentTimestamp ::= TimeStampToken
-- Signature Timestamp
id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 14}
SignatureTimeStampToken ::= TimeStampToken
-- Complete Certificate Refs.
id-aa-ets-certificateRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 21}
CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
-- Complete Revocation Refs
id-aa-ets-revocationRefs OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 22}
CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
CrlOcspRef ::= SEQUENCE {
crlids [0] CRLListID OPTIONAL,
ocspids [1] OcspListID OPTIONAL,
otherRev [2] OtherRevRefs OPTIONAL
}
CRLListID ::= SEQUENCE {
crls SEQUENCE OF CrlValidatedID
}
CrlValidatedID ::= SEQUENCE {
crlHash OtherHash,
crlIdentifier CrlIdentifier OPTIONAL }
CrlIdentifier ::= SEQUENCE {
crlissuer Name,
crlIssuedTime UTCTime,
crlNumber INTEGER OPTIONAL
}
OcspListID ::= SEQUENCE {
ocspResponses SEQUENCE OF OcspResponsesID
}
OcspResponsesID ::= SEQUENCE {
ocspIdentifier OcspIdentifier,
ocspRepHash OtherHash OPTIONAL
}
OcspIdentifier ::= SEQUENCE {
ocspResponderID ResponderID,
-- As in OCSP response data
producedAt GeneralizedTime
-- As in OCSP response data
}
OtherRevRefs ::= SEQUENCE {
otherRevRefType OTHER-REVOCATION-REF.&id,
otherRevRefs SEQUENCE OF OTHER-REVOCATION-REF.&Type
}
OTHER-REVOCATION-REF ::= CLASS {
&Type,
&id OBJECT IDENTIFIER UNIQUE }
WITH SYNTAX {
WITH SYNTAX &Type ID &id }
-- Certificate Values
id-aa-ets-certValues OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 23}
CertificateValues ::= SEQUENCE OF Certificate
-- Certificate Revocation Values
id-aa-ets-revocationValues OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 24}
RevocationValues ::= SEQUENCE {
crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
otherRevVals [2] OtherRevVals OPTIONAL
}
OtherRevVals ::= SEQUENCE {
otherRevValType OTHER-REVOCATION-VAL.&id,
otherRevVals SEQUENCE OF OTHER-REVOCATION-REF.&Type
}
OTHER-REVOCATION-VAL ::= CLASS {
&Type,
&id OBJECT IDENTIFIER UNIQUE }
WITH SYNTAX {
WITH SYNTAX &Type ID &id }
-- CAdES-C Timestamp
id-aa-ets-escTimeStamp OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 25}
ESCTimeStampToken ::= TimeStampToken
-- Time-Stamped Certificates and CRLs
id-aa-ets-certCRLTimestamp OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 26}
TimestampedCertsCRLs ::= TimeStampToken
-- Archive Timestamp
id-aa-ets-archiveTimestampV2 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 48}
ArchiveTimeStampToken ::= TimeStampToken
-- Attribute certificate references
id-aa-ets-attrCertificateRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 44}
AttributeCertificateRefs ::= SEQUENCE OF OtherCertID
-- Attribute revocation references
id-aa-ets-attrRevocationRefs OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) id-aa(2) 45}
AttributeRevocationRefs ::= SEQUENCE OF CrlOcspRef
END
Annex B (Informative): Extended Forms of Electronic Signatures โจ
Okay bestie, this is where we level up ๐ Section 4 gives you the overview of all the different formats of electronic signatures in the present document ๐ฆ This annex is the cheat sheet: it lists the attributes that need to be present in each of the extended electronic signature formats, and it walks through example validation sequences using those extended formats ๐ธ Main character energy for signatures, ngl ๐ซถ
B.1. Extended Forms of Validation Data โจ
okay so the Complete validation data (CAdES-C) from Section 4.3 (the one shown in Figure 3) can be extended into electronic signatures with extended validation data ๐ . Here are the main flavours of it ๐ฆ.
An X-Long electronic signature (CAdES-X Long) is basically the CAdES-C plus the values of the certificates and the revocation information ๐.
This form can be useful when the verifier does not have direct access to the following info ๐:
- the signer's certificate;
- all the CA certificates that make up the full certification path;
- all the associated revocation status information, as referenced in the CAdES-C.
sometimes you also want to add extra time-stamps to the Electronic Signatures as additional attributes โฐ. For example:
- time-stamping all the validation data as held with the ES (CAdES-C). This extended validation data is called a CAdES-X Type 1; or
- time-stamping individual reference data as used for complete validation. This form of extended validation data is called a CAdES-X Type 2.
NOTE 1: The advantages and drawbacks of CAdES-X Type 1 and CAdES-X Type 2 are discussed in Annex C.4.4. ๐ง
These time-stamp forms can be useful when you need to counter the risk that any CA keys used in the certificate chain may be compromised ๐ญ.
You can also combine the two formats above ๐ฅ. This form of extended validation data is called an ES X-Long Type 1 or CAdES-X Long Type 2. It's super handy when the verifier needs both the values and proof of when the validation data existed ๐.
NOTE 2: The advantages and drawbacks of CAdES-X long Type 1 and CAdES-X long Type 2 are discussed in Annex C.4.6. ๐ง
B.1.1. CAdES-X Long ๐ธ
an electronic signature with the additional validation data forming the CAdES-X Long form (CAdES-X-Long) is shown in Figure B.1, and it's made up of the following:
- CAdES-BES or CAdES-EPES, as defined in Sections 4.3 , 5.7, or 5.8;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2.
the following attributes are required if a TSP is not providing a time-mark of the ES ๐ฐ๏ธ:
- signature-time-stamp attribute, as defined in Section 6.1.1.
the following attributes are required if the full certificate values and revocation values are not already included in the CAdES-BES or CAdES-EPES ๐:
- certificate-values attribute, as defined in Section 6.3.3;
- revocation-values attribute, as defined in Section 6.3.4.
if attributes certificates are used, then the following attributes may be present ๐ง:
- attribute-certificate-references attribute, defined in Section 6.2.3;
- attribute-revocation-references attribute, as defined in Section 6.2.4.
other unsigned attributes may be present, but they're not required ๐ซถ.
NOTE: Attribute certificate and revocation references are only present if a user attribute certificate is present in the electronic signature; see Sections 6.2.2 and 6.2.3. ๐
+---------------------- CAdES-X-Long --------------------------------+
|+-------------------------------------- CAdES-C ---+ |
|| +----------+ | +-------------+|
||+----- CAdES-BES or CAdES-EPES ----+ |Timestamp | | | ||
||| | |over | | | Complete ||
|||+---------++----------++---------+| |digital | | | certificate ||
|||| || || || |signature | | | and ||
||||Signer's || Signed ||Digital || | | | | revocation ||
||||Document ||Attributes||signature|| |Optional | | | data ||
|||| || || || |when | | | ||
|||+---------++----------++---------+| |timemarked| | | ||
||+----------------------------------+ +----------+ | | ||
|| +-----------+| +-------------+|
|| |Complete || |
|| |certificate|| |
|| |and || |
|| |revocation || |
|| |references || |
|| +-----------+| |
|+--------------------------------------------------+ |
| |
+--------------------------------------------------------------------+
Figure B.1: Illustration of CAdES-X-Long ๐จ
B.1.2. CAdES-X Type 1 ๐ฆ
an electronic signature with the additional validation data forming the eXtended validation data - Type 1 X is shown in Figure B.2, and it comprises the following ๐:
- the CAdES-BES or CAdES-EPES, as defined in Sections 4.2, 5.7, or 5.8;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2;
- CAdES-C-Timestamp attribute, as defined in Section 6.3.5.
the following attributes are required if a TSP is not providing a time-mark of the ES:
- signature-time-stamp attribute, as defined in Section 6.1.1.
if attributes certificates are used, then the following attributes may be present:
- attribute-certificate-references attribute, defined in Section 6.2.3;
- attribute-revocation-references attribute, as defined in Section 6.2.4.
other unsigned attributes may be present, but they are not required.
+------------------------ CAdES-X-Type 1 ----------------------------+
|+---------------------------------- CAdES-C ------+ |
|| +----------+ | +-------------+ |
||+--- CAdES-BES or CAdES-EPES ------+|Timestamp | | | | |
||| ||over | | | | |
|||+---------++----------++---------+||digital | | | | |
||||Signer's || Signed || Digital |||signature | | | Timestamp | |
||||Document ||Attributes||signature||| | | | over | |
|||| || || |||Optional | | | CAdES-C | |
|||+---------++----------++---------+||when | | | | |
||+----------------------------------+|timemarked| | | | |
|| +----------+ | | | |
|| +-----------+| +-------------+ |
|| |Complete || |
|| |certificate|| |
|| | and || |
|| |revocation || |
|| |references || |
|| +-----------+| |
|+-------------------------------------------------+ |
| |
+--------------------------------------------------------------------+
Figure B.2: Illustration of CAdES-X Type 1 ๐
B.1.3. CAdES-X Type 2 ๐ง
an electronic signature with the additional validation data forming the eXtended Validation Data - Type 2 X is shown in Figure B.3, and it comprises the following ๐ญ:
- CAdES-BES or CAdES-EPES, as defined in Sections 4.2, 5.7, or 5.8;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2;
- time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.
the following attributes are required if a TSP is not providing a time-mark of the ES:
- signature-time-stamp attribute, as defined in Section 6.1.1.
if attributes certificates are used, then the following attributes may be present:
- attribute-certificate-references attribute, defined in Section 6.2.3;
- attribute-revocation-references attribute, as defined in Section 6.2.4.
other unsigned attributes may be present, but they are not required.
+----------------------- CAdES-X-Type 2 -----------------------------+
|+-------------------------------------- CAdES-C --+ |
|| +----------+ | |
||+-- CAdES-BES or CAdES-EPES -------+|Timestamp | | |
||| ||over | | |
|||+---------++----------++---------+||digital | | +-------------+ |
|||| || || |||Signature | | | Timestamp | |
||||Signer's || Signed || Digital ||| | | | only over | |
||||Document ||Attributes||signature|||Optional | | | Complete | |
|||| || || |||when | | | certificate | |
|||+---------++----------++---------+||Timemarked| | | and | |
||+----------------------------------++----------+ | | revocation | |
|| +-----------+| | references | |
|| |Complete || +-------------+ |
|| |certificate|| |
|| |and || |
|| |revocation || |
|| |references || |
|| +-----------+| |
|+-------------------------------------------------+ |
| |
+--------------------------------------------------------------------+
Figure B.3: Illustration of CAdES-X Type 2 ๐ฆ
B.1.4. CAdES-X Long Type 1 and CAdES-X Long Type 2 ๐
okay so an ES with the extra validation data that makes up CAdES-X Long Type 1 and CAdES-X Long Type 2 is shown in Figure B.4 โจ, and it's built from these pieces:
- CAdES-BES or CAdES-EPES, as defined in Sections 4.3, 5.7, or 5.8;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2;
the signature-time-stamp attribute is required if a TSP is not providing a time-mark of the ES ๐ฐ๏ธ:
- signature-time-stamp attribute, as defined in Section 6.1.1.
if the full certificate values and revocation values are not already in the CAdES-BES or CAdES-EPES, then these two are required ๐ :
- certificate-values attribute, as defined in Section 6.3.3;
- revocation-values attribute, as defined in Section 6.3.4.
if attributes certificates are used, these ones may be present ๐ฆ:
- attribute-certificate-references attribute, defined in Section 6.2.3;
- attribute-revocation-references attribute, as defined in Section 6.2.4.
plus, one of these attributes is required (it's giving "pick one" energy ๐ซถ):
- CAdES-C-Timestamp attribute, as defined in Section 6.3.5;
- time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.
other unsigned attributes may be present, but they're not required ๐ธ.
+---------------------- CAdES-X-Type 1 or 2 ------------------------+
| +--------------+|
|+-------------------------------------- CAdES-C --+|+------------+||
|| +----------+ ||| Timestamp |||
||+-- CAdES-BES or CAdES-EPES -------+|Timestamp | ||| over |||
||| ||over | ||| CAdES-C |||
|||+---------++----------++---------+||digital | | +------------+ |
|||| || || |||signature | || or ||
||||Signer's || Signed || Digital ||| | ||+------------+||
||||Document ||Attributes||Signature|||Optional | ||| Timestamp |||
|||| || || |||when | ||| only over |||
|||+---------++----------++---------+||timemarked| ||| complete |||
||+----------------------------------++----------+ ||| certificate|||
|| ||| and |||
|| +-----------+||| revocation |||
|| |Complete |||| references |||
|| |certificate|||+------------+||
|| |and ||+--------------+|
|| |revocation || +------------+ |
|| |references || |Complete | |
|| +-----------+| |certificate | |
|+-------------------------------------------------+ | and | |
| |revocation | |
| | values | |
| +------------+ |
+-------------------------------------------------------------------+
Figure B.4: Illustration of CAdES-X Long Type 1
and CAdES-X Long Type 2
B.2. Time-Stamp Extensions โฑ๏ธ
every instance of the time-stamp attribute may include these attributes related to the TSU as unsigned attributes in the signedData of the time-stamp ๐:
- complete-certificate-references attribute of the TSU, as defined in Section 6.2.1;
- complete-revocation-references attribute of the TSU, as defined in Section 6.2.2;
- certificate-values attribute of the TSU, as defined in Section 6.3.3;
- revocation-values attribute of the TSU, as defined in Section 6.3.4.
other unsigned attributes may be present, but they're not required ๐.
B.3. Archive Validation Data (CAdES-A) ๐๏ธ
okay this one is the big-brain move ๐ง . before the algorithms, keys, and other crypto data used when the CAdES-C was built go weak, and the crypto functions become vulnerable (or the certificates backing up earlier time-stamps expire), the signed data, the CAdES-C, and any extra info (aka any CAdES-X) should be time-stamped ๐ฐ๏ธ. if possible, this should use stronger algorithms (or longer key lengths) than the original time-stamp. this extra data plus its time-stamp is called Archive validation data required for the ES Archive format (CAdES-A) โจ. the time-stamping process may be repeated every time the protection used to time-stamp a previous CAdES-A becomes weak, so a CAdES-A can end up with multiple embedded time-stamps ๐.
here's an example of an electronic signature (ES) with the extra validation data for the CAdES-C and CAdES-X forming the CAdES-A, shown in Figure B.5 ๐ฆ:
+--------------------------- CAdES-A---------------------------------+
|+----------------------------------------------------+ |
|| +--------------+| +----------+ |
||+--------------------- CAdES-C ----+|+------------+|| | | |
||| +----------+ ||| Timestamp ||| | | |
|||+-- CAdES-BES ------+|Timestamp | ||| over ||| | | |
|||| or CAdES-EPES ||over | ||| CAdES-C ||| | Archive | |
|||| ||digital | ||+------------+|| | | |
|||| ||signature | || or || |Timestamp | |
|||| || | ||+------------+|| | | |
|||| ||optional | ||| Timestamp ||| | | |
|||| ||when | ||| only over ||| | | |
|||| ||timemarked| ||| complete ||| | | |
|||+-------------------++----------+ ||| certificate||| +----------+ |
||| ||| and ||| |
||| +-------------+||| revocation ||| |
||| | Complete |||| references ||| |
||| | certificate |||+------------+|| |
||| | and ||+--------------+| |
||| | revocation || +------------+ | |
||| | references || |Complete | | |
||| +-------------+| |certificate | | |
||+----------------------------------+ | and | | |
|| |revocation | | |
|| | values | | |
|| +------------+ | |
|+----------------------------------------------------+ |
+--------------------------------------------------------------------+
Figure B.5: Illustration of CAdES-A
the CAdES-A is made up of these elements ๐งฉ:
- the CAdES-BES or CAdES-EPES, including their signed and unsigned attributes;
- complete-certificate-references attribute, as defined in Section 6.2.1;
- complete-revocation-references attribute, as defined in Section 6.2.2.
the signature-time-stamp attribute is required if a TSP is not providing a time-mark of the ES ๐ฐ๏ธ:
- signature-time-stamp attribute, as defined in Section 6.1.1.
if attributes certificates are used, these may be present ๐ธ:
- attribute-certificate-references attribute, defined in Section 6.2.3;
- attribute-revocation-references attribute, as defined in Section 6.2.4.
if the full certificate values and revocation values are not already in the CAdES-BES or CAdES-EPES, these are required ๐ :
- certificate-values attribute, as defined in Section 6.3.3;
- revocation-values attribute, as defined in Section 6.3.4.
at least one of these two attributes is required ๐:
- CAdES-C-Timestamp attribute, as defined in Section 6.3.5;
- time-stamped-certs-crls-references attribute, as defined in Section 6.3.6.
and this one is required too ๐ฅ:
- archive-time-stamp attributes, defined in Section 6.4.1.
several instances of the archive-time-stamp attribute may show up on an electronic signature, both over time and from different TSUs ๐. the time-stamp should be created using stronger algorithms (or longer key lengths) than the original electronic signatures or time-stamps, no cap ๐.
other unsigned attributes of the ES may be present, but they're not required ๐ซถ.
the archive-time-stamp holds its own certificate and revocation info, which it needs to validate itself ๐. this may include these unsigned attributes:
- complete-certificate-references attribute of the TSU, as defined in Section 6.2.1;
- complete-revocation-references attribute of the TSU, as defined in Section 6.2.2;
- certificate-values attribute of the TSU, as defined in Section 6.3.3;
- revocation-values attribute of the TSU, as defined in Section 6.3.4.
other unsigned attributes may be present, but they're not required ๐ฆ.
B.4. Example Validation Sequence ๐ง
as we covered earlier, the signer or the initial verifier may collect all the additional data that forms the electronic signature ๐ฆ. Figure B.6 and the description after it show how the validation process can build up a complete electronic signature over time, and honestly it's so satisfying to watch ๐ญโจ.
+------------------------------------------ CAdES-C -------------+
|+------------------------------- CAdES-T ------+ |
||+-------------- CAdES ------------+ | |
|||+--------------------++---------+|+---------+| +-----------+ |
|||| ________ || |||Timestamp|| |Complete | |
|||||Sign.Pol| ||Digital |||over || |certificate| |
||||| Id. | Signed ||signature|||digital || | and | |
||||| option.|attributes|| |||signature|| |revocation | |
|||||________| |+---------+|+---------+| |references | |
|||+--------------------+ | ^ | +-----------+ |
||+---------------------------------+ | | ^ |
|| 1 | / | | |
|+---------------------- | ------------/--------+ | |
Okay so bestie, we're picking up right at the figures for the Example Validation Sequence ๐ โจ Let's look at Figure B.6, the basic validation loop, first.
+----------------------- | ---------- / --------------- / -------+
| /2 ----3--------
+----------+ | / /
| | v / |
| Signer's | +---------------------+ +-------------+
| document |----->| Validation Process |---->|- Valid |
| | +---------------------+ 4 |- Invalid |
+----------+ | ^ | ^ |- Validation |
v | v | | Incomplete |
+---------+ +--------+ +-------------+
|Signature| |Trusted |
| Policy | |Service |
| Issuer | |Provider|
+---------+ +--------+
Figure B.6: Illustration of a CAdES validation sequence ๐ฆ
Soon after the signer hands over the electronic signature (CAdES) (1), the digital signature value may be checked ๐ The validation process shall at least add a time-stamp (2), unless the signer already provided one that the verifier trusts ๐ซถ The validation process may also validate the electronic signature using extra data (for example certificates, CRL, and so on) that comes from Trusted Service Providers ๐ธ When it applies, the validation process must also meet the requirements in a signature policy ๐ If the validation process ends up as validation incomplete, then the output from this stage is the CAdES-T โจ
To figure out whether the validity status is Valid or Invalid and tell the user about it (4), all the extra data needed to validate the CAdES-C has to be on hand ๐ Think the full certificate and the revocation info, periodt ๐
Once the data needed for the complete validation data references (CAdES-C) is available, the validation process should:
- obtain all the necessary additional certificates and revocation status information;
- complete all the validation checks on the ES using the complete certificate and revocation information (if a time-stamp is not already present, this may be added at the same stage, combining the CAdES-T and CAdES-C processes);
- record the complete certificate and revocation references (3);
- indicate the validity status to the user (4).
At the same time the validation process creates the CAdES-C, it may provide and/or record the values of certificates and revocation status information used in CAdES-C (5). The end result is called CAdES-X Long. ๐ Main character era, honestly ๐
This is illustrated in Figure B.7.
+----------------------------------------------------- CAdES-X Long -+
|+------------------------------- CAdES-C -------------+ |
||+-------------- CAdES ------------+ | |
|||+--------------------++---------+|+---------+ |+-----------+|
|||| ________ || |||Timestamp| ||Complete ||
|||||Sign.Pol| ||Digital |||over | ||certificate||
||||| Id. | Signed ||signature|||digital | || and ||
||||| option.|attributes|| |||signature| ||revocation ||
|||||________| || ||+---------+ || values ||
|||+--------------------++---------+| ^ +-----------+|+-----------+|
||+---------------------------------+ | |Complete || ^ |
|| | | |certificate|| | |
|| | 2 | | and || | |
|| | | |revocation || | |
|| | | |references || | |
|| 1 | / +-----------+| | |
|+------------------------ | ------- / --------- ^-----+ / |
+------------------------- | ------ / ---------- |--------- / -------+
| / ----- / ------- /
+----------+ | / / 3 / 5
| | v | | |
| Signer's | +--------------------+ +-----------+
| document |----->| Validation Process |----->| - Valid |
| | +--------------------+ 4 | - Invalid |
+----------+ | ^ | ^ +-----------+
v | v |
+---------+ +--------+
|Signature| |Trusted |
| Policy | |Service |
| Issuer | |Provider|
+---------+ +--------+
Figure B.7: Illustration of a CAdES validation sequence with CAdES-X Long ๐
When the validation process creates the CAdES-C, it may also create extended forms of validation data ๐ง
A first alternative is to time-stamp all data forming the CAdES-X Type 1 โฐ
This is illustrated in Figure B.8.
+------------------------------------------------ CAdES-X Type 1 -----+
|+------------------------------- CAdES-C ------------------+ |
||+-------------- CAdES ------------+ | |
|||+--------------------++---------+|+---------++----------+|+-------+|
|||| ________ || |||Timestamp|| Complete ||| ||
|||||Sign.Pol| ||Digital |||over || cert. |||Time- ||
||||| Id. | Signed ||signature|||digital || and |||stamp ||
||||| option.|attributes|| |||signature|| revoc. ||| over ||
|||||________| |+---------+|+---------+|references|||CAdES-C||
|||+--------------------+ | ^ | ||| ||
||+---------------------------------+ | +----------+|+-------+|
|| | | ^ | ^ |
|| 1 | / | | | |
|+------------------------ | --------- / ----------- / -----+ | |
+------------------------- | -------- / ----------- / --------- / ----+
| 2 / ---3---- /
+----------+ | / / -----------5------
| | v | | /
| Signer's | +--------------------+ +-----------+
| document |----->| Validation Process |-----> | - Valid |
| | +--------------------+ 4 | - Invalid |
+----------+ | ^ | ^ +-----------+
v | v |
+---------+ +--------+
|Signature| |Trusted |
| Policy | |Service |
| Issuer | |Provider|
+---------+ +--------+
Figure B.8: Illustration of CAdES with eXtended validation data CAdES-X Type 1 ๐
Another alternative is to time-stamp the certificate and revocation information references used to validate the electronic signature (but not the signature) (6) ๐ฆ The end result is called CAdES-X Type 2 ๐
This is illustrated in Figure B.9.
+-------------------------------------------- CAdES-X Type 2 --------+
|+------------------------------- CAdES-C -------------+ |
||+-------------- CAdES ------------+ | |
|||+--------------------++---------+|+---------+ |+-----------+|
|||| ________ || |||Timestamp| ||Timestamp ||
|||||Sign.Pol| || |||over | || over ||
||||| Id. | Signed ||Digital |||digital | ||complete ||
||||| option.|attributes||signature|||signature| ||certificate||
|||||________| || ||| | || ||
|||+--------------------++---------+|+---------+ || and ||
||+---------------------------------+ ^ +-----------+||revocation ||
|| | | |Complete |||references ||
|| | | |certificate||+-----------+|
|| | | | and || ^ |
|| 1 | 2 | |revocation || | |
|| | | |references || | |
|| | | +-----------+| | |
|+------------------------ | --------- | --- ^ --------+ | |
| | | 3 | / |
| | | / ---------- |
| | / / / 6 |
| | / / / |
| | / / / |
+------------------------- | ----- | -- | -- / ----------------------+
| | | |
v | | |
+--------------------+ +-----------+
| Validation Process |----->| - Valid |
+--------------------+ 4 | - Invalid |
| ^ | ^ +-----------+
v | v |
+---------+ +--------+
|Signature| |Trusted |
| Policy | |Service |
+---------+ +--------+
Figure B.9: Illustration of CAdES with eXtended validation data CAdES-X Type 2 ๐ธ
Before the algorithms used in any of the electronic signatures become, or are likely to become, compromised or vulnerable in the future, it may be necessary to time-stamp the entire electronic signature, including all the values of the validation and user data, as an ES with Archive validation data (CAdES-A) (7) โญ Think of it as a time capsule ๐
A CAdES-A is illustrated in Figure B.10.
+----------------------------- CAdES-A ---------------------------+
| |
| +-- CAdES-X Long Type 1 or 2 ----------+ |
| | | +------------+ |
| | | | | |
| | | | Archive | |
| | | | Time-stamp | |
| | | | | |
| | | +------------+ |
| +---------------------------------------+ ^ |
| +----------+ ^ ^ ^ ^ | |
| | | | | | | / |
| | Signers' | | | | | / |
| | Document |\ | | | | / |
| | | \ 1 2 | 3 | 5 | 6 | 7 / |
| +----------+ \ | | | | / |
| \ | | | | / |
+----------------- \ --- | - | - | - | ------ / ------------------+
\ | | | | |
| | | | | |
| | | | | |
v v | | | |
+-----------------------------+ +-----------+
| Validation Process |----->| - Valid |
+-----------------------------+ 4 | - Invalid |
| ^ | ^ +-----------+
v | v |
+---------+ +--------+
|Signature| |Trusted |
| Policy | |Service |
| Issuer | |Provider|
+---------+ +--------+
Figure B.10: Illustration of CAdES-A ๐ฅ
B.5. Additional Optional Features โจ
okay so the document also defines some extra optional features ๐ bestie, these are all optional, but they're iconic:
- indicate a commitment type being made by the signer ๐ซถ
- indicate the claimed time when the signature was done โฐ
- indicate the claimed location of the signer ๐
- indicate the claimed or certified role under which a signature was created ๐
- support counter signatures ๐
- support multiple signatures ๐
Annex C (Informative): General Description ๐ฆ
this annex is the vibe check ๐ง It explains some of the concepts and gives the reasoning behind the normative parts of the document ๐
the spec below explains why and when each part of an electronic signature is useful ๐ It also covers the vulnerabilities and threats each part helps counter, and how it does that ๐ญ
C.1. The Signature Policy ๐
the signature policy is a set of rules for creating and validating an electronic signature ๐ If you follow them, the signature can be determined to be valid โจ A given legal or contractual context may recognize a particular signature policy as meeting its requirements ๐ A signature policy may be issued by a party that relies on the electronic signatures, and the signer picks it for use with that relying party ๐ค Or it can be set up by an electronic trading association for its members to use ๐ธ Both the signer and the verifier use the same signature policy, no exceptions ๐
the signature policy may be explicitly identified, or it may be implied by the semantics of the data being signed and by external data, like a contract being referenced that itself points to a signature policy ๐ An explicit signature policy has a globally unique reference, and the signer binds that reference to an electronic signature as part of the signature calculation ๐
the signature policy needs to be readable by humans ๐ so people can check that it meets the legal and contractual requirements where it's being used ๐ผ To make automatic processing of an electronic signature work, the parts of the policy that define the electronic rules for creating and validating the signature also need to be fully defined and in a form computers can process ๐ค
so the signature policy includes the following:
- rules that apply to technical validation of a particular signature ๐งช
- rules that may be implied through adoption of Certificate Policies that apply to the electronic signature (e.g., rules for ensuring the secrecy of the private signing key) ๐
- rules that relate to the environment used by the signer, e.g., the use of an agreed CAD (Card Accepting Device) used in conjunction with a smart card ๐ณ
for example, the major rules needed for technical validation can include:
- recognized root keys or "top-level certification authorities" ๐
- acceptable certificate policies (if any) ๐
- necessary certificate extensions and values (if any) ๐งฉ
- the need for the revocation status for each component of the certification tree ๐ซ
- acceptable TSAs (if time-stamp tokens are being used) โฑ๏ธ
- acceptable organizations for keeping the audit trails with time-marks (if time-marking is being used) ๐๏ธ
- acceptable AAs (if any are being used), and ๐ซ
- rules defining the components of the electronic signature that shall be provided by the signer with data required by the verifier when required to provide long-term proof ๐ฐ๏ธ
C.2. Signed Information ๐
the information being signed may be defined as a MIME-encapsulated message ๐ MIME can signal the format of the content so the right display or application gets picked ๐ฅ๏ธ The content can be formatted data, free text, or fields from an electronic form (e-form) ๐ For example, the Adobe(tm) format "pdf" or the eXtensible Mark up Language (XML) may be used ๐ Annex D defines how the content may be structured to indicate the type of signed data using MIME ๐
C.3. Components of an Electronic Signature ๐งฉ
C.3.1. Reference to the Signature Policy ๐
when two independent parties want to evaluate an electronic signature, it's a must that they get the same result ๐ This can be handled with comprehensive signature policies that keep signature validation consistent ๐ฏ Signature policies can be identified implicitly by the data being signed, or they can be explicitly identified using the CAdES-EPES form of electronic signature ๐ฏ The CAdES-EPES requires that a consistent signature policy be used by both the signer and verifier ๐ค
by signing over the Signature Policy Identifier in the CAdES-EPES, the signer explicitly shows that they applied the signature policy when creating the signature ๐ซถ
to unambiguously identify the details of an explicit signature policy that is used to verify a CAdES-EPES signature, an identifier and a hash of the "Signature policy" shall be part of the signed data ๐ Extra information about the explicit policy (e.g., a web reference to the document) may be carried as "qualifiers" to the Signature Policy Identifier ๐ท๏ธ
to unambiguously identify the authority responsible for defining an explicit signature policy, the "Signature policy" can be signed ๐๏ธ
C.3.2. Commitment Type Indication ๐
the commitment type can be indicated in the electronic signature either:
- explicitly, using a "commitment type indication" in the electronic signature ๐ฃ
- implicitly or explicitly from the semantics of the signed data ๐ง
if the commitment type is explicit, using a "commitment type indication" in the electronic signature, then accepting a verified signature implies accepting the semantics of that commitment type โ The semantics of explicit commitment type indications may be subject to agreement between signer and verifier, specified as part of the signature policy, or registered for generic use across multiple policies ๐ค
if a CAdES-EPES electronic signature format is used and the electronic signature includes a commitment type indication other than one of those recognized under the signature policy, the signature shall be treated as invalid ๐ซ๐
how commitment is indicated using the semantics of the data being signed is outside the scope of the present document ๐
NOTE: Examples of commitment indicated through the semantics of the data being signed are:
- an explicit commitment made by the signer, indicated by the type of data being signed over. Thus, the data structure being signed can have an explicit commitment within the context of the application (e.g., EDIFACT purchase order) ๐
- an implicit commitment, which is a commitment made by the signer because the data being signed over has specific semantics (meaning) that only humans can interpret (i.e., free text) ๐
C.3.3. Certificate Identifier from the Signer ๐ชช
in a lot of real-life environments, users can get different certificates from different CAs, or even from the same CA, that contain the same public key for different names ๐ The big perk is that a user can use the same private key for different purposes ๐ Using one key for multiple things matters when a smart card protects the private key, since a smart card's storage is always limited ๐ณ When several CAs are involved, each certificate may contain a different identity, e.g., as a citizen of a nation or as an employee of a company ๐ So when a private key is used for various purposes, the certificate is needed to clarify the context the private key was used in when generating the signature ๐งพ Where multiple private keys might be used, the signer has to tell the verifier exactly which certificate to use ๐ซต
a lot of current schemes simply add the certificate after the signed data, and that makes them vulnerable to substitution attacks ๐ฑ If the signer's certificate was just appended to the signature and wasn't protected by it, anyone could swap in a different certificate, and the message would look like it was signed by someone else ๐ To counter this kind of attack, the signer's identifier has to be protected by the signer's digital signature ๐ก๏ธ
to unambiguously identify the certificate used to verify the signature, an identifier of the signer's certificate shall be part of the signed data ๐ช
C.3.4. Role Attributes ๐
the signer's name matters, but their position within a company or organization matters just as much ๐ผ Some information (e.g., a contract) may only be valid if signed by someone in a particular role, like a Sales Director ๐ In lots of cases, who the Sales Director actually is isn't that important ๐คทโโ๏ธ What's fundamental is making sure the signer is empowered by their company to be the Sales Director ๐
the present document defines two different ways to provide this feature:
- by placing a claimed role name in the CMS signed attributes field ๐ฃ๏ธ
- by placing an attribute certificate containing a certified role name in the CMS signed attributes field ๐
NOTE: Another possible approach would have been to use additional attributes containing the role name(s) in the signer's identity certificate. However, it was decided not to follow this approach because it significantly complicates the management of certificates. For example, using separate certificates for the signer's identity and roles means new identity keys don't need to be issued if a user's role changes ๐
C.3.4.1. Claimed Role ๐โโ๏ธ
the signer may be trusted to state their own role without any certificate to back up the claim ๐ค In that case, the claimed role can be added to the signature as a signed attribute โ๏ธ
C.3.4.2. Certified Role ๐
unlike public key certificates, which bind an identifier to a public key, Attribute Certificates bind the identifier of a certificate to some attributes, like a role ๐ซ An Attribute Certificate is NOT issued by a CA. It's issued by an Attribute Authority (AA) ๐ข In most cases, the Attribute Authority might be under the control of an organization or company that's best placed to know which attributes are relevant to which individual ๐งโ๐ผ The Attribute Authority may use or point to public key certificates issued by any CA, as long as the appropriate trust may be placed in that CA ๐ค Attribute Certificates may have various periods of validity, and that period may be quite short, e.g., one day โณ That means a new Attribute Certificate has to be obtained every day, valid for that day, but this can be a real advantage because revocation of such certificates may not be needed ๐ When signing, the signer has to specify which Attribute Certificate they select ๐ฏ To do that, the Attribute Certificate has to be included in the signed data so the signer's digital signature protects it ๐
to unambiguously identify the attribute certificate(s) used to verify the signature, an identifier of the attribute certificate(s) from the signer shall be part of the signed data ๐
C.3.5. Signer Location ๐
okay so sometimes in a transaction it actually matters where the signer was physically sitting when they put their signature on, so there's an optional location indicator that SHALL be able to be included ๐บ๏ธ
to show where the signer was when they applied their signature, a location attribute MAY be included in the signature ๐ธ
C.3.6. Signing Time โฐ
the doc gives you a way to include a claimed signing time as an attribute of an electronic signature โจ
with this attribute, a signer MAY sign over a time that is the claimed signing time. when an ES with Time gets created (CAdES-T), there's either a trusted time-stamp that gets obtained and added to the ES, or a trusted time-mark sitting in an audit trail ๐ when a verifier accepts a signature, the two times SHALL be within acceptable limits ๐
there's also a further optional attribute defined in the doc to time-stamp the content and prove the content existed at the time shown on the time-stamp token ๐งพ
with this optional attribute, a trusted secure time MAY be obtained before the document gets signed and included under the digital signature. it does need an online connection to a trusted time-stamping service before generating the signature, so it might not be the precise signing time since it was grabbed in advance ๐ still, the signer MAY use this optional attribute to prove the signed object existed before the date in the time-stamp (see Section 5.11.4) ๐ฆ
C.3.7. Content Format ๐
when you present signed data to a human user, it's really important there's zero ambiguity about how the signed info is shown to the relying party ๐ when data (not stuff that's been further signed or encrypted) is wrapped in the SignedData (eContentType in EncapsulatedContentInfo set to id-data), further typing information SHOULD be used to identify the type of document being signed, so the relying party can pick the right representation (text, sound, or video) ๐ this is generally done with the MIME content typing and encoding mechanism defined in RFC 2045 [6]). more info on MIME is in Annex F ๐
C.3.8. content-hints ๐งฉ
this one's giving puzzle energy ๐ช the contents-hints attribute gives info about the innermost signed content of a multi-layer message, where one content is encapsulated in another. this can be super useful if the signed data is itself encrypted ๐
C.3.9. Content Cross-Referencing ๐
when you're presenting signed data that relates to other signed data, it may be important to identify which signed data it relates to. the content-reference and content-identifier attributes, defined in ESS (RFC 2634 [5]), let you link a request message and a reply message in an exchange between two parties ๐
C.4. Components of Validation Data ๐งณ
C.4.1. Revocation Status Information ๐ต๏ธ
a verifier has to make sure that the signer's certificate was valid at the time of the signature. there are two ways to check this:
- using Certificate Revocation Lists (CRLs);
- using responses from an online certificate status server (for example, obtained through the OCSP protocol).
NOTE 1: the time of the signature may not be known, so time-stamping or time-marking MAY be used to show when it was known that the signature existed โณ
NOTE 2: when you're validating an electronic signature and checking revocation status information, if a "grace period" is required, it needs to be long enough for the involved authority to process a "last-minute" revocation request and for that request to propagate through the revocation system. this grace period gets added to the time included with the time-stamp token or the time-mark, so the revocation status information SHOULD be captured after the end of the grace period ๐ซถ
C.4.1.1. CRL Information ๐
when you're using CRLs to get revocation info, a verifier has to make sure they get, at the time of the first verification, the right certificate revocation information from the signer's CA. this SHOULD be done as soon as possible to keep the delay between generating and verifying the signature small. however, a "grace period" is REQUIRED so CAs have time to process revocation requests โฐ
for example, a revocation request might land at a CA just before the next CRL gets issued, and there may not be enough time to include the revised revocation status information. this means checking that the signer certificate serial number is NOT included in the CRL. the signer, the initial verifier, or a later verifier MAY obtain this CRL. if the signer gets it, it SHALL be conveyed to the verifier. it MAY be convenient to archive the CRL for easier later verification or arbitration ๐๏ธ or, as long as the CRL is archived somewhere it can be accessed for arbitration, the serial number of the CRL used MAY be archived together with the verified electronic signature as a CAdES-C form ๐งพ
even if the certificate serial number shows up in the CRL with the status "suspended" (i.e., on hold), the signature is not to be deemed valid, because a suspended certificate isn't supposed to be used even by its rightful owner ๐ โโ๏ธ
C.4.1.2. OCSP Information ๐ฐ๏ธ
when you're using OCSP to get revocation info, a verifier has to make sure they get, at the time of the first verification, an OCSP response that contains the status "valid". this SHOULD be done as soon as possible after the signature is generated, while still giving a "grace period" that's suitable enough for the involved authority to process a "last-minute" revocation request. the signer, the verifier, or any other third party MAY fetch this OCSP response. OCSP responses are transient and aren't archived by any TSP, including CA, so every verifier is responsible for making sure it's stored somewhere safe ๐ the simplest way is to store them with the electronic signature. another option is to store them somewhere they can be easily retrieved and then include references to them in the electronic signature itself as a CAdES-C form ๐
just like with CRLs, the certificate might be declared invalid but with the secondary status "suspended". in that case, the same comment as for the CRL applies ๐
C.4.2. Certification Path ๐ค๏ธ
a verifier may have to ascertain that the certification path was valid at the time of the signature, up to a trust point, according to the:
- naming constraints;
- certificate policy constraints;
- signature policy, when applicable.
since the time of the signature can't be known for sure, an upper limit of it SHOULD be used, as indicated by either the time-stamp or the time-mark โฑ๏ธ
in this case, you'll need to capture all the certificates from the certification path, starting with the signer's and ending with the self-signed certificate from one trusted root. when applicable, this MAY be specified as part of the Signature Policy. you'll also need to capture the Certificate Authority Revocation Lists (CARLs) to prove none of the CAs in the chain were revoked at the time of the signature. again, all of this material MAY be incorporated in the electronic signature (ES X forms). another option is to store this info so it can be easily retrieved, and then include references to it in the electronic signature itself as a CAdES-C form ๐งฉ
C.4.3. Time-Stamping for Long Life of Signatures ๐ฆ
an important property for long-standing signatures is that a signature, once it's been found valid, SHALL continue to be valid months or years later ๐
a signer, a verifier, or both MAY be required to provide, on request, proof that a digital signature was created or verified during the validity period of all the certificates in the certification path. in that case, the signer, verifier, or both will also need to prove that the signer's certificate and all the CA certificates used to form a valid certification path were not revoked when the signature was created or verified ๐
it would be quite unacceptable to call a signature invalid just because the keys or certificates were compromised later. so there's a real need to demonstrate that the signature keys were valid when the signature was created, to give long-term evidence of the signature's validity ๐ญ
it could be the case that a certificate was valid at the time of the signature but got revoked some time later. in this event, evidence SHALL be provided that the document was signed before the signing key was revoked. a Time-Stamping Authority (TSA) can provide that evidence โจ a time-stamp is obtained by sending the hash value of the given data to the TSA. the returned "time-stamp" is a signed document that contains the hash value, the identity of the TSA, and the time of stamping. this proves the given data existed before the time of stamping ๐ฐ๏ธ time-stamping a digital signature (by sending a hash of the signature to the TSA) before the signer's private key is revoked shows the signature was created before the certificate was revoked ๐ฅ
if a recipient wants to hold a valid electronic signature, they'll need to make sure they've got a valid time-stamp for it before that key (and any key involved in the validation) is revoked. the sooner the time-stamp is obtained after the signing time, the better ๐โโ๏ธ any time-stamp or time-mark taken after the expiration date of any certificate in the certification path has no value in proving the validity of a signature ๐
it's important to note that signatures MAY be generated "off-line" and time-stamped later by anyone, like the signer or any recipient who cares about the value of the signature ๐ the time-stamp can be provided by the signer along with the signed document, or the recipient can get it after receiving the signed document ๐ง
the time-stamp is NOT a component of the Basic Electronic Signature, but it is the essential component of the ES with Time ๐
it is REQUIRED, in the present document, that if a signer's digital signature value is to be time-stamped, the time-stamp token is issued by a trusted source, known as a Time-Stamping Authority ๐
the present document requires that the signer's digital signature value be time-stamped by a trusted source before the electronic signature can become an ES with Complete validation data. acceptable TSAs MAY be specified in a Signature Validation Policy ๐ซง
this technique is referred to as CAdES-C in the present document ๐
should both the signer and verifier be required to time-stamp the signature value to meet the requirements of the signature policy, the signature policy MAY specify a permitted time delay between the two time-stamps ๐
C.4.4. Time-Stamping for Long Life of Signature before CA Key Compromises ๐โจ
okay so this one is about protecting your signature in case a CA key ever gets compromised ๐ญ when there's a requirement to guard against that, you need time-stamped, extended electronic signatures. a verifier may be asked, on request, to prove that the certification path and the revocation information used at signing time were valid, even if one of the issuing keys or OCSP responder keys gets compromised later ๐ซฃ
the present document gives us two ways to use time-stamps against this compromise ๐
- time-stamp the ES with Complete validation data, when an OCSP response is used to get the status of the certificate from the signer (CAdES-X Type 1). this format works with an OCSP response, and it has the extra perk of integrity protection over the whole data ๐ฉท
- time-stamp only the certification path and revocation information references when a CRL is used to get the status of the certificate from the signer (CAdES-X Type2). this format is good for CRLs, since the time-stamped info may be reused for more than one signature (when signers have their certificates issued by the same CA and when signatures can be checked using the same CRLs) ๐ฆ
NOTE: The signer, verifier, or both may obtain the time-stamp. ๐ธ
C.4.4.1. Time-Stamping the ES with Complete Validation Data (CAdES-X Type 1) ๐
when an OCSP response is involved, you need to time-stamp that response specifically, in case the responder's key ever gets compromised ๐ the info in an OCSP response is user specific and time specific, so every signature received needs its own individual time-stamp ๐ค instead of only time-stamping the certification path references and revocation information references (which include the OCSP response), the time-stamp goes on the CAdES-C. since the certification path and revocation information references are part of the ES with Complete validation data, they get protected too ๐ก๏ธ for the same cryptographic cost, you get an integrity mechanism over the ES with Complete validation data, so any modification can be detected immediately ๐ it should be noticed that other ways of protecting or detecting the integrity of the ES with Complete validation data exist and could be used ๐ this technique does need a time-stamp for every signature, but it's a great fit for individual users who want an integrity-protected copy of all the validated signatures they've received ๐
by time-stamping the complete electronic signature, including the digital signature and the references to the certificates and revocation status information used to support validating that signature, the time-stamp makes sure there's no ambiguity about how that signature gets validated ๐
this technique is referred to as CAdES-X Type 1 in the present document. โจ
NOTE: Trust is achieved in the references by including a hash of the data being referenced. ๐ฅ
if you want to keep a copy of the additional data being referenced for any reason, that data may be attached to the electronic signature, and then the electronic signature becomes a CAdES-X Long Type 1, as defined by the present document ๐
a CAdES-X Long Type 1 is simply a CAdES-X Type 1 concatenated with a copy of the additional data being referenced. ๐ง
C.4.4.2. Time-Stamping Certificates and Revocation Information References (CAdES-X Type 2) ๐
time-stamping each ES with Complete validation data, like we just covered, may not be efficient, especially when the same set of CA certificates and CRL information is used to validate lots of signatures ๐ฉ
time-stamping CA certificates stops any attacker from issuing bogus CA certificates that could be claimed to have existed before the CA key was compromised ๐ซ any bogus time-stamped CA certificates will show that the certificate was created after the legitimate CA key was compromised. same energy with CA CRLs: time-stamping them stops any attacker from issuing bogus CA CRLs that could be claimed to exist before the CA key was compromised ๐ โโ๏ธ
time-stamping of commonly used certificates and CRLs can be done centrally, e.g., inside a company or by a service provider ๐ข this cuts down the amount of data the verifier has to time-stamp. for example, it could be reduced to just one time-stamp per day (i.e., in the case where all the signers use the same CA, and the CRL applies for the whole day) ๐ the thing that needs to be time-stamped isn't the actual certificates and CRLs, but the unambiguous references to those certificates and CRLs ๐ซถ
this technique is referred to as CAdES-X Type 2 in the present document and requires the following: ๐
- all the CA certificates references and revocation information references (i.e., CRLs) used in validating the CAdES-C are covered by one or more time-stamps.
so a CAdES-C with a time-stamp signature value at time T1 can be proved valid if all the CA and CRL references are time-stamped at time T1+. ๐ฏ
C.4.5. Time-Stamping for Archive of Signature ๐ฆ
okay, computers keep getting faster, which makes it more likely that algorithms can be broken and keys compromised ๐ฐ so there's a real requirement to protect electronic signatures against that possibility ๐ก๏ธ
over time, weaknesses can show up in the cryptographic algorithms used to create an electronic signature (e.g., due to the time available for cryptoanalysis, or improvements in cryptoanalytical techniques). before those weaknesses become likely, a verifier should take extra measures to keep the electronic signature valid ๐ท there are several techniques that could do this, depending on the nature of the weakened cryptography. to keep things simple, the present document uses a single technique called Archive validation data that covers all the cases โจ
Archive validation data is the validation data plus the complete certificate and revocation data, time-stamped together with the electronic signature ๐ฆ it's necessary if the hash function and the crypto algorithms used to create the signature are no longer secure. also, if it can't be assumed that the hash function used by the Time-Stamping Authority is secure, then nested time-stamps of the Archived Electronic Signature are required ๐
the potential for a Trusted Service Provider (TSP) key compromise should be significantly lower than user keys, because TSP(s) are expected to use stronger cryptography and better key protection ๐ช it can be expected that new algorithms (or old ones with greater key lengths) will be used. in that case, a sequence of time-stamps will protect against forgery ๐ each time-stamp needs to be affixed before either the compromise of the signing key or the cracking of the algorithms used by the TSA. TSAs (Time-Stamping Authorities) should have long keys (e.g., which at the time of drafting the present document was at least 2048 bits for the signing RSA algorithm) and/or a "good" or different algorithm ๐
nested time-stamps will also protect the verifier against key compromise, or against cracking the algorithm on the old electronic signatures ๐ช
the process will need to be performed and iterated before the cryptographic algorithms used for generating the previous time-stamp are no longer secure. archive validation data may thus carry multiple embedded time-stamps ๐ง
this technique is referred to as CAdES-A in the present document. ๐ฆ
C.4.6. Reference to Additional Data ๐
using CAdES-X Type 1 or CAdES-X Type 2 extended validation data, verifiers still need to keep track of all the components that were used to validate the signature, so they can retrieve them again later on ๐๏ธ these components may be archived by an external source, like a Trusted Service Provider. in that case, the referenced information provided as part of the ES with Complete validation data (CAdES-C) is good enough ๐ the actual certificates and CRL information reference in the CAdES-C can be gathered when needed for arbitration โ๏ธ
if references to additional data aren't adequate, then the actual values of all the certificates and revocation information required may be part of the electronic signature. this technique is referred to as CAdES-X Long Type 1 or CAdES-X Long Type 2 in the present document ๐
C.4.7. Time-Stamping for Mutual Recognition ๐ซถ
in some business scenarios, both the signer and the verifier need to time-stamp their own copy of the signature value ๐ค ideally, the two time-stamps should be as close to each other as possible โฑ๏ธ
EXAMPLE: A contract is signed by two parties, A and B,
representing their respective organizations; to time-stamp the
signer and verifier data, two approaches are possible:
- under the terms of the contract, a predefined common
"trusted" TSA may be used;
- if both organizations run their own time-stamping services, A
and B can have the transaction time-stamped by these two
time-stamping services.
in the second case, the electronic signature will only be considered valid if both time-stamps were obtained in due time (i.e., there should not be a long delay between obtaining the two time-stamps) โณ that way, neither A nor B can repudiate the signing time indicated by their own time-stamping service ๐ so A and B don't need to agree on a common "trusted" TSA to get a valid transaction ๐ฅ
it's important to note that signatures may be generated "off-line" and time-stamped at a later time by anyone, e.g., by the signer or any recipient interested in validating the signature ๐ฌ the time-stamp over the signature from the signer can therefore be provided by the signer together with the signed document, and/or be obtained by the verifier after receiving the signed document ๐
the business scenarios may thus dictate that one or more of the long-term signature time-stamping methods described above be used. this may be part of a mutually agreed Signature Validation Policy, which is part of an agreed signature policy under which digital signatures may be used to support the business relationship between the two parties ๐๐
C.4.8. TSA Key Compromise ๐
TSA servers should be built so that once the private signature key is installed, there's minimal likelihood of compromise for as long as possible ๐ฐ so the validity period for the TSA's keys should be as long as possible ๐ฐ๏ธ
both the CAdES-T and the CAdES-C contain at least one time-stamp over the signer's signature ๐๏ธ to protect against compromise of the private signature key used to produce that time-stamp, the Archive validation data can be used when a different Time-Stamping Authority key is involved in producing the additional time-stamp ๐ if it's believed that the TSA key used for an earlier time-stamp may ever be compromised (e.g., outside its validity period), then the CAdES-A should be used. for extremely long periods, this may be applied repeatedly using new TSA keys ๐
this technique is referred to as a nested CAdES-A in the present document. ๐ชโจ
C.5. Multiple Signatures ๐
okay so some electronic signatures are only valid if they have more than one signature on them ๐ซถ this is pretty much always the case when a contract gets signed by two parties. the order of the signatures might matter or might not, aka one might need to go on before the other, or it might not ๐คทโโ๏ธ
there are a few kinds of multiple and counter signatures that need to be supported, and they split into two main categories:
- independent signatures;
- embedded signatures.
independent signatures are parallel ๐ฆ the order doesn't matter at all. you SHOULD be able to have more than one independent signature over the same data. wait no, the original says "shall be provided", so the capability to have more than one independent signature over the same data shall be provided. โจ
embedded signatures get applied one after the other ๐ they're for when the order really does matter. the capability to sign over signed data shall be provided.
these forms are described in Section 5.13. ngl every other multiple signature setup, like a signed document with a countersignature, double countersignatures, or multiple signatures, can be reduced to one or more of the two cases above. it's giving simplification ๐ง
Annex D (Informative): Data Protocols to Interoperate with TSPs ๐ธ
D.1. Operational Protocols
signers and verifiers can use these protocols to talk to Trusted Service Providers while they're creating and validating electronic signatures. literally the friendly neighbourhood helpers ๐
D.1.1. Certificate Retrieval
user certificates, CA certificates, and cross-certificates can be pulled from a repository using the Lightweight Directory Access Protocol, as defined in RFC 3494 [RFC3494], with the schema defined in RFC 4523 [RFC4523]. ๐
D.1.2. CRL Retrieval
certificate revocation lists, including authority revocation lists and partial CRL variants, can also be fetched from a repository with the Lightweight Directory Access Protocol, as defined in RFC 3494 [RFC3494], with the schema defined in RFC 4523 [RFC4523]. same vibes as D.1.1, just for the revocation lists ๐
D.1.3. Online Certificate Status
instead of using certificate revocation lists, you can check a certificate's status using the Online Certificate Status Protocol (OCSP), as defined in RFC 2560 [3]. it's the quick-check option ๐
D.1.4. Time-Stamping
the time-stamping service can be accessed using the Time-Stamping Protocol defined in RFC 3161 [7]. โฐ
D.2. Management Protocols
signers and verifiers can use these management protocols to manage how their certificates get used. ๐
D.2.1. Request for Certificate Revocation
if you want a certificate revoked, you can make that request using the revocation request and response messages defined in RFC 4210 [RFC4210]. bye bye cert ๐ฅ
Annex E (Informative): Security Considerations ๐
E.1. Protection of Private Key
okay this one is SERIOUS bestie ๐ญ the security of the electronic signature mechanism in this document depends on the privacy of the signer's private key. full stop.
implementations should take steps to make sure private keys cannot be compromised. guard that key like it's your diary ๐๐
E.2. Choice of Algorithms
implementers should know that cryptographic algorithms get weaker over time ๐ฐ๏ธ as new cryptanalysis techniques show up and computers get faster, the work factor needed to break a given algorithm goes down. so cryptographic algorithm implementations should be modular, which lets new algorithms be dropped in easily. basically implementers should be ready for the set of mandatory-to-implement algorithms to change over time. no cap, nothing stays the same forever ๐ฆ
Annex F (Informative): Example Structured Contents and MIME ๐
F.1. Use of MIME to Encode Data
the signed content may be structured using MIME (Multipurpose Internet Mail Extensions -- RFC 2045 [6]). MIME was first built for internet email, but it has a bunch of features that make it great for a shared structure for encoding all kinds of electronic documents and other multimedia data, like photos and videos ๐ธ these features include:
- providing a means of signalling the type of "object" being carried (e.g., text, image, ZIP file, application data);
- providing a means of associating a file name with an object;
- associating several independent objects (e.g., a document and image) to form a multi-part object;
- handling data encoded in text or binary and, if necessary, re-encoding the binary as text.
when encoding a single object, MIME is made of:
- header information, followed by;
- encoded content.
this structure can be extended to support multi-part content. the more the merrier ๐ง
F.1.1. Header Information
a MIME header includes:
MIME Version information: e.g., MIME-Version: 1.0
content type information, which describes the content well enough to be shown to a user or handed to an application process, as needed. this covers the "media type" (e.g., text, image, audio) or whether the data is meant for a particular kind of application. for text, the content type also says which character set is used, e.g., Content-Type: text/plain; charset="us-ascii". ๐
content-encoding information, which says how the content is encoded (more on the encodings MIME supports below) ๐ค
other info about the content, like a description or an associated file name ๐๏ธ
here's an example MIME header for a text object:
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
and here's one for a binary file containing a pdf document:
Content-Type: application/pdf
Content-Transfer-Encoding: base64
Content-Description: JCFV201.pdf
Content-Disposition: filename="JCFV201.pdf"
F.1.2. Content Encoding
MIME supports a range of mechanisms for encoding both text and binary data. โจ
text data can be carried transparently as lines of text encoded in 7- or 8-bit ASCII characters. MIME also has a "quoted-printable" encoding that turns characters other than basic ASCII into an ASCII sequence. ๐ธ
binary can either be carried:
- transparently as 8-bit octets; or
- converted to a basic set of characters using a system called Base64.
NOTE: As there are some mail relays that can only handle 7-bit ASCII, Base64 encoding is usually used on the Internet. ๐
F.1.3. Multi-Part Content
several objects (e.g., text and a file attachment) can be linked together using a special "multi-part" content type. this is shown by the content type "multipart" with a string that marks the separation between each part. ๐งฉ
on top of a header for the overall multipart content, each part gets its own header info showing the inner content type and encoding.
here's an example of multipart content:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----
=_NextPart_000_01BC4599.98004A80"
Content-Transfer-Encoding: 7bit
------=_NextPart_000_01BC4599.98004A80
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Per your request, I've attached our proposal for the Java Card Version
2.0 API and the Java Card FAQ.
------=_NextPart_000_01BC4599.98004A80
Content-Type: application/pdf; name="JCFV201.pdf"
Content-Transfer-Encoding: base64
Content-Description: JCFV201.pdf
Content-Disposition: attachment; filename="JCFV201.pdf"
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAACAAAAAgAAAAA
AAAAAEAAAtAAAAAEAAAD+////AAAAAAMAAAAGAAAA//////////////////////////////
//////////AANhAAQAYg==
------=_NextPart_000_01BC4599.98004A80--
multipart content can be nested ๐ช so a set of linked objects (e.g., HTML text and images) can be handled as one single attachment to another object (e.g., text).
the Content-Type from each part of the S/MIME message tells you what type of content it is. ๐
F.2. S/MIME
the specific use of MIME to carry CMS data (extended as defined in this document) that's been secured is called S/MIME (see [RFC3851]). ๐
S/MIME carries electronic signatures in either of these two ways:
- an "application/pkcs7-mime" object with the CMS carried as a binary attachment (PKCS7 is the name of the early version of CMS).
the signed data may be included in the SignedData, which itself may be included in a single S/MIME object. see [RFC3851], Section 3.4.2: "Signing Using application/pkcs7-mime with SignedData" and Figure F.1 hereafter.
or
- a "multipart/signed" object with the signed data and the signature encoded as separate MIME objects.
the signed data is not included in the SignedData, and the CMS structure only includes the signature. see [RFC3851], Section 3.4.3: "Signing Using the multipart/signed Format" and Figure F.2 hereafter.
+-------------++----------++-------------++------------+
| || || || |
| S/MIME || CAdES || MIME || pdf file |
| || || || |
|Content-Type=||SignedData||Content-Type=||Dear MrSmith|
|application/ || eContent ||application/ ||Received |
|pkcs7-mime || ||pdf || 100 tins |
| || || || |
|smime-type= || /| || /| || Mr.Jones |
|signed-data || / -----+ / ------+ |
| || \ -----+ \ ------+ |
| || \| || \| |+------------+
| || |+-------------+
| |+----------+
+-------------+
Figure F.1: Signing Using application/pkcs7-mime
F.2.1. Using application/pkcs7-mime
this approach is pretty similar to handling signed data like any other binary file attachment ๐
here's an example of signed data encoded this way:
Content-Type: application/pkcs7-mime; smime-type=signed-data;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m
567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7
77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH
HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh
6YT64V0GhIGfHfQbnj75
F.2.2. Using application/pkcs7-signature ๐
okay so CMS has a second option too ๐ฆ this time the signature and the data it protects are separate MIME objects sitting together in one message. the signed data is NOT stuffed inside the SignedData, so the CMS bit only carries the signature ๐ for the full details, check out [RFC3851], Section 3.4.3: "Signing Using the multipart/signed Format" and Figure F.2 hereafter โจ
here's what an example of signed data using this approach looks like ๐ธ
Content-Type: multipart/signed;
protocol="application/pkcs7-signature";
micalg=sha1; boundary=boundary42
--boundary42
Content-Type: text/plain
This is a clear-signed message.
--boundary42
Content-Type: application/pkcs7-signature; name=smime.p7s
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7s
ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6
4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj
n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
7GhIGfHfYT64VQbnj756
--boundary42--
so with this second approach, the signed data goes through the CMS process and gets carried as one part of a multipart signed MIME structure, which is shown in Figure F.2 ๐ง the CMS structure just holds the electronic signature, that's it, that's the tea โ
+---------------++----------++-------------++------------+
| || || || |
| MIME || CAdES || MIME || pdf file |
| || || || |
|Content-Type= ||SignedData||Content-Type=||Dear MrSmith|
|multipart/ || ||application/ ||Received |
|signed || ||pdf || 100 tins |
| /| || || || |
| / -------------------+ /| || Mr.Jones |
| \ -------------------+ / -----+ |
| \| || || \ -----+ |
|Content-Type= || || \| |+------------+
|application/ || |+-------------+
|pdf || |
| || |
|Content-Type= || |
|application/ || |
|pkcs7-signature|| |
| || |
| /| || |
| / -------+ |
| \ -------+ |
| \| ||----------+
| |
+---------------+
Figure F.2: Signing Using application/pkcs7-signature
and the big win here ๐ฅ this second approach (multipart/signed) has the advantage that the signed data can be decoded by any MIME-compatible system, even if that system doesn't recognize CMS-encoded electronic signatures ๐ญ it's giving "everyone can read the letter, even the people who don't know the secret handshake" ๐
Annex G (Informative): Relationship to the European Directive and EESSI ๐ช๐บ
G.1. Introduction ๐ท
this annex is basically a little tour of how electronic signatures made under the present document connect to the requirements in the European Parliament and Council Directive on a Community framework for electronic signatures ๐
NOTE: Legal advice should be sought on the specific national legislation regarding use of electronic signatures.
the present document is one of a set of standards defined under the "European Electronic Signature Standardization Initiative" (EESSI) for electronic signature products and solutions compliant with the European Directive for Electronic Signatures ๐
G.2. Electronic Signatures and the Directive ๐งพ
the directive defines electronic signatures as:
- "data in electronic form which are attached to or logically associated with other electronic data and which serve as a method of authentication".
the directive says an electronic signature should not be denied "legal effectiveness and admissibility as evidence in legal proceedings" solely on the grounds that it is in electronic form ๐ฆ
the directive also says an electronic signature has equivalence to a hand-written signature if it meets specific criteria, which are:
- it is an "advanced electronic signature" with the following properties:
- a) it is uniquely linked to the signatory;
- b) it is capable of identifying the signatory;
- c) it is created using means that the signatory can maintain under his sole control; and
- d) it is linked to the data to which it relates in such a manner that any subsequent change of the data is detectable.
- it is based on a certificate that meets detailed criteria given in Annex I of the directive and is issued by a "certification-service-provider" that meets requirements given in Annex II of the directive. Such a certificate is referred to as a "qualified certificate";
- it is created by a "device", for which detailed criteria are given in Annex III of the directive. Such a device is referred to a "secure-signature-creation device".
this form of electronic signature is referred to as a "qualified electronic signature" in EESSI (see below) ๐
G.3. ETSI Electronic Signature Formats and the Directive ๐
an electronic signature created in accordance with the present document is:
- a) considered to be an "electronic signature" under the terms of the Directive;
- b) considered to be an "advanced electronic signature" under the terms of the Directive;
- c) considered to be a "Qualified Electronic Signature", provided the additional requirements in Annex I, II, and III of the Directive are met. The requirements in Annex I, II, and III of the Directive are outside the scope of the present document, and are subject to standardization elsewhere.
G.4. EESSI Standards and Classes of Electronic Signature ๐ง
G.4.1. Structure of EESSI Standardization ๐ธ
EESSI looks at standards in several areas. See the ETSI and CEN web sites for the latest list of standards and their versions ๐
- use of X.509 public key certificates as qualified certificates;
- security Management and Certificate Policy for CSPs Issuing Qualified Certificates;
- security requirements for trustworthy systems used by CSPs Issuing Qualified Certificates;
- security requirements for Secure Signature Creation Devices;
- security requirements for Signature Creation Systems;
- procedures for Electronic Signature Verification;
- electronic signature syntax and encoding formats;
- protocol to interoperate with a Time-Stamping Authority;
- Policy requirements for Time-Stamping Authorities; and
- XML electronic signature formats.
each of these standards covers a range of requirements, including the requirements of Qualified Electronic Signatures, as specified in Article 5.1 of the Directive ๐ however, some of them also address general requirements of electronic signatures for business and electronic commerce, which all fall into the category of Article 5.2 of the Directive. that variation can be identified either as different levels or different options ๐ซถ
G.4.2. Classes of Electronic Signatures ๐
since some of these standards cover a range of requirements, it may be useful to pick out a set of standards that addresses a specific business need. that set of standards and how they're used defines a class of electronic signature ๐ the first class already identified is the qualified electronic signature, which fulfils the requirements of Article 5.1 of the Directive โจ
a limited number of "classes of electronic signatures" and corresponding profiles could be defined in close cooperation with actors on the market (business, users, suppliers). the need for such standards is envisaged, in addition to those for qualified electronic signatures, in areas such as:
- different classes of electronic signatures with long-term validity;
- electronic signatures for business transactions with limited value.
G.4.3. Electronic Signature Classes and the ETSI Electronic Signature Format ๐ฆ
the electronic signature format defined in the present document is applicable to the EESSI area "electronic signature and encoding formats" ๐ท
an electronic signature produced by a signer (see Section 5 and conformance Section 10.1) is applicable to the proposed class of electronic signature: "qualified electronic signatures fulfilling article 5.1" ๐ฅ
with the addition of attributes by the verifier (see Section 6 and conformance Section 10.2), the qualified electronic signature supports long-term validity โญ
Annex H (Informative): APIs for the Generation and Verification of Electronic Signatures Tokens ๐งโโ๏ธ
while the present document describes the data format of an electronic signature, the question is whether there exist APIs (Application Programming Interfaces) able to manipulate these structures ๐ at least two such APIs have been defined: one set by the IETF and another set by the OMG (Object Management Group) ๐
H.1. Data Framing ๐
okay bestie, so before either of these APIs can touch the signature data, we need to wrap it in a mechanism-independent token format. ๐ [RFC2743] Section 3.1 is the one that sets up this wrapper for the first token in a GSS-API context establishment sequence. It includes an identifier for the mechanism type on that context, so the token can be read unambiguously โจ
Every electronic signature data format defined in this document shall be framed following that description, or it won't be processable by these APIs ๐
The token tag's encoding comes from ASN.1 and DER, but it's written straight in octets instead of at the ASN.1 level. That makes it easier to implement interoperably without needing general ASN.1 processing code ๐ง The token tag has these elements, in order:
0x60is the tag for the RFC 2743 SEQUENCE. It means the constructed form with a definite length encoding comes next. ๐- The token-length octets say how long everything after them is. That covers elements 3 to 5 below plus the mechanism-defined token object after the tag. This part can be a variable number of octets:
- a) If the value is less than 128, it fits in one octet. Bit 8 (the high-order bit) is
0, and the other bits hold the value. - b) If the value is 128 or more, it takes two or more octets. Bit 8 of the first octet is
1, and the remaining bits of that first octet say how many more octets follow. The following octets carry the value, 8 bits each, with the most significant digit first. The minimum number of octets shall be used to encode the length, so no octets representing leading zeros shall be included in the length encoding. ๐ธ
- a) If the value is less than 128, it fits in one octet. Bit 8 (the high-order bit) is
0x06is the tag for OBJECT IDENTIFIER. ๐ฆ- The object identifier length is the number of octets in the encoded object identifier from element 5. It's encoded using the rules in 2a) and 2b) above. ๐
- The object identifier octets are a variable number of octets, encoded using ASN.1 BER rules:
- The first octet is the sum of two values: ๐ฅ
- the top-level object identifier component multiplied by 40 (decimal), and
- the second-level object identifier component.
- The first octet is the sum of two values: ๐ฅ
This is the only spot in an object identifier encoding where one octet holds more than one component. ๐
- Any following octets encode the successively lower components of the object identifier. A component can span multiple octets. It uses 7 bits per octet (most significant bits first), and bit 8 is set to
1on every octet except the final one for that component. The minimum number of octets shall be used to encode each component, so no octets representing leading zeros shall be included in a component's encoding. โญ
NOTE: In many implementations, elements 3 to 5 may be stored and referenced as a contiguous string constant. ๐ซถ
The token tag is followed right away by a mechanism-defined token object. There's no separate size specifier between the object identifier value and that token object, so don't go looking for one ๐
Tokens that conform to this document shall have the following OID in order to be processable by IDUP-APIs:
id-etsi-es-IDUP-Mechanism-v1 OBJECT IDENTIFIER ::=
{ itu-t(0) identified-organization(4) etsi(0)
electronic-signature-standard (1733) part1 (1) IDUPMechanism (4)
etsiESv1(1) }
H.2. IDUP-GSS-APIs Defined by the IETF ๐
The IETF CAT WG put out an RFC in December 1998 called IDUP-GSS-API (Independent Data Unit Protection). It's [RFC2479] ๐ง It can handle the electronic signature data format defined in this document. ๐
IDUP-GSS-API includes support for non-repudiation services. ๐
It supports evidence generation and evidence verification. "Evidence" means information that, either alone or combined with other information, establishes proof about an event or action. โจ
IDUP supports several types of evidence. This document supports all of the IDUP types through the commitment-type parameter. ๐
Section 2.3.3 of IDUP describes the specific calls for handling evidence, called "EV" calls. The "EV" group gives a simple, high-level interface to the underlying IDUP mechanisms. It's for when an application only needs to deal with evidence, not with encryption or integrity services. ๐ฆ
All generation and verification is done according to the contents of an NR policy referenced in the context. ๐
Get_token_details returns the attributes for a given input token to an application. IDUP-GSS-API tokens are meant to stay opaque to the calling application. This call lets the application learn about the token without breaking that opaqueness. The most important attribute is the mechanism type. The application can pass it to the IDUP_Establish_Env() call to set up the right environment for processing the token. ๐ง
Generate_token generates a non-repudiation token using the current environment. ๐ธ
Verify_evidence verifies the evidence token using the current environment. It returns a major_status code that shows whether the token's evidence is complete, meaning it can still be successfully verified (perhaps years) later. ๐ฐ๏ธ If the token's evidence isn't complete, the token can be passed to another API, form_complete_PIDU, to finish it. This happens when the status "conditionally valid" comes back. That status corresponds to the status "validation incomplete" in this document. ๐
Form_Complete_PIDU is mainly used when the evidence token doesn't contain all the data needed to verify it. Some of the data that isn't stored in the token might become unavailable between when the token is generated and when it's verified. This call gathers the missing information and adds it to the token, so verification can be guaranteed to work at any future time. ๐ฅ
H.3. CORBA Security Interfaces Defined by the OMG ๐
Non-repudiation interfaces are defined in "CORBA Security", a document produced by the OMG (Object Management Group). They're written in IDL (Interface Definition Language) and are optional. ๐
Tokens supporting non-repudiation are handled through these interfaces:
set_NR_featuresspecifies the features to apply to future evidence generation and verification operations; ๐ทget_NR_featuresreturns the features that will be applied to future evidence generation and verification operations; ๐ผgenerate_tokengenerates a non-repudiation token using the current non-repudiation features; ๐ซงverify_evidenceverifies the evidence token using the current non-repudiation features; ๐get_tokens_detailsreturns information about an input non-repudiation token. The information returned depends on the type of token; ๐งพform_complete_evidenceis used when the evidence token doesn't contain all the data needed to verify it, and some of that data might become unavailable between generation and verification unless it's stored in the token. Theform_complete_evidenceoperation gathers the missing information and includes it in the token so that verification can be guaranteed at any future time. ๐
NOTE: The similarity between the two sets of APIs is noticeable. ๐ฏโโ๏ธ
Annex I (Informative): Cryptographic Algorithms ๐ง
[RFC3370] [10] describes the conventions for using several cryptographic algorithms with the Cryptographic Message Syntax (CMS). ๐ Only the hashing and signing algorithms are appropriate for use with this document. โจ
Since RFC 3370 [10] was published, MD5 has been broken. It's no longer considered appropriate, so it has been deleted from the list of algorithms. ๐
I.1. Digest Algorithms ๐
I.1.1. SHA-1 ๐ฆ
The SHA-1 digest algorithm is defined in FIPS Pub 180-1. The algorithm identifier for SHA-1 is: ๐
sha-1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) oiw(14)
secsig(3) algorithm(2) 26 }
The AlgorithmIdentifier parameters field is optional. If it's present, the parameters field shall contain an ASN.1 NULL. Implementations should accept SHA-1 AlgorithmIdentifiers with absent parameters as well as NULL parameters. Implementations should generate SHA-1 AlgorithmIdentifiers with NULL parameters. ๐ซถ
I.1.2. General
Okay bestie, time for the digest lineup ๐ (aka hash functions, the grown-up name) and every single one of these is a whole vibe ๐ฅ
- ISO/IEC 10118-1 (1994) [ISO10118-1]: "Information technology - Security techniques - Hash-functions - Part 1: General". ISO/IEC 10118-1 is the starter pack ๐ธ It contains definitions and describes basic concepts.
- ISO/IEC 10118-2 (1994) [ISO10118-2]: "Information technology - Security techniques - Hash-functions - Part 2: Hash-functions using an n-bit block cipher algorithm". ISO/IEC 10118-2 specifies two ways to build a hash-function out of a block cipher ๐ง
- ISO/IEC 10118-3 (1997) [ISO10118-3]: "Information technology - Security techniques - Hash-functions - Part 3: Dedicated hash-functions". ISO/IEC 10118-3 specifies these dedicated hash-functions:
- SHA-1 (FIPS 180-1);
- RIPEMD-128;
- RIPEMD-160.
- ISO/IEC 10118-4 (1998) [ISO10118-4]: "Information technology - Security techniques - Hash-functions - Part 4: Hash-functions using modular arithmetic". Math girl era ๐ฆ
- RFC 1320 (PS 1992): "The MD4 Message-Digest Algorithm". RFC 1320 specifies the hash-function MD4. Honestly? MD4 is considered outdated now ๐
- RFC 1321 (I 1992): "The MD5 Message-Digest Algorithm". RFC 1321 (informational) specifies the hash-function MD5. Today, MD5 is not recommended for new implementations ๐
- FIPS Publication 180-1 (1995): "Secure Hash Standard". FIPS 180-1 specifies the Secure Hash Algorithm (SHA), a dedicated hash-function developed for use with the DSA. The original SHA, published in 1993, got a slight glow-up in 1995 and was renamed SHA-1 โจ
- ANSI X9.30-2 (1997) [X9.30-2]: "Public Key Cryptography for the Financial Services Industry - Part 2: The Secure Hash Algorithm (SHA-1)". X9.30-2 specifies the ANSI-Version of SHA-1 ๐
- ANSI X9.31-2 (1996) [X9.31-2]: "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 2: Hash Algorithms". X9.31-2 specifies hash algorithms ๐
I.2. Digital Signature Algorithms
I.2.1. DSA
Okay the DSA signature algorithm is defined in FIPS Pub 186 ๐ DSA is always used with the SHA-1 message digest algorithm, no exceptions, no drama. The algorithm identifier for DSA is:
id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
x9-57 (10040) x9cm(4) 3 }
The AlgorithmIdentifier parameters field shall not be present ๐ซถ
I.2.2. RSA
The RSA signature algorithm is defined in [RFC3447] ๐ฅ RFC 3370 [10] specifies how to use the RSA signature algorithm with the SHA-1 algorithm. The algorithm identifier for RSA with SHA-1 is:
Sha1WithRSAEncryption OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 5 }
NOTE: RFC 3370 [10] recommends that MD5 not be used for new implementations ๐
I.2.3. General
Here's the rest of the digital signature lineup, the whole squad ๐ The following is a selection of work that has been done in the area of digital signature mechanisms:
- FIPS Publication 186 (1994): "Digital Signature Standard". NIST's Digital Signature Algorithm (DSA) is a variant of ElGamal's Discrete Logarithm-based digital signature mechanism. The DSA requires a 160-bit hash-function and mandates SHA-1 ๐
- IEEE P1363 (2000) [P1363]: "Standard Specifications for Public-Key Cryptography". IEEE P1363 contains mechanisms for digital signatures, key establishment, and encipherment based on three families of public key schemes:
- "Conventional" Discrete Logarithm (DL)-based techniques, i.e., Diffie-Hellman (DH) key agreement, Menezes-Qu-Vanstone (MQV) key agreement, the Digital Signature Algorithm (DSA), and Nyberg-Rueppel (NR) digital signatures;
- Elliptic Curve (EC)-based variants of the DL-mechanisms specified above, i.e., EC-DH, EC-MQV, EC-DSA, and EC-NR. For elliptic curves, implementation options include mod p and characteristic 2 with polynomial or normal basis representation;
- Integer Factoring (IF)-based techniques, including RSA encryption, RSA digital signatures, and RSA-based key transport.
- ISO/IEC 9796-2 (1997) [ISO9796-2]: "Information technology - Security techniques - Digital signature schemes giving message recovery - Part 2: Mechanisms using a hash-function". ISO/IEC 9796-2 specifies digital signature mechanisms with partial message recovery that are also based on the RSA technique but make use of a hash-function ๐ฆ
- ISO/IEC 9796-4 (1998) [ISO9796-4]: "Digital signature schemes giving message recovery - Part 4: Discrete logarithm based mechanisms". ISO/IEC 9796-4 specifies digital signature mechanisms with partial message recovery that are based on Discrete Logarithm techniques. The document includes the Nyberg-Rueppel scheme โจ
- ISO/IEC 14888-1 [ISO14888-1]: "Digital signatures with appendix - Part 1: General". ISO/IEC 14888-1 contains definitions and describes the basic concepts of digital signatures with appendix ๐ธ
- ISO/IEC 14888-2 [ISO14888-2]: "Digital signatures with appendix - Part 2: Identity-based mechanisms". ISO/IEC 14888-2 specifies digital signature schemes with appendix that make use of identity-based keying material. The document includes the zero-knowledge techniques of Fiat-Shamir and Guillou-Quisquater ๐ง
- ISO/IEC 14888-3 [ISO14888-3]: "Digital signatures with appendix - Part 3: Certificate-based mechanisms". ISO/IEC 14888-3 specifies digital signature schemes with appendix that make use of certificate-based keying material. The document includes five schemes:
- DSA;
- EC-DSA, an elliptic curve-based analog of NIST's Digital Signature Algorithm;
- Pointcheval-Vaudeney signatures;
- RSA signatures;
- ESIGN.
- ISO/IEC 15946-2 (2002) [ISO15946-2]: "Cryptographic techniques based on elliptic curves - Part 2: Digital signatures", specifies digital signature schemes with appendix using elliptic curves. The document includes two schemes:
- EC-DSA, an elliptic curve-based analog of NIST's Digital Signature Algorithm;
- EC-AMV, an elliptic curve-based analog of the Agnew-Muller-Vanstone signature algorithm.
- ANSI X9.31-1 (1997) [X9.31-1]: "Public Key Cryptography Using Reversible Algorithms for the Financial Services Industry - Part 1: The RSA Signature Algorithm". ANSI X9.31-1 specifies a digital signature mechanism with appendix using the RSA public key technique ๐
- ANSI X9.30-1 (1997) [X9.30-1]: "Public Key Cryptography Using Irreversible Algorithms for the Financial Services Industry - Part 1: The Digital Signature Algorithm (DSA)". ANSI X9.30-1 specifies the DSA, NIST's Digital Signature Algorithm ๐
- ANSI X9.62 (1998) [X9.62]: "Public Key Cryptography for the Financial Services Industry - The Elliptic Curve Digital Signature Algorithm (ECDSA)". ANSI X9.62 specifies the Elliptic Curve Digital Signature Algorithm, an analog of NIST's Digital Signature Algorithm (DSA) using elliptic curves. The appendices provide tutorial information on the underlying mathematics for elliptic curve cryptography and give many examples ๐ซถ
Annex J (Informative): Guidance on Naming
J.1. Allocation of Names
Okay, the subject name shall be allocated through a registration scheme administered through a Registration Authority (RA) to ensure uniqueness ๐ This RA may be an independent body or a function carried out by the Certification Authority.
In addition to ensuring uniqueness, the RA shall verify that the name allocated properly identifies the applicant and that authentication checks are carried out to protect against masquerade ๐ฅ
The name allocated by an RA is based on registration information provided by, or relating to, the applicant (e.g., his personal name, date of birth, residence address) and information allocated by the RA. Three variations commonly exist:
- the name is based entirely on registration information, which uniquely identifies the applicant (e.g., "Pierre Durand (born on) July 6, 1956");
- the name is based on registration information, with the addition of qualifiers added by the registration authority to ensure uniqueness (e.g., "Pierre Durand 12");
- the registration information is kept private by the registration authority and the registration authority allocates a "pseudonym" ๐ฆ
J.2. Providing Access to Registration Information
Under certain circumstances, it may be necessary for information used during registration, but not published in the certificate, to be made available to third parties (e.g., to an arbitrator to resolve a dispute or for law enforcement). This registration information is likely to include personal and sensitive information ๐
Thus, the RA needs to establish a policy for:
- whether the registration information should be disclosed;
- to whom such information should be disclosed;
- under what circumstances such information should be disclosed.
This policy may be different whether the RA is being used only within a company or for public use. The policy will have to take into account national legislation and in particular any data protection and privacy legislation ๐ธ
Currently, the provision of access to registration is a local matter for the RA. However, if open access is required, standard protocols, such as HTTP -- RFC 2068 (Internet Web Access Protocol), may be employed with the addition of security mechanisms necessary to meet the data protection requirements (e.g., Transport Layer Security -- RFC 4346 [RFC4346]) with client authentication ๐ง
J.3. Naming Schemes
J.3.1. Naming Schemes for Individual Citizens โจ
okay so sometimes the subject name in a public key certificate just isn't specific enough ๐ฅบ two people can share the same name (homonyms), or someone might go by a pseudonym. adding more attributes would help tell them apart, BUT stuffing more info into a certificate that sits in a public repository goes straight against the privacy protection requirements ๐ โโ๏ธ
the Registration Authority does learn more stuff at registration time, but not all of it ends up in the certificate. to balance these two opposite needs, the hash values of some extra attributes can go in the certificate instead ๐ซถ when the certificate owner provides those attributes, they can be verified. biometric attributes can unambiguously identify a person ๐ญ examples include a picture or a manual signature from the certificate owner ๐ธ
NOTE: hashing only protects privacy if the possible inputs are big enough ๐ hashing someone's social security number usually isn't enough, because it can be reversed really easily.
a picture works if the verifier already met the person and later wants to check that the certificate they received belongs to that same person ๐ at the first exchange, the picture is sent, and the hash in the certificate can be used by the verifier to confirm it's the right person. at the next exchange, the picture doesn't need to be sent again ๐
a manual signature can work if the verifier already received a signed document beforehand โ๏ธ at the first exchange, the drawing of the manual signature is sent, and the hash in the certificate can be used to verify it's the right manual signature. next time, the manual signature doesn't need to be sent again ๐ธ
J.3.2. Naming Schemes for Employees of an Organization ๐ผ
okay so an employee's name inside an organization is probably some mix of the organization's name and the employee's identifier within it ๐ง
an organization name is usually a registered name, meaning the business or trading name used in day-to-day business ๐ a Naming Authority registers it, and that Naming Authority guarantees the registered name is unambiguous and can't be confused with another organization ๐
if you want more info about a given registered organization name, you have to go back to a publicly available directory maintained by the Naming Authority ๐
the identifier can be a name or a pseudonym (like a nickname or an employee number) ๐ when it's a name, it's supposed to be descriptive enough to unambiguously identify the person. when it's a pseudonym, the certificate doesn't reveal who the person is. however, it does ensure the person was correctly authenticated at registration, so they may be eligible for certain advantages that are implicitly or explicitly obtained by having the certificate ๐ฅ either way, this can still be insufficient because of homonyms ๐ฌ
putting more attributes in the certificate could fix that, like the person's organization unit or the name of the city where their office is ๐ข BUT the more info you cram into the certificate, the more problems pop up if the organization structure or place of work changes, so this might not be the best solution ๐ an alternative is to provide more attributes (like organization unit and place of work) through access to a directory the company maintains ๐๏ธ it's likely that the Registration Authority got more info at registration than what ended up in the certificate, if that extra info is placed in a repository that's accessible only to the organization ๐
Acknowledgments ๐ซถ
Special thanks to Russ Housley for reviewing the document ๐
Authors' Addresses ๐ฆ
Denis Pinkas
Bull SAS
Rue Jean-Jaures
78340 Les Clayes sous Bois CEDEX
FRANCE
EMail: Denis.Pinkas@bull.net
Nick Pope
Thales eSecurity
Meadow View House
Long Crendon
Aylesbury
Buck
HP18 9EQ
United Kingdom
EMail: nick.pope@thales-esecurity.com
John Ross
Security & Standards Consultancy Ltd
The Waterhouse Business Centre
2 Cromer Way
Chelmsford
Essex
CM1 2QE
United Kingdom
EMail: ross@secstan.com
Full Copyright Statement ยฉ๏ธ
Copyright (C) The IETF Trust (2008). โจ
okay so this document is subject to the rights, licenses and restrictions in BCP 78, and except as stated there, the authors keep all their rights ๐
this document and the info in it are provided on an "AS IS" basis, and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ๐
Intellectual Property ๐ง
ngl this part is all about who owns what ๐ the IETF takes no position on the validity or scope of any Intellectual Property Rights or other rights that someone might claim to cover the implementation or use of the technology in this document, or on whether any license under those rights might or might not be available. it also doesn't claim to have made any independent effort to identify such rights. info on the procedures for rights in RFC documents can be found in BCP 78 and BCP 79 ๐
copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, or the result of an attempt to get a general license or permission to use such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr ๐
the IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology required to implement this standard ๐ just send the info to ietf-ipr@ietf.org ๐
๐ฆ where this page comes from
- ietf: rfc5126 2008-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms