home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1100s / rfc1113.txt < prev    next >
Text File  |  1989-08-23  |  87KB  |  1,907 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            J. Linn
  8. Request for Comments:  1113                                          DEC
  9. Obsoletes RFCs: 989, 1040                         IAB Privacy Task Force
  10.                                                              August 1989
  11.  
  12.  
  13.            Privacy Enhancement for Internet Electronic Mail:
  14.       Part I -- Message Encipherment and Authentication Procedures
  15.  
  16. STATUS OF THIS MEMO
  17.  
  18.    This RFC suggests a draft standard elective protocol for the Internet
  19.    community, and requests discussion and suggestions for improvements.
  20.    Distribution of this memo is unlimited.
  21.  
  22. ACKNOWLEDGMENT
  23.  
  24.    This RFC is the outgrowth of a series of IAB Privacy Task Force
  25.    meetings and of internal working papers distributed for those
  26.    meetings.  I would like to thank the following Privacy Task Force
  27.    members and meeting guests for their comments and contributions at
  28.    the meetings which led to the preparation of this RFC: David
  29.    Balenson, Curt Barker, Jim Bidzos, Matt Bishop, Danny Cohen, Tom
  30.    Daniel, Charles Fox, Morrie Gasser, Russ Housley, Steve Kent
  31.    (chairman), John Laws, Steve Lipner, Dan Nessett, Mike Padlipsky, Rob
  32.    Shirey, Miles Smid, Steve Walker, and Steve Wilbur.
  33.  
  34. Table of Contents
  35.  
  36.    1.  Executive Summary                                               2
  37.    2.  Terminology                                                     3
  38.    3.  Services, Constraints, and Implications                         3
  39.    4.  Processing of Messages                                          7
  40.    4.1  Message Processing Overview                                    7
  41.    4.1.1  Types of Keys                                                7
  42.    4.1.2  Processing Procedures                                        8
  43.    4.2  Encryption Algorithms and Modes                                9
  44.    4.3  Privacy Enhancement Message Transformations                   10
  45.    4.3.1  Constraints                                                 10
  46.    4.3.2  Approach                                                    11
  47.    4.3.2.1  Step 1: Local Form                                        12
  48.    4.3.2.2  Step 2: Canonical Form                                    12
  49.    4.3.2.3  Step 3: Authentication and Encipherment                   12
  50.    4.3.2.4  Step 4: Printable Encoding                                13
  51.    4.3.2.5  Summary of Transformations                                15
  52.    4.4  Encapsulation Mechanism                                       15
  53.    4.5  Mail for Mailing Lists                                        17
  54.    4.6  Summary of Encapsulated Header Fields                         18
  55.  
  56.  
  57.  
  58. Linn                                                            [Page 1]
  59.  
  60. RFC 1113                Mail Privacy: Procedures             August 1989
  61.  
  62.  
  63.    4.6.1  Per-Message Encapsulated Header Fields                      20
  64.    4.6.1.1  X-Proc-Type Field                                         20
  65.    4.6.1.2  X-DEK-Info Field                                          21
  66.    4.6.2  Encapsulated Header Fields Normally Per-Message             21
  67.    4.6.2.1  X-Sender-ID Field                                         22
  68.    4.6.2.2  X-Certificate Field                                       22
  69.    4.6.2.3  X-MIC-Info Field                                          23
  70.    4.6.3  Encapsulated Header Fields with Variable Occurrences        23
  71.    4.6.3.1  X-Issuer-Certificate Field                                23
  72.    4.6.4  Per-Recipient Encapsulated Header Fields                    24
  73.    4.6.4.1  X-Recipient-ID Field                                      24
  74.    4.6.4.2  X-Key-Info Field                                          24
  75.    4.6.4.2.1  Symmetric Key Management                                24
  76.    4.6.4.2.2  Asymmetric Key Management                               25
  77.    5.  Key Management                                                 26
  78.    5.1  Data Encrypting Keys (DEKs)                                   26
  79.    5.2  Interchange Keys (IKs)                                        26
  80.    5.2.1  Subfield Definitions                                        28
  81.    5.2.1.1  Entity Identifier Subfield                                28
  82.    5.2.1.2  Issuing Authority Subfield                                29
  83.    5.2.1.3  Version/Expiration Subfield                               29
  84.    5.2.2  IK Cryptoperiod Issues                                      29
  85.    6.  User Naming                                                    29
  86.    6.1  Current Approach                                              29
  87.    6.2  Issues for Consideration                                      30
  88.    7.  Example User Interface and Implementation                      30
  89.    8.  Areas For Further Study                                        31
  90.    9.  References                                                     32
  91.    NOTES                                                              32
  92.  
  93. 1.  Executive Summary
  94.  
  95.    This RFC defines message encipherment and authentication procedures,
  96.    in order to provide privacy enhancement services for electronic mail
  97.    transfer in the Internet.  It is one member of a related set of four
  98.    RFCs.  The procedures defined in the current RFC are intended to be
  99.    compatible with a wide range of key management approaches, including
  100.    both symmetric (secret-key) and asymmetric (public-key) approaches
  101.    for encryption of data encrypting keys.  Use of symmetric
  102.    cryptography for message text encryption and/or integrity check
  103.    computation is anticipated.  RFC-1114 specifies supporting key
  104.    management mechanisms based on the use of public-key certificates.
  105.    RFC-1115 specifies algorithm and related information relevant to the
  106.    current RFC and to RFC-1114.  A subsequent RFC will provide details
  107.    of paper and electronic formats and procedures for the key management
  108.    infrastructure being established in support of these services.
  109.  
  110.    Privacy enhancement services (confidentiality, authentication, and
  111.  
  112.  
  113.  
  114. Linn                                                            [Page 2]
  115.  
  116. RFC 1113                Mail Privacy: Procedures             August 1989
  117.  
  118.  
  119.    message integrity assurance) are offered through the use of end-to-
  120.    end cryptography between originator and recipient User Agent
  121.    processes, with no special processing requirements imposed on the
  122.    Message Transfer System at endpoints or at intermediate relay sites.
  123.    This approach allows privacy enhancement facilities to be
  124.    incorporated on a site-by-site or user-by-user basis without impact
  125.    on other Internet entities.  Interoperability among heterogeneous
  126.    components and mail transport facilities is supported.
  127.  
  128. 2.  Terminology
  129.  
  130.    For descriptive purposes, this RFC uses some terms defined in the OSI
  131.    X.400 Message Handling System Model per the 1984 CCITT
  132.    Recommendations.  This section replicates a portion of X.400's
  133.    Section 2.2.1, "Description of the MHS Model: Overview" in order to
  134.    make the terminology clear to readers who may not be familiar with
  135.    the OSI MHS Model.
  136.  
  137.    In the MHS model, a user is a person or a computer application.  A
  138.    user is referred to as either an originator (when sending a message)
  139.    or a recipient (when receiving one).  MH Service elements define the
  140.    set of message types and the capabilities that enable an originator
  141.    to transfer messages of those types to one or more recipients.
  142.  
  143.    An originator prepares messages with the assistance of his or her
  144.    User Agent (UA).  A UA is an application process that interacts with
  145.    the Message Transfer System (MTS) to submit messages.  The MTS
  146.    delivers to one or more recipient UAs the messages submitted to it.
  147.    Functions performed solely by the UA and not standardized as part of
  148.    the MH Service elements are called local UA functions.
  149.  
  150.    The MTS is composed of a number of Message Transfer Agents (MTAs).
  151.    Operating together, the MTAs relay messages and deliver them to the
  152.    intended recipient UAs, which then make the messages available to the
  153.    intended recipients.
  154.  
  155.    The collection of UAs and MTAs is called the Message Handling System
  156.    (MHS).  The MHS and all of its users are collectively referred to as
  157.    the Message Handling Environment.
  158.  
  159. 3.  Services, Constraints, and Implications
  160.  
  161.    This RFC defines mechanisms to enhance privacy for electronic mail
  162.    transferred in the Internet.  The facilities discussed in this RFC
  163.    provide privacy enhancement services on an end-to-end basis between
  164.    sender and recipient UAs.  No privacy enhancements are offered for
  165.    message fields which are added or transformed by intermediate relay
  166.    points.
  167.  
  168.  
  169.  
  170. Linn                                                            [Page 3]
  171.  
  172. RFC 1113                Mail Privacy: Procedures             August 1989
  173.  
  174.  
  175.    Authentication and integrity facilities are always applied to the
  176.    entirety of a message's text.  No facility for confidentiality
  177.    without authentication is provided.  Encryption facilities may be
  178.    applied selectively to portions of a message's contents; this allows
  179.    less sensitive portions of messages (e.g., descriptive fields) to be
  180.    processed by a recipient's delegate in the absence of the recipient's
  181.    personal cryptographic keys.  In the limiting case, where the
  182.    entirety of message text is excluded from encryption, this feature
  183.    can be used to yield the effective combination of authentication and
  184.    integrity services without confidentiality.
  185.  
  186.    In keeping with the Internet's heterogeneous constituencies and usage
  187.    modes, the measures defined here are applicable to a broad range of
  188.    Internet hosts and usage paradigms.  In particular, it is worth
  189.    noting the following attributes:
  190.  
  191.       1.  The mechanisms defined in this RFC are not restricted to a
  192.           particular host or operating system, but rather allow
  193.           interoperability among a broad range of systems.  All
  194.           privacy enhancements are implemented at the application
  195.           layer, and are not dependent on any privacy features at
  196.           lower protocol layers.
  197.  
  198.       2.  The defined mechanisms are compatible with non-enhanced
  199.           Internet components.  Privacy enhancements are implemented
  200.           in an end-to-end fashion which does not impact mail
  201.           processing by intermediate relay hosts which do not
  202.           incorporate privacy enhancement facilities.  It is
  203.           necessary, however, for a message's sender to be cognizant
  204.           of whether a message's intended recipient implements privacy
  205.           enhancements, in order that encoding and possible
  206.           encipherment will not be performed on a message whose
  207.           destination is not equipped to perform corresponding inverse
  208.           transformations.
  209.  
  210.       3.  The defined mechanisms are compatible with a range of mail
  211.           transport facilities (MTAs).  Within the Internet,
  212.           electronic mail transport is effected by a variety of SMTP
  213.           implementations.  Certain sites, accessible via SMTP,
  214.           forward mail into other mail processing environments (e.g.,
  215.           USENET, CSNET, BITNET).  The privacy enhancements must be
  216.           able to operate across the SMTP realm; it is desirable that
  217.           they also be compatible with protection of electronic mail
  218.           sent between the SMTP environment and other connected
  219.           environments.
  220.  
  221.       4.  The defined mechanisms are compatible with a broad range of
  222.           electronic mail user agents (UAs).  A large variety of
  223.  
  224.  
  225.  
  226. Linn                                                            [Page 4]
  227.  
  228. RFC 1113                Mail Privacy: Procedures             August 1989
  229.  
  230.  
  231.           electronic mail user agent programs, with a corresponding
  232.           broad range of user interface paradigms, is used in the
  233.           Internet.  In order that electronic mail privacy
  234.           enhancements be available to the broadest possible user
  235.           community, selected mechanisms should be usable with the
  236.           widest possible variety of existing UA programs.  For
  237.           purposes of pilot implementation, it is desirable that
  238.           privacy enhancement processing be incorporable into a
  239.           separate program, applicable to a range of UAs, rather than
  240.           requiring internal modifications to each UA with which
  241.           privacy-enhanced services are to be provided.
  242.  
  243.       5.  The defined mechanisms allow electronic mail privacy
  244.           enhancement processing to be performed on personal computers
  245.           (PCs) separate from the systems on which UA functions are
  246.           implemented.  Given the expanding use of PCs and the limited
  247.           degree of trust which can be placed in UA implementations on
  248.           many multi-user systems, this attribute can allow many users
  249.           to process privacy-enhanced mail with a higher assurance
  250.           level than a strictly UA-based approach would allow.
  251.  
  252.       6.  The defined mechanisms support privacy protection of
  253.           electronic mail addressed to mailing lists (distribution
  254.           lists, in ISO parlance).
  255.  
  256.       7.  The mechanisms defined within this RFC are compatible with a
  257.           variety of supporting key management approaches, including
  258.           (but not limited to) manual pre-distribution, centralized
  259.           key distribution based on symmetric cryptography, and the
  260.           use of public-key certificates.  Different key management
  261.           mechanisms may be used for different recipients of a
  262.           multicast message.  While support for a particular key
  263.           management mechanism is not a minimum essential requirement
  264.           for compatibility with this RFC, adoption of the public-key
  265.           certificate approach defined in companion RFC-1114 is
  266.           strongly recommended.
  267.  
  268.    In order to achieve applicability to the broadest possible range of
  269.    Internet hosts and mail systems, and to facilitate pilot
  270.    implementation and testing without the need for prior modifications
  271.    throughout the Internet, three basic restrictions are imposed on the
  272.    set of measures to be considered in this RFC:
  273.  
  274.       1.  Measures will be restricted to implementation at endpoints
  275.           and will be amenable to integration at the user agent (UA)
  276.           level or above, rather than necessitating integration into
  277.           the message transport system (e.g., SMTP servers).
  278.  
  279.  
  280.  
  281.  
  282. Linn                                                            [Page 5]
  283.  
  284. RFC 1113                Mail Privacy: Procedures             August 1989
  285.  
  286.  
  287.       2.  The set of supported measures enhances rather than restricts
  288.           user capabilities.  Trusted implementations, incorporating
  289.           integrity features protecting software from subversion by
  290.           local users, cannot be assumed in general.  In the absence
  291.           of such features, it appears more feasible to provide
  292.           facilities which enhance user services (e.g., by protecting
  293.           and authenticating inter-user traffic) than to enforce
  294.           restrictions (e.g., inter-user access control) on user
  295.           actions.
  296.  
  297.       3.  The set of supported measures focuses on a set of functional
  298.           capabilities selected to provide significant and tangible
  299.           benefits to a broad user community.  By concentrating on the
  300.           most critical set of services, we aim to maximize the added
  301.           privacy value that can be provided with a modest level of
  302.           implementation effort.
  303.  
  304.    As a result of these restrictions, the following facilities can be
  305.    provided:
  306.  
  307.       1.  disclosure protection,
  308.  
  309.       2.  sender authenticity,
  310.  
  311.       3.  message integrity measures, and
  312.  
  313.       4.  (if asymmetric key management is used) non-repudiation of
  314.           origin,
  315.  
  316.    but the following privacy-relevant concerns are not addressed:
  317.  
  318.       1.  access control,
  319.  
  320.       2.  traffic flow confidentiality,
  321.  
  322.       3.  address list accuracy,
  323.  
  324.       4.  routing control,
  325.  
  326.       5.  issues relating to the casual serial reuse of PCs by
  327.           multiple users,
  328.  
  329.       6.  assurance of message receipt and non-deniability of receipt,
  330.  
  331.       7.  automatic association of acknowledgments with the messages
  332.           to which they refer, and
  333.  
  334.       8.  message duplicate detection, replay prevention, or other
  335.  
  336.  
  337.  
  338. Linn                                                            [Page 6]
  339.  
  340. RFC 1113                Mail Privacy: Procedures             August 1989
  341.  
  342.  
  343.           stream-oriented services.
  344.  
  345.    A message's sender will determine whether privacy enhancements are to
  346.    be performed on a particular message.  Therefore, a sender must be
  347.    able to determine whether particular recipients are equipped to
  348.    process privacy-enhanced mail.  In a general architecture, these
  349.    mechanisms will be based on server queries; thus, the query function
  350.    could be integrated into a UA to avoid imposing burdens or
  351.    inconvenience on electronic mail users.
  352.  
  353. 4.  Processing of Messages
  354.  
  355. 4.1  Message Processing Overview
  356.  
  357.    This subsection provides a high-level overview of the components and
  358.    processing steps involved in electronic mail privacy enhancement
  359.    processing.  Subsequent subsections will define the procedures in
  360.    more detail.
  361.  
  362. 4.1.1  Types of Keys
  363.  
  364.    A two-level keying hierarchy is used to support privacy-enhanced
  365.    message transmission:
  366.  
  367.       1.  Data Encrypting Keys (DEKs) are used for encryption of
  368.           message text and (with certain choices among a set of
  369.           alternative algorithms) for computation of message integrity
  370.           check (MIC) quantities.  DEKs are generated individually for
  371.           each transmitted message; no predistribution of DEKs is
  372.           needed to support privacy-enhanced message transmission.
  373.  
  374.       2.  Interchange Keys (IKs) are used to encrypt DEKs for
  375.           transmission within messages.  Ordinarily, the same IK will
  376.           be used for all messages sent from a given originator to a
  377.           given recipient over a period of time.  Each transmitted
  378.           message includes a representation of the DEK(s) used for
  379.           message encryption and/or MIC computation, encrypted under
  380.           an individual IK per named recipient.  The representation is
  381.           associated with "X-Sender-ID:" and "X-Recipient-ID:" fields,
  382.           which allow each individual recipient to identify the IK
  383.           used to encrypt DEKs and/or MICs for that recipient's use.
  384.           Given an appropriate IK, a recipient can decrypt the
  385.           corresponding transmitted DEK representation, yielding the
  386.           DEK required for message text decryption and/or MIC
  387.           verification.  The definition of an IK differs depending on
  388.           whether symmetric or asymmetric cryptography is used for DEK
  389.           encryption:
  390.  
  391.  
  392.  
  393.  
  394. Linn                                                            [Page 7]
  395.  
  396. RFC 1113                Mail Privacy: Procedures             August 1989
  397.  
  398.  
  399.          2a. When symmetric cryptography is used for DEK
  400.              encryption, an IK is a single symmetric key shared
  401.              between an originator and a recipient.  In this
  402.              case, the same IK is used to encrypt MICs as well
  403.              as DEKs for transmission.  Version/expiration
  404.              information and IA identification associated with
  405.              the originator and with the recipient must be
  406.              concatenated in order to fully qualify a symmetric
  407.              IK.
  408.  
  409.          2b. When asymmetric cryptography is used, the IK
  410.              component used for DEK encryption is the public
  411.              component of the recipient.  The IK component used
  412.              for MIC encryption is the private component of the
  413.              originator, and therefore only one encrypted MIC
  414.              representation need be included per message, rather than
  415.              one per recipient.  Each of these IK
  416.              components can be fully qualified in an
  417.              "X-Recipient-ID:" or "X-Sender-ID:" field,
  418.              respectively.
  419.  
  420. 4.1.2  Processing Procedures
  421.  
  422.    When privacy enhancement processing is to be performed on an outgoing
  423.    message, a DEK is generated [1] for use in message encryption and (if
  424.    a chosen MIC algorithm requires a key) a variant of the DEK is formed
  425.    for use in MIC computation.  DEK generation can be omitted for the
  426.    case of a message in which all contents are excluded from encryption,
  427.    unless a chosen MIC computation algorithm requires a DEK.
  428.  
  429.    An "X-Sender-ID:" field is included in the header to provide one
  430.    identification component for the IK(s) used for message processing.
  431.    IK components are selected for each individually named recipient; a
  432.    corresponding "X-Recipient-ID:" field, interpreted in the context of
  433.    a prior "X-Sender-ID:" field, serves to identify each IK.  Each "X-
  434.    Recipient-ID:" field is followed by an "X-Key-Info:" field, which
  435.    transfers a DEK encrypted under the IK appropriate for the specified
  436.    recipient.  When symmetric key management is used for a given
  437.    recipient, the "X-Key-Info:" field also transfers the message's
  438.    computed MIC, encrypted under the recipient's IK.  When asymmetric
  439.    key management is used, a prior "X-MIC-Info:" field carries the
  440.    message's MIC encrypted under the private component of the sender.
  441.  
  442.    A four-phase transformation procedure is employed in order to
  443.    represent encrypted message text in a universally transmissible form
  444.    and to enable messages encrypted on one type of host computer to be
  445.    decrypted on a different type of host computer.  A plaintext message
  446.    is accepted in local form, using the host's native character set and
  447.  
  448.  
  449.  
  450. Linn                                                            [Page 8]
  451.  
  452. RFC 1113                Mail Privacy: Procedures             August 1989
  453.  
  454.  
  455.    line representation.  The local form is converted to a canonical
  456.    message text representation, defined as equivalent to the inter-SMTP
  457.    representation of message text.  This canonical representation forms
  458.    the input to the MIC computation and encryption processes.
  459.  
  460.    For encryption purposes, the canonical representation is padded as
  461.    required by the encryption algorithm.  The padded canonical
  462.    representation is encrypted (except for any regions which are
  463.    explicitly excluded from encryption).  The encrypted text (along with
  464.    the canonical representation of regions which were excluded from
  465.    encryption) is encoded into a printable form.  The printable form is
  466.    composed of a restricted character set which is chosen to be
  467.    universally representable across sites, and which will not be
  468.    disrupted by processing within and between MTS entities.
  469.  
  470.    The output of the encoding procedure is combined with a set of header
  471.    fields carrying cryptographic control information.  The result is
  472.    passed to the electronic mail system to be encapsulated as the text
  473.    portion of a transmitted message.
  474.  
  475.    When a privacy-enhanced message is received, the cryptographic
  476.    control fields within its text portion provide the information
  477.    required for the authorized recipient to perform MIC verification and
  478.    decryption of the received message text.  First, the printable
  479.    encoding is converted to a bitstring.  Encrypted portions of the
  480.    transmitted message are decrypted.  The MIC is verified.  The
  481.    canonical representation is converted to the recipient's local form,
  482.    which need not be the same as the sender's local form.
  483.  
  484. 4.2  Encryption Algorithms and Modes
  485.  
  486.    For purposes of this RFC, the Block Cipher Algorithm DEA-1, defined
  487.    in ANSI X3.92-1981 [2] shall be used for encryption of message text.
  488.    The DEA-1 is equivalent to the Data Encryption Standard (DES), as
  489.    defined in FIPS PUB 46 [3].  When used for encryption of text, the
  490.    DEA-1 shall be used in the Cipher Block Chaining (CBC) mode, as
  491.    defined in ISO IS 8372 [4].  The identifier string "DES-CBC", defined
  492.    in RFC-1115, signifies this algorithm/mode combination.  The CBC mode
  493.    definition in IS 8372 is equivalent to that provided in FIPS PUB 81
  494.    [5] and in ANSI X3.106-1983 [16].  Use of other algorithms and/or
  495.    modes for message text processing will require case-by-case study to
  496.    determine applicability and constraints.  Additional algorithms and
  497.    modes approved for use in this context will be specified in
  498.    successors to RFC-1115.
  499.  
  500.    It is an originator's responsibility to generate a new pseudorandom
  501.    initializing vector (IV) for each privacy-enhanced electronic mail
  502.    message unless the entirety of the message is excluded from
  503.  
  504.  
  505.  
  506. Linn                                                            [Page 9]
  507.  
  508. RFC 1113                Mail Privacy: Procedures             August 1989
  509.  
  510.  
  511.    encryption.  Section 4.3.1 of [17] provides rationale for this
  512.    requirement, even in a context where individual DEKs are generated
  513.    for individual messages.  The IV will be transmitted with the
  514.    message.
  515.  
  516.    Certain operations require that one key be encrypted under an
  517.    interchange key (IK) for purposes of transmission.  A header facility
  518.    indicates the mode in which the IK is used for encryption.  RFC-1115
  519.    specifies encryption algorithm/mode identifiers, including DES-ECB,
  520.    DES-EDE, and RSA.  All implementations using symmetric key management
  521.    should support DES-ECB IK use, and all implementations using
  522.    asymmetric key management should support RSA IK use.
  523.  
  524.    RFC-1114, released concurrently with this RFC, specifies asymmetric,
  525.    certificate-based key management procedures to support the message
  526.    processing procedures defined in this document.  The message
  527.    processing procedures can also be used with symmetric key management,
  528.    given prior distribution of suitable symmetric IKs through out-of-
  529.    band means.  Support for the asymmetric approach defined in RFC-1114
  530.    is strongly recommended.
  531.  
  532. 4.3  Privacy Enhancement Message Transformations
  533.  
  534. 4.3.1  Constraints
  535.  
  536.    An electronic mail encryption mechanism must be compatible with the
  537.    transparency constraints of its underlying electronic mail
  538.    facilities.  These constraints are generally established based on
  539.    expected user requirements and on the characteristics of anticipated
  540.    endpoint and transport facilities.  An encryption mechanism must also
  541.    be compatible with the local conventions of the computer systems
  542.    which it interconnects.  In our approach, a canonicalization step is
  543.    performed to abstract out local conventions and a subsequent encoding
  544.    step is performed to conform to the characteristics of the underlying
  545.    mail transport medium (SMTP).  The encoding conforms to SMTP
  546.    constraints, established to support interpersonal messaging.  SMTP's
  547.    rules are also used independently in the canonicalization process.
  548.    RFC-821's [7] Section 4.5 details SMTP's transparency constraints.
  549.  
  550.    To prepare a message for SMTP transmission, the following
  551.    requirements must be met:
  552.  
  553.       1.  All characters must be members of the 7-bit ASCII character
  554.           set.
  555.  
  556.       2.  Text lines, delimited by the character pair <CR><LF>, must
  557.           be no more than 1000 characters long.
  558.  
  559.  
  560.  
  561.  
  562. Linn                                                           [Page 10]
  563.  
  564. RFC 1113                Mail Privacy: Procedures             August 1989
  565.  
  566.  
  567.       3.  Since the string <CR><LF>.<CR><LF> indicates the end of a
  568.           message, it must not occur in text prior to the end of a
  569.           message.
  570.  
  571.    Although SMTP specifies a standard representation for line delimiters
  572.    (ASCII <CR><LF>), numerous systems use a different native
  573.    representation to delimit lines.  For example, the <CR><LF> sequences
  574.    delimiting lines in mail inbound to UNIX systems are transformed to
  575.    single <LF>s as mail is written into local mailbox files.  Lines in
  576.    mail incoming to record-oriented systems (such as VAX VMS) may be
  577.    converted to appropriate records by the destination SMTP [8] server.
  578.    As a result, if the encryption process generated <CR>s or <LF>s,
  579.    those characters might not be accessible to a recipient UA program at
  580.    a destination which uses different line delimiting conventions.  It
  581.    is also possible that conversion between tabs and spaces may be
  582.    performed in the course of mapping between inter-SMTP and local
  583.    format; this is a matter of local option.  If such transformations
  584.    changed the form of transmitted ciphertext, decryption would fail to
  585.    regenerate the transmitted plaintext, and a transmitted MIC would
  586.    fail to compare with that computed at the destination.
  587.  
  588.    The conversion performed by an SMTP server at a system with EBCDIC as
  589.    a native character set has even more severe impact, since the
  590.    conversion from EBCDIC into ASCII is an information-losing
  591.    transformation.  In principle, the transformation function mapping
  592.    between inter-SMTP canonical ASCII message representation and local
  593.    format could be moved from the SMTP server up to the UA, given a
  594.    means to direct that the SMTP server should no longer perform that
  595.    transformation.  This approach has a major disadvantage: internal
  596.    file (e.g., mailbox) formats would be incompatible with the native
  597.    forms used on the systems where they reside.  Further, it would
  598.    require modification to SMTP servers, as mail would be passed to SMTP
  599.    in a different representation than it is passed at present.
  600.  
  601. 4.3.2  Approach
  602.  
  603.    Our approach to supporting privacy-enhanced mail across an
  604.    environment in which intermediate conversions may occur encodes mail
  605.    in a fashion which is uniformly representable across the set of
  606.    privacy-enhanced UAs regardless of their systems' native character
  607.    sets.  This encoded form is used to represent mail text from sender
  608.    to recipient, but the encoding is not applied to enclosing mail
  609.    transport headers or to encapsulated headers inserted to carry
  610.    control information between privacy-enhanced UAs.  The encoding's
  611.    characteristics are such that the transformations anticipated between
  612.    sender and recipient UAs will not prevent an encoded message from
  613.    being decoded properly at its destination.
  614.  
  615.  
  616.  
  617.  
  618. Linn                                                           [Page 11]
  619.  
  620. RFC 1113                Mail Privacy: Procedures             August 1989
  621.  
  622.  
  623.    A sender may exclude one or more portions of a message from
  624.    encryption processing, but authentication processing is always
  625.    applied to the entirety of message text.  Explicit action is required
  626.    to exclude a portion of a message from encryption processing; by
  627.    default, encryption is applied to the entirety of message text.  The
  628.    user-level delimiter which specifies such exclusion is a local
  629.    matter, and hence may vary between sender and recipient, but all
  630.    systems should provide a means for unambiguous identification of
  631.    areas excluded from encryption processing.
  632.  
  633.    An outbound privacy-enhanced message undergoes four transformation
  634.    steps, described in the following four subsections.
  635.  
  636. 4.3.2.1  Step 1: Local Form
  637.  
  638.    The message text is created in the system's native character set,
  639.    with lines delimited in accordance with local convention.
  640.  
  641. 4.3.2.2  Step 2: Canonical Form
  642.  
  643.    The entire message text, including both those portions subject to
  644.    encipherment processing and those portions excluded from such
  645.    processing, is converted to a universal canonical form, analogous to
  646.    the inter-SMTP representation [9] as defined in RFC-821 and RFC-822
  647.    [10] (ASCII character set, <CR><LF> line delimiters).  The processing
  648.    required to perform this conversion is minimal on systems whose
  649.    native character set is ASCII.  (Note: Since the output of the
  650.    canonical encoding process will never be submitted directly to SMTP,
  651.    but only to subsequent steps of the privacy enhancement encoding
  652.    process, the dot-stuffing transformation discussed in RFC-821,
  653.    section 4.5.2, is not required.)  Since a message is converted to a
  654.    standard character set and representation before encryption, it can
  655.    be decrypted and its MIC can be verified at any type of destination
  656.    host computer.  The decryption and MIC verification is performed
  657.    before any conversions which may be necessary to transform the
  658.    message into a destination-specific local form.
  659.  
  660. 4.3.2.3  Step 3: Authentication and Encipherment
  661.  
  662.    The canonical form is input to the selected MIC computation algorithm
  663.    in order to compute an integrity check quantity for the message.  No
  664.    padding is added to the canonical form before submission to the MIC
  665.    computation algorithm, although certain MIC algorithms will apply
  666.    their own padding in the course of computing a MIC.
  667.  
  668.    Padding is applied to the canonical form as needed to perform
  669.    encryption in the DEA-1 CBC mode, as follows: The number of octets to
  670.    be encrypted is determined by subtracting the number of octets
  671.  
  672.  
  673.  
  674. Linn                                                           [Page 12]
  675.  
  676. RFC 1113                Mail Privacy: Procedures             August 1989
  677.  
  678.  
  679.    excluded from encryption from the total length of the canonically
  680.    encoded text.  Octets with the hexadecimal value FF (all ones) are
  681.    appended to the canonical form as needed so that the text octets to
  682.    be encrypted, along with the added padding octets, fill an integral
  683.    number of 8-octet encryption quanta.  No padding is applied if the
  684.    number of octets to be encrypted is already an integral multiple of
  685.    8.  The use of hexadecimal FF (a value outside the 7-bit ASCII set)
  686.    as a padding value allows padding octets to be distinguished from
  687.    valid data without inclusion of an explicit padding count indicator.
  688.  
  689.    The regions of the message which have not been excluded from
  690.    encryption are encrypted.  To support selective encipherment
  691.    processing, an implementation must retain internal indications of the
  692.    positions of excluded areas excluded from encryption with relation to
  693.    non-excluded areas, so that those areas can be properly delimited in
  694.    the encoding procedure defined in step 4.  If a region excluded from
  695.    encryption intervenes between encrypted regions, cryptographic state
  696.    (e.g., IVs and accumulation of octets into encryption quanta) is
  697.    preserved and continued after the excluded region.
  698.  
  699. 4.3.2.4  Step 4: Printable Encoding
  700.  
  701.    Proceeding from left to right, the bit string resulting from step 3
  702.    is encoded into characters which are universally representable at all
  703.    sites, though not necessarily with the same bit patterns (e.g.,
  704.    although the character "E" is represented in an ASCII-based system as
  705.    hexadecimal 45 and as hexadecimal C5 in an EBCDIC-based system, the
  706.    local significance of the two representations is equivalent).  This
  707.    encoding step is performed for all privacy-enhanced messages, even if
  708.    an entire message is excluded from encryption.
  709.  
  710.    A 64-character subset of International Alphabet IA5 is used, enabling
  711.    6 bits to be represented per printable character.  (The proposed
  712.    subset of characters is represented identically in IA5 and ASCII.)
  713.    Two additional characters, "=" and "*", are used to signify special
  714.    processing functions.  The character "=" is used for padding within
  715.    the printable encoding procedure.  The character "*" is used to
  716.    delimit the beginning and end of a region which has been excluded
  717.    from encipherment processing.  The encoding function's output is
  718.    delimited into text lines (using local conventions), with each line
  719.    except the last containing exactly 64 printable characters and the
  720.    final line containing 64 or fewer printable characters.  (This line
  721.    length is easily printable and is guaranteed to satisfy SMTP's 1000-
  722.    character transmitted line length limit.)
  723.  
  724.    The encoding process represents 24-bit groups of input bits as output
  725.    strings of 4 encoded characters. Proceeding from left to right across
  726.    a 24-bit input group extracted from the output of step 3, each 6-bit
  727.  
  728.  
  729.  
  730. Linn                                                           [Page 13]
  731.  
  732. RFC 1113                Mail Privacy: Procedures             August 1989
  733.  
  734.  
  735.    group is used as an index into an array of 64 printable characters.
  736.    The character referenced by the index is placed in the output string.
  737.    These characters, identified in Table 0, are selected so as to be
  738.    universally representable, and the set excludes characters with
  739.    particular significance to SMTP (e.g., ".", "<CR>", "<LF>").
  740.  
  741.    Special processing is performed if fewer than 24 bits are available
  742.    in an input group, either at the end of a message or (when the
  743.    selective encryption facility is invoked) at the end of an encrypted
  744.    region or an excluded region.  A full encoding quantum is always
  745.    completed at the end of a message and before the delimiter "*" is
  746.    output to initiate or terminate the representation of a block
  747.    excluded from encryption.  When fewer than 24 input bits are
  748.    available in an input group, zero bits are added (on the right) to
  749.    form an integral number of 6-bit groups.  Output character positions
  750.    which are not required to represent actual input data are set to the
  751.    character "=".  Since all canonically encoded output is an integral
  752.    number of octets, only the following cases can arise: (1) the final
  753.    quantum of encoding input is an integral multiple of 24 bits; here,
  754.    the final unit of encoded output will be an integral multiple of 4
  755.    characters with no "=" padding, (2) the final quantum of encoding
  756.    input is exactly 8 bits; here, the final unit of encoded output will
  757.    be two characters followed by two "=" padding characters, or (3) the
  758.    final quantum of encoding input is exactly 16 bits; here, the final
  759.    unit of encoded output will be three characters followed by one "="
  760.    padding character.
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Linn                                                           [Page 14]
  787.  
  788. RFC 1113                Mail Privacy: Procedures             August 1989
  789.  
  790.  
  791. 4.3.2.5  Summary of Transformations
  792.  
  793.    In summary, the outbound message is subjected to the following
  794.    composition of transformations:
  795.  
  796.         Transmit_Form = Encode(Encipher(Canonicalize(Local_Form)))
  797.  
  798.    The inverse transformations are performed, in reverse order, to
  799.    process inbound privacy-enhanced mail:
  800.  
  801.  
  802.        Local_Form = DeCanonicalize(Decipher(Decode(Transmit_Form)))
  803.  
  804.    Value Encoding  Value Encoding  Value Encoding  Value Encoding
  805.        0 A            17 R            34 i            51 z
  806.        1 B            18 S            35 j            52 0
  807.        2 C            19 T            36 k            53 1
  808.        3 D            20 U            37 l            54 2
  809.        4 E            21 V            38 m            55 3
  810.        5 F            22 W            39 n            56 4
  811.        6 G            23 X            40 o            57 5
  812.        7 H            24 Y            41 p            58 6
  813.        8 I            25 Z            42 q            59 7
  814.        9 J            26 a            43 r            60 8
  815.       10 K            27 b            44 s            61 9
  816.       11 L            28 c            45 t            62 +
  817.       12 M            29 d            46 u            63 /
  818.       13 N            30 e            47 v
  819.       14 O            31 f            48 w         (pad) =
  820.       15 P            32 g            49 x
  821.       16 Q            33 h            50 y           (1) *
  822.  
  823.    (1) The character "*" is used to enclose portions of an
  824.    encoded message to which encryption processing has not
  825.    been applied.
  826.  
  827.  
  828.                        Printable Encoding Characters
  829.                                   Table 1
  830.  
  831.  
  832.    Note that the local form and the functions to transform messages to
  833.    and from canonical form may vary between the sender and recipient
  834.    systems without loss of information.
  835.  
  836. 4.4  Encapsulation Mechanism
  837.  
  838.    Encapsulation of privacy-enhanced messages within an enclosing layer
  839.  
  840.  
  841.  
  842. Linn                                                           [Page 15]
  843.  
  844. RFC 1113                Mail Privacy: Procedures             August 1989
  845.  
  846.  
  847.    of headers interpreted by the electronic mail transport system offers
  848.    a number of advantages in comparison to a flat approach in which
  849.    certain fields within a single header are encrypted and/or carry
  850.    cryptographic control information.  Encapsulation provides generality
  851.    and segregates fields with user-to-user significance from those
  852.    transformed in transit.  All fields inserted in the course of
  853.    encryption/authentication processing are placed in the encapsulated
  854.    header.  This facilitates compatibility with mail handling programs
  855.    which accept only text, not header fields, from input files or from
  856.    other programs.  Further, privacy enhancement processing can be
  857.    applied recursively.  As far as the MTS is concerned, information
  858.    incorporated into cryptographic authentication or encryption
  859.    processing will reside in a message's text portion, not its header
  860.    portion.
  861.  
  862.    The encapsulation mechanism to be used for privacy-enhanced mail is
  863.    derived from that described in RFC-934 [11] which is, in turn, based
  864.    on precedents in the processing of message digests in the Internet
  865.    community.  To prepare a user message for encrypted or authenticated
  866.    transmission, it will be transformed into the representation shown in
  867.    Figure 1.
  868.  
  869.    As a general design principle, sensitive data is protected by
  870.    incorporating the data within the encapsulated text rather than by
  871.    applying measures selectively to fields in the enclosing header.
  872.    Examples of potentially sensitive header information may include
  873.    fields such as "Subject:", with contents which are significant on an
  874.    end-to-end, inter-user basis.  The (possibly empty) set of headers to
  875.    which protection is to be applied is a user option.  It is strongly
  876.    recommended, however, that all implementations should replicate
  877.    copies of "X-Sender-ID:" and "X-Recipient-ID:" fields within the
  878.    encapsulated text.
  879.  
  880.    If a user wishes disclosure protection for header fields, they must
  881.    occur only in the encapsulated text and not in the enclosing or
  882.    encapsulated header.  If disclosure protection is desired for a
  883.    message's subject indication, it is recommended that the enclosing
  884.    header contain a "Subject:" field indicating that "Encrypted Mail
  885.    Follows".
  886.  
  887.    If an authenticated version of header information is desired, that
  888.    data can be replicated within the encapsulated text portion in
  889.    addition to its inclusion in the enclosing header.  For example, a
  890.    sender wishing to provide recipients with a protected indication of a
  891.    message's position in a series of messages could include a copy of a
  892.    timestamp or message counter field within the encapsulated text.
  893.  
  894.    A specific point regarding the integration of privacy-enhanced mail
  895.  
  896.  
  897.  
  898. Linn                                                           [Page 16]
  899.  
  900. RFC 1113                Mail Privacy: Procedures             August 1989
  901.  
  902.  
  903.    facilities with the message encapsulation mechanism is worthy of
  904.    note.  The subset of IA5 selected for transmission encoding
  905.    intentionally excludes the character "-", so encapsulated text can be
  906.    distinguished unambiguously from a message's closing encapsulation
  907.    boundary (Post-EB) without recourse to character stuffing.
  908.  
  909.    Enclosing Header Portion
  910.            (Contains header fields per RFC-822)
  911.  
  912.    Blank Line
  913.            (Separates Enclosing Header from Encapsulated Message)
  914.  
  915.    Encapsulated Message
  916.  
  917.        Pre-Encapsulation Boundary (Pre-EB)
  918.            -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  919.  
  920.        Encapsulated Header Portion
  921.            (Contains encryption control fields inserted in plaintext.
  922.            Examples include "X-DEK-Info:", "X-Sender-ID:", and
  923.            "X-Key-Info:".
  924.            Note that, although these control fields have line-oriented
  925.            representations similar to RFC-822 header fields, the set
  926.            of fields valid in this context is disjoint from those used
  927.            in RFC-822 processing.)
  928.  
  929.        Blank Line
  930.            (Separates Encapsulated Header from subsequent encoded
  931.            Encapsulated Text Portion)
  932.  
  933.        Encapsulated Text Portion
  934.            (Contains message data encoded as specified in Section 4.3;
  935.            may incorporate protected copies of enclosing and
  936.            encapsulated header fields such as "Subject:", etc.)
  937.  
  938.        Post-Encapsulation Boundary (Post-EB)
  939.            -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  940.  
  941.  
  942.                            Message Encapsulation
  943.                                  Figure 1
  944.  
  945.  
  946. 4.5  Mail for Mailing Lists
  947.  
  948.    When mail is addressed to mailing lists, two different methods of
  949.    processing can be applicable: the IK-per-list method and the IK-per-
  950.    recipient method.  The choice depends on the information available to
  951.  
  952.  
  953.  
  954. Linn                                                           [Page 17]
  955.  
  956. RFC 1113                Mail Privacy: Procedures             August 1989
  957.  
  958.  
  959.    the sender and on the sender's preference.
  960.  
  961.    If a message's sender addresses a message to a list name or alias,
  962.    use of an IK associated with that name or alias as a entity (IK-per-
  963.    list), rather than resolution of the name or alias to its constituent
  964.    destinations, is implied.  Such an IK must, therefore, be available
  965.    to all list members.  For the case of asymmetric key management, the
  966.    list's private component must be available to all list members.  This
  967.    alternative will be the normal case for messages sent via remote
  968.    exploder sites, as a sender to such lists may not be cognizant of the
  969.    set of individual recipients.  Unfortunately, it implies an
  970.    undesirable level of exposure for the shared IK, and makes its
  971.    revocation difficult.  Moreover, use of the IK-per-list method allows
  972.    any holder of the list's IK to masquerade as another sender to the
  973.    list for authentication purposes.
  974.  
  975.    If, in contrast, a message's sender is equipped to expand the
  976.    destination mailing list into its individual constituents and elects
  977.    to do so (IK-per-recipient), the message's DEK (and, in the symmetric
  978.    key management case, MIC) will be encrypted under each per-recipient
  979.    IK and all such encrypted representations will be incorporated into
  980.    the transmitted message.  Note that per-recipient encryption is
  981.    required only for the relatively small DEK and MIC quantities carried
  982.    in the "X-Key-Info:" field, not for the message text which is, in
  983.    general, much larger.  Although more IKs are involved in processing
  984.    under the IK-per-recipient method, the pairwise IKs can be
  985.    individually revoked and possession of one IK does not enable a
  986.    successful masquerade of another user on the list.
  987.  
  988. 4.6  Summary of Encapsulated Header Fields
  989.  
  990.    This section summarizes the syntax and semantics of the encapsulated
  991.    header fields to be added to messages in the course of privacy
  992.    enhancement processing.  The fields are presented in three groups.
  993.    Normally, the groups will appear in encapsulated headers in the order
  994.    in which they are shown, though not all fields in each group will
  995.    appear in all messages. In certain indicated cases, it is recommended
  996.    that the fields be replicated within the encapsulated text portion as
  997.    well as being included within the encapsulated header.  Figures 2 and
  998.    3 show the appearance of small example encapsulated messages.  Figure
  999.    2 assumes the use of symmetric cryptography for key management.
  1000.    Figure 3 illustrates an example encapsulated message in which
  1001.    asymmetric key management is used.
  1002.  
  1003.    Unless otherwise specified, all field arguments are processed in a
  1004.    case-sensitive fashion.  In most cases, numeric quantities are
  1005.    represented in header fields as contiguous strings of hexadecimal
  1006.    digits, where each digit is represented by a character from the
  1007.  
  1008.  
  1009.  
  1010. Linn                                                           [Page 18]
  1011.  
  1012. RFC 1113                Mail Privacy: Procedures             August 1989
  1013.  
  1014.  
  1015.    ranges "0"-"9" or upper case "A"-"F".  Since public-key certificates
  1016.    and quantities encrypted using asymmetric algorithms are large in
  1017.    size, use of a more space-efficient encoding technique is appropriate
  1018.    for such quantities, and the encoding mechanism defined in Section
  1019.    4.3.2.4 of this RFC, representing 6 bits per printed character, is
  1020.    adopted.  The example shown in Figure 3 shows asymmetrically
  1021.    encrypted quantities (e.g., "X-MIC-Info:", "X-Key-Info:") with 64-
  1022.    character printed representations, corresponding to 384 bits.  The
  1023.    fields carrying asymmetrically encrypted quantities also illustrate
  1024.    the use of folding as defined in RFC-822, section 3.1.1.
  1025.  
  1026.    -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  1027.    X-Proc-Type: 3,ENCRYPTED
  1028.    X-DEK-Info: DES-CBC,F8143EDE5960C597
  1029.    X-Sender-ID: linn@ccy.bbn.com::
  1030.    X-Recipient-ID: linn@ccy.bbn.com:ptf-kmc:3
  1031.    X-Key-Info: DES-ECB,RSA-MD2,9FD3AAD2F2691B9A,B70665BB9BF7CBCD,
  1032.     A60195DB94F727D3
  1033.    X-Recipient-ID: privacy-tf@venera.isi.edu:ptf-kmc:4
  1034.    X-Key-Info: DES-ECB,RSA-MD2,161A3F75DC82EF26,E2EF532C65CBCFF7,
  1035.     9F83A2658132DB47
  1036.  
  1037.    LLrHB0eJzyhP+/fSStdW8okeEnv47jxe7SJ/iN72ohNcUk2jHEUSoH1nvNSIWL9M
  1038.    8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIkjHUlBLpvXR0UrUzYbkNpk0agV2IzUpk
  1039.    J6UiRRGcDSvzrsoK+oNvqu6z7Xs5Xfz5rDqUcMlK1Z6720dcBWGGsDLpTpSCnpot
  1040.    dXd/H5LMDWnonNvPCwQUHt==
  1041.    -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  1042.  
  1043.  
  1044.                Example Encapsulated Message (Symmetric Case)
  1045.                                  Figure 2
  1046.  
  1047.  
  1048.    -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  1049.    X-Proc-Type: 3,ENCRYPTED
  1050.    X-DEK-Info: DES-CBC,F8143EDE5960C597
  1051.    X-Sender-ID: linn@ccy.bbn.com::
  1052.    X-Certificate:
  1053.     jHUlBLpvXR0UrUzYbkNpk0agV2IzUpk8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIk
  1054.     YbkNpk0agV2IzUpk8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIkjHUlBLpvXR0UrUz
  1055.     agV2IzUpk8tEjmFjHUlBLpvXR0UrUz/zxB+bATMtPjCUWbz8Lr9wloXIkYbkNpk0
  1056.    X-Issuer-Certificate:
  1057.     TMtPjCUWbz8Lr9wloXIkYbkNpk0agV2IzUpk8tEjmFjHUlBLpvXR0UrUz/zxB+bA
  1058.     IkjHUlBLpvXR0UrUzYbkNpk0agV2IzUpk8tEjmF/zxB+bATMtPjCUWbz8Lr9wloX
  1059.     vXR0UrUzYbkNpk0agV2IzUpk8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIkjHUlBLp
  1060.    X-MIC-Info: RSA-MD2,RSA,
  1061.     5rDqUcMlK1Z6720dcBWGGsDLpTpSCnpotJ6UiRRGcDSvzrsoK+oNvqu6z7Xs5Xfz
  1062.    X-Recipient-ID: linn@ccy.bbn.com:RSADSI:3
  1063.  
  1064.  
  1065.  
  1066. Linn                                                           [Page 19]
  1067.  
  1068. RFC 1113                Mail Privacy: Procedures             August 1989
  1069.  
  1070.  
  1071.    X-Key-Info: RSA,
  1072.     lBLpvXR0UrUzYbkNpk0agV2IzUpk8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIkjHU
  1073.    X-Recipient-ID: privacy-tf@venera.isi.edu:RSADSI:4
  1074.    X-Key-Info: RSA,
  1075.     NcUk2jHEUSoH1nvNSIWL9MLLrHB0eJzyhP+/fSStdW8okeEnv47jxe7SJ/iN72oh
  1076.  
  1077.    LLrHB0eJzyhP+/fSStdW8okeEnv47jxe7SJ/iN72ohNcUk2jHEUSoH1nvNSIWL9M
  1078.    8tEjmF/zxB+bATMtPjCUWbz8Lr9wloXIkjHUlBLpvXR0UrUzYbkNpk0agV2IzUpk
  1079.    J6UiRRGcDSvzrsoK+oNvqu6z7Xs5Xfz5rDqUcMlK1Z6720dcBWGGsDLpTpSCnpot
  1080.    dXd/H5LMDWnonNvPCwQUHt==
  1081.    -----PRIVACY-ENHANCED MESSAGE BOUNDARY-----
  1082.  
  1083.               Example Encapsulated Message (Asymmetric Case)
  1084.                                  Figure 3
  1085.  
  1086.  
  1087.    Although the encapsulated header fields resemble RFC-822 header
  1088.    fields, they are a disjoint set and will not in general be processed
  1089.    by the same parser which operates on enclosing header fields.  The
  1090.    complexity of lexical analysis needed and appropriate for
  1091.    encapsulated header field processing is significantly less than that
  1092.    appropriate to RFC-822 header processing.  For example, many
  1093.    characters with special significance to RFC-822 at the syntactic
  1094.    level have no such significance within encapsulated header fields.
  1095.  
  1096.    When the length of an encapsulated header field is longer than the
  1097.    size conveniently printable on a line, whitespace may be used to fold
  1098.    the field in the manner of RFC-822, section 3.1.1.  Any such inserted
  1099.    whitespace is not to be interpreted as a part of a subfield.  As a
  1100.    particular example, due to the length of public-key certificates and
  1101.    of quantities encrypted using asymmetric algorithms, such quantities
  1102.    may often need to be folded across multiple printed lines.  In order
  1103.    to facilitate such folding in a uniform manner, the bits representing
  1104.    such a quantity are to be divided into an ordered set (with leftmost
  1105.    bits first) of zero or more 384-bit groups (corresponding to 64-
  1106.    character printed representations), followed by a final group of bits
  1107.    which may be any length up to 384 bits.
  1108.  
  1109. 4.6.1  Per-Message Encapsulated Header Fields
  1110.  
  1111.    This group of encapsulated header fields contains fields which occur
  1112.    no more than once in a privacy-enhanced message, generally preceding
  1113.    all other encapsulated header fields.
  1114.  
  1115. 4.6.1.1  X-Proc-Type Field
  1116.  
  1117.    The "X-Proc-Type:" encapsulated header field, required for all
  1118.    privacy-enhanced messages, identifies the type of processing
  1119.  
  1120.  
  1121.  
  1122. Linn                                                           [Page 20]
  1123.  
  1124. RFC 1113                Mail Privacy: Procedures             August 1989
  1125.  
  1126.  
  1127.    performed on the transmitted message.  Only one "X-Proc-Type:" field
  1128.    occurs in a message; the "X-Proc-Type:" field must be the first
  1129.    encapsulated header field in the message.
  1130.  
  1131.    The "X-Proc-Type:" field has two subfields, separated by a comma.
  1132.    The first subfield is a decimal number which is used to distinguish
  1133.    among incompatible encapsulated header field interpretations which
  1134.    may arise as changes are made to this standard.  Messages processed
  1135.    according to this RFC will carry the subfield value "3" to
  1136.    distinguish them from messages processed in accordance with prior
  1137.    RFCs 989 and 1040.
  1138.  
  1139.    The second subfield may assume one of two string values: "ENCRYPTED"
  1140.    or "MIC-ONLY".  Unless all of a message's encapsulated text is
  1141.    excluded from encryption, the "X-Proc-Type:" field's second subfield
  1142.    must specify "ENCRYPTED".  Specification of "MIC-ONLY", when applied
  1143.    in conjunction with certain combinations of key management and MIC
  1144.    algorithm options, permits certain fields which are superfluous in
  1145.    the absence of encryption to be omitted from the encapsulated header.
  1146.    In particular, "X-Recipient-ID:" and "X-Key-Info:" fields can be
  1147.    omitted for recipients for whom asymmetric cryptography is used,
  1148.    assuming concurrent use of a keyless MIC computation algorithm.  The
  1149.    "X-DEK-Info:" field can be omitted for all "MIC-ONLY" messages.
  1150.  
  1151. 4.6.1.2  X-DEK-Info Field
  1152.  
  1153.    The "X-DEK-Info:" encapsulated header field identifies the message
  1154.    text encryption algorithm and mode, and also carries the Initializing
  1155.    Vector used for message encryption.  No more than one "X-DEK-Info:"
  1156.    field occurs in a message; the field is required except for messages
  1157.    specified as "MIC-ONLY" in the "X-Proc-Type:" field.
  1158.  
  1159.    The "X-DEK-Info:" field carries two arguments, separated by a comma.
  1160.    For purposes of this RFC, the first argument must be the string
  1161.    "DES-CBC", signifying (as defined in RFC-1115) use of the DES
  1162.    algorithm in the CBC mode.  The second argument represents a 64-bit
  1163.    Initializing Vector (IV) as a contiguous string of 16 hexadecimal
  1164.    digits.  Subsequent revisions of RFC-1115 will specify any additional
  1165.    values which may appear as the first argument of this field.
  1166.  
  1167. 4.6.2  Encapsulated Header Fields Normally Per-Message
  1168.  
  1169.    This group of encapsulated header fields contains fields which
  1170.    ordinarily occur no more than once per message.  Depending on the key
  1171.    management option(s) employed, some of these fields may be absent
  1172.    from some messages.  The "X-Sender-ID" field may occur more than once
  1173.    in a message if different sender-oriented IK components (perhaps
  1174.    corresponding to different versions) must be used for different
  1175.  
  1176.  
  1177.  
  1178. Linn                                                           [Page 21]
  1179.  
  1180. RFC 1113                Mail Privacy: Procedures             August 1989
  1181.  
  1182.  
  1183.    recipients. In this case later occurrences override prior
  1184.    occurrences.  If a mixture of symmetric and asymmetric key
  1185.    distribution is used within a single message, the recipients for each
  1186.    type of key distribution technology should be grouped together to
  1187.    simplify parsing.
  1188.  
  1189. 4.6.2.1  X-Sender-ID Field
  1190.  
  1191.    The "X-Sender-ID:" encapsulated header field, required for all
  1192.    privacy-enhanced messages, identifies a message's sender and provides
  1193.    the sender's IK identification component.  It should be replicated
  1194.    within the encapsulated text.  The IK identification component
  1195.    carried in an "X-Sender-ID:" field is used in conjunction with all
  1196.    subsequent "X-Recipient-ID:" fields until another "X-Sender-ID:"
  1197.    field occurs; the ordinary case will be that only a single "X-
  1198.    Sender-ID:" field will occur, prior to any "X-Recipient-ID:" fields.
  1199.  
  1200.    The "X-Sender-ID:" field contains (in order) an Entity Identifier
  1201.    subfield, an (optional) Issuing Authority subfield, and an (optional)
  1202.    Version/Expiration subfield.  The optional subfields are omitted if
  1203.    their use is rendered redundant by information carried in subsequent
  1204.    "X-Recipient-ID:" fields; this will ordinarily be the case where
  1205.    symmetric cryptography is used for key management.  The subfields are
  1206.    delimited by the colon character (":"), optionally followed by
  1207.    whitespace.
  1208.  
  1209.    Section 5.2, Interchange Keys, discusses the semantics of these
  1210.    subfields and specifies the alphabet from which they are chosen.
  1211.    Note that multiple "X-Sender-ID:" fields may occur within a single
  1212.    encapsulated header.  All "X-Recipient-ID:" fields are interpreted in
  1213.    the context of the most recent preceding "X-Sender-ID:" field; it is
  1214.    illegal for an "X-Recipient-ID:" field to occur in a header before an
  1215.    "X-Sender-ID:" has been provided.
  1216.  
  1217. 4.6.2.2  X-Certificate Field
  1218.  
  1219.    The "X-Certificate:" encapsulated header field is used only when
  1220.    asymmetric key management is employed for one or more of a message's
  1221.    recipients.  To facilitate processing by recipients (at least in
  1222.    advance of general directory server availability), inclusion of this
  1223.    field in all messages is strongly recommended.  The field transfers a
  1224.    sender's certificate as a numeric quantity, represented with the
  1225.    encoding mechanism defined in Section 4.3.2.4 of this RFC.  The
  1226.    semantics of a certificate are discussed in RFC-1114.  The
  1227.    certificate carried in an "X-Certificate:" field is used in
  1228.    conjunction with "X-Sender-ID:" and "X-Recipient-ID:" fields for
  1229.    which asymmetric key management is employed.
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Linn                                                           [Page 22]
  1235.  
  1236. RFC 1113                Mail Privacy: Procedures             August 1989
  1237.  
  1238.  
  1239. 4.6.2.3  X-MIC-Info Field
  1240.  
  1241.    The "X-MIC-Info:" encapsulated header field, used only when
  1242.    asymmetric key management is employed for at least one recipient of a
  1243.    message, carries three arguments, separated by commas.  The first
  1244.    argument identifies the algorithm under which the accompanying MIC is
  1245.    computed; RFC-1115 specifies the acceptable set of MIC algorithm
  1246.    identifiers.  The second argument identifies the algorithm under
  1247.    which the accompanying MIC is encrypted; for purposes of this RFC,
  1248.    the string "RSA" as described in RFC-1115  must occur, identifying
  1249.    use of the RSA algorithm.  The third argument is a MIC,
  1250.    asymmetrically encrypted using the originator's private component.
  1251.    As discussed earlier in this section, the asymmetrically encrypted
  1252.    MIC is represented using the technique described in Section 4.3.2.4
  1253.    of this RFC.
  1254.  
  1255.    The "X-MIC-Info:" field will occur immediately following the
  1256.    message's "X-Sender-ID:" field and any "X-Certificate:" or "X-
  1257.    Issuer-Certificate:" fields.  Analogous to the "X-Sender-ID:" field,
  1258.    an "X-MIC-Info:" field applies to all subsequent recipients for whom
  1259.    asymmetric key management is used.
  1260.  
  1261. 4.6.3  Encapsulated Header Fields with Variable Occurrences
  1262.  
  1263.    This group of encapsulated header fields contains fields which will
  1264.    normally occur variable numbers of times within a message, with
  1265.    numbers of occurrences ranging from zero to non-zero values which are
  1266.    independent of the number of recipients.
  1267.  
  1268. 4.6.3.1  X-Issuer-Certificate Field
  1269.  
  1270.    The "X-Issuer-Certificate:" encapsulated header field is meaningful
  1271.    only when asymmetric key management is used for at least one of a
  1272.    message's recipients.  A typical "X-Issuer-Certificate:" field would
  1273.    contain the certificate containing the public component used to sign
  1274.    the certificate carried in the message's "X-Certificate:" field, for
  1275.    recipients' use in chaining through that certificate's certification
  1276.    path.  Other "X-Issuer-Certificate:" fields, typically representing
  1277.    higher points in a certification path, also may be included by a
  1278.    sender.  The order in which "X-Issuer-Certificate:" fields are
  1279.    included need not correspond to the order of the certification path;
  1280.    the order of that path may in general differ from the viewpoint of
  1281.    different recipients.  More information on certification paths can be
  1282.    found in RFC-1114.
  1283.  
  1284.    The certificate is represented in the same manner as defined for the
  1285.    "X-Certificate:" field, and any "X-Issuer-Certificate:" fields will
  1286.    ordinarily follow the "X-Certificate:" field directly.  Use of the
  1287.  
  1288.  
  1289.  
  1290. Linn                                                           [Page 23]
  1291.  
  1292. RFC 1113                Mail Privacy: Procedures             August 1989
  1293.  
  1294.  
  1295.    "X-Issuer-Certificate:" field is optional even when asymmetric key
  1296.    management is employed, although its incorporation is strongly
  1297.    recommended in the absence of alternate directory server facilities
  1298.    from which recipients can access issuers' certificates.
  1299.  
  1300. 4.6.4  Per-Recipient Encapsulated Header Fields
  1301.  
  1302.    This group of encapsulated header fields normally appears once for
  1303.    each of a message's named recipients.  As a special case, these
  1304.    fields may be omitted in the case of a "MIC-ONLY" message to
  1305.    recipients for whom asymmetric key management is employed, given that
  1306.    the chosen MIC algorithm is keyless.
  1307.  
  1308. 4.6.4.1  X-Recipient-ID Field
  1309.  
  1310.    The "X-Recipient-ID:" encapsulated header field identifies a
  1311.    recipient and provides the recipient's IK identification component.
  1312.    One "X-Recipient-ID:" field is included for each of a message's named
  1313.    recipients. It should be replicated within the encapsulated text.
  1314.    The field contains (in order) an Entity Identifier subfield, an
  1315.    Issuing Authority subfield, and a Version/Expiration subfield.  The
  1316.    subfields are delimited by the colon character (":"), optionally
  1317.    followed by whitespace.
  1318.  
  1319.    Section 5.2, Interchange Keys, discusses the semantics of the
  1320.    subfields and specifies the alphabet from which they are chosen.  All
  1321.    "X-Recipient-ID:" fields are interpreted in the context of the most
  1322.    recent preceding "X-Sender-ID:" field; it is illegal for an "X-
  1323.    Recipient-ID:" field to occur in a header before an "X-Sender-ID:"
  1324.    has been provided.
  1325.  
  1326. 4.6.4.2  X-Key-Info Field
  1327.  
  1328.    One "X-Key-Info:" field is included for each of a message's named
  1329.    recipients.  Each "X-Key-Info:" field is interpreted in the context
  1330.    of the most recent preceding "X-Recipient-ID:" field; normally, an
  1331.    "X-Key-Info:" field will immediately follow its associated "X-
  1332.    Recipient-ID:" field.  The field's argument(s) differ depending on
  1333.    whether symmetric or asymmetric key management is used for a
  1334.    particular recipient.
  1335.  
  1336. 4.6.4.2.1  Symmetric Key Management
  1337.  
  1338.    When symmetric key management is employed for a given recipient, the
  1339.    "X-Key-Info:" encapsulated header field transfers four items,
  1340.    separated by commas: an IK Use Indicator, a MIC Algorithm Indicator,
  1341.    a DEK and a MIC.  The IK Use Indicator identifies the algorithm and
  1342.    mode in which the identified IK was used for DEK encryption for a
  1343.  
  1344.  
  1345.  
  1346. Linn                                                           [Page 24]
  1347.  
  1348. RFC 1113                Mail Privacy: Procedures             August 1989
  1349.  
  1350.  
  1351.    particular recipient.  For recipients for whom symmetric key
  1352.    management is used, it may assume the reserved string values "DES-
  1353.    ECB" or "DES-EDE", as defined in RFC-1115.
  1354.  
  1355.    The MIC Algorithm Indicator identifies the MIC computation algorithm
  1356.    used for a particular recipient; values for this subfield are defined
  1357.    in RFC-1115.  The DEK and MIC are encrypted under the IK identified
  1358.    by a preceding "X-Recipient-ID:" field and prior "X-Sender-ID:"
  1359.    field; they are represented as two strings of contiguous hexadecimal
  1360.    digits, separated by a comma.
  1361.  
  1362.    When DEA-1 is used for message text encryption, the DEK
  1363.    representation will be 16 hexadecimal digits (corresponding to a 64-
  1364.    bit key); this subfield can be extended to 32 hexadecimal digits
  1365.    (corresponding to a 128-bit key) if required to support other
  1366.    algorithms.
  1367.  
  1368.    Symmetric encryption of MICs is always performed in the same
  1369.    encryption mode used to encrypt the message's DEK.  Encrypted MICs,
  1370.    like encrypted DEKs, are represented as contiguous strings of
  1371.    hexadecimal digits.  The size of a MIC is dependent on the choice of
  1372.    MIC algorithm as specified in the MIC Algorithm Indicator subfield.
  1373.  
  1374. 4.6.4.2.2  Asymmetric Key Management
  1375.  
  1376.    When asymmetric key management is employed for a given recipient, the
  1377.    "X-Key-Info:" field transfers two quantities, separated by commas.
  1378.    The first argument is an IK Use Indicator identifying the algorithm
  1379.    (and mode, if applicable) in which the DEK is encrypted; for purposes
  1380.    of this RFC, the IK Use Indicator subfield will always assume the
  1381.    reserved string value "RSA" (as defined in RFC-1115) for recipients
  1382.    for whom asymmetric key management is employed, signifying use of the
  1383.    RSA algorithm.  The second argument is a DEK, encrypted (using
  1384.    asymmetric encryption) under the recipient's public component.
  1385.  
  1386.    Throughout this RFC we have adopted the terms "private component" and
  1387.    "public component" to refer to the quantities which are,
  1388.    respectively, kept secret and made publically available in asymmetric
  1389.    cryptosystems.  This convention is adopted to avoid possible
  1390.    confusion arising from use of the term "secret key" to refer to
  1391.    either the former quantity or to a key in a symmetric cryptosystem.
  1392.  
  1393.    As discussed earlier in this section, the asymmetrically encrypted
  1394.    DEK is represented using the technique described in Section 4.3.2.4
  1395.    of this RFC.
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Linn                                                           [Page 25]
  1403.  
  1404. RFC 1113                Mail Privacy: Procedures             August 1989
  1405.  
  1406.  
  1407. 5.  Key Management
  1408.  
  1409.    Several cryptographic constructs are involved in supporting the
  1410.    privacy-enhanced message processing procedure.  A set of fundamental
  1411.    elements is assumed.  Data Encrypting Keys (DEKs) are used to encrypt
  1412.    message text and (for some MIC computation algorithms) in the message
  1413.    integrity check (MIC) computation process.  Interchange Keys (IKs)
  1414.    are used to encrypt DEKs and MICs for transmission with messages.  In
  1415.    a certificate-based asymmetric key management architecture,
  1416.    certificates are used as a means to provide entities' public
  1417.    components and other information in a fashion which is securely bound
  1418.    by a central authority.  The remainder of this section provides more
  1419.    information about these constructs.
  1420.  
  1421. 5.1  Data Encrypting Keys (DEKs)
  1422.  
  1423.    Data Encrypting Keys (DEKs) are used for encryption of message text
  1424.    and (with some MIC computation algorithms) for computation of message
  1425.    integrity check quantities (MICs).  It is strongly recommended that
  1426.    DEKs be generated and used on a one-time, per-message, basis.  A
  1427.    transmitted message will incorporate a representation of the DEK
  1428.    encrypted under an appropriate interchange key (IK) for each of the
  1429.    named recipients.
  1430.  
  1431.    DEK generation can be performed either centrally by key distribution
  1432.    centers (KDCs) or  by endpoint systems.  Dedicated KDC systems may be
  1433.    able to  implement stronger algorithms for random DEK generation than
  1434.    can be supported in endpoint systems.  On the other hand,
  1435.    decentralization allows endpoints to be relatively self-sufficient,
  1436.    reducing the level of trust which must be placed in components other
  1437.    than a message's originator and recipient.  Moreover, decentralized
  1438.    DEK generation at endpoints reduces the frequency with which senders
  1439.    must make real-time queries of (potentially unique) servers in order
  1440.    to send mail, enhancing communications availability.
  1441.  
  1442.    When symmetric cryptography is used, one advantage of centralized
  1443.    KDC-based generation is that DEKs can be returned to endpoints
  1444.    already encrypted under the IKs of message recipients rather than
  1445.    providing the IKs to the senders.  This reduces IK exposure and
  1446.    simplifies endpoint key management requirements.  This approach has
  1447.    less value if asymmetric cryptography is used for key management,
  1448.    since per-recipient public IK components are assumed to be generally
  1449.    available and per-sender private IK components need not necessarily
  1450.    be shared with a KDC.
  1451.  
  1452. 5.2  Interchange Keys (IKs)
  1453.  
  1454.    Interchange Key (IK) components are used to encrypt DEKs and MICs.
  1455.  
  1456.  
  1457.  
  1458. Linn                                                           [Page 26]
  1459.  
  1460. RFC 1113                Mail Privacy: Procedures             August 1989
  1461.  
  1462.  
  1463.    In general, IK granularity is at the pairwise per-user level except
  1464.    for mail sent to address lists comprising multiple users.  In order
  1465.    for two principals to engage in a useful exchange of privacy-enhanced
  1466.    electronic mail using conventional cryptography, they must first
  1467.    possess common IK components (when symmetric key management is used)
  1468.    or complementary IK components (when asymmetric key management is
  1469.    used).  When symmetric cryptography is used, the IK consists of a
  1470.    single component, used to encrypt both DEKs and MICs.  When
  1471.    asymmetric cryptography is used, a recipient's public component is
  1472.    used as an IK to encrypt DEKs (a transformation invertible only by a
  1473.    recipient possessing the corresponding private component), and the
  1474.    originator's private component is used to encrypt MICs (a
  1475.    transformation invertible by all recipients, since the originator's
  1476.    certificate provides the necessary public component of the
  1477.    originator).
  1478.  
  1479.    While this RFC does not prescribe the means by which interchange keys
  1480.    are provided to appropriate parties, it is useful to note that such
  1481.    means may be centralized (e.g., via key management servers) or
  1482.    decentralized (e.g., via pairwise agreement and direct distribution
  1483.    among users).  In any case, any given IK component is associated with
  1484.    a responsible Issuing Authority (IA).  When certificate-based
  1485.    asymmetric key management, as discussed in RFC-1114, is employed, the
  1486.    IA function is performed by a Certification Authority (CA).
  1487.  
  1488.    When an IA generates and distributes an IK component, associated
  1489.    control information is provided to direct how it is to be used.  In
  1490.    order to select the appropriate IK(s) to use in message encryption, a
  1491.    sender must retain a correspondence between IK components and the
  1492.    recipients with which they are associated.  Expiration date
  1493.    information must also be retained, in order that cached entries may
  1494.    be invalidated and replaced as appropriate.
  1495.  
  1496.    Since a message may be sent with multiple IK components identified,
  1497.    corresponding to multiple intended recipients, each recipient's UA
  1498.    must be able to determine that recipient's intended IK component.
  1499.    Moreover, if no corresponding IK component is available in the
  1500.    recipient's database when a message arrives, the recipient must be
  1501.    able to identify the required IK component and identify that IK
  1502.    component's associated IA.  Note that different IKs may be used for
  1503.    different messages between a pair of communicants.  Consider, for
  1504.    example, one message sent from A to B and another message sent (using
  1505.    the IK-per-list method) from A to a mailing list of which B is a
  1506.    member.  The first message would use IK components associated
  1507.    individually with A and B, but the second would use an IK component
  1508.    shared among list members.
  1509.  
  1510.    When a privacy-enhanced message is transmitted, an indication of the
  1511.  
  1512.  
  1513.  
  1514. Linn                                                           [Page 27]
  1515.  
  1516. RFC 1113                Mail Privacy: Procedures             August 1989
  1517.  
  1518.  
  1519.    IK components used for DEK and MIC encryption must be included.  To
  1520.    this end, the "X-Sender-ID:" and "X-Recipient-ID:" encapsulated
  1521.    header fields provide the following data:
  1522.  
  1523.       1. Identification of the relevant Issuing Authority (IA subfield)
  1524.  
  1525.       2.  Identification of an entity with which a particular IK
  1526.           component is associated (Entity Identifier or EI subfield)
  1527.  
  1528.       3.  Version/Expiration subfield
  1529.  
  1530.    The colon character (":") is used to delimit the subfields within an
  1531.    "X-Sender-ID:" or "X-Recipient-ID:".  The IA, EI, and
  1532.    version/expiration subfields are generated from a restricted
  1533.    character set, as prescribed by the following BNF (using notation as
  1534.    defined in RFC-822, sections 2 and 3.3):
  1535.  
  1536.    IKsubfld       :=       1*ia-char
  1537.  
  1538.    ia-char        :=       DIGIT / ALPHA / "'" / "+" / "(" / ")" /
  1539.                            "," / "." / "/" / "=" / "?" / "-" / "@" /
  1540.                            "%" / "!" / '"' / "_" / "<" / ">"
  1541.    An example "X-Recipient-ID:" field is as follows:
  1542.  
  1543.       X-Recipient-ID: linn@ccy.bbn.com:ptf-kmc:2
  1544.  
  1545.    This example field indicates that IA "ptf-kmc" has issued an IK
  1546.    component for use on messages sent to "linn@ccy.bbn.com", and that
  1547.    the IA has provided the number 2 as a version indicator for that IK
  1548.    component.
  1549.  
  1550. 5.2.1  Subfield Definitions
  1551.  
  1552.    The following subsections define the subfields of "X-Sender-ID:" and
  1553.    "X-Recipient-ID:" fields.
  1554.  
  1555. 5.2.1.1  Entity Identifier Subfield
  1556.  
  1557.    An entity identifier is constructed as an IKsubfld.  More
  1558.    restrictively, an entity identifier subfield assumes the following
  1559.    form:
  1560.  
  1561.                       <user>@<domain-qualified-host>
  1562.  
  1563.    In order to support universal interoperability, it is necessary to
  1564.    assume a universal form for the naming information.  For the case of
  1565.    installations which transform local host names before transmission
  1566.    into the broader Internet, it is strongly recommended that the host
  1567.  
  1568.  
  1569.  
  1570. Linn                                                           [Page 28]
  1571.  
  1572. RFC 1113                Mail Privacy: Procedures             August 1989
  1573.  
  1574.  
  1575.    name as presented to the Internet be employed.
  1576.  
  1577. 5.2.1.2  Issuing Authority Subfield
  1578.  
  1579.    An IA identifier subfield is constructed as an IKsubfld.  IA
  1580.    identifiers must be assigned in a manner which assures uniqueness.
  1581.    This can be done on a centralized or hierarchic basis.
  1582.  
  1583. 5.2.1.3  Version/Expiration Subfield
  1584.  
  1585.    A version/expiration subfield is constructed as an IKsubfld.  The
  1586.    version/expiration subfield format may vary among different IAs, but
  1587.    must satisfy certain functional constraints.  An IA's
  1588.    version/expiration subfields must be sufficient to distinguish among
  1589.    the set of IK components issued by that IA for a given identified
  1590.    entity.  Use of a monotonically increasing number is sufficient to
  1591.    distinguish among the IK components provided for an entity by an IA;
  1592.    use of a timestamp additionally allows an expiration time or date to
  1593.    be prescribed for an IK component.
  1594.  
  1595. 5.2.2  IK Cryptoperiod Issues
  1596.  
  1597.    An IK component's cryptoperiod is dictated in part by a tradeoff
  1598.    between key management overhead and revocation responsiveness.  It
  1599.    would be undesirable to delete an IK component permanently before
  1600.    receipt of a message encrypted using that IK component, as this would
  1601.    render the message permanently undecipherable.  Access to an expired
  1602.    IK component would be needed, for example, to process mail received
  1603.    by a user (or system) which had been inactive for an extended period
  1604.    of time.  In order to enable very old IK components to be deleted, a
  1605.    message's recipient desiring encrypted local long term storage should
  1606.    transform the DEK used for message text encryption via re-encryption
  1607.    under a locally maintained IK, rather than relying on IA maintenance
  1608.    of old IK components for indefinite periods.
  1609.  
  1610. 6.  User Naming
  1611.  
  1612. 6.1  Current Approach
  1613.  
  1614.    Unique naming of electronic mail users, as is needed in order to
  1615.    select corresponding keys correctly, is an important topic and one
  1616.    which has received significant study.  Our current architecture
  1617.    associates IK components with user names represented in a universal
  1618.    form ("user@domain-qualified-host"), relying on the following
  1619.    properties:
  1620.  
  1621.       1.  The universal form must be specifiable by an IA as it
  1622.           distributes IK components and known to a UA as it processes
  1623.  
  1624.  
  1625.  
  1626. Linn                                                           [Page 29]
  1627.  
  1628. RFC 1113                Mail Privacy: Procedures             August 1989
  1629.  
  1630.  
  1631.           received IK components and IK component identifiers.  If a
  1632.           UA or IA uses addresses in a local form which is different
  1633.           from the universal form, it must be able to perform an
  1634.           unambiguous mapping from the universal form into the local
  1635.           representation.
  1636.  
  1637.       2.  The universal form, when processed by a sender UA, must have
  1638.           a recognizable correspondence with the form of a recipient
  1639.           address as specified by a user (perhaps following local
  1640.           transformation from an alias into a universal form).
  1641.  
  1642.    It is difficult to ensure these properties throughout the Internet.
  1643.    For example, an MTS which transforms address representations between
  1644.    the local form used within an organization and the universal form as
  1645.    used for Internet mail transmission may cause property 2 to be
  1646.    violated.
  1647.  
  1648. 6.2  Issues for Consideration
  1649.  
  1650.    The use of flat (non-hierarchic) electronic mail user identifiers,
  1651.    which are unrelated to the hosts on which the users reside, may offer
  1652.    value.  As directory servers become more widespread, it may become
  1653.    appropriate for would-be senders to search for desired recipients
  1654.    based on such attributes.  Personal characteristics, like social
  1655.    security numbers, might be considered.  Individually-selected
  1656.    identifiers could be registered with a central authority, but a means
  1657.    to resolve name conflicts would be necessary.
  1658.  
  1659.    A point of particular note is the desire to accommodate multiple
  1660.    names for a single individual, in order to represent and allow
  1661.    delegation of various roles in which that individual may act.  A
  1662.    naming mechanism that binds user roles to keys is needed.  Bindings
  1663.    cannot be immutable since roles sometimes change (e.g., the
  1664.    comptroller of a corporation is fired).
  1665.  
  1666.    It may be appropriate to examine the prospect of extending the
  1667.    DARPA/DoD domain system and its associated name servers to resolve
  1668.    user names to unique user IDs.  An additional issue arises with
  1669.    regard to mailing list support: name servers do not currently perform
  1670.    (potentially recursive) expansion of lists into users.  ISO and CSNet
  1671.    are working on user-level directory service mechanisms, which may
  1672.    also bear consideration.
  1673.  
  1674. 7.  Example User Interface and Implementation
  1675.  
  1676.    In order to place the mechanisms and approaches discussed in this RFC
  1677.    into context, this section presents an overview of a prototype
  1678.    implementation. This implementation is a standalone program which is
  1679.  
  1680.  
  1681.  
  1682. Linn                                                           [Page 30]
  1683.  
  1684. RFC 1113                Mail Privacy: Procedures             August 1989
  1685.  
  1686.  
  1687.    invoked by a user, and lies above the existing UA sublayer.  In the
  1688.    UNIX system, and possibly in other environments as well, such a
  1689.    program can be invoked as a "filter" within an electronic mail UA or
  1690.    a text editor, simplifying the sequence of operations which must be
  1691.    performed by the user.  This form of integration offers the advantage
  1692.    that the program can be used in conjunction with a range of UA
  1693.    programs, rather than being compatible only with a particular UA.
  1694.  
  1695.    When a user wishes to apply privacy enhancements to an outgoing
  1696.    message, the user prepares the message's text and invokes the
  1697.    standalone program (interacting with the program in order to provide
  1698.    address information and other data required to perform privacy
  1699.    enhancement processing), which in turn generates output suitable for
  1700.    transmission via the UA.  When a user receives a privacy-enhanced
  1701.    message, the UA delivers the message in encrypted form, suitable for
  1702.    decryption and associated processing by the standalone program.
  1703.  
  1704.    In this prototype implementation (based on symmetric key management),
  1705.    a cache of IK components is maintained in a local file, with entries
  1706.    managed manually based on information provided by originators and
  1707.    recipients.  This cache is, effectively, a simple database.  IK
  1708.    components are selected for transmitted messages based on the
  1709.    sender's identity and on recipient names, and corresponding "X-
  1710.    Sender-ID:" and "X-Recipient-ID:" fields are placed into the
  1711.    message's encapsulated header.  When a message is received, these
  1712.    fields are used as a basis for a lookup in the database, yielding the
  1713.    appropriate IK component entries.  DEKs and IVs are generated
  1714.    dynamically within the program.
  1715.  
  1716.    Options and destination addresses are selected by command line
  1717.    arguments to the standalone program.  The function of specifying
  1718.    destination addresses to the privacy enhancement program is logically
  1719.    distinct from the function of specifying the corresponding addresses
  1720.    to the UA for use by the MTS.  This separation results from the fact
  1721.    that, in many cases, the local form of an address as specified to a
  1722.    UA differs from the Internet global form as used in "X-Sender-ID:"
  1723.    and "X-Recipient-ID:" fields.
  1724.  
  1725. 8.  Areas For Further Study
  1726.  
  1727.    The procedures defined in this RFC are sufficient to support
  1728.    implementation of privacy-enhanced electronic mail transmission among
  1729.    cooperating parties in the Internet.  Further effort will be needed,
  1730.    however, to enhance robustness, generality, and interoperability.  In
  1731.    particular, further work is needed in the following areas:
  1732.  
  1733.       1.  User naming techniques, and their relationship to the domain
  1734.           system, name servers, directory services, and key management
  1735.  
  1736.  
  1737.  
  1738. Linn                                                           [Page 31]
  1739.  
  1740. RFC 1113                Mail Privacy: Procedures             August 1989
  1741.  
  1742.  
  1743.           functions.
  1744.  
  1745.       2.  Detailed standardization of Issuing Authority and directory
  1746.           service functions and interactions.
  1747.  
  1748.       3.  Privacy-enhanced interoperability with X.400 mail.
  1749.  
  1750.    We anticipate generation of subsequent RFCs which will address these
  1751.    topics.
  1752.  
  1753. 9.  References
  1754.  
  1755.    This section identifies background references which may be useful to
  1756.    those contemplating use of the mechanisms defined in this RFC.
  1757.  
  1758.        ISO 7498/Part 2 - Security Architecture, prepared by ISO/TC97/SC
  1759.        21/WG 1 Ad hoc group on Security, extends the OSI Basic Reference
  1760.        Model to cover security aspects which are general architectural
  1761.        elements of communications protocols, and provides an annex with
  1762.        tutorial and background information.
  1763.  
  1764.        US Federal Information Processing Standards Publication (FIPS
  1765.        PUB) 46, Data Encryption Standard, 15 January 1977, defines the
  1766.        encipherment algorithm used for message text encryption and
  1767.        Message Authentication Code (MAC) computation.
  1768.  
  1769.        FIPS PUB 81, DES Modes of Operation, 2 December 1980, defines
  1770.        specific modes in which the Data Encryption Standard algorithm
  1771.        may to be used to perform encryption.
  1772.  
  1773.        FIPS PUB 113, Computer Data Authentication, May 1985, defines a
  1774.        specific procedure for use of the Data Encryption Standard
  1775.        algorithm to compute a MAC.
  1776.  
  1777. NOTES:
  1778.  
  1779.   [1]  Key generation for MIC computation and message text encryption
  1780.        may either be performed by the sending host or by a centralized
  1781.        server.  This RFC does not constrain this design alternative.
  1782.        Section 5.1 identifies possible advantages of a centralized
  1783.        server approach if symmetric key management is employed.
  1784.  
  1785.   [2]  American National Standard Data Encryption Algorithm (ANSI
  1786.        X3.92-1981), American National Standards Institute, Approved 30
  1787.        December 1980.
  1788.  
  1789.   [3]  Federal Information Processing Standards Publication 46, Data
  1790.        Encryption Standard, 15 January 1977.
  1791.  
  1792.  
  1793.  
  1794. Linn                                                           [Page 32]
  1795.  
  1796. RFC 1113                Mail Privacy: Procedures             August 1989
  1797.  
  1798.  
  1799.   [4]  Information Processing Systems: Data Encipherment: Modes of
  1800.        Operation of a 64-bit Block Cipher.
  1801.  
  1802.   [5]  Federal Information Processing Standards Publication 81, DES
  1803.        Modes of Operation, 2 December 1980.
  1804.  
  1805.   [6]  ANSI X9.17-1985, American National Standard, Financial
  1806.        Institution Key Management (Wholesale), American Bankers
  1807.        Association, April 4, 1985, Section 7.2.
  1808.  
  1809.   [7]  Postel, J., "Simple Mail Transfer Protocol" RFC-821,
  1810.        USC/Information Sciences Institute, August 1982.
  1811.  
  1812.   [8]  This transformation should occur only at an SMTP endpoint, not at
  1813.        an intervening relay, but may take place at a gateway system
  1814.        linking the SMTP realm with other environments.
  1815.  
  1816.   [9]  Use of the SMTP canonicalization procedure at this stage was
  1817.        selected since it is widely used and implemented in the Internet
  1818.        community, not because SMTP interoperability with this
  1819.        intermediate result is required; no privacy-enhanced message will
  1820.        be passed to SMTP for transmission directly from this step in the
  1821.        four-phase transformation procedure.
  1822.  
  1823.  [10]  Crocker, D., "Standard for the Format of ARPA Internet Text
  1824.        Messages", RFC-822, August 1982.
  1825.  
  1826.  [11]  Rose, M. and E. Stefferud, "Proposed Standard for Message
  1827.        Encapsulation", RFC-934, January 1985.
  1828.  
  1829.  [12]  CCITT Recommendation X.411 (1988), "Message Handling Systems:
  1830.        Message Transfer System: Abstract Service Definition and
  1831.        Procedures".
  1832.  
  1833.  [13]  CCITT Recommendation X.509 (1988), "The Directory -
  1834.        Authentication Framework".
  1835.  
  1836.  [14]  Kille, S., "Mapping between X.400 and RFC-822", RFC-987, June
  1837.        1986.
  1838.  
  1839.  [15]  Federal Information Processing Standards Publication 113,
  1840.        Computer Data Authentication, May 1985.
  1841.  
  1842.  [16]  American National Standard for Information Systems - Data
  1843.        Encryption Algorithm - Modes of Operation (ANSI X3.106-1983),
  1844.        American National Standards Institute - Approved 16 May 1983.
  1845.  
  1846.  [17]  Voydock, V. and S. Kent, "Security Mechanisms in High-Level
  1847.  
  1848.  
  1849.  
  1850. Linn                                                           [Page 33]
  1851.  
  1852. RFC 1113                Mail Privacy: Procedures             August 1989
  1853.  
  1854.  
  1855.        Network Protocols", ACM Computing Surveys, Vol. 15, No. 2, Pages
  1856.        135-171, June 1983.
  1857.  
  1858. Author's Address
  1859.  
  1860.        John Linn
  1861.        Secure Systems
  1862.        Digital Equipment Corporation
  1863.        85 Swanson Road, BXB1-2/D04
  1864.        Boxborough, MA  01719-1326
  1865.  
  1866.        Phone: 508-264-5491
  1867.  
  1868.        EMail: Linn@ultra.enet.dec.com
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Linn                                                           [Page 34]
  1907.