Internet Engineering Task Force | V.M. Moscaritolo, Ed. |
Internet-Draft | PGP, part of Symantec Corporation |
Intended status: Informational | March 11, 2011 |
Expires: September 12, 2011 |
MIME media type literal packet in OpenPGP
draft-moscaritolo-openpgp-literal-00
This document describes an extension to the OpenPGP Message Format that allows a Multipurpose Internet Mail Extension (MIME) Media Typeto be associated with the encoded content. By providing more information beyond the existing binary and text formats this extension and can enable the automated selection of an appropriate media viewer for the decoded content.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 12, 2011.
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document describes an extension to the OpenPGP Message Format that allows a Multipurpose Internet Mail Extension (MIME) Media Type (aka Intenet Media type) to be associated with the encoded content. By providing more information beyond the existing binary and text formats this extension and can enable the automated selection of an appropriate media viewer for the decoded content.
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 RFC 2119 [RFC2119].
The OpenPGP RFC 4880 [RFC4880] currently specifies only a few formats for encoded content: text, binary and UTF-8. The format itself of the content is specified in section 5.9 as part of the Literal Data packet (Tag 11). In addition to the body of the message being encoded, this packet also contains a one-octet field that describes how the data is formatted.
The current choices are 'b' (0x62), in which case the Literal packet contains binary data and 't' (0x74) which describes text data and 'u' (0x75) for UTF-8 Data.
This field is followed by a file name as a string (one-octet length, followed by a file name). While not detailed in the RFC, most implementations of PGP also add a trailing null at the end of the file name but use the string length to skip to the next field.
We propose to add a new formatting type of 'm' (0x6d) to describe that there is a RFC 2046 [RFC2046] MIME media type associated with the literal data. In the case of a 'm' format type, the MIME media type is appended to the end of the null terminated file name, while extending the file name length byte to accommodate this additional information.
0000 6d 17 73 6f 6d 65 64 61 74 61 2e 6a 70 67 00 69 |m.somedata.jpg.i| 0010 6d 61 67 65 2f 6a 70 65 67 |mage/jpeg |
The following is an example of a Literal Data packet (Tag 11) that specifies the MIME media type format image/jpeg for a file named 'somedata.jpg'
OpenPGP implementations supporting the MIME literal data packet format SHOULD use the MIME media type string to select the appropriate viewer for the encoded content. Implementations should consider the following possibilities: RFC 4880 [RFC4880] section 13.10.
In the long run, a more correct method of associated MIME media type with content might employ one of the experimental tags mentioned in
The author would like to acknowledge the help of many individuals who helped in particular Derek Atkins, Jon Callas, Damon Cokenias, David Finkelstein, Hal Finney and Will Price.
Damon Cokenias, Derek Atkins and Jon Callas provided important criticism on compliance with OpenPGP RFC 4880 [RFC4880].
This memo includes no request to IANA.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC4880] | Callas, J., Donnerhacke, L., Finney, H., Shaw, D. and R. Thayer, "OpenPGP Message Format", RFC 4880, November 2007. |
[RFC2046] | Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996. |
[RFC2629] | Rose, M.T., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999. |
[RFC3552] | Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, July 2003. |
[I-D.narten-iana-considerations-rfc2434bis] | Narten, T and H Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", Internet-Draft draft-narten-iana-considerations-rfc2434bis-09, March 2008. |