Free trial The cheapest email marketing platform: try Moosend free for 30 days, no credit card. Don't miss your seat. The cheapest email marketing platform Start free trial →

RFC 1847: Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted

RFC 1847 defines multipart/signed and multipart/encrypted, the structure behind S/MIME and PGP/MIME. Examples, common mistakes, and why headers need RFC 9788 header protection.

Alaa Touil
Email infrastructure specialist, 8+ years in SMTP and deliverability
9 min read Updated Nov 9, 2026 135 views
RFC 1847 Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted - SMTPedia reference
RFC 1847
Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted

Current standard

Domain
Security / S/MIME
Published
October 1995
Supersedes
First in series
SMTP relevance
Medium

↗ Read on rfc-editor.org

What this RFC defines

RFC 1847 defines two MIME multipart subtypes for message security: multipart/signed and multipart/encrypted. These provide the container format for email messages that carry a cryptographic signature or are encrypted, allowing the security layer to be applied to any MIME content type without restricting the content encoding.

Where you see it in practice

When you receive a digitally signed email from a corporate sender that your mail client shows with a certificate icon or verified sender badge, the outer message structure is a multipart/signed container as defined by RFC 1847. The structure contains the original message content as the first part and the detached signature as the second. S/MIME (today RFC 8551) and PGP/MIME (RFC 3156) both use the multipart/signed and multipart/encrypted types defined here.

Secure multipart formats

RFC 1847 defined two secure MIME multipart formats: multipart/signed (a body part plus its cryptographic signature as a second part) and multipart/encrypted (encryption control info plus the encrypted payload). Published in October 1995, this document is the structural foundation used by both S/MIME (RFC 5751 later, then RFC 8551) and PGP/MIME (RFC 3156). Most signed or encrypted email uses one of these structures; S/MIME encryption is the notable exception, as it uses a single application/pkcs7-mime part.

Multipart/signed structure

A multipart/signed message has three parameters in its Content-Type: protocol (the signature format, e.g., application/pgp-signature or application/pkcs7-signature), micalg (the hash algorithm used, e.g., sha256), and boundary (as with any multipart). The body has exactly two parts: the signed content (which is normal MIME) and the signature (which is opaque cryptographic data). Verifiers hash the signed content and check the signature against the expected key.

Practical deployment

Multipart/signed is preferred over inline signing because it lets clients that do not understand the signature format still display the signed content correctly. If a recipient without S/MIME or PGP support receives a multipart/signed message, they see the signed part rendered normally and the signature as an unfamiliar attachment they can ignore. This graceful degradation is why RFC 1847 multipart format won over embedded formats where the signature is intermixed with the content. Most signed email you receive follows the RFC 1847 layout; the main exception is S/MIME opaque signing (application/pkcs7-mime), described below.

Quick Reference

RFC 1847 (October 1995) defines the Security Multiparts framework: two MIME content types (multipart/signed and multipart/encrypted) used by both S/MIME and PGP/OpenPGP to carry cryptographic protection. Separates the protected content from the cryptographic metadata (signature or encrypted key), letting mail clients without security awareness still display the content while security-aware clients verify or decrypt. Foundation for all modern signed and encrypted email.

RFC 1847 at a glance

AspectDetail
PurposeDefine MIME structure for signed and encrypted email
Two typesmultipart/signed and multipart/encrypted
Used byS/MIME (RFC 5751, RFC 8551) and PGP/OpenPGP (RFC 9580, RFC 3156)
Key benefitContent readable by non-security-aware clients; security verified by aware clients
PublishedOctober 1995

multipart/signed structure

multipart/signed body structure
Content-Type: multipart/signed;
protocol=”application/pkcs7-signature”;
micalg=sha-256;
boundary=”—=signed-boundary”

—–=signed-boundary
Content-Type: text/plain

This is the readable body content. Non-security-aware clients
display this normally.

—–=signed-boundary
Content-Type: application/pkcs7-signature; name=”smime.p7s”
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=”smime.p7s”

MIIQ2AYJKoZIhvcNAQcCoIIQyTCCEMUC…
[base64 signature]

—–=signed-boundary–

