RFC 9216: S/MIME Example Keys and Certificates
- D. K. Gillmor, Ed.
Abstract
The S/MIME development community benefits from sharing samples of signed or encrypted data. This document facilitates such collaboration by defining a small set of X.509v3 certificates and keys for use when generating such samples.¶
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
The S/MIME ([RFC8551]) development
community, in particular the email development community, benefits from
sharing samples of signed and/or encrypted data. Often, the exact key
material used does not matter because the properties being tested
pertain to implementation correctness, completeness, or interoperabilit
This document defines a small set of X.509v3 certificates ([RFC5280]) and secret keys for use when generating or operating on such samples.¶
An example RSA Certification Authority is supplied, and sample RSA certificates are provided for two "personas", Alice and Bob.¶
Additionally, an Ed25519 ([RFC8032]) Certification Authority is supplied, along with sample Ed25519 certificates for two more "personas", Carlos and Dana.¶
This document focuses narrowly on functional, well-formed identity
and key material. It is a starting point that other documents can use
to develop sample signed or encrypted messages, test vectors, or other
artifacts for improved interoperabilit
1.1. Terminology
- "Certification Authority" (or "CA"):
- a party capable of issuing X.509 certificates¶
- "End Entity" (or "EE"):
- a party that is capable of using X.509 certificates (and their corresponding secret key material)¶
- "Mail User Agent" (or "MUA"):
- a program that generates or handles email messages ([RFC5322])¶
1.2. Prior Work
[RFC4134] contains some sample certificates as well as messages of various S/MIME formats. That older work has unacceptably old algorithm choices that may introduce failures when testing modern systems: in 2019, some tools explicitly marked 1024-bit RSA and 1024-bit DSS as weak.¶
This earlier document also does not use the now widely accepted
Privacy
It also includes examples of messages and other structures that are greater in ambition than this document intends to be.¶
[RFC8410] includes an example X25519 certificate that is certified with Ed25519, but it appears to be self issued, and it is not directly useful in testing an S/MIME-capable MUA.¶
2. Background
2.1. Certificate Usage
These X.509 certificates ([RFC5280]) are designed for use with S/MIME protections ([RFC8551]) for email ([RFC5322]).¶
In particular, they should be usable with signed and encrypted messages as part of test suites and interoperabilit
All end-entity and intermediate CA certificates are marked with Certificate Policies from [TEST-POLICY] indicating that they are intended only for use in testing environments.
End-entity certificates are marked with policy 2
2.2. Certificate Expiration
The certificates included in this document expire in 2052. This should be sufficiently far in the future that they will be useful for a few decades. However, when testing tools in the far future (or when playing with clock-skew scenarios), care should be taken to consider the certificate validity window.¶
Due to this lengthy expiration window, these certificates will not be particularly useful to test or evaluate the interaction between certificate expiration and protected messages.¶
2.3. Certificate Revocation
Because these are expected to be used in test suites or examples, and we do not expect there to be online network services in these use cases, we do not expect these certificates to produce any revocation artifacts.¶
As a result, none of the certificates include either an Online Certificate Status Protocol (OCSP)
indicator (see id-ad-ocsp as defined in the Authority
Information Access X.509 extension in Section 4.2.2.1 of [RFC5280]) or a Certificate Revocation List (CRL)
indicator (see the CRL Distribution Points X.509 extension as defined
in Section 4.2.1.13 of [RFC5280]).¶
2.4. Using the CA in Test Suites
To use these end-entity certificates in a piece of software (for example, in a test suite or an interoperabilit
Note that some tooling behaves differently for certificates validated by "locally installed root CAs" than for pre-installed "system-level" root CAs). For example, many common implementations of HTTP Public Key Pinning (HPKP) ([RFC7469]) only applied the designed protections when dealing with a certificate issued by a pre-installed "system-level" root CA and were disabled when dealing with a certificate issued by a "locally installed root CA".¶
To test some tooling specifically, it may be necessary to install the root CA as a "system-level" root CA.¶
2.5. Certificate Chains
In most real-world examples, X.509 certificates are deployed with a chain of more than one X.509 certificate. In particular, there is typically a long-lived root CA that users' software knows about upon installation, and the end-entity certificate is issued by an intermediate CA, which is in turn issued by the root CA.¶
The example end-entity certificates in this document can be used either with a simple two-link certificate chain (they are directly certified by their corresponding root CA) or in a three-link chain.¶
For example, Alice's encryption certificate (alice; see Section 4.3) can be validated by a peer that directly trusts the example RSA CA's root cert (ca.rsa.crt; see Section 3.1):¶
And it can also be validated by a peer that only directly trusts the example Ed25519 CA's
root cert (ca.25519.crt; see Section 6.1) via an
intermediate cross-signed CA cert (ca.rsa.cross.crt; see Section 3.3):¶
By omitting the cross-signed CA certs, it should be possible to test a "transvalid" certificate (an end-entity certificate that is supplied without its intermediate certificate) in some configurations.¶
2.6. Passwords
Each secret key presented in this document is represented as a PEM-encoded PKCS #8 ([RFC5958]) object in cleartext form (it has no password).¶
As such, the secret key objects are not suitable for verifying interoperable password protection schemes.¶
However, the PKCS #12 ([RFC7292]) objects do have simple textual passwords, because tooling for dealing with passwordless PKCS #12 objects is underdeveloped at the time of this document.¶
2.7. Secret Key Origins
The secret RSA keys in this document are all deterministical
The secret Ed25519 and X25519 keys in this document are all derived by hashing a simple string. The seeds and their derivation are included in the document for informational purposes and to allow recreation of the objects from appropriate tooling.¶
All RSA seeds used are 224 bits long (the first 224 bits of the SHA-256 digest of the origin string) and are represented in hexadecimal.¶
3. Example RSA Certification Authority
The example RSA Certification Authority has the following information:¶
- Name:
-
Sample LAMPS RSA Certification Authority¶
3.1. RSA Certification Authority Root Certificate
This certificate is used to verify certificates issued by the example RSA Certification Authority.¶
3.3. RSA Certification Authority Cross-Signed Certificate
If an email client only trusts the Ed25519 Certification Authority Root Certificate found in Section 6.1, they can use this intermediate CA certificate to verify any end-entity certificate issued by the example RSA Certification Authority.¶
4. Alice's Sample Certificates
Alice has the following information:¶
4.1. Alice's Signature Verification End-Entity Certificate
This certificate is used for verification of signatures made by Alice.¶
4.2. Alice's Signing Private Key Material
This private key material is used by Alice to create signatures.¶
This secret key was generated using provable prime generation found
in [FIPS186-4] using the seed
92c89d4330d3d8e3.
This seed is the first 224 bits of the SHA-256 ([SHA]) digest of the string
draft.¶
4.3. Alice's Encryption End-Entity Certificate
This certificate is used to encrypt messages to Alice.¶
4.4. Alice's Decryption Private Key Material
This private key material is used by Alice to decrypt messages.¶
This secret key was generated using provable prime generation found in [FIPS186-4] using the seed 1cf74849f7445f46.
This seed is the first 224 bits of the SHA-256 ([SHA]) digest of the string draft.¶
5. Bob's Sample
Bob has the following information:¶
5.1. Bob's Signature Verification End-Entity Certificate
This certificate is used for verification of signatures made by Bob.¶
5.2. Bob's Signing Private Key Material
This private key material is used by Bob to create signatures.¶
This secret key was generated using provable prime generation found
in [FIPS186-4] using the seed
f4afaacbb5473f36.
This seed is the first 224 bits of the SHA-256 ([SHA]) digest of the string
draft.¶
5.3. Bob's Encryption End-Entity Certificate
This certificate is used to encrypt messages to Bob.¶
5.4. Bob's Decryption Private Key Material
This private key material is used by Bob to decrypt messages.¶
This secret key was generated using provable prime generation found
in [FIPS186-4] using the seed
98c8998652958929.
This seed is the first 224 bits of the SHA-256 ([SHA]) digest of the string
draft.¶
6. Example Ed25519 Certification Authority
The example Ed25519 Certification Authority has the following information:¶
- Name:
-
Sample LAMPS Ed25519 Certification Authority¶
6.1. Ed25519 Certification Authority Root Certificate
This certificate is used to verify certificates issued by the example Ed25519 Certification Authority.¶
6.3. Ed25519 Certification Authority Cross-Signed Certificate
If an email client only trusts the RSA Certification Authority Root Certificate found in Section 3.1, they can use this intermediate CA certificate to verify any end-entity certificate issued by the example Ed25519 Certification Authority.¶
7. Carlos's Sample Certificates
Carlos has the following information:¶
7.1. Carlos's Signature Verification End-Entity Certificate
This certificate is used for verification of signatures made by Carlos.¶
7.2. Carlos's Signing Private Key Material
This private key material is used by Carlos to create signatures.¶
This secret key is the SHA-256 ([SHA]) digest of the ASCII string draft.¶
7.3. Carlos's Encryption End-Entity Certificate
This certificate is used to encrypt messages to Carlos.
It contains an SMIMECapabiliti
7.4. Carlos's Decryption Private Key Material
This private key material is used by Carlos to decrypt messages.¶
This secret key is the SHA-256 ([SHA]) digest of the ASCII string
draft.¶
8. Dana's Sample Certificates
Dana has the following information:¶
8.1. Dana's Signature Verification End-Entity Certificate
This certificate is used for verification of signatures made by Dana.¶
8.2. Dana's Signing Private Key Material
This private key material is used by Dana to create signatures.¶
This secret key is the SHA-256 ([SHA]) digest of the ASCII string
draft.¶
8.3. Dana's Encryption End-Entity Certificate
This certificate is used to encrypt messages to Dana. It contains
an SMIMECapabiliti
8.4. Dana's Decryption Private Key Material
This private key material is used by Dana to decrypt messages.¶
This seed is the SHA-256 ([SHA]) digest of the ASCII string draft.¶
9. Security Considerations
The keys presented in this document should be considered compromised and insecure, because the secret key material is published and therefore not secret.¶
Any application that maintains a deny list of invalid key material should include these keys in its list.¶
10. IANA Considerations
This document has no IANA actions.¶
11. References
11.1. Normative References
- [RFC5280]
-
Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10
.17487 , , <https:///RFC5280 www >..rfc -editor .org /info /rfc5280 - [RFC5958]
-
Turner, S., "Asymmetric Key Packages", RFC 5958, DOI 10
.17487 , , <https:///RFC5958 www >..rfc -editor .org /info /rfc5958 - [RFC7292]
-
Moriarty, K., Ed., Nystrom, M., Parkinson, S., Rusch, A., and M. Scott, "PKCS #12: Personal Information Exchange Syntax v1.1", RFC 7292, DOI 10
.17487 , , <https:///RFC7292 www >..rfc -editor .org /info /rfc7292 - [RFC7468]
-
Josefsson, S. and S. Leonard, "Textual Encodings of PKIX, PKCS, and CMS Structures", RFC 7468, DOI 10
.17487 , , <https:///RFC7468 www >..rfc -editor .org /info /rfc7468 - [RFC8032]
-
Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, DOI 10
.17487 , , <https:///RFC8032 www >..rfc -editor .org /info /rfc8032 - [RFC8479]
-
Mavrogiannopoulo
s, , "Storing Validation Parameters in PKCS#8", RFC 8479, DOI 10N. .17487 , , <https:///RFC8479 www >..rfc -editor .org /info /rfc8479 - [RFC8551]
-
Schaad, J., Ramsdell, B., and S. Turner, "Secure
/Multipurpose , RFC 8551, DOI 10Internet Mail Extensions (S/MIME) Version 4.0 Message Specification" .17487 , , <https:///RFC8551 www >..rfc -editor .org /info /rfc8551
11.2. Informative References
- [FIPS186-4]
-
National Institute of Standards and Technology (NIST), "Digital Signature Standard (DSS)", FIPS PUB 186-4, DOI 10
.6028 , , <https:///NIST .FIPS .186 -4 doi >..org /10 .6028 /NIST .FIPS .186 -4 - [OPENPGP
-SAMPLES] -
Einarsson, B. R., juga, and D. K. Gillmor, "OpenPGP Example Keys and Certificates", Work in Progress, Internet-Draft, draft
-bre , , <https://-openpgp -samples -01 datatracker >..ietf .org /doc /html /draft -bre -openpgp -samples -01 - [RFC4134]
-
Hoffman, P., Ed., "Examples of S/MIME Messages", RFC 4134, DOI 10
.17487 , , <https:///RFC4134 www >..rfc -editor .org /info /rfc4134 - [RFC5322]
-
Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10
.17487 , , <https:///RFC5322 www >..rfc -editor .org /info /rfc5322 - [RFC7469]
-
Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning Extension for HTTP", RFC 7469, DOI 10
.17487 , , <https:///RFC7469 www >..rfc -editor .org /info /rfc7469 - [RFC8410]
-
Josefsson, S. and J. Schaad, "Algorithm Identifiers for Ed25519, Ed448, X25519, and X448 for Use in the Internet X.509 Public Key Infrastructure", RFC 8410, DOI 10
.17487 , , <https:///RFC8410 www >..rfc -editor .org /info /rfc8410 - [RFC8418]
-
Housley, R., "Use of the Elliptic Curve Diffie-Hellman Key Agreement Algorithm with X25519 and X448 in the Cryptographic Message Syntax (CMS)", RFC 8418, DOI 10
.17487 , , <https:///RFC8418 www >..rfc -editor .org /info /rfc8418 - [SHA]
-
National Institute of Standards and Technology (NIST), "Secure Hash Standard (SHS)", FIPS PUB 180-4, DOI 10
.6028 , , <https:///NIST .FIPS .180 -4 doi >..org /10 .6028 /NIST .FIPS .180 -4 - [TEST-POLICY]
-
National Institute of Standards and Technology (NIST), "Test Certificate Policy to Support PKI Pilots and Testing", Computer Security Resource Center, , <https://
csrc >..nist .gov /CSRC /media /Projects /Computer -Security -Objects -Register /documents /test _policy .pdf
Acknowledgements
This document was inspired by similar work in the OpenPGP space by Bjarni Rúnar Einarsson and juga; see [OPENPGP-SAMPLES].¶
Eric Rescorla helped spot issues with certificate formats.¶
Sean Turner pointed to [RFC4134] as prior work.¶
Deb Cooley suggested that Alice and Bob should have separate certificates for signing and encryption.¶
Wolfgang Hommel helped to build reproducible encrypted PKCS #12 objects.¶
Carsten Bormann got the XML sourcecode markup working for this document.¶
David A. Cooper identified problems with the certificates and suggested corrections.¶
Lijun Liao helped get the terminology right.¶
Stewart Bryant and Roman Danyliw provided editorial suggestions.¶