Extensions to Automatic Certificate Management Environment for end user S/MIME certificates
Isode Ltd14 Castle MewsHamptonMiddlesexTW12 2NPUKalexey.melnikov@isode.comACMES/MIME
This document specifies identifiers and challenges required to enable
the Automated Certificate Management Environment (ACME) to issue
certificates for use by email users
that want to use S/MIME.
ACME is a mechanism for automating certificate
management on the Internet. It enables administrative entities to
prove effective control over resources like domain names, and
automates the process of generating and issuing certificates.
This document describes an extension to ACME for use by S/MIME.
defines extensions for issuing end user S/MIME certificates.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in
.
ACME defines "dns" Identifier Type that is used to verify that a particular entity
has control over a domain or specific service associated with the domain.
In order to be able to issue end-user S/MIME certificates, ACME needs a new Identifier Type that
proves ownership of an email address.
This document defines a new Identifier Type "email" which corresponds to
an (all ASCII) email address or Internationalized Email addresses .
(When Internationalized Email addresses are used, both U-labels and A-labels are allowed in the domain part.)
This can be used with S/MIME or other similar service that requires possession of a certificate tied to an email address.
Any identifier of type "email" in a newOrder request MUST NOT have a wildcard ("*") character in its value.
A new challenge type "email-reply-00" is used with "email" Identifier Type,
which provides proof that an ACME client has control over an email address:
ACME server generates a "challenge" email message with the subject "ACME: <token-part1>",
where <token-part1> is the base64url encoded first part of the token,
which contains at least 64 bit of entropy. The challenge email message structure
is described in more details in .
The second part of the token (token-part2,
which also contains at least 64 bit of entropy) is returned over HTTPS to the ACME client.
ACME client concatenates "token-part1" and "token-part2" to create "token", calculates
key-authz (as per Section 8.1 of ),
then includes the base64url encoded SHA-256 digest
of the key authorization in the body of a response email message containing
a single text/plain MIME body part .
The response email message structure
is described in more details in
For an identifier of type "email", CSR MUST contain the request email address in an extensionRequest
attribute requesting a subjectAltName extension.
A "challenge" email message MUST have the following structure:
The message Subject header field has the following syntax: "ACME: <token-part1>",
where the prefix "ACME:" is followed by folding white space (FWS, see )
and then by <token-part1> is the base64url encoded first part of the ACME token
that MUST be at least 64 bit long after decoding.
Due to recommended 78 octet line length limit
in , the subject line can be folded, so whitespaces (if any) within
the <token-part1> MUST be ignored. encoding of subject MUST be supported,
but when used, only "UTF-8" and "US-ASCII" charsets MUST be used (i.e. other charsets MUST NOT be used).
The To header field MUST be the email address of the entity that requested S/MIME certificate to be generated.The message MAY contain Reply-To header field.
The message MUST include the "Auto-Submitted: auto-generated" header field .
The "Auto-Submitted" header field SHOULD include "type=acme" parameter.
It MAY include other optional parameters as allowed by syntax of Auto-Submitted header field.The message MAY contain Reply-To header field.
In order to prove authenticity of a challenge message, it MUST be either DKIM
signed or S/MIME signed.
If DKIM signing is used, the resulting DKIM-Signature header field MUST contain the "h=" tag that includes
at least "From", "Sender", "Reply-To", "To", "CC", "Subject", "Date", "In-Reply-To", "References",
"Message-ID", "Content-Type" and "Content-Transfer-Encoding" header fields.
The message MUST also pass DMARC validation , which implies DKIM and SPF validation .
The body of the challenge message is not used for automated processing, so it can be any media type.
(However there are extra requirements on S/MIME signing, if used. See below.)
Typically it is text/plain or text/html containing human readable explanation of the purpose of the message.
If S/MIME signing is used to prove authenticity of the challenge message,
then multipart/signed or "application/pkcs7-mime; smime-type=signed-data;" media type should be used.
Either way, it MUST use S/MIME header protection.
A "response" email message MUST have the following structure:
The message Subject header field has the following syntax: "<Reply-prefix> ACME: <token-part1>",
where <Reply-prefix> is typically the reply prefix "Re: " and
the string "ACME:" is followed by folding white space (FWS, see )
and then by <token-part1>. <token-part1> is the base64url encoded first part of the ACME token
(as received in the ACME challenge) that MUST be at least 64 bit long after decoding. Due to recommended 78 octet line length limit
in , the subject line can be folded, so whitespaces (if any) within
the <token-part1> MUST be ignored. encoding of subject MUST be supported,
but when used, only "UTF-8" and "US-ASCII" charsets MUST be used (i.e. other charsets MUST NOT be used).
The From: header field contains the email address of the user that is requesting S/MIME certificate issuance.The To: header field of the response contains the value from the Reply-To: header field from the challenge message (if set)
or from the From: header field of the challenge message otherwise.The Cc: header field is ignored if present in the "response" email message.The In-Reply-To: header field SHOULD be set to the Message-ID header field of the challenge message
according to rules in Section 3.6.4 of .
Media type of the "response" email message is either text/plain or multipart/alternative containing
text/plain as one of the alternatives.
The text/plain body part (whether or not it is inside multipart/alternative)
MUST contain a block of lines starting with the line "-----BEGIN ACME RESPONSE-----", followed by one
or more line containing base64url encoded SHA-256 digest
of the key authorization, calculated based on token-part1 (received over email)
and token-part2 (received over HTTPS). (Note that due to historic line length limitations
in email, line endings (CRLFs) can be freely inserted in the middle of the encoded digest,
so they MUST be ignored when processing it.). The final line of the encoded digest
is followed by the line containing "-----END ACME RESPONSE-----".
Any text before and after this block is ignored. For example such text might explain what
to do with it for ACME-unaware clients.
There is no need to use any Content-Transfer-Encoding other than 7bit for the text/plain body part,
however use of Quoted-Printable or base64 is not prohibited in a "response" email message.
In order to prove authenticity of a response message, it MUST be DKIM
signed. The resulting DKIM-Signature header field MUST contain the "h=" tag that includes
at least "From", "Sender", "Reply-To", "To", "CC", "Subject", "Date", "In-Reply-To", "References",
"Message-ID", "Content-Type" and "Content-Transfer-Encoding" header fields.
updated/clarified use of DKIM/SPF/DMARC with Internationalized Email addresses .
Please consult RFC 8616 in regards to any changes that need to be implemented.
Use of non ASCII characters in left hand sides of Internationalized Email addresses requires putting
Internationalized Email Addresses in X.509 Certificates .
IANA is requested to register a new Identifier type in the "ACME Identifier Types" registry
defined in Section 9.7.7 of with Label "email" and a Reference to [RFCXXXX],
and .
The new Identifier Type corresponds to an (all ASCII) email address
or Internationalized Email addresses .
IANA is also requested to register a new entry in the "ACME Validation Methods" registry
defined in Section 9.7.8 of .
This entry is as follows:
LabelIdentifier TypeACMEReferenceemail-reply-00emailY[RFCXXXX]
Please see Security Considerations of for general security considerations
related to use of ACME. This challenge/response protocol demonstrates that an entity that controls
the private key (corresponding to the public key in the certificate) also controls the named email
account. Any claims about the correctness or fitness-for-purpose of the email address must be
otherwise assured.
Security of "email-reply-00" challenge type depends on security of email system.
A third party that can read and reply to user's email messages (by possessing a user's password
or a secret derived from it that can give read and reply access, such as "password equivalent" information;
or by being given permissions to act on user's behalf using email delegation feature common
in some email systems)
can request S/MIME certificates and is indistinguishable from the email account owner.
Email system in its turn depends on DNS. A third party that can manipulate DNS MX records
for a domain might be able to redirect email and can get (at least temporary) read and reply access to it.
Similar considerations apply to SPF and DMARC TXT records in DNS.
Use of DNSSEC by email system administrators is recommended to avoid easy spoofing
of DNS records affecting email system.
Secure Hash Standard (SHS)National Institute of Standards and TechnologyThank you to Andreas Schulze, Gerd v. Egidy, James A Baker, Ben Schwartz and Michael Jenkins for suggestions, comments and corrections on this document.