Parameters:
protocol MIME type of the signature part
application/pkcs7-signature for S/MIME
application/pgp-signature for OpenPGP
micalg Message Integrity Check algorithm (SHA-256, SHA-384)
used for the signature

Structure rules:
– Exactly two parts: content first, signature second
– Content is exactly what was signed (byte-for-byte)
– Signature part contains the cryptographic signature over the content
– Any modification to content invalidates the signature
– Non-security-aware clients render only the content part

multipart/encrypted structure

multipart/encrypted body structure (PGP style)
Content-Type: multipart/encrypted;
protocol=”application/pgp-encrypted”;
boundary=”—=encrypted-boundary”

—–=encrypted-boundary
Content-Type: application/pgp-encrypted

Version: 1

—–=encrypted-boundary
Content-Type: application/octet-stream

—–BEGIN PGP MESSAGE—–

hQEMA1kJ4Yn3D5j1AQf9GxKX…
[encrypted content]
—–END PGP MESSAGE—–

—–=encrypted-boundary–

Structure rules:
– Two parts: control info first, encrypted data second
– Control info identifies the encryption protocol
– Encrypted data contains the actual protected content
– Non-security-aware clients see only “encrypted message” indicators
– Aware clients decrypt with recipient’s private key

Note: S/MIME typically uses application/pkcs7-mime (single part, opaque)
rather than multipart/encrypted for encryption.

Why the multipart approach won

ApproachBehavior with legacy clientsBehavior with security-aware clients
multipart/signed (RFC 1847)Show readable body; ignore signature partVerify signature over body
Opaque signing (single application/pkcs7-mime with signed-data)Show “attachment cannot be displayed”Extract body from signed envelope, verify, display
Multipart/signed lets non-security-aware clients still read the message. Users on unsupported clients see the body; the signature is a small attachment they can ignore. Opaque signing hides the body entirely from unsupported clients, providing no fallback. This is why RFC 1847 multipart format won over embedded formats where the signature is intermixed with the content.

What multipart/signed does not protect: the headers

RFC 1847 signs the content part only. The Subject, From, To and Date of the outer message sit outside the signature. An attacker who intercepts a signed message can change its Subject or swap the visible sender name, and many clients still show “signature valid”, because the signed body was not touched.

HeaderCovered by RFC 1847?Covered by RFC 9788 header protection?
Body and attachmentsYesYes
SubjectNoYes (and can be hidden when the message is encrypted)
From, To, Cc, DateNoYes
Received, DKIM-Signature and other headers added in transitNoNo (added after the sender signed)

RFC 9788, published in 2025 as “Header Protection for Cryptographically Protected E-mail”, fixes this for both S/MIME and PGP/MIME. The sending client copies the header fields into the protected part, so the signature covers them, and the receiving client displays the protected values instead of the outer ones. It updates RFC 8551 and keeps the RFC 1847 structure, so legacy clients still display the message. Support in mail clients is still limited, so check whether yours renders protected headers before relying on them.

Common Security Multipart mistakes

Modifying content after signing. The signature covers the exact bytes of the content part. Any modification (whitespace, line endings, added footer) invalidates the signature. Mailing lists that add a footer to the body break multipart/signed signatures (a Subject tag does not, since the signature covers the content part, not the outer headers). Unlike DKIM, there is no ARC-style repair for S/MIME or PGP signatures.
Wrong micalg parameter. The micalg (Message Integrity Check algorithm) must match the algorithm used to compute the signature. Common: sha-256 for RSA signatures. Some clients reject or warn on a mismatched micalg even when the signature itself is valid, while others ignore the parameter, so a mismatch produces results that vary from one recipient to the next. Note the naming: S/MIME uses values like sha-256, PGP/MIME uses pgp-sha256.
Nested multipart/signed inside multipart/mixed. A signed part inside an outer multipart/mixed loses the signature protection scope. Signing works when multipart/signed is the outermost or contained inside multipart/encrypted (for sign-then-encrypt). Placing it as an inner part in a mixed structure with attachments outside the signed scope is legal but confusing.
Not preserving Content-Transfer-Encoding. The signature covers the content exactly as encoded. If a relay re-encodes (7-bit to 8-bit, quoted-printable to base64), the signature breaks. RFC 1847 addresses this by requiring the signed part to be in a 7-bit-safe form before signing: encode 8-bit or binary content with quoted-printable or base64 first, so no relay has a reason to convert it.
Emitting only opaque signing. Some legacy S/MIME implementations use only application/pkcs7-mime opaque signing; recipients without S/MIME capability see an inscrutable attachment. multipart/signed (RFC 1847) is more user-friendly and equally standards-compliant. Default to multipart/signed unless you have a specific reason for opaque.
Security-using standards

  • RFC 5751: S/MIME 3.2
  • RFC 8551: S/MIME 4.0 (current)
  • RFC 9580: OpenPGP
  • RFC 3156: MIME Security with OpenPGP
