4.1. Main Use Case
This section applies to the main use case, where the sending and receiving side (fully) support Header Protection as specified herein (cf. Section 3.1.1).¶
Note: The sending side specification of the main use case is also applicable to the cases where the sending side (fully) supports Header Protection as specified herein, while the receiving side does not, but is MIME-conformant according to [RFC2045], ff. (cf. Section 3.1.2 and Section 3.1.2.1).¶
Further backward compatibility cases are defined in Section 4.2.¶
4.1.1. MIME Format
4.1.1.1. Introduction
As per S/MIME version 3.1 and later (cf. [RFC8551]), the sending client MAY wrap a full MIME message in a message/RFC822 wrapper in order to apply S/MIME security services to these header fields.¶
To help the receiving side to distinguish between a forwarded and a wrapped message, the Content-Type header field parameter "forwarded" is added as defined in [I-D.melnikov-iana-reg-forwarded].¶
The simplified (cryptographic overhead not shown) MIME structure of such an Email Message looks as follows:¶
<Outer Message Header Section (unprotected)> <Outer Message Body (protected)> <MIME Header Section (wrapper)> <Inner Message Header Section> <Inner Message Body>¶
The following example demonstrates how an Original Message might be protected, i.e., the Original Message is contained as Inner Message in the Protected Body of an Outer Message. It illustrates the first Body part (of the Outer Message) as a "multipart/signed" (application/pkcs7-signature) media type:¶
Lines are prepended as follows:¶
- "O: " Outer Message Header Section¶
- "I: " Message Header Section¶
- "W: " Wrapper (MIME Header Section)¶
O: Date: Mon, 25 Sep 2017 17:31:42 +0100 (GMT Daylight Time) O: Message-ID: <e4a483cb-1dfb-481d-903b-298c92c21f5e@m.example.net> O: Subject: Meeting at my place O: From: "Alexey Melnikov" <alexey.melnikov@example.net> O: To: somebody@example.net O: MIME-Version: 1.0 O: Content-Type: multipart/signed; charset=us-ascii; micalg=sha1; O: protocol="application/pkcs7-signature"; O: boundary=boundary-AM This is a multipart message in MIME format. --boundary-AM W: Content-Type: message/RFC822; forwarded=no W: I: Date: Mon, 25 Sep 2017 17:31:42 +0100 (GMT Daylight Time) I: From: "Alexey Melnikov" <alexey.melnikov@example.net> I: Message-ID: <e4a483cb-1dfb-481d-903b-298c92c21f5e@m.example.net> I: MIME-Version: 1.0 I: MMHS-Primary-Precedence: 3 I: Subject: Meeting at my place I: To: somebody@example.net I: X-Mailer: Isode Harrier Web Server I: Content-Type: text/plain; charset=us-ascii This is an important message that I don't want to be modified. --boundary-AM Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature [[base-64 encoded signature]] --boundary-AM--¶
The Outer Message Header Section is unprotected, while the remainder (Outer Message Body) is protected. The Outer Message Body consists of the wrapper (MIME Header Section) and the Inner Message (Header Section and Body).¶
The wrapper is a simple MIME Header Section with media type "message/rfc822" containing a Content-Type header field parameter "forwarded=no" followed by an empty line.¶
If the source is an Original (message/rfc822) Message, the Inner Message Header Section is typically the same as (or a subset of) the Original Message Header Section (cf. Section 4.1.2.1), and the Inner Message Body is typically the same as the Original Message Body.¶
The Inner Message itself may contain any MIME structure.¶
Note: It is still to be decided by the LAMPS WG whether or not to recommend an alternative MIME format as described in Appendix B.1.1.1 (instead of the currently standardized and above defined format).¶
4.1.2. Sending Side
To ease explanation, the following describes the case where an Original (message/rfc822) Message to be protected is present. If this is not the case, Original Message means the (virtual) Message that would be constructed for sending it as unprotected email.¶
4.1.2.1. Inner Message Header Fields
It is RECOMMENDED that the Inner Message contains all Header Fields of the Original Message with the exception of the following Header Field, which MUST NOT be included within the Inner Message nor within any other protected part of the Message:¶
- Bcc¶
[[ TODO: Bcc handling needs to be further specified (see also Appendix A.1). Certain MUAs cannot properly decrypt Messages with Bcc recipients. ]]¶
4.1.2.2. Wrapper
The wrapper is a simple MIME Header Section followed by an empty line preceding the Inner Message (inside the Outer Message Body). The media type of the wrapper MUST be "message/RFC822" and MUST contain the Content-Type header field parameter "forwarded=no" as defined in [I-D.melnikov-iana-reg-forwarded]. The wrapper unambiguously delimits the Inner Message from the rest of the Message.¶
4.1.2.3. Cryptographic Layers / Envelope
[[ TODO: Basically refer to S/MIME standards ]]¶
4.1.2.4. Outer Message Header Fields
4.1.2.4.1. Encrypted Messages
To maximize Privacy, it is strongly RECOMMENDED to follow the principle of Data Minimization (cf. Section 2.1).¶
However, the Outer Message Header Section SHOULD contain the Essential Header Fields and, in addition, MUST contain the Header Fields of the MIME Header Section part to describe Cryptographic Layer of the protected MIME subtree as per [RFC8551].¶
The following Header Fields are defined as the Essential Header Fields:¶
- From¶
- To (if present in the Original Message)¶
- Cc (if present in the Original Message)¶
- Bcc (if present in the Original Message, see also Section 4.1.2.1 and Appendix A.1)¶
- Date¶
- Message-ID¶
- Subject¶
Further processing by the Submission Entity normally depends on part of these Header Fields, e.g. From and Date HFs are required by [RFC5322]. Furthermore, not including certain Header Fields may trigger spam detection to flag the Message, and/or lead to user experience (UX) issues.¶
For further Data Minimization, the value of the Subject Header Field SHOULD be obfuscated as follows:¶
* Subject: [...]¶
and it is RECOMMENDED to replace the Message-ID by a new randomly generated Message-ID.¶
In addition, the value of other Essential Header Fields MAY be obfuscated.¶
Non-Essential Header Fields SHOULD be omitted from the Outer Message Header Section where possible. If Non-essential Header Fields are included in the Outer Message Header Section, those MAY be obfuscated too.¶
Header Fields that are not obfuscated should contain the same values as in the Original Message.¶
If an implementation obfuscates the From, To, and/or Cc Header Fields, it may need to provide access to the clear text content of these Header Fields to the Submission Entity for processing purposes. This is particularly relevant, if proprietary Submission Entities are used. Obfuscation of Header Fields may adversely impact spam filtering.¶
(A use case for obfuscation of all Outer Message Header Fields is routing email through the use of onion routing or mix networks, e.g. [pEp.mixnet].)¶
The MIME Header Section part is the collection of MIME Header Fields describing the following MIME structure as defined in [RFC2045]. A MIME Header Section part typically includes the following Header Fields:¶
The following example shows the MIME Header Section part of an S/MIME signed Message (using application/pkcs7-mime with SignedData):¶
MIME-Version: 1.0 Content-Type: application/pkcs7-mime; smime-type=signed-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m¶
Depending on the scenario, further Header Fields MAY be exposed in the Outer Message Header Section, which is NOT RECOMMENDED unless justified. Such Header Fields may include e.g.:¶
4.1.2.4.2. Unencrypted Messages
The Outer Message Header Section of unencrypted Messages SHOULD contain at least the Essential Header Fields and, in addition, MUST contain the Header Fields of the MIME Header Section part to describe Cryptographic Layer of the protected MIME subtree as per [RFC8551]. It may contain further Header Fields, in particular those also present in the Inner Message Header Section.¶
4.1.2.5. Sending Side Message Processing
For a protected Message the following steps are applied before a Message is handed over to the Submission Entity:¶
4.1.2.5.1. Step 1: Decide on Protection Level and Information Disclosure
The implementation which applies protection to a Message must decide:¶
- Which Protection Level (signature and/or encryption) shall be applied to the Message? This depends on user request and/or local policy as well as availability of cryptographic keys.¶
- Which Header Fields of the Original Message shall be part of the Outer Message Header Section? This typically depends on local policy. By default, the Essential Header Fields are part of the Outer Message Header Section; cf. Section 4.1.2.4.¶
- Which of these Header Fields are to be obfuscated? This depends on local policy and/or specific Privacy requirements of the user. By default only the Subject Header Field is obfuscated; cf. Section 4.1.2.4.¶
4.1.2.5.2. Step 2: Compose the Outer Message Header Section
Depending on the decision in Section 4.1.2.5.1, the implementation shall compose the Outer Message Header Section. (Note that this also includes the necessary MIME Header Section part for the following protection layer.)¶
Outer Header Fields that are not obfuscated should contain the same values as in the Original Message (except for MIME Header Section part, which depends on the Protection Level selected in Section 4.1.2.5.1).¶
4.1.2.5.3. Step 3: Apply Protection to the Original Message
Depending on the Protection Level selected in Section 4.1.2.5.1, the implementation applies signature and/or encryption to the Original Message, including the wrapper (as per [RFC8551]), and sets the resulting package as the Outer Message Body.¶
The resulting (Outer) Message is then typically handed over to the Submission Entity.¶
[[ TODO: Example ]]¶
4.1.3. Receiving Side
4.1.3.1. Receiving User Facing Message Header Fields
The Receiving User Facing Message SHOULD be a verbatim copy of the Inner Message.¶
4.1.3.2. Receiving Side Message Processing
When a protected Message is received, the following steps are applied:¶
4.1.3.2.1. Step 1: Decrypt Message and/or check signature
Depending on the Protection Level, the received Message is decrypted and/or its signature is checked as per [RFC8551].¶
4.1.3.2.2. Step 2: Construct the Receiving User Facing Message
The Receiving User Facing Message is constructed according to Section 4.1.3.1.¶
The resulting Message is handed over for further processing, which typically involves rendering it for the user.¶
4.1.3.3. Step 3: Prepare Information Cyptographic Verification
[[ TODO: Signature valid, etc. ]]¶