rfc-1864

The Content-MD5 Header Field

J. Myers, M. Rose
date1995-10 streamLegacy statusDRAFT STANDARD pages4 canonicalhttps://www.rfc-editor.org/rfc/rfc1864 doi10.17487/RFC1864
This memo specifies an optional header field, Content-MD5, for use with MIME-conformant messages. [STANDARDS-TRACK]

obsoletes

Extracted elements (12)

design-rationale §1

Content-MD5 was introduced because existing MIME mechanisms, while protecting data during transport encoding/decoding, do not provide a mechanism for verifying that decoded data remain intact. The field fills the gap between transport-level encoding and verified data integrity.

email, security

design-rationale §2 RECOMMENDED

Use of Content-MD5 is RECOMMENDED whenever data integrity is desired but Privacy-Enhanced Mail services are not available, positioning it as a lightweight alternative to PEM for integrity-only scenarios.

email, security

interoperability-note §2

Textual data is regularly altered during normal mail delivery; addition or deletion of trailing whitespace produces a different MD5 digest. Therefore, when Content-MD5 is used, either quoted-printable or base64 SHOULD be employed as the content-transfer-encoding to prevent spurious integrity failures.

email, security

normative-requirement §2 MUST NOT

Content-MD5 may only be added to MIME entities of a 'leaf' nature; it MUST NOT be used with content types multipart or message/rfc822.

email

normative-requirement §2 MUST

For textual data, the MD5 algorithm MUST be computed on data where each newline is represented by a CR-LF pair, as required by MIME canonical form.

email

normative-requirement §3 MAY

If the Content-MD5 field is present, a recipient user agent MAY use it to verify that the MIME entity's contents have not been modified during transport.

email, security

normative-requirement §3 MUST NOT

Message relays and gateways are expressly forbidden to alter their processing based on the presence of the Content-MD5 field. However, a gateway is allowed to remove the field if the corresponding MIME entity is translated into a different content-type.

email

normative-requirement §2 MUST NOT

The Content-MD5 field MUST be generated only by an originating user agent. Message relays and gateways are expressly forbidden from generating a Content-MD5 field.

email, security

normative-requirement §2 MUST

The MD5 algorithm MUST be computed on the canonical form of the MIME entity's object, after conversion to canonical form but before applying any content-transfer-encoding. The receiver also applies MD5 after undoing content-transfer-encoding.

email, security, crypto

protocol-element §1

Content-MD5 is an optional MIME header field that serves as a message integrity check (MIC). It may be used to verify that decoded data are identical to the data originally sent, and may also appear in encapsulated headers of message/external-body objects.

email, security

security-consideration §4

Content-MD5 provides a data integrity service that protects against accidental modification in transit from sender to recipient. It does not provide a secure integrity service; Privacy Enhanced Mail (PEM) is conjectured to protect data from all modifications, including intentional ones.

email, security, crypto

wire-format §2

The MD5 algorithm produces a 128-bit digest, yielding 16 octets in network byte order (big-endian). These 16 octets are then base64-encoded to produce the Content-MD5 field value (e.g., 'Q2hlY2sgSW50ZWdyaXR5IQ==').

email, security