MIME foundation

Related standards

  • RFC 6376: DKIM (different signature model; headers not body)
  • RFC 8617: ARC (preserves DKIM through forwarders that would break signatures)

Frequently asked questions

What is the difference between multipart/signed and DKIM signing?

Different scope and purpose. multipart/signed (RFC 1847) signs the message body content end-to-end from sender to recipient; used by S/MIME and PGP. DKIM (RFC 6376) signs specified headers plus body hash for domain-level authentication; used for anti-spoofing at the sending domain level. multipart/signed proves who the person is and is checked by the reader’s client; DKIM proves which domain sent the message and is checked by receiving servers. They are complementary; a message can carry both.

Why does multipart/signed break in mailing lists?

Mailing lists modify messages: add [ListName] to Subject, add footers to body, add List-* headers. The signature covers exact content bytes; any modification invalidates it. Options: (1) list signs with its own key (replacing sender’s signature), (2) list preserves body exactly (rare), (3) the list leaves the body untouched and puts its information in List-* headers only. ARC does not help here: it records DKIM, SPF and DMARC verdicts for receiving servers, not the validity of an S/MIME or PGP signature, which the reader’s client checks on its own.

Should I use multipart/signed or opaque S/MIME signing?

multipart/signed for most cases. Non-security-aware clients see readable body; aware clients verify signature. Opaque signing hides body from unsupported clients, providing no fallback. Choose opaque only when you specifically need to prevent unsigned reading of the content (rare in email; more relevant for document workflows).

Can multipart/encrypted contain a multipart/signed inside?

Yes; this is the sign-then-encrypt pattern. Structure: multipart/encrypted with an inner multipart/signed, providing both signature and confidentiality. Decrypt first, then verify. Very common in secure email deployments. Alternative encrypt-then-sign (signed outside encrypted) is less common but useful for gateway signing over encrypted content.

Is RFC 1847 still current?

Yes. RFC 1847 has not been superseded; the multipart/signed and multipart/encrypted types it defines remain the foundation for signed and encrypted email in 2026. The specific security protocols using them (S/MIME, PGP) have evolved, but the multipart framework is stable. New implementations should target RFC 1847 for the multipart structure alongside their chosen security protocol.

Did this guide save you time?

SMTPedia is free and independent. A coffee helps keep every guide accurate.

Buy SMTPedia a coffee

See SMTPedia first on Google

Add us as a preferred source in Top Stories.

Add as preferred source

About the Author

Alaa - SMTPedia author

Alaa · LinkedIn

Email infrastructure specialist with 8+ years of hands-on experience in SMTP, deliverability, and email verification. I’ve configured and troubleshot mail systems across Postfix, Exchange, and cloud relays, managed IP reputation and warmup campaigns, and built verification pipelines processing millions of addresses. My work spans DNS authentication (SPF, DKIM, DMARC, BIMI), bounce handling, blocklist monitoring, and compliance frameworks including CAN-SPAM and GDPR. I write every article on SMTPedia to give email professionals, developers, and marketers the accurate, RFC-grounded reference they need.


About SMTPedia

SMTPedia is an independent email industry reference covering SMTP, IMAP, POP3, email deliverability, marketing platforms, DNS authentication, and email verification. Every article is researched from official provider documentation, IETF RFCs, and industry best practices. Settings and configurations are verified quarterly.

We are cited as a source by ChatGPT, Microsoft Copilot, and thousands of email professionals worldwide. Learn more about our editorial process.