Mime Type for Encrypted Attachments
Ingo Klöcker
ingo.kloecker@epost.de
Wed May 21 14:10:39 2003
--Boundary-02=_nnSy+0IFhRITjR+
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: signed data
Content-Disposition: inline
On Monday 19 May 2003 14:02, Patrick Brunschwig wrote:
> What would be the correct content type for encrypted attachments if
> the mail is sent as inline PGP (i.e. multipart/mixed)?
>
> I have found a number of content types that seem to be in use, so I'm
> not sure what would be the "best". I know that e.g. Outlook uses
> "application/octet-stream", but I think this is a rather bad default.
>
> What about "application/pgp" or "application/pgp-encrypted", any
> idea?
application/pgp-encrypted is definitely the wrong choice because that's=20
the content type of the message part which holds the version number of=20
a PGP/MIME encrypted message. Here's a short example of such a message:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=46rom: xyz
To: abc
Date: ...
Subject: secret
MIME-version: 1.0
Content-type: multipart/encrypted;
charset=3Diso-8859-15;
boundary=3D"Boundary-02=3D_0guk++/xisah7Wk";
protocol=3D"application/pgp-encrypted"
Content-transfer-encoding: 7bit
=2D-Boundary-02=3D_0guk++/xisah7Wk
Content-Type: application/pgp-encrypted
Content-Description: version code
Content-Disposition: attachment
Version: 1
=2D-Boundary-02=3D_0guk++/xisah7Wk
Content-Type: application/octet-stream
Content-Description: encrypted data
Content-Disposition: inline; filename=3D"msg.asc"
=2D----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.1 (GNU/Linux)
hQIOAzDP3ccyMZU4EAf/Q3tO7Iziro8/NUs+7Lqk76poiPY8fza5AOdL7kB4fkWJ
=2E..
=3D1WYw
=2D----END PGP MESSAGE-----
=2D-Boundary-02=3D_0guk++/xisah7Wk--
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
And IIRC application/pgp was used for inline encrypted messages before=20
PGP/MIME was developed.
I'd say using application/octet-stream is the correct choice. You could=20
add Content-Description and Content-Disposition as in the above=20
PGP/MIME message. But since probably no email client will understand=20
such a non-standard message it doesn't really matter.
Regards,
Ingo
--Boundary-02=_nnSy+0IFhRITjR+
Content-Type: application/pgp-signature
Content-Description: signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA+ySnnGnR+RTDgudgRAj49AKCDCD2ha0ZO8vohNBqVXw5AfgsWhQCg38u0
Rkmaz529zK02mYJi5XS37RM=
=au84
-----END PGP SIGNATURE-----
--Boundary-02=_nnSy+0IFhRITjR+--