home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1800s / rfc1848.txt < prev    next >
Text File  |  1995-10-01  |  95KB  |  2,692 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         S. Crocker
  8. Request For Comments: 1848                               CyberCash, Inc.
  9. Category: Standards Track                                       N. Freed
  10.                                             Innosoft International, Inc.
  11.                                                                J. Galvin
  12.                                                                S. Murphy
  13.                                              Trusted Information Systems
  14.                                                             October 1995
  15.  
  16.  
  17.                      MIME Object Security Services
  18.  
  19. Status of this Memo
  20.  
  21.    This document specifies an Internet standards track protocol for the
  22.    Internet community, and requests discussion and suggestions for
  23.    improvements.  Please refer to the current edition of the "Internet
  24.    Official Protocol Standards" (STD 1) for the standardization state
  25.    and status of this protocol.  Distribution of this memo is unlimited.
  26.  
  27. Abstract
  28.  
  29.    This document defines MIME Object Security Services (MOSS), a
  30.    protocol that uses the multipart/signed and multipart/encrypted
  31.    framework [7] to apply digital signature and encryption services to
  32.    MIME objects.  The services are offered through the use of end-to-end
  33.    cryptography between an originator and a recipient at the application
  34.    layer.  Asymmetric (public key) cryptography is used in support of
  35.    the digital signature service and encryption key management.
  36.    Symmetric (secret key) cryptography is used in support of the
  37.    encryption service.  The procedures are intended to be compatible
  38.    with a wide range of public key management approaches, including both
  39.    ad hoc and certificate-based schemes.  Mechanisms are provided to
  40.    support many public key management approaches.
  41.  
  42. Table of Contents
  43.  
  44.    1.  Introduction .............................................    3
  45.    2.  Applying MIME Object Security Services ...................    4
  46.    2.1  Digital Signature Service ...............................    4
  47.    2.1.1  Canonicalization ......................................    5
  48.    2.1.2  Digital Signature Control Information .................    7
  49.    2.1.2.1  Version: ............................................    8
  50.    2.1.2.2  Originator-ID: ......................................    8
  51.    2.1.2.3  MIC-Info: ...........................................    8
  52.    2.1.3  application/moss-signature Content Type Definition ....    9
  53.    2.1.4  Use of multipart/signed Content Type ..................   10
  54.    2.2  Encryption Service ......................................   11
  55.  
  56.  
  57.  
  58. Crocker, et al              Standards Track                     [Page 1]
  59.  
  60. RFC 1848             MIME Object Security Services          October 1995
  61.  
  62.  
  63.    2.2.1  Encryption Control Information ........................   12
  64.    2.2.1.1  DEK-Info: ...........................................   13
  65.    2.2.1.2  Recipient-ID: .......................................   14
  66.    2.2.1.3  Key-Info: ...........................................   14
  67.    2.2.2  application/moss-keys Content Type Definition .........   15
  68.    2.2.3  Use of multipart/encrypted Content Type ...............   16
  69.    3.  Removing MIME Object Security Services ...................   17
  70.    3.1  Digital Signature Service ...............................   18
  71.    3.1.1  Preparation ...........................................   18
  72.    3.1.2  Verification ..........................................   19
  73.    3.1.3  Results ...............................................   19
  74.    3.2  Encryption Service ......................................   20
  75.    3.2.1  Preparation ...........................................   20
  76.    3.2.2  Decryption ............................................   20
  77.    3.2.3  Results ...............................................   21
  78.    4.  Identifying Originators, Recipients, and Their Keys ......   21
  79.    4.1  Name Forms ..............................................   23
  80.    4.1.1  Email Addresses .......................................   23
  81.    4.1.2  Arbitrary Strings .....................................   23
  82.    4.1.3  Distinguished Names ...................................   23
  83.    4.2  Identifiers .............................................   24
  84.    4.2.1  Email Address .........................................   25
  85.    4.2.2  Arbitrary String ......................................   25
  86.    4.2.3  Distinguished Name ....................................   26
  87.    4.2.4  Public Key ............................................   26
  88.    4.2.5  Issuer Name and Serial Number .........................   27
  89.    5.  Key Management Content Types .............................   27
  90.    5.1  application/mosskey-request Content Type Definition .....   28
  91.    5.2  application/mosskey-data Content Type Definition ........   29
  92.    6.  Examples .................................................   31
  93.    6.1  Original Message Prepared for Protection ................   31
  94.    6.2  Sign Text of Original Message ...........................   32
  95.    6.3  Sign Headers and Text of Original Message ...............   32
  96.    6.4  Encrypt Text of a Message ...............................   33
  97.    6.5  Encrypt the Signed Text of a Message ....................   35
  98.    6.6  Protecting Audio Content ................................   37
  99.    6.6.1  Sign Audio Content ....................................   37
  100.    6.6.2  Encrypt Audio Content .................................   37
  101.    7.  Observations .............................................   38
  102.    8.  Comparison of MOSS and PEM Protocols .....................   39
  103.    9.  Security Considerations ..................................   41
  104.    10.  Acknowledgements ........................................   41
  105.    11.  References ..............................................   41
  106.    12.  Authors' Addresses ......................................   43
  107.      Appendix A: Collected Grammar ..............................   44
  108.      Appendix B: Imported Grammar ...............................   47
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Crocker, et al              Standards Track                     [Page 2]
  115.  
  116. RFC 1848             MIME Object Security Services          October 1995
  117.  
  118.  
  119. 1.  Introduction
  120.  
  121.    MIME [2], an acronym for "Multipurpose Internet Mail Extensions",
  122.    defines the format of the contents of Internet mail messages and
  123.    provides for multi-part textual and non-textual message bodies.  An
  124.    Internet electronic mail message consists of two parts: the headers
  125.    and the body.  The headers form a collection of field/value pairs
  126.    structured according to STD 11, RFC 822 [1], whilst the body, if
  127.    structured, is defined according to MIME.  MIME does not provide for
  128.    the application of security services.
  129.  
  130.    PEM [3-6], an acronym for "Privacy Enhanced Mail", defines message
  131.    encryption and message authentication procedures for text-based
  132.    electronic mail messages using a certificate-based key management
  133.    mechanism.  The specifications include several features that are
  134.    easily and more naturally supported by MIME, for example, the
  135.    transfer encoding operation, the Content-Domain header, and the
  136.    support services specified by its Part IV [6].  The specification is
  137.    limited by specifying the application of security services to text
  138.    messages only.
  139.  
  140.    MOSS is based in large part on the PEM protocol as defined by RFC
  141.    1421.  Many of PEMs features and most of its protocol specification
  142.    are included here.  A comparison of MOSS and PEM may be found in
  143.    Section 8.
  144.  
  145.    In order to make use of the MOSS services, a user (where user is not
  146.    limited to being a human, e.g., it could be a process or a role) is
  147.    required to have at least one public/private key pair.  The public
  148.    key must be made available to other users with whom secure
  149.    communication is desired.  The private key must not be disclosed to
  150.    any other user.
  151.  
  152.    An originator's private key is used to digitally sign MIME objects; a
  153.    recipient would use the originator's public key to verify the digital
  154.    signature.  A recipient's public key is used to encrypt the data
  155.    encrypting key that is used to encrypt the MIME object; a recipient
  156.    would use the corresponding private key to decrypt the data
  157.    encrypting key so that the MIME object can be decrypted.
  158.  
  159.    As long as the private keys are protected from disclosure, i.e., the
  160.    private keys are accessible only to the user to whom they have been
  161.    assigned, the recipient of a digitally signed message will know from
  162.    whom the message was sent and the originator of an encrypted message
  163.    will know that only the intended recipient is able to read it.  For
  164.    assurance, the ownership of the public keys used in verifying digital
  165.    signatures and encrypting messages should be verified.  A stored
  166.    public key should be protected from modification.
  167.  
  168.  
  169.  
  170. Crocker, et al              Standards Track                     [Page 3]
  171.  
  172. RFC 1848             MIME Object Security Services          October 1995
  173.  
  174.  
  175.    The framework defined in [7] provides an embodiment of a MIME object
  176.    and its digital signature or encryption keys.  When used by MOSS the
  177.    framework provides digital signature and encryption services to
  178.    single and multi-part textual and non-textual MIME objects.
  179.  
  180. 2.  Applying MIME Object Security Services
  181.  
  182.    The application of the MOSS digital signature service requires the
  183.    following components.
  184.  
  185.    (1)  The data to be signed.
  186.  
  187.    (2)  The private key of the originator.
  188.  
  189.    The data to be signed is prepared according to the description below.
  190.    The digital signature is created by generating a hash of the data and
  191.    encrypting the hash value with the private key of the originator.
  192.    The digital signature, some additional ancillary information
  193.    described below, and the data are then embodied in a multipart/signed
  194.    body part.  Finally, the multipart/signed body part may be
  195.    transferred to a recipient or processed further, for example, it may
  196.    be encrypted.
  197.  
  198.    The application of the MOSS encryption service requires the following
  199.    components.
  200.  
  201.    (1)  The data to be encrypted.
  202.  
  203.    (2)  A data encrypting key to encrypt the data.
  204.  
  205.    (3)  The public key of the recipient.
  206.  
  207.    The data to be encrypted is prepared according to the description
  208.    below.  The originator creates a data encrypting key and encrypts the
  209.    data.  The recipient's public key is used to encrypt the data
  210.    encrypting key.  The encrypted data, the encrypted data encrypting
  211.    key, and some additional ancillary information described below are
  212.    then embodied in a multipart/encrypted body part, ready to be
  213.    transferred to a recipient or processed further, for example, it may
  214.    be signed.
  215.  
  216.    The next two sections describe the digital signature and encryption
  217.    services, respectively, in detail.
  218.  
  219. 2.1.  Digital Signature Service
  220.  
  221.    The MOSS digital signature service is applied to MIME objects,
  222.    specifically a MIME body part.  The MIME body part is created
  223.  
  224.  
  225.  
  226. Crocker, et al              Standards Track                     [Page 4]
  227.  
  228. RFC 1848             MIME Object Security Services          October 1995
  229.  
  230.  
  231.    according to a local convention and then made available to the
  232.    digital signature service.
  233.  
  234.    The following sequence of steps comprises the application of the
  235.    digital signature service.
  236.  
  237.  
  238.    (1)  The body part to be signed must be canonicalized.
  239.  
  240.  
  241.    (2)  The digital signature and other control information must be gen-
  242.         erated.
  243.  
  244.  
  245.    (3)  The control information must be embodied in an appropriate MIME
  246.         content type.
  247.  
  248.  
  249.    (4)  The control information body part and the data body part must be
  250.         embodied in a multipart/signed content type.
  251.  
  252.  
  253.    Each of these steps is described below.
  254.  
  255. 2.1.1.  Canonicalization
  256.  
  257.    The body part must be converted to a canonical form that is uniquely
  258.    and unambiguously representable in at least the environment where the
  259.    digital signature is created and the environment where the digital
  260.    signature will be verified, i.e., the originator and recipient's
  261.    environment, respectively.  This is required in order to ensure that
  262.    both the originator and recipient have the same data with which to
  263.    calculate the digital signature; the originator needs to be able to
  264.    create the digital signature value while the recipient needs to be
  265.    able to compare a re-computed value with the received value.  If the
  266.    canonical form is representable on many different host computers, the
  267.    signed data may be forwarded by recipients to additional recipients,
  268.    who will also be able to verify the original signature.  This service
  269.    is called forwardable authentication.
  270.  
  271.    The canonicalization transformation is a two step process.  First,
  272.    the body part must be converted to a form that is unambiguously
  273.    representable on as many different host computers as possible.
  274.    Second, the body part must have its line delimiters converted to a
  275.    unique and unambiguous representation.
  276.  
  277.    The representation chosen to satisfy the first step is 7bit, as
  278.    defined by MIME; the high order bit of each octet of the data to be
  279.  
  280.  
  281.  
  282. Crocker, et al              Standards Track                     [Page 5]
  283.  
  284. RFC 1848             MIME Object Security Services          October 1995
  285.  
  286.  
  287.    signed must be zero.  A MIME body part is comprised of two parts:
  288.    headers and content.  Since the headers of body parts are already
  289.    required to be represented in 7bit, this step does not require
  290.    changes to the headers.  This step requires that if the content is
  291.    not already 7bit then it must be encoded with an appropriate MIME
  292.    content transfer encoding and a Content-Transfer-Encoding: header
  293.    must be added to the headers.  For example, if the content to be
  294.    signed contains 8bit or binary data, the content must be encoded with
  295.    either the quoted-printable or base64 encoding as defined by MIME.
  296.  
  297.       IMPLEMENTORS NOTE: Since the MIME standard explicitly disallows
  298.       nested content transfer encodings, i.e., the content types
  299.       multipart and message may not themselves be encoded, the 7bit
  300.       transformation requires each nested body part to be individually
  301.       encoded in a 7bit representation.  Any valid MIME encoding, e.g.,
  302.       quoted-printable or base64, may be used and, in fact, a different
  303.       encoding may be used on each of the non-7bit body parts.
  304.  
  305.    Representing all content types in a 7bit format transforms them into
  306.    text-based content types.  However, text-based content types present
  307.    a unique problem.  In particular, the line delimiter used for a
  308.    text-based content type is specific to a local environment; different
  309.    environments use the single character carriage-return (<CR>), the
  310.    single character line-feed (<LF>), or the two character sequence
  311.    "carriage-return line-feed (<CR><LF>)".
  312.  
  313.    The application of the digital signature service requires that the
  314.    same line delimiter be used by both the originator and the recipient.
  315.    This document specifies that the two character sequence "<CR><LF>"
  316.    must be used as the line delimiter.  Thus, the second step of the
  317.    canonicalization transformation includes the conversion of the local
  318.    line delimiter to the two character sequence "<CR><LF>".
  319.  
  320.    The conversion to the canonical line delimiter is only required for
  321.    the purposes of computing the digital signature.  Thus, originators
  322.    must apply the line delimiter conversion before computing the digital
  323.    signature but must transfer the data without the line delimiter
  324.    conversion.  Similarly, recipients must apply the line delimiter
  325.    conversion before computing the digital signature.
  326.  
  327.       NOTE: An originator can not transfer the content with the line
  328.       delimiter conversion intact because the conversion process is not
  329.       idempotent.  In particular, SMTP servers may themselves convert
  330.       the line delimiter to a local line delimiter, prior to the message
  331.       being delivered to the recipient.  Thus, a recipient has no way of
  332.       knowing if the conversion is present or not.  If the recipient
  333.       applies the conversion to a content in which it is already
  334.       present, the resulting content may have two line delimiters
  335.  
  336.  
  337.  
  338. Crocker, et al              Standards Track                     [Page 6]
  339.  
  340. RFC 1848             MIME Object Security Services          October 1995
  341.  
  342.  
  343.       present, which would cause the verification of the signature to
  344.       fail.
  345.  
  346.       IMPLEMENTORS NOTE: Implementors should be aware that the
  347.       conversion to a 7bit representation is a function that is required
  348.       in a minimally compliant MIME user agent.  Further, the line
  349.       delimiter conversion required here is distinct from the same
  350.       conversion included in that function.  Specifically, the line
  351.       delimiter conversion applied when a body part is converted to a
  352.       7bit representation (transfer encoded) is performed prior to the
  353.       application of the transfer encoding.  The line delimiter
  354.       conversion applied when a body part is signed is performed after
  355.       the body part is converted to 7bit (transfer encoded).  Both line
  356.       delimiter conversions are required.
  357.  
  358. 2.1.2.  Digital Signature Control Information
  359.  
  360.    The application of the digital signature service generates control
  361.    information which includes the digital signature itself.  The syntax
  362.    of the control information is that of a set of RFC 822 headers,
  363.    except that the folding of header values onto continuation lines is
  364.    explicitly forbidden.  Each header and value pair generated by the
  365.    digital signature service must be output on exactly one line.
  366.  
  367.    The complete set of headers generated by the digital signature
  368.    service is as follows.
  369.  
  370.    Version:
  371.       indicates which version of the MOSS protocol the remaining headers
  372.       represent.
  373.  
  374.    Originator-ID:
  375.       indicates the private key used to create the digital signature and
  376.       the corresponding public key to be used to verify it.
  377.  
  378.    MIC-Info:
  379.       contains the digital signature value.
  380.  
  381.    Each invocation of the digital signature service must emit exactly
  382.    one Version: header and at least one pair of Originator-ID: and MIC-
  383.    Info: headers.  The Version: header must always be emitted first.
  384.    The Originator-ID: and MIC-Info: headers are always emitted in pairs
  385.    in the order indicated.  This specification allows an originator to
  386.    generate multiple signatures of the data, presumably with different
  387.    signature algorithms, and to include them all in the control
  388.    information.  The interpretation of the presence of multiple
  389.    signatures is outside the scope of this specification except that a
  390.    MIC-Info: header is always interpreted in the context of the
  391.  
  392.  
  393.  
  394. Crocker, et al              Standards Track                     [Page 7]
  395.  
  396. RFC 1848             MIME Object Security Services          October 1995
  397.  
  398.  
  399.    immediately preceding Originator-ID: header.
  400.  
  401. 2.1.2.1.  Version:
  402.  
  403.    The version header is defined by the grammar token <version> as
  404.    follows.
  405.  
  406.       <version>  ::= "Version:" "5" CRLF
  407.  
  408.    Its value is constant and MOSS implementations compliant with this
  409.    specification must recognize only this value and generate an error if
  410.    any other value is found.
  411.  
  412. 2.1.2.2.  Originator-ID:
  413.  
  414.    The purpose of the originator header is two-fold: to directly
  415.    identify the public key to be used to verify the digital signature
  416.    and to indirectly identify the user who owns both it and its
  417.    corresponding private key.  Typically, a recipient is less interested
  418.    in the actual public key value, although obviously the recipient
  419.    needs the value to verify the signature, and more interested in
  420.    identifying its owner.  Thus, the originator header may convey either
  421.    or both pieces of information:
  422.  
  423.       the public key to be used to verify the signature
  424.  
  425.       the name of the owner and which of the owner's public keys to use
  426.       to verify the signature
  427.  
  428.    The decision as to what information to place in the value rests
  429.    entirely with the originator.  The suggested value is to include
  430.    both.  Recipients with whom the originator has previously
  431.    communicated will have to verify that the information presented is
  432.    consistent with what is already known.  New recipients will want all
  433.    of the information, which they will need to verify prior to storing
  434.    in their local database.
  435.  
  436.    The originator header is defined by the grammar token <origid> as
  437.    follows.
  438.  
  439.       <origid>  ::= "Originator-ID:" <id> CRLF
  440.  
  441.    The grammar token <id> is defined in Section 4.
  442.  
  443. 2.1.2.3.  MIC-Info:
  444.  
  445.    The purpose of the Message Integrity Check (MIC) header is to convey
  446.    the digital signature value.  Its value is a comma separated list of
  447.  
  448.  
  449.  
  450. Crocker, et al              Standards Track                     [Page 8]
  451.  
  452. RFC 1848             MIME Object Security Services          October 1995
  453.  
  454.  
  455.    three arguments: the hash (or MIC) algorithm identifier, the
  456.    signature algorithm identifier, and the digital signature.
  457.  
  458.    The MIC header is defined by the grammar token <micinfo> as follows.
  459.  
  460.       <micinfo>  ::= "MIC-Info:" <micalgid> "," <ikalgid> ","
  461.                      <asymsignmic> CRLF
  462.  
  463.    The grammar tokens for the MIC algorithms and identifiers
  464.    (<micalgid>), signature algorithms and identifiers (<ikalgid>), and
  465.    signed MIC formats (<asymsignmic>) are defined by RFC 1423.  They are
  466.    also reprinted in Appendix B.
  467.  
  468.       IMPLEMENTORS NOTE: RFC 1423 is referenced by the PEM protocol,
  469.       which includes support for symmetric signatures and key
  470.       management.  As a result, some of the grammar tokens defined
  471.       there, for example, <ikalgid>, will include options that are not
  472.       legal for this protocol.  These options must be ignored and have
  473.       not been included in the appendix.
  474.  
  475. 2.1.3.  application/moss-signature Content Type Definition
  476.  
  477.    (1)  MIME type name: application
  478.  
  479.    (2)  MIME subtype name: moss-signature
  480.  
  481.    (3)  Required parameters: none
  482.  
  483.    (4)  Optional parameters: none
  484.  
  485.    (5)  Encoding considerations: quoted-printable is always sufficient
  486.  
  487.    (6)  Security considerations: none
  488.  
  489.    The "application/moss-signature" content type is used on the second
  490.    body part of an enclosing multipart/signed.  Its content is comprised
  491.    of the digital signature of the data in the first body part of the
  492.    enclosing multipart/signed and other control information required to
  493.    verify that signature, as defined by Section 2.1.2.  The label
  494.    "application/moss-signature" must be used as the value of the
  495.    protocol parameter of the enclosing multipart/signed; the protocol
  496.    parameter must be present.
  497.  
  498.    Part of the signature verification information will be the Message
  499.    Integrity Check (MIC) algorithm(s) used during the signature creation
  500.    process.  The MIC algorithm(s) identified in this body part must
  501.    match the MIC algorithm(s) identified in the micalg parameter of the
  502.    enclosing multipart/signed.  If it does (they do) not, a user agent
  503.  
  504.  
  505.  
  506. Crocker, et al              Standards Track                     [Page 9]
  507.  
  508. RFC 1848             MIME Object Security Services          October 1995
  509.  
  510.  
  511.    should identify the discrepancy to a user and it may choose to either
  512.    halt or continue processing, giving precedence to the algorithm(s)
  513.    identified in this body part.
  514.  
  515.    An application/moss-signature body part is constructed as follows:
  516.  
  517.       Content-Type: application/moss-signature
  518.  
  519.       <mosssig>
  520.  
  521.    where the grammar token <mosssig> is defined as follows.
  522.  
  523.       <mosssig>       ::= <version> ( 1*<origasymflds> )
  524.  
  525.       <version>       ::= "Version:" "5" CRLF
  526.  
  527.       <origasymflds>  ::= <origid> <micinfo>
  528.  
  529.       <origid>        ::= "Originator-ID:" <id> CRLF
  530.  
  531.       <micinfo>       ::= "MIC-Info:" <micalgid> "," <ikalgid> ","
  532.                           <asymsignmic> CRLF
  533.  
  534.    The token <id> is defined in Section 4.  All other tokens are defined
  535.    in Section 2.1.2.3.
  536.  
  537. 2.1.4.  Use of multipart/signed Content Type
  538.  
  539.    The definition of the multipart/signed content type in [7] specifies
  540.    three steps for creating the body part.
  541.  
  542.  
  543.    (1)  The body part to be digitally signed is created according to a
  544.         local convention, for example, with a text editor or a mail user
  545.         agent.
  546.  
  547.  
  548.    (2)  The body part is prepared for the digital signature service
  549.         according to the protocol parameter, in this case according to
  550.         Section 2.1.1.
  551.  
  552.  
  553.    (3)  The prepared body part is digitally signed according to the
  554.         protocol parameter, in this case according to Section 2.1.2.
  555.  
  556.  
  557.    The multipart/signed content type is constructed as follows.
  558.  
  559.  
  560.  
  561.  
  562. Crocker, et al              Standards Track                    [Page 10]
  563.  
  564. RFC 1848             MIME Object Security Services          October 1995
  565.  
  566.  
  567.    (1)  The value of its required parameter "protocol" is set to
  568.         "application/moss-signature".
  569.  
  570.  
  571.    (2)  The signed body part becomes its first body part.
  572.  
  573.  
  574.    (3)  Its second body part is labeled "application/moss-signature" and
  575.         is filled with the control information generated by the digital
  576.         signature service.
  577.  
  578.  
  579.    (4)  The value of its required parameter "micalg" is set to the same
  580.         value used in the MIC-Info: header in the control information.
  581.         If there is more than one MIC-Info: header present the value is
  582.         set to a comma separated list of values from the MIC-Info
  583.         headers.  The interpretation of the order of the list of values
  584.         is outside the scope of this specification.
  585.  
  586.  
  587.    A multipart/signed content type with the MOSS protocol might look as
  588.    follows:
  589.  
  590.       Content-Type: multipart/signed;
  591.         protocol="application/moss-signature";
  592.         micalg="rsa-md5"; boundary="Signed Message"
  593.  
  594.       --Signed Message
  595.       Content-Type: text/plain
  596.  
  597.       This is some example text.
  598.  
  599.       --Signed Message
  600.       Content-Type: application/moss-signature
  601.  
  602.       Version: 5
  603.       Originator-ID: ID-INFORMATION
  604.       MIC-Info: RSA-MD5,RSA,SIGNATURE-INFORMATION
  605.       --Signed Message--
  606.  
  607.    where ID-INFORMATION and SIGNATURE-INFORMATION are descriptive of the
  608.    content that would appear in a real body part.
  609.  
  610. 2.2.  Encryption Service
  611.  
  612.    The MOSS encryption service is applied to MIME objects, specifically
  613.    a MIME body part.  The MIME body part is created according to a local
  614.    convention and then made available to the encryption service.
  615.  
  616.  
  617.  
  618. Crocker, et al              Standards Track                    [Page 11]
  619.  
  620. RFC 1848             MIME Object Security Services          October 1995
  621.  
  622.  
  623.    The following sequence of steps comprises the application of the
  624.    encryption service.
  625.  
  626.  
  627.    (1)  The body part to be encrypted must be in MIME canonical form.
  628.  
  629.  
  630.    (2)  The data encrypting key and other control information must be
  631.         generated.
  632.  
  633.  
  634.    (3)  The control information must be embodied in an appropriate MIME
  635.         content type.
  636.  
  637.  
  638.    (4)  The control information body part and the encrypted data body
  639.         part must be embodied in a multipart/encrypted content type.
  640.  
  641.  
  642.    The first step is defined by MIME.  The latter three steps are
  643.    described below.
  644.  
  645. 2.2.1.  Encryption Control Information
  646.  
  647.    The application of the encryption service generates control
  648.    information which includes the data encrypting key used to encrypt
  649.    the data itself.  The syntax of the control information is that of a
  650.    set of RFC 822 headers, except that the folding of header values onto
  651.    continuation lines is explicitly forbidden.  Each header and value
  652.    pair generated by the encryption service must be output on exactly
  653.    one line.
  654.  
  655.    First, the originator must retrieve the public key of the recipient.
  656.    The retrieval may be from a local database or from a remote service.
  657.    The acquisition of the recipient's public key is outside the scope of
  658.    the specification, although Section 5 defines one possible mechanism.
  659.  
  660.    With the public key, the originator encrypts the data encrypting key
  661.    according to the Key-Info: header defined below.  The complete set of
  662.    headers generated by the encryption service is as follows.
  663.  
  664.    Version:
  665.       indicates which version of the MOSS protocol the remaining headers
  666.       represent and is defined in Section 2.1.2.1.
  667.  
  668.    DEK-Info:
  669.       indicates the algorithm and mode used to encrypt the data.
  670.  
  671.  
  672.  
  673.  
  674. Crocker, et al              Standards Track                    [Page 12]
  675.  
  676. RFC 1848             MIME Object Security Services          October 1995
  677.  
  678.  
  679.    Recipient-ID:
  680.       indicates the public key used to encrypt the data encrypting key
  681.       that was used to encrypt the data.
  682.  
  683.    Key-Info:
  684.       contains data encrypting key encrypted with the recipient's public
  685.       key.
  686.  
  687.    Each invocation of the encryption service must emit exactly one
  688.    Version: header, exactly one DEK-Info: header, and at least one pair
  689.    of Recipient-ID: and Key-Info: headers.  Headers are always emitted
  690.    in the order indicated.  The Recipient-ID: and Key-Info: headers are
  691.    always emitted in pairs in the order indicated, one pair for each
  692.    recipient of the encrypted data.  A Key-Info: header is always
  693.    interpreted in the context of the immediately preceding Recipient-ID:
  694.    header.
  695.  
  696.       IMPLEMENTORS NOTE: Implementors should always generate a
  697.       Recipient-ID: and Key-Info header pair representing the originator
  698.       of the encrypted data.  By doing so, if an originator sends a
  699.       message to a recipient that is returned undelivered, the
  700.       originator will be able to decrypt the message and determine an
  701.       appropriate course of action based on its content.  If not, an
  702.       originator will not be able to review the message that was sent.
  703.  
  704. 2.2.1.1.  DEK-Info:
  705.  
  706.    The purpose of the data encrypting key information header is to
  707.    indicate the algorithm and mode used to encrypt the data, along with
  708.    any cryptographic parameters that may be required, e.g.,
  709.    initialization vectors.  Its value is either a single argument
  710.    indicating the algorithm and mode or a comma separated pair of
  711.    arguments where the second argument carries any cryptographic
  712.    parameters required by the algorithm and mode indicated in the first
  713.    argument.
  714.  
  715.    The data encrypting key information header is defined by the grammar
  716.    token <dekinfo> as follows.
  717.  
  718.       <dekinfo>  ::= "DEK-Info" ":" <dekalgid>
  719.                      [ "," <dekparameters> ] CRLF
  720.  
  721.    The grammar tokens for the encryption algorithm and mode identifier
  722.    (<dekalgid>) and the optional cryptographic parameters
  723.    (<dekparameters>) are defined by RFC 1423.  They are also reprinted
  724.    in Appendix B.
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Crocker, et al              Standards Track                    [Page 13]
  731.  
  732. RFC 1848             MIME Object Security Services          October 1995
  733.  
  734.  
  735. 2.2.1.2.  Recipient-ID:
  736.  
  737.    The purpose of the recipient header is to identify the private key
  738.    that must be used to decrypt the data encrypting key that will be
  739.    used to decrypt the data.  Presumably the recipient owns the private
  740.    key and thus is less interested in identifying the owner of the key
  741.    and more interested in the private key value itself.  Nonetheless,
  742.    the recipient header may convey either or both pieces of information:
  743.  
  744.       the public key corresponding to the private key to be used to
  745.       decrypt the data encrypting key
  746.  
  747.       the name of the owner and which of the owner's private keys to use
  748.       to decrypt the data encrypting key
  749.  
  750.    The decision as to what information to place in the value rests
  751.    entirely with the originator.  The suggested choice is to include
  752.    just the public key.  However, some recipients may prefer that
  753.    originators not include their public key.  How this preference is
  754.    conveyed to and managed by the originator is outside the scope of
  755.    this specification.
  756.  
  757.    The recipient header is defined by the grammar token <recipid> as
  758.    follows.
  759.  
  760.       <recipid>  ::= "Recipient-ID:" <id> CRLF
  761.  
  762.    The grammar token <id> is defined in Section 4.
  763.  
  764. 2.2.1.3.  Key-Info:
  765.  
  766.    The purpose of the key information header is to convey the encrypted
  767.    data encrypting key.  Its value is a comma separated list of two
  768.    arguments: the algorithm and mode identifier in which the data
  769.    encrypting key is encrypted and the encrypted data encrypting key.
  770.  
  771.    The key information header is defined by the grammar token
  772.    <asymkeyinfo> as follows.
  773.  
  774.       <asymkeyinfo>  ::= "Key-Info" ":" <ikalgid> "," <asymencdek> CRLF
  775.  
  776.    The grammar tokens for the encryption algorithm and mode identifier
  777.    (<ikalgid>) and the encrypted data encrypting key format
  778.    (<asymsignmic>) are defined by RFC 1423.  They are also reprinted in
  779.    Appendix B.
  780.  
  781.       IMPLEMENTORS NOTE: RFC 1423 is referenced by the PEM protocol,
  782.       which includes support for symmetric signatures and key
  783.  
  784.  
  785.  
  786. Crocker, et al              Standards Track                    [Page 14]
  787.  
  788. RFC 1848             MIME Object Security Services          October 1995
  789.  
  790.  
  791.       management.  As a result, some of the grammar tokens defined
  792.       there, for example, <ikalgid>, will include options that are not
  793.       legal for this protocol.  These options must be ignored and have
  794.       not been included in the appendix.
  795.  
  796. 2.2.2.  application/moss-keys Content Type Definition
  797.  
  798.    (1)  MIME type name: application
  799.  
  800.    (2)  MIME subtype name: moss-keys
  801.  
  802.    (3)  Required parameters: none
  803.  
  804.    (4)  Optional parameters: none
  805.  
  806.    (5)  Encoding considerations: quoted-printable is always sufficient
  807.  
  808.    (6)  Security considerations: none
  809.  
  810.    The "application/moss-keys" content type is used on the first body
  811.    part of an enclosing multipart/encrypted.  Its content is comprised
  812.    of the data encryption key used to encrypt the data in the second
  813.    body part and other control information required to decrypt the data,
  814.    as defined by Section 2.2.1.  The label "application/moss-keys" must
  815.    be used as the value of the protocol parameter of the enclosing
  816.    multipart/encrypted; the protocol parameter must be present.
  817.  
  818.    An application/moss-keys body part is constructed as follows:
  819.  
  820.       Content-Type: application/moss-keys
  821.  
  822.       <mosskeys>
  823.  
  824.    where the <mosskeys> token is defined as follows.
  825.  
  826.       <mosskeys>      ::= <version> <dekinfo> 1*<recipasymflds>
  827.  
  828.       <version>       ::= "Version:" "5" CRLF
  829.  
  830.       <dekinfo>       ::= "DEK-Info" ":" <dekalgid>
  831.                           [ "," <dekparameters> ] CRLF
  832.  
  833.       <recipasymflds> ::= <recipid> <asymkeyinfo>
  834.  
  835.       <recipid>       ::= "Recipient-ID:" <id> CRLF
  836.  
  837.       <asymkeyinfo>   ::= "Key-Info" ":" <ikalgid> "," <asymencdek> CRLF
  838.  
  839.  
  840.  
  841.  
  842. Crocker, et al              Standards Track                    [Page 15]
  843.  
  844. RFC 1848             MIME Object Security Services          October 1995
  845.  
  846.  
  847.    The token <id> is defined in Section 4.  The token <version> is
  848.    defined in Section 2.1.2.1.  All other tokens are defined in Section
  849.    2.2.1.3.
  850.  
  851. 2.2.3.  Use of multipart/encrypted Content Type
  852.  
  853.    The definition of the multipart/encrypted body part in [7] specifies
  854.    three steps for creating the body part.
  855.  
  856.  
  857.    (1)  The body part to be encrypted is created according to a local
  858.         convention, for example, with a text editor or a mail user
  859.         agent.
  860.  
  861.  
  862.    (2)  The body part is prepared for encryption according to the
  863.         protocol parameter, in this case the body part must be in MIME
  864.         canonical form.
  865.  
  866.  
  867.    (3)  The prepared body part is encrypted according to the protocol
  868.         parameter, in this case according to Section 2.2.1.
  869.  
  870.  
  871.    The multipart/encrypted content type is constructed as follows.
  872.  
  873.  
  874.    (1)  The value of its required parameter "protocol" is set to
  875.         "application/moss-keys".
  876.  
  877.  
  878.    (2)  The first body part is labeled "application/moss-keys" and is
  879.         filled with the control information generated by the encryption
  880.         service.
  881.  
  882.  
  883.    (3)  The encrypted body part becomes the content of its second body
  884.         part, which is labeled "application/octet-stream".
  885.  
  886.  
  887.    A multipart/encrypted content type with the MOSS protocol might look
  888.    as follows:
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Crocker, et al              Standards Track                    [Page 16]
  899.  
  900. RFC 1848             MIME Object Security Services          October 1995
  901.  
  902.  
  903.       Content-Type: multipart/encrypted;
  904.         protocol="application/moss-keys";
  905.         boundary="Encrypted Message"
  906.  
  907.       --Encrypted Message
  908.       Content-Type: application/moss-keys
  909.  
  910.       Version: 5
  911.       DEK-Info: DES-CBC,DEK-INFORMATION
  912.       Recipient-ID: ID-INFORMATION
  913.       Key-Info: RSA,KEY-INFORMATION
  914.  
  915.       --Encrypted Message
  916.       Content-Type: application/octet-stream
  917.  
  918.       ENCRYPTED-DATA
  919.       --Encrypted Message--
  920.  
  921.    where DEK-INFORMATION, ID-INFORMATION, and KEY-INFORMATION are
  922.    descriptive of the content that would appear in a real body part.
  923.  
  924. 3.  Removing MIME Object Security Services
  925.  
  926.    The verification of the MOSS digital signature service requires the
  927.    following components.
  928.  
  929.  
  930.    (1)  A recipient to verify the digital signature.
  931.  
  932.  
  933.    (2)  A multipart/signed body part with two body parts: the signed
  934.         data and the control information.
  935.  
  936.  
  937.    (3)  The public key of the originator.
  938.  
  939.  
  940.    The signed data and control information of the enclosing
  941.    multipart/signed are prepared according to the description below.
  942.    The digital signature is verified by re-computing the hash of the
  943.    data, decrypting the hash value in the control information with the
  944.    originator's public key, and comparing the two hash values.  If the
  945.    two hash values are equal, the signature is valid.
  946.  
  947.    The decryption of the MOSS encryption service requires the following
  948.    components.
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Crocker, et al              Standards Track                    [Page 17]
  955.  
  956. RFC 1848             MIME Object Security Services          October 1995
  957.  
  958.  
  959.    (1)  A recipient to decrypt the data.
  960.  
  961.  
  962.    (2)  A multipart/encrypted body part with two body parts: the
  963.         encrypted data and the control information.
  964.  
  965.  
  966.    (3)  The private key of the recipient.
  967.  
  968.  
  969.    The encrypted data and control information of the enclosing
  970.    multipart/encrypted are prepared according to the description below.
  971.    The data encrypting key is decrypted with the recipient's private key
  972.    and used to decrypt the data.
  973.  
  974.    The next two sections describe the digital signature and encryption
  975.    services in detail, respectively.
  976.  
  977. 3.1.  Digital Signature Service
  978.  
  979.    This section describes the processing steps necessary to verify the
  980.    MOSS digital signature service.  The definition of the
  981.    multipart/signed body part in [7] specifies three steps for receiving
  982.    it.
  983.  
  984.  
  985.    (1)  The digitally signed body part and the control information body
  986.         part are prepared for processing.
  987.  
  988.  
  989.    (2)  The prepared body parts are made available to the digital
  990.         signature verification process.
  991.  
  992.  
  993.    (3)  The results of the digital signature verification process are
  994.         made available to the user and processing continues with the
  995.         digitally signed body part, as returned by the digital signature
  996.         verification process.
  997.  
  998.  
  999.    Each of these steps is described below.
  1000.  
  1001. 3.1.1.  Preparation
  1002.  
  1003.    The digitally signed body part (the data) and the control information
  1004.    body part are separated from the enclosing multipart/signed body
  1005.    part.
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Crocker, et al              Standards Track                    [Page 18]
  1011.  
  1012. RFC 1848             MIME Object Security Services          October 1995
  1013.  
  1014.  
  1015.    The control information is prepared by removing any content transfer
  1016.    encodings that may be present.
  1017.  
  1018.    The digitally signed body part is prepared by leaving the content
  1019.    transfer encodings intact and canonicalizing the line delimiters
  1020.    according to Step 2 of Section 2.1.1.
  1021.  
  1022. 3.1.2.  Verification
  1023.  
  1024.    First, the recipient must obtain the public key of the originator.
  1025.    The public key may be contained in the control information or it may
  1026.    be necessary for the recipient to retrieve the public key based on
  1027.    information present in the control information.  The retrieval may be
  1028.    from a local database or from a remote service.  The acquisition of
  1029.    the originator's public key is outside the scope of the
  1030.    specification, although Section 5 defines one possible mechanism.
  1031.  
  1032.    With the public key, the recipient decrypts the hash value contained
  1033.    in the control information.  Then, a new hash value is computed over
  1034.    the body part purported to have been digitally signed.
  1035.  
  1036.    Finally, the two hash values are compared to determine the accuracy
  1037.    of the digital signature.
  1038.  
  1039. 3.1.3.  Results
  1040.  
  1041.    There are two required components of the results of the verification
  1042.    process.  The first is an indication as to whether a public key could
  1043.    be found that allows the hash values in the previous step to compare
  1044.    equal.  Such an indication verifies only that the data received is
  1045.    the same data that was digitally signed.
  1046.  
  1047.    The second indication identifies the owner of the public key who is
  1048.    presumably the holder of the private key that created the digital
  1049.    signature.  The indication must include a testament as to the
  1050.    accuracy of the owner identification.
  1051.  
  1052.    At issue is a recipient knowing who created the digital signature.
  1053.    In order for the recipient to know with certainty who digitally
  1054.    signed the message, the binding between the owner's name and the
  1055.    public key must have been verified by the recipient prior to the
  1056.    verification of the digital signature.  The verification of the
  1057.    binding may have been completed offline and stored in a trusted,
  1058.    local database or, if the owner's name and public key are embodied in
  1059.    a certificate, it may be possible to complete it in realtime.  See
  1060.    Section 5 for more information.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Crocker, et al              Standards Track                    [Page 19]
  1067.  
  1068. RFC 1848             MIME Object Security Services          October 1995
  1069.  
  1070.  
  1071. 3.2.  Encryption Service
  1072.  
  1073.    This section describes the processing steps necessary to decrypt the
  1074.    MOSS encryption service.  The definition of the multipart/encrypted
  1075.    body part in [7] specifies three steps for receiving it.
  1076.  
  1077.  
  1078.    (1)  The encrypted body part and the control information body part
  1079.         are prepared for processing.
  1080.  
  1081.  
  1082.    (2)  The prepared body parts are made available to the decryption
  1083.         process.
  1084.  
  1085.  
  1086.    (3)  The results of the decryption process are made available to the
  1087.         user and processing continues with the decrypted body part, as
  1088.         returned by the decryption process.
  1089.  
  1090.  
  1091.    Each of these steps is described below.
  1092.  
  1093. 3.2.1.  Preparation
  1094.  
  1095.    The encrypted body part (the data) and the control information body
  1096.    part are separated from the enclosing multipart/encrypted body part.
  1097.    The body parts are prepared for the decryption process by removing
  1098.    any content transfer encodings that may be present.
  1099.  
  1100. 3.2.2.  Decryption
  1101.  
  1102.    First, the recipient must locate the encrypted data encrypting key in
  1103.    the control information.  Each Recipient-ID: header is checked in
  1104.    order to see if it identifies the recipient or a public key of the
  1105.    recipient.
  1106.  
  1107.    If it does, the immediately following Key-Info: header will contain
  1108.    the data encrypting key encrypted with the public key of the
  1109.    recipient.  The recipient must use the corresponding private key to
  1110.    decrypt the data encrypting key.
  1111.  
  1112.    The data is decrypted with the data encrypting key.  The decrypted
  1113.    data will be a MIME object, a body part, ready to be processed by a
  1114.    MIME agent.
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Crocker, et al              Standards Track                    [Page 20]
  1123.  
  1124. RFC 1848             MIME Object Security Services          October 1995
  1125.  
  1126.  
  1127. 3.2.3.  Results
  1128.  
  1129.    If the recipient is able to locate and decrypt a data encrypting key,
  1130.    from the point of view of MOSS the decryption should be considered
  1131.    successful.  An indication of the owner of the private key used to
  1132.    decrypt the data encrypting key must be made available to the user.
  1133.  
  1134.    Ultimately, the success of the decryption is dependent on the ability
  1135.    of a MIME agent to continue processing with the decrypted body part.
  1136.  
  1137. 4.  Identifying Originators, Recipients, and Their Keys
  1138.  
  1139.    In the PEM specifications, public keys are required to be embodied in
  1140.    certificates, an object that binds each public key with a
  1141.    distinguished name.  A distinguished name is a name form that
  1142.    identifies the owner of the public key.  The embodiment is issued by
  1143.    a certification authority, a role that is expected to be trustworthy
  1144.    insofar as the certification authority would have procedures to
  1145.    verify the identity of the owner prior to issuing the certificate.
  1146.  
  1147.    In MOSS, a user is not required to have a certificate.  The MOSS
  1148.    services require that the user have at least one public/private key
  1149.    pair.  The MOSS protocol requires the digital signature and
  1150.    encryption services to emit Originator-ID: and Recipient-ID: headers,
  1151.    as appropriate.  In the discussion above the actual value of these
  1152.    headers was omitted, having been relegated to this section.  Although
  1153.    the value of each of these headers serves a distinct purpose, for
  1154.    simplicity the single grammar token <id> represents the value that
  1155.    may be assigned to either header.
  1156.  
  1157.    One possible value for the Originator-ID: and Recipient-ID: headers
  1158.    is the public key values themselves.  However, while it is true that
  1159.    the public keys alone could be exchanged and used by users to
  1160.    communicate, the values are, in fact, large and cumbersome.  In
  1161.    addition, public keys would appear as a random sequence of characters
  1162.    and, as a result, would not be immediately consumable by human users.
  1163.  
  1164.       NOTE: It should be pointed out that a feature of being able to
  1165.       specify the public key explicitly is that it allows users to
  1166.       exchange encrypted, anonymous mail.  In particular, receiving
  1167.       users will always know a message comes from the same originating
  1168.       user even if the real identity of the originating user is unknown.
  1169.  
  1170.    Recognizing that the use of public keys is, in general, unsuitable
  1171.    for use by humans, MOSS allows other identifiers in Originator-ID:
  1172.    and Recipient-ID: headers.  These other identifiers are comprised of
  1173.    two parts: a name form and a key selector.
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Crocker, et al              Standards Track                    [Page 21]
  1179.  
  1180. RFC 1848             MIME Object Security Services          October 1995
  1181.  
  1182.  
  1183.    The name form is chosen and asserted by the user who owns the
  1184.    public/private key pair.  Three name forms are specified by this
  1185.    document.  The use of a distinguished name is retained for
  1186.    compatibility with PEM (and compatibility with the X.500 Directory
  1187.    should it become a ubiquitous service).  However, the Internet
  1188.    community has a great deal of experience with the use of electronic
  1189.    mail addresses as a name form.  Also, arbitrary strings are useful to
  1190.    identify the owners of public keys when private name forms are used.
  1191.    Hence, email addresses and arbitrary strings are included as name
  1192.    forms to increase flexibility.
  1193.  
  1194.    Since a user may have more than one public key and may wish to use
  1195.    the same name form for each public key, a name form is insufficient
  1196.    for uniquely identifying a public key.  A unique "key selector" must
  1197.    be assigned to each public key.  The combination of a name form and
  1198.    the key selector uniquely identifies a public key.  Throughout this
  1199.    document, this combination is called an identifier.  There are 5
  1200.    identifiers specified by this document.
  1201.  
  1202.       NOTE: In the simplest case, key selectors will be assigned by the
  1203.       owners of the public/private key pairs.  This works best when
  1204.       users generate their own key pairs for personal use, from which
  1205.       they distribute their public key to others asserting by
  1206.       declaration that the public key belongs to them.  When the
  1207.       assertion that the public key belongs to them is made by a third
  1208.       party, for example when a certification authority issues a
  1209.       certificate to a user according to [4], the key selector may be
  1210.       assigned by that third party.
  1211.  
  1212.    The value of the key selector must be unique with respect to the name
  1213.    form with which it forms an identifier.  Although the same key
  1214.    selector value may be used by more than one name form it must not be
  1215.    used for two different keys with the same name form.  When considered
  1216.    separately, neither a name form nor a key selector is sufficient for
  1217.    identifying the public key to be used.  Either could be used to
  1218.    determine a set of public keys that may be tried in turn until the
  1219.    desired public key is identified.
  1220.  
  1221.    With a public/private key pair for one's self and software that is
  1222.    MOSS aware, an originating user may digitally sign arbitrary data and
  1223.    send it to one or more recipients.  With the public keys of the
  1224.    recipients, a user may encrypt the data so that only the intended
  1225.    recipients can decrypt and read it.  With the name forms assigned to
  1226.    the public keys, originators and recipients can easily recognize
  1227.    their peers in a communication.
  1228.  
  1229.    In the next section the 3 name forms are described in detail.
  1230.    Following that is the specification of the 5 identifiers.
  1231.  
  1232.  
  1233.  
  1234. Crocker, et al              Standards Track                    [Page 22]
  1235.  
  1236. RFC 1848             MIME Object Security Services          October 1995
  1237.  
  1238.  
  1239. 4.1.  Name Forms
  1240.  
  1241.    There are 3 name forms specified by this document: email addresses,
  1242.    distinguished names, and arbitrary strings.
  1243.  
  1244. 4.1.1.  Email Addresses
  1245.  
  1246.    The email address (grammar token <emailstr>) used must be a valid
  1247.    RFC822 address, which is defined in terms of one of the two grammar
  1248.    tokens <addr-spec> or <route-addr>.  The grammar for these two tokens
  1249.    is included in the Appendix as a convenience; the definitive source
  1250.    for these tokens is necessarily RFC822 [1].
  1251.  
  1252.       <emailstr>      ::= <addr-spec> / <route-addr>
  1253.                           ; an electronic mail address as defined by
  1254.                           ; one of these two tokens from RFC822
  1255.  
  1256.    For example, the strings "crocker@tis.com", "galvin@tis.com",
  1257.    "murphy@tis.com", and "ned@innosoft.com" are all email addresses.
  1258.  
  1259. 4.1.2.  Arbitrary Strings
  1260.  
  1261.    The arbitrary string (grammar token <string>) must have a length of
  1262.    at least 1.  There are no other restrictions on the value chosen.
  1263.  
  1264.       <string>        ::= ; a non-null sequence of characters
  1265.  
  1266.    For example, the string
  1267.  
  1268.       the SAAG mailing list maintainer
  1269.  
  1270.    is an arbitrary string.
  1271.  
  1272. 4.1.3.  Distinguished Names
  1273.  
  1274.    The distinguished name (grammar token <dnamestr>) must be constructed
  1275.    according to the guidelines of the X.500 Directory.  The actual
  1276.    syntax of the distinguished name is outside the scope of this
  1277.    specification.  However, RFC1422, for example, specifies syntactic
  1278.    restrictions based on its choice of a certification hierarchy for
  1279.    certificates.
  1280.  
  1281.    For the purposes of conveying a distinguished name from an originator
  1282.    to a recipient, it must be ASN.1 encoded and then printably encoded
  1283.    according to the base64 encoding defined by MIME.
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Crocker, et al              Standards Track                    [Page 23]
  1291.  
  1292. RFC 1848             MIME Object Security Services          October 1995
  1293.  
  1294.  
  1295.       <dnamestr>      ::= <encbin>
  1296.                           ; a printably encoded, ASN.1 encoded
  1297.                           ; distinguished name (as defined by the 'Name'
  1298.                           ; production specified in X.501 [8])
  1299.  
  1300.    For example,
  1301.  
  1302.       /Country Name=US
  1303.       /State or Province Name=MD
  1304.       /Organization Name=Trusted Information Systems
  1305.       /Organizational Unit Name=Glenwood
  1306.       /Common Name=James M. Galvin/
  1307.  
  1308.    is a distinguished name in a user friendly format (line breaks and
  1309.    leading spaces present only to improve readability).  When encoded,
  1310.    it would appear as follows (line breaks present only to improve
  1311.    readability):
  1312.  
  1313.       MG0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNRDEkMCIGA1UEChMbVHJ1c3RlZCBJ
  1314.       bmZvcm1hdGlvbiBTeXN0ZW1zMREwDwYDVQQLEwhHbGVud29vZDEYMBYGA1UEAxMP
  1315.       SmFtZXMgTS4gR2Fsdmlu
  1316.  
  1317. 4.2.  Identifiers
  1318.  
  1319.    There are 5 types of identifiers specified by this document:
  1320.  
  1321.       email address identifiers
  1322.  
  1323.       arbitrary string identifiers
  1324.  
  1325.       distinguished name identifiers
  1326.  
  1327.       the public keys themselves
  1328.  
  1329.       issuer name serial number pairs from a certificate
  1330.  
  1331.    All of these have approximately the same structure (except issuer
  1332.    name and serial number which has 'TYPE, STRING, KEYSEL' for
  1333.    historical reasons):
  1334.  
  1335.       TYPE, KEYSEL, STRING
  1336.  
  1337.    The TYPE field is a literal string chosen from the set "EN", "STR",
  1338.    "DN", "PK", and "IS", one for each of the possible identifiers.
  1339.  
  1340.    The KEYSEL field is used to distinguish between the multiple public
  1341.    keys that may be associated with the name form in the STRING field.
  1342.    Its value must be unique with respect to all other key selectors used
  1343.  
  1344.  
  1345.  
  1346. Crocker, et al              Standards Track                    [Page 24]
  1347.  
  1348. RFC 1848             MIME Object Security Services          October 1995
  1349.  
  1350.  
  1351.    with the same name form.  An example would be to use a portion (low-
  1352.    order 16 or 32 bits) or all of the actual public key used.
  1353.  
  1354.    The STRING field is the name form and has a different syntax
  1355.    according to the value of the TYPE field.
  1356.  
  1357.    The identifier used in each of the originator and recipient fields is
  1358.    described by the following grammar.  The definition of the key
  1359.    selector token is included here since it used by several of the
  1360.    identifiers below.
  1361.  
  1362.       <id>            ::=   <id-email> / <id-string>    / <id-dname>
  1363.                           / <id-publickey> / <id-issuer>
  1364.  
  1365.       <keysel>        ::= 1*<hexchar>
  1366.                           ; hex dump of a non-null sequence of octets
  1367.  
  1368.    Each of the identifier name forms is described below.
  1369.  
  1370. 4.2.1.  Email Address
  1371.  
  1372.    The email address identifier has the following syntax.
  1373.  
  1374.       <id-email>      ::= "EN"  "," <keysel> "," <emailstr> CRLF
  1375.  
  1376.    The syntax of the token <emailstr> is defined in Section 4.1.1.
  1377.  
  1378.    For example:
  1379.  
  1380.       EN,1,galvin@tis.com
  1381.  
  1382.    is an email address identifier.
  1383.  
  1384. 4.2.2.  Arbitrary String
  1385.  
  1386.    The arbitrary string identifier has the following syntax.
  1387.  
  1388.       <id-string>     ::= "STR" "," <keysel> "," <string> CRLF
  1389.  
  1390.    The syntax of the token <string> is defined in Section 4.1.2.
  1391.  
  1392.    For example:
  1393.  
  1394.       STR,1,The SAAG mailing list maintainer
  1395.  
  1396.    is an arbitrary string identifier.
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Crocker, et al              Standards Track                    [Page 25]
  1403.  
  1404. RFC 1848             MIME Object Security Services          October 1995
  1405.  
  1406.  
  1407. 4.2.3.  Distinguished Name
  1408.  
  1409.    The distinguished name identifier has the following syntax.
  1410.  
  1411.       <id-dname>      ::= "DN"  "," <keysel> "," <dnamestr> CRLF
  1412.  
  1413.    The syntax of the token <dnamestr> is defined in Section 4.1.3.
  1414.  
  1415.    For example (line breaks present only to improve readability):
  1416.  
  1417.       DN,1,MG0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNRDEkMCIGA1UEChMbVHJ1c3R
  1418.       lZCBJbmZvcm1hdGlvbiBTeXN0ZW1zMREwDwYDVQQLEwhHbGVud29vZDEYMBYGA1U
  1419.       EAxMPSmFtZXMgTS4gR2Fsdmlu
  1420.  
  1421.    is a distinguished name identifier.
  1422.  
  1423. 4.2.4.  Public Key
  1424.  
  1425.    The public key identifier has the following syntax.
  1426.  
  1427.       <id-publickey>  ::= "PK"  "," <publickey> [ "," <id-subset> ] CRLF
  1428.  
  1429.       <publickey>     ::= <encbin>
  1430.                           ; a printably encoded, ASN.1 encoded public
  1431.                           ; key (as defined by the
  1432.                           ; 'SubjectPublicKeyInfo' production specified
  1433.                           ; in X.509 [9])
  1434.  
  1435.       <id-subset>     ::= <id-email> / <id-string> / <id-dname>
  1436.  
  1437.    The production SubjectPublicKeyInfo is imported from the X.500
  1438.    Directory from the certificate object.  It is currently the best
  1439.    choice for a general purpose public key encoding.
  1440.  
  1441.    For example, (line breaks present only to improve readability):
  1442.  
  1443.       PK,MHkwCgYEVQgBAQICAwADawAwaAJhAMAHQ45ywA357G4fqQ61aoC1fO6BekJmG
  1444.       4475mJkwGIUxvDkwuxe/EFdPkXDGBxzdGrW1iuh5K8kl8KRGJ9wh1HU4TrghGdhn
  1445.       0Lw8gG67Dmb5cBhY9DGwq0CDnrpKZV3cQIDAQAB
  1446.  
  1447.    is a public key identifier without the optional <id-subset>.
  1448.  
  1449.    In normal usage, the token <id-subset> is expected to be present.  It
  1450.    represents a mechanism by which an identifier (name form and key
  1451.    selector) can be associated with a public key.  Recipients of a
  1452.    public key identifier must take care to verify the accuracy of the
  1453.    purported association.  If they do not, it may be possible for a
  1454.    malicious originator to assert an identifier that accords the
  1455.  
  1456.  
  1457.  
  1458. Crocker, et al              Standards Track                    [Page 26]
  1459.  
  1460. RFC 1848             MIME Object Security Services          October 1995
  1461.  
  1462.  
  1463.    originator unauthorized privileges.  See Section 5.2 for more
  1464.    details.
  1465.  
  1466.    For example, (line breaks present only to improve readability):
  1467.  
  1468.       PK,MHkwCgYEVQgBAQICAwADawAwaAJhAMAHQ45ywA357G4fqQ61aoC1fO6BekJmG
  1469.       4475mJkwGIUxvDkwuxe/EFdPkXDGBxzdGrW1iuh5K8kl8KRGJ9wh1HU4TrghGdhn
  1470.       0Lw8gG67Dmb5cBhY9DGwq0CDnrpKZV3cQIDAQAB,EN,2,galvin@tis.com
  1471.  
  1472.    is a public key identifier with the optional <id-subset>.
  1473.  
  1474. 4.2.5.  Issuer Name and Serial Number
  1475.  
  1476.    The issuer name and serial number identifier has the following
  1477.    syntax.
  1478.  
  1479.       <id-issuer>     ::= "IS"  "," <dnamestr>  "," <serial> CRLF
  1480.  
  1481.       <serial>        ::= 1*<hexchar>
  1482.                           ; hex dump of a certificate serial number
  1483.  
  1484.    The <id-issuer> identifier is included for compatibility with the
  1485.    ID-ASymmetric fields defined in [3] (and compatibility with X.500
  1486.    Directory certificates should they become ubiquitously available).
  1487.    Its syntax was chosen such that the older fields are easily converted
  1488.    to this new form by prefixing the old value with "IS" (and replacing
  1489.    the field name of [3] with an appropriate new ID field name).  For
  1490.    example, (line breaks present only to improve readability):
  1491.  
  1492.       IS,MFMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNRDEkMCIGA1UEChMbVHJ1c3
  1493.       RlZCBJbmZvcm1hdGlvbiBTeXN0ZW1zMREwDwYDVQQLEwhHbGVud29vZA==,02
  1494.  
  1495.    is an issuer name and serial number identifier according to MOSS,
  1496.    while
  1497.  
  1498.       MFMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNRDEkMCIGA1UEChMbVHJ1c3
  1499.       RlZCBJbmZvcm1hdGlvbiBTeXN0ZW1zMREwDwYDVQQLEwhHbGVud29vZA==,02
  1500.  
  1501.    is an issuer name and serial number identifier according to PEM.
  1502.  
  1503. 5.  Key Management Content Types
  1504.  
  1505.    This document defines two key management content types: one for
  1506.    requesting cryptographic key material and one for sending
  1507.    cryptographic key material.  Since MOSS depends only on the existence
  1508.    of public/private key pairs, these content types provide a means for
  1509.    conveying public keys and an assertion as to the identity of the
  1510.    owner.  In addition, in order to be compatible with the certificate-
  1511.  
  1512.  
  1513.  
  1514. Crocker, et al              Standards Track                    [Page 27]
  1515.  
  1516. RFC 1848             MIME Object Security Services          October 1995
  1517.  
  1518.  
  1519.    base key management system proposed by RFC 1422, the content types
  1520.    may also be used to convey certificate and certificate revocation
  1521.    list material.
  1522.  
  1523.    The functions defined here are based on the exchange of body parts.
  1524.    In particular, a user would send a message containing at least one
  1525.    application/mosskey-request content, as defined below.  In response,
  1526.    a user would expect to receive a message containing at least one
  1527.    application/mosskey-data content, as defined below.  MIME provides a
  1528.    convenient framework for a user to send several request body parts
  1529.    and to receive several data (response) body parts in one message.
  1530.  
  1531. 5.1.  application/mosskey-request Content Type Definition
  1532.  
  1533.    (1)  MIME type name: application
  1534.  
  1535.    (2)  MIME subtype name: mosskey-request
  1536.  
  1537.    (3)  Required parameters: none
  1538.  
  1539.    (4)  Optional parameters: none
  1540.  
  1541.    (5)  Encoding considerations: quoted-printable is always sufficient
  1542.  
  1543.    (6)  Security Considerations: none
  1544.  
  1545.    The content of this body part corresponds to the following
  1546.    production.
  1547.  
  1548.       <request>       ::= <version>
  1549.                           ( <subject> / <issuer> / <certification> )
  1550.  
  1551.       <version>       ::= "Version:" "5" CRLF
  1552.  
  1553.       <subject>       ::= "Subject:" <id> CRLF
  1554.  
  1555.       <issuer>        ::= "Issuer:" <id> CRLF
  1556.  
  1557.       <certification> ::= "Certification:" <encbin> CRLF
  1558.  
  1559.    A user would use this content type to specify needed cryptographic
  1560.    key information.  The message containing this content type might be
  1561.    directed towards an automatic or manual responder, which may be
  1562.    mail-based, depending on the local implementation and environment.
  1563.    The application/mosskey-request content type is an independent body
  1564.    part because it is entirely independent of any other body part.
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Crocker, et al              Standards Track                    [Page 28]
  1571.  
  1572. RFC 1848             MIME Object Security Services          October 1995
  1573.  
  1574.  
  1575.    If the application/mosskey-request content contains a Certification:
  1576.    field it requests certification of the self-signed certificate in the
  1577.    field value.  If the content contains an Issuer: field it requests
  1578.    the Certificate Revocation List (CRL) chain beginning with the CRL of
  1579.    the issuer identified in the field value.  If the content contains a
  1580.    Subject: field it requests either the public key of the subject or a
  1581.    certificate chain beginning with the subject identified in the field
  1582.    value, or both if both exist.
  1583.  
  1584.    The Subject: and Issuer: fields each contain a value of type <id>,
  1585.    which is defined in Section 4.
  1586.  
  1587.    One possible response to receiving an application/mosskey-request
  1588.    body part is to construct and return an application/mosskey-data body
  1589.    part.  When returning public keys, certificate chains, and
  1590.    certificate revocation list chains, if there exists more than one,
  1591.    several application/mosskey-data body parts are to be returned in the
  1592.    reply message, one for each.
  1593.  
  1594. 5.2.  application/mosskey-data Content Type Definition
  1595.  
  1596.    The principal objective of this content type is to convey
  1597.    cryptographic keying material from a source to a destination.  This
  1598.    might be in response to the receipt of an application/mosskey-request
  1599.    content type or it might be in anticipation of receiving an
  1600.    application/mosskey-request if it is not sent, e.g., it may be
  1601.    combined with a multipart/signed object by an originator to ensure
  1602.    that a recipient has the cryptographic keying material necessary to
  1603.    verify the signature.  When combined with other content types, the
  1604.    processing by a recipient is enhanced if the application/mosskey-data
  1605.    content type is positioned in its enclosing content type prior to the
  1606.    content types that will make use of its cryptographic keying
  1607.    material.
  1608.  
  1609.    However, no explicit provision is made in this document for
  1610.    determining the authenticity or accuracy of the data being conveyed.
  1611.    In particular, when a public key and its identifier is conveyed,
  1612.    there is nothing to prevent the source or an interloper along the
  1613.    path from the source to the destination from substituting alternate
  1614.    values for either the public key or the identifier.
  1615.  
  1616.    It is incumbent upon a recipient to verify the authenticity and
  1617.    accuracy of the data received in this way prior to its use.  This
  1618.    problem can be addressed by the use of certificates, since a
  1619.    certification hierarchy is a well-defined mechanism that conveniently
  1620.    supports the automatic verification of the data.  Alternatively, the
  1621.    source of the application/mosskey-data body part could digitally sign
  1622.    it.  In this way, if the destination believes that a correct source's
  1623.  
  1624.  
  1625.  
  1626. Crocker, et al              Standards Track                    [Page 29]
  1627.  
  1628. RFC 1848             MIME Object Security Services          October 1995
  1629.  
  1630.  
  1631.    public key is available locally and if the destination believes the
  1632.    source would convey accurate data, then the contents of the
  1633.    application/mosskey-data from the source could be believed to be
  1634.    accurate.
  1635.  
  1636.       NOTE: Insofar as a certificate represents a mechanism by which a
  1637.       third party vouches for the binding between a name and a public
  1638.       key, the signing of an application/mosskey-data body part is a
  1639.       similar mechanism.
  1640.  
  1641.    (1)  MIME type name: application
  1642.  
  1643.    (2)  MIME subtype name: mosskey-data
  1644.  
  1645.    (3)  Required parameters: none
  1646.  
  1647.    (4)  Optional parameters: none
  1648.  
  1649.    (5)  Encoding considerations: quoted-printable is always sufficient.
  1650.  
  1651.    (6)  Security Considerations: none
  1652.  
  1653.    The content of this body part corresponds to the following
  1654.    production.
  1655.  
  1656.       <mosskeydata>   ::= <version>
  1657.                           ( <publickeydata> / <certchain> / <crlchain> )
  1658.  
  1659.       <version>       ::= "Version:" "5" CRLF
  1660.  
  1661.       <publickeydata> ::= "Key:" "PK" "," <publickey> ","
  1662.                           <id-subset> CRLF
  1663.  
  1664.       <certchain>     ::= <cert> *( [ <crl> ] <cert> )
  1665.  
  1666.       <crlchain>      ::= 1*( <crl> [ <cert> ] )
  1667.  
  1668.       <cert>          ::= "Certificate:" <encbin> CRLF
  1669.  
  1670.       <crl>           ::= "CRL:" <encbin> CRLF
  1671.  
  1672.    This content type is used to transfer public keys, certificate
  1673.    chains, or Certificate Revocation List (CRL) chains.  The information
  1674.    in the body part is entirely independent of any other body part.
  1675.    (Note that the converse is not true: the validity of a protected body
  1676.    part cannot be determined without the proper public keys,
  1677.    certificates, or current CRL information.)  As such, the
  1678.    application/mosskey-data content type is an independent body part.
  1679.  
  1680.  
  1681.  
  1682. Crocker, et al              Standards Track                    [Page 30]
  1683.  
  1684. RFC 1848             MIME Object Security Services          October 1995
  1685.  
  1686.  
  1687.    The <publickeydata> production contains exactly one public key.  It
  1688.    is used to bind a public key with its corresponding name form and key
  1689.    selector.  It is recommended that when responders are returning this
  1690.    information that the enclosing body part be digitally signed by the
  1691.    responder in order to protect the information.  The <id-subset> token
  1692.    is defined in Section 4.2.4.
  1693.  
  1694.    The <certchain> production contains one certificate chain.  A
  1695.    certificate chain starts with the requested certificate and continues
  1696.    with the certificates of subsequent issuers.  Each issuer certificate
  1697.    included must have issued the preceding certificate.  For each
  1698.    issuer, a CRL may be supplied.  A CRL in the chain belongs to the
  1699.    immediately following issuer.  Therefore, it potentially contains the
  1700.    immediately preceding certificate.
  1701.  
  1702.    The <crlchain> production contains one certificate revocation list
  1703.    chain.  The CRLs in the chain begin with the requested CRL and
  1704.    continue with the CRLs of subsequent issuers.  The issuer of each CRL
  1705.    is presumed to have issued a certificate for the issuer of the
  1706.    preceding CRL.  For each CRL, the issuer's certificate may be
  1707.    supplied.  A certificate in the chain must belong to the issuer of
  1708.    the immediately preceding CRL.
  1709.  
  1710.    The relationship between a certificate and an immediately preceding
  1711.    CRL is the same in both <certchain> and <crlchain>.  In a <certchain>
  1712.    the CRLs are optional.  In a <crlchain> the certificates are
  1713.    optional.
  1714.  
  1715. 6.  Examples
  1716.  
  1717.    Each example is included as a separate section for ease of reference.
  1718.  
  1719. 6.1.  Original Message Prepared for Protection
  1720.  
  1721.    Except as explicitly indicated, the following message is used as the
  1722.    message to be protected.
  1723.  
  1724.       To: Ned Freed <ned@innosoft.com>
  1725.       Subject: Hi Ned!
  1726.  
  1727.       How do you like the new MOSS?
  1728.  
  1729.       Jim
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Crocker, et al              Standards Track                    [Page 31]
  1739.  
  1740. RFC 1848             MIME Object Security Services          October 1995
  1741.  
  1742.  
  1743. 6.2.  Sign Text of Original Message
  1744.  
  1745.    When the text of the original message is signed, it will look like
  1746.    this, where lines with an ampersand '&' are digitally signed (note
  1747.    the use of the public key identifier with the included email name
  1748.    identifier, on the lines marked with an asterisk '*'):
  1749.  
  1750.         To: Ned Freed <ned@innosoft.com>
  1751.         Subject: Hi Ned!
  1752.         MIME-Version: 1.0
  1753.         Content-Type: multipart/signed;
  1754.           protocol="application/moss-signature";
  1755.           micalg="rsa-md5"; boundary="Signed Boundary"
  1756.  
  1757.         --Signed Boundary
  1758.       & Content-Type: text/plain; charset="us-ascii"
  1759.       & Content-ID: <21436.785186814.2@tis.com>
  1760.       &
  1761.       & How do you like the new MOSS?
  1762.       &
  1763.       & Jim
  1764.  
  1765.         --Signed Boundary
  1766.         Content-Type: application/moss-signature
  1767.         Content-ID: <21436.785186814.1@tis.com>
  1768.         Content-Transfer-Encoding: quoted-printable
  1769.  
  1770.         Version: 5
  1771.       * Originator-ID: PK,MHkwCgYEVQgBAQICAwADawAwaAJhAMAHQ45ywA357G4f=
  1772.       * qQ61aoC1fO6BekJmG4475mJkwGIUxvDkwuxe/EFdPkXDGBxzdGrW1iuh5K8kl8=
  1773.       * KRGJ9wh1HU4TrghGdhn0Lw8gG67Dmb5cBhY9DGwq0CDnrpKZV3cQIDAQAB,EN,=
  1774.       * 2,galvin@tis.com
  1775.         MIC-Info: RSA-MD5,RSA,PnEvyFV3sSyTSiGh/HFgWUIFa22jbHoTrFIMVERf=
  1776.         MZXUKzFsHbmKtIowJlJR56OoImo+t7WjRfzpMH7MOKgPgzRnTwk0T5dOcP/lfb=
  1777.         sOVJjleV7vTe9yoNp2P8mi/hs7
  1778.  
  1779.         --Signed Boundary--
  1780.  
  1781. 6.3.  Sign Headers and Text of Original Message
  1782.  
  1783.    If, instead, we choose to protect the headers with the text of the
  1784.    original message, it will look like this, where lines with an
  1785.    ampersand '&' are encrypted:
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Crocker, et al              Standards Track                    [Page 32]
  1795.  
  1796. RFC 1848             MIME Object Security Services          October 1995
  1797.  
  1798.  
  1799.         To: Ned Freed <ned@innosoft.com>
  1800.         Subject: Hi Ned!
  1801.         MIME-Version: 1.0
  1802.         Content-Type: multipart/signed;
  1803.           protocol="application/moss-signature";
  1804.           micalg="rsa-md5"; boundary="Signed Boundary"
  1805.  
  1806.         --Signed Boundary
  1807.       & Content-Type: message/rfc822
  1808.       & Content-ID: <21468.785187044.2@tis.com>
  1809.       &
  1810.       & To:         Ned Freed <ned@innosoft.com>
  1811.       & Subject:    Hi Ned!
  1812.       &
  1813.       &
  1814.       & How do you like the new MOSS?
  1815.       &
  1816.       & Jim
  1817.  
  1818.         --Signed Boundary
  1819.         Content-Type: application/moss-signature
  1820.         Content-ID: <21468.785187044.1@tis.com>
  1821.         Content-Transfer-Encoding: quoted-printable
  1822.  
  1823.         Version: 5
  1824.         Originator-ID: PK,MHkwCgYEVQgBAQICAwADawAwaAJhAMAHQ45ywA357G4f=
  1825.         qQ61aoC1fO6BekJmG4475mJkwGIUxvDkwuxe/EFdPkXDGBxzdGrW1iuh5K8kl8=
  1826.         KRGJ9wh1HU4TrghGdhn0Lw8gG67Dmb5cBhY9DGwq0CDnrpKZV3cQIDAQAB,EN,=
  1827.         2,galvin@tis.com
  1828.         MIC-Info: RSA-MD5,RSA,ctbDBgkYtFW1sisb5w4/Y/p94LftgQ0IrEn3d6WT=
  1829.         wjfxFBvAceVWfawsZPLijVKZUYtbIqJmjKtzTJlagBawfA/KhUsvTZdR6Dj+4G=
  1830.         d8dBBwMKvqMKTHAUxGXYxwNdbK
  1831.  
  1832.         --Signed Boundary--
  1833.  
  1834. 6.4.  Encrypt Text of a Message
  1835.  
  1836.    If we choose to encrypt the text of the following message, that is,
  1837.    encrypt the lines marked with asterisk '*':
  1838.  
  1839.         To: Jim Galvin <galvin@tis.com>
  1840.         Subject: an encrypted message
  1841.  
  1842.       * How do you like the new MOSS?
  1843.       *
  1844.       * Jim
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Crocker, et al              Standards Track                    [Page 33]
  1851.  
  1852. RFC 1848             MIME Object Security Services          October 1995
  1853.  
  1854.  
  1855.    the message would look as follows (note the use of the email name
  1856.    identifier, on the line marked with an asterisk '*'):
  1857.  
  1858.         To: Jim Galvin <galvin@tis.com>
  1859.         Subject: an encrypted message
  1860.         MIME-Version: 1.0
  1861.         Content-Type: multipart/encrypted;
  1862.           protocol="application/moss-keys";
  1863.           boundary="Encrypted Boundary"
  1864.  
  1865.         --Encrypted Boundary
  1866.         Content-Type: application/moss-keys
  1867.         Content-ID: <21535.785187667.1@tis.com>
  1868.         Content-Transfer-Encoding: quoted-printable
  1869.  
  1870.         Version: 5
  1871.         DEK-Info: DES-CBC,D488AAAE271C8159
  1872.       * Recipient-ID: EN,2,galvin@tis.com
  1873.         Key-Info: RSA,ISbC3IR01BrYq2rp493X+Dt7WrVq3V3/U/YXbxOTY5cmiy1/=
  1874.         7NvSqqXSK/WZq05lN99RDUQhdNxXI64ePAbFWQ6RGoiCrRs+Dc95oQh7EFEPoT=
  1875.         9P6jyzcV1NzZVwfp+u
  1876.  
  1877.         --Encrypted Boundary
  1878.         Content-Type: application/octet-stream
  1879.         Content-Transfer-Encoding: base64
  1880.  
  1881.         AfR1WSeyLhy5AtcX0ktUVlbFC1vvcoCjYWy/yYjVj48eqzUVvGTGMsV6MdlynU
  1882.         d4jcJgRnQIQvIxm2VRgH8W8MkAlul+RWGu7jnxjp0sNsU562+RZr0f4F3K3n4w
  1883.         onUUP265UvvMj23RSTguZ/nl/OxnFM6SzDgV39V/i/RofqI=
  1884.  
  1885.         --Encrypted Boundary--
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Crocker, et al              Standards Track                    [Page 34]
  1907.  
  1908. RFC 1848             MIME Object Security Services          October 1995
  1909.  
  1910.  
  1911. 6.5.  Encrypt the Signed Text of a Message
  1912.  
  1913.    If, instead, we choose to sign the text before we encrypt it, the
  1914.    structure would be as follows, where lines with an asterisk '*' are
  1915.    digitally signed and lines with an ampersand '&' are encrypted:
  1916.  
  1917.           Content-Type: multipart/encrypted;
  1918.             protocol="application/moss-keys";
  1919.             boundary="Encrypted Boundary"
  1920.  
  1921.           --Encrypted Boundary
  1922.           Content-Type: application/moss-keys
  1923.  
  1924.           KEY INFORMATION
  1925.  
  1926.           --Encrypted Boundary
  1927.           Content-Type: application/octet-stream
  1928.  
  1929.       &   Content-Type: multipart/signed;
  1930.       &     protocol="application/moss-signature";
  1931.       &     micalg="rsa-md5"; boundary="Signed Boundary"
  1932.       &
  1933.       &   --Signed Boundary
  1934.       & * Content-Type: text/plain
  1935.       & *
  1936.       & * How do you like the new MOSS?
  1937.       & *
  1938.       & * Jim
  1939.       &
  1940.       &   --Signed Boundary
  1941.       &   Content-Type: application/moss-signature
  1942.       &
  1943.       &   SIGNATURE INFORMATION
  1944.       &
  1945.       &   --Signed Boundary--
  1946.  
  1947.           --Encrypted Boundary--
  1948.  
  1949.    where KEY INFORMATION and SIGNATURE INFORMATION are descriptive of
  1950.    the actual content that would appear in a real body part.  The actual
  1951.    message would be like this:
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Crocker, et al              Standards Track                    [Page 35]
  1963.  
  1964. RFC 1848             MIME Object Security Services          October 1995
  1965.  
  1966.  
  1967.       To: Jim Galvin <galvin@tis.com>
  1968.       Subject: an encrypted message
  1969.       MIME-Version: 1.0
  1970.       Content-Type: multipart/encrypted;
  1971.         protocol="application/moss-keys";
  1972.         boundary="Encrypted Boundary"
  1973.  
  1974.       --Encrypted Boundary
  1975.       Content-Type: application/moss-keys
  1976.       Content-ID: <21546.785188458.1@tis.com>
  1977.       Content-Transfer-Encoding: quoted-printable
  1978.  
  1979.       Version: 5
  1980.       DEK-Info: DES-CBC,11CC89F8D90F1DFE
  1981.       Recipient-ID: EN,2,galvin@tis.com
  1982.       Key-Info: RSA,AZTtlEc6xm0vjkvtVUITUh7sz+nOuOwP0tsym6CQozD9IwVIJz=
  1983.       Y8+vIfbh5BpR0kS6prq3EGFBFR8gRMUvbgHtEKPD/4ICQ7b6ssZ7FmKhl/cJC5rV=
  1984.       jpb4EOUlwOXwRZ
  1985.  
  1986.       --Encrypted Boundary
  1987.       Content-Type: application/octet-stream
  1988.       Content-Transfer-Encoding: base64
  1989.  
  1990.       ZvWvtosDzRBXJzkDFFRb9Qjrgm2nDWg3zotJ3ZpExpWUG/aRJ7Vwd+PWkSfrDPJ5
  1991.       2V/wkxwMrum6xJHZonrtyd0AvaztvriMm2zXTefzwpGG1i5zK47PBqreLA3HDTK2
  1992.       U6B13vzpE8wMSVefzaCTSpXRSCh08ceVEZrIYS53/CKZV2/Sga71pGNlux8MsJpY
  1993.       Lwdj5Q3NKocg1LMngMo8yrMAe+avMjfOnhui49Xon1Gft+N5XDH/+wI9qxI9fkQv
  1994.       NZVDlWIhCYEkxd5ke549tLkJjEqHQbgJW5C+K/uxdiD2dBt+nRCXcuO0Px3yKRyY
  1995.       g/9BgTf36padSHuv48xBg5YaqaEWpEzLI0Qd31vAyP23rqiPhfBn6sjhQ2KrWhiF
  1996.       2l3TV8kQsIGHHZUkaUbqkXJe6PEdWWhwsqCFPDdkpjzQRrTuJH6xleNUFg+CG1V+
  1997.       tL4IgMjQqm3KVojRXx8bG2auVN89NfwFswmoq4fXTrh3xyVS1VgxjKkcYI8SVVmk
  1998.       YjCxVviJP3zO2UzBvCoMfADtBVBz1njYETtVGDO97uT39MqL85uEgiF4E5TkOj/m
  1999.       04+88G0/vvN/RISKJiFQJ3FyVIB/ShX9Dixl8WCx3rxwN5g2QFLiyQVulzuNhimS
  2000.       D4ZxEo7smcTsAXUjwSLRtdjmTTutw2GmFESUaIrY81NcpQJRPNAvF0IkN6ddwL4q
  2001.       vzUS99vjQp15g9FUv82lHtHwhM18a9GokVG8xYOjBBsn9anp9abh4Tp/c/vpbunQ
  2002.       UqnpV29rF4wj+8OwUOMi9ymGabBXAjw7DhNH2RdRVr1upQO896OX81VWB0LsA0cp
  2003.       +ymxhTrEI+wCHcrsNMoRK/7zAeuAi0f1t9bN594EFlLoIrBnKEa1/OUAhMT7kG1f
  2004.       NkSRnc8BZswIoPyRetsTurQfD40nsVHvNwE9Jz7wbBo00gd6blPADOUYFxfW5zu6
  2005.       ubygBqJiKPM4II2fCdNj7CptfQcoRTeguKMVPLVmFg/EINuWBFm10GqlYT7p4zhf
  2006.       zysV/3r5LVZ1E8armTCRJ2GoYG5h+SKcytaQ0IT8S2nLPCZl1hzdajsrqHFe8omQ
  2007.  
  2008.       --Encrypted Boundary--
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Crocker, et al              Standards Track                    [Page 36]
  2019.  
  2020. RFC 1848             MIME Object Security Services          October 1995
  2021.  
  2022.  
  2023. 6.6.  Protecting Audio Content
  2024.  
  2025.    In addition to text, the MOSS services as defined here will protect
  2026.    arbitrary body parts, for example, the following audio body part:
  2027.  
  2028.       Content-Type: audio/basic
  2029.  
  2030.       AUDIO DATA HERE
  2031.  
  2032. 6.6.1.  Sign Audio Content
  2033.  
  2034.    When signed an audio content would appear as follows, where lines
  2035.    with an ampersand '&' are digitally signed:
  2036.  
  2037.         Content-Type: multipart/signed;
  2038.           protocol="application/moss-signature";
  2039.           micalg="rsa-md5"; boundary="Signed Boundary"
  2040.  
  2041.         --Signed Boundary
  2042.       & Content-Type: audio/basic
  2043.       & Content-Transfer-Encoding: base64
  2044.       &
  2045.       & base64(AUDIO-DATA-HERE)
  2046.  
  2047.         --Signed Boundary
  2048.         Content-Type: application/moss-signature
  2049.  
  2050.         SIGNATURE-INFORMATION-HERE
  2051.  
  2052.         --Signed Boundary--
  2053.  
  2054.    where AUDIO-DATA-HERE and SIGNATURE-INFORMATION-HERE are descriptive
  2055.    of the content that would appear in a real body part.
  2056.  
  2057. 6.6.2.  Encrypt Audio Content
  2058.  
  2059.    When encrypted an audio content would appear as follows, where lines
  2060.    with an ampersand '&' are encrypted:
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Crocker, et al              Standards Track                    [Page 37]
  2075.  
  2076. RFC 1848             MIME Object Security Services          October 1995
  2077.  
  2078.  
  2079.         Content-Type: multipart/encrypted;
  2080.           protocol="application/moss-keys";
  2081.           boundary="Encrypted Boundary"
  2082.  
  2083.         --Encrypted Boundary
  2084.         Content-Type: application/moss-keys
  2085.  
  2086.         KEY-INFORMATION-HERE
  2087.  
  2088.         --Encrypted Boundary
  2089.         Content-Type: application/octet-stream
  2090.         Content-Transfer-Encoding: base64
  2091.  
  2092.       & Content-Type: audio/basic
  2093.       &
  2094.       & base64(encrypted(AUDIO-DATA-HERE))
  2095.  
  2096.         --Encrypted Boundary--
  2097.  
  2098.    where KEY-INFORMATION-HERE and AUDIO-DATA-HERE are descriptive of the
  2099.    content that would appear in a real body part.
  2100.  
  2101. 7.  Observations
  2102.  
  2103.    The use of MIME and the framework defined by [7] exhibits several
  2104.    properties:
  2105.  
  2106.  
  2107.    (1)  It allows arbitrary content types to be protected, not just the
  2108.         body of an RFC822 message.
  2109.  
  2110.  
  2111.    (2)  It allows a message to contain several body parts which may or
  2112.         may not be protected.
  2113.  
  2114.  
  2115.    (3)  It allows the components of a multipart or message content to be
  2116.         protected with different services.
  2117.  
  2118.  
  2119.    The use of a MIME-capable user agent makes complex nesting of
  2120.    protected message body parts much easier.  For example, the user can
  2121.    separately sign and encrypt a message.  This allows complete
  2122.    separation of the confidentiality security service from the digital
  2123.    signature security service.  That is, different key pairs could be
  2124.    used for the different services and could be protected separately.
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Crocker, et al              Standards Track                    [Page 38]
  2131.  
  2132. RFC 1848             MIME Object Security Services          October 1995
  2133.  
  2134.  
  2135.    This is useful for at least two reasons.  First, some public key
  2136.    algorithms do not support both digital signatures and encryption; two
  2137.    key pairs would be required in this case.  Second, an employee's
  2138.    company could be given access to the (private) decryption key but not
  2139.    the (private) signature key, thereby granting the company the ability
  2140.    to decrypt messages addressed to the employee in emergencies without
  2141.    also granting the company the ability to sign messages as the
  2142.    employee.
  2143.  
  2144. 8.  Comparison of MOSS and PEM Protocols
  2145.  
  2146.    MOSS differs from PEM in the following ways.
  2147.  
  2148.  
  2149.    (1)  When using PEM, users are required to have certificates.  When
  2150.         using MOSS, users need only have a public/private key pair.
  2151.  
  2152.  
  2153.    (2)  MOSS broadens the allowable name forms that users may use to
  2154.         identify their public keys, including arbitrary strings, email
  2155.         addresses, or distinguished names.
  2156.  
  2157.  
  2158.    (3)  PEM currently only supports text-based electronic mail messages
  2159.         and the message text is required to be represented by the ASCII
  2160.         character set with "<CR><LF>" line delimiters.  These
  2161.         restrictions no longer apply.
  2162.  
  2163.  
  2164.    (4)  The PEM specification currently requires that encryption
  2165.         services be applied only to message bodies that have been
  2166.         signed.  By providing for each of the services separately, they
  2167.         may be applied in any order according to the needs of the
  2168.         requesting application.
  2169.  
  2170.  
  2171.    (5)  MIME includes transfer encoding operations to ensure the
  2172.         unmodified transfer of body parts.  Therefore, unlike PEM, MOSS
  2173.         does not need to include these functions.
  2174.  
  2175.  
  2176.    (6)  PEM specifies a Proc-Type: header field to identify the type of
  2177.         processing that was performed on the message.  This
  2178.         functionality is subsumed by the MIME Content-Type: headers.
  2179.         The Proc-Type: header also includes a decimal number that is
  2180.         used to distinguish among incompatible encapsulated header field
  2181.         interpretations which may arise as changes are made to the PEM
  2182.         standard.  This functionality is replaced by the Version: header
  2183.  
  2184.  
  2185.  
  2186. Crocker, et al              Standards Track                    [Page 39]
  2187.  
  2188. RFC 1848             MIME Object Security Services          October 1995
  2189.  
  2190.  
  2191.         specified in this document.
  2192.  
  2193.  
  2194.    (7)  PEM specifies a Content-Domain: header, the purpose of which is
  2195.         to describe the type of the content which is represented within
  2196.         a PEM message's encapsulated text.  This functionality is
  2197.         subsumed by the MIME Content-Type: headers.
  2198.  
  2199.  
  2200.    (8)  The PEM specifications include a document that defines new types
  2201.         of PEM messages, specified by unique values used in the Proc-
  2202.         Type: header, to be used to request certificate and certificate
  2203.         revocation list information.  This functionality is subsumed by
  2204.         two new content types specified in this document:
  2205.         application/mosskey- request and application/mosskey-data.
  2206.  
  2207.  
  2208.    (9)  The header fields having to do with certificates (Originator-
  2209.         Certificate: and Issuer-Certificate:) and CRLs (CRL:) are
  2210.         relegated for use only in the application/mosskey-data and
  2211.         application/mosskey-request content types and are no longer
  2212.         allowed in the header portion of a PEM signed or encrypted
  2213.         message.  This separates key management services from the
  2214.         digital signature and encryption services.
  2215.  
  2216.  
  2217.    (10) The grammar specified here explicitly separates the header
  2218.         fields that may appear for the encryption and signature security
  2219.         services.  It is the intent of this document to specify a
  2220.         precise expression of the allowed header fields; there is no
  2221.         intent to disallow the functionality of combinations of
  2222.         encryption and signature security found in [3].
  2223.  
  2224.  
  2225.    (11) With the separation of the encryption and signature security
  2226.         services, there is no need for a MIC-Info: field in the headers
  2227.         associated with an encrypted message.
  2228.  
  2229.  
  2230.    (12) In [3], when asymmetric key management is used, an Originator-ID
  2231.         field is required in order to identify the private key used to
  2232.         sign the MIC argument in the MIC-Info: field.  Because no MIC-
  2233.         Info: field is associated with the encryption security service
  2234.         under asymmetric key management, there is no requirement in that
  2235.         case to include an Originator-ID field.
  2236.  
  2237.  
  2238.    (13) The protocol specified here explicitly excludes symmetric key
  2239.  
  2240.  
  2241.  
  2242. Crocker, et al              Standards Track                    [Page 40]
  2243.  
  2244. RFC 1848             MIME Object Security Services          October 1995
  2245.  
  2246.  
  2247.         management.
  2248.  
  2249.  
  2250.    (14) This document requires all data that is to be digitally signed
  2251.         to be represented in 7bit form.
  2252.  
  2253.  
  2254. 9.  Security Considerations
  2255.  
  2256.    This entire document is about security.
  2257.  
  2258. 10.  Acknowledgements
  2259.  
  2260.    David H. Crocker suggested the use of a multipart structure for the
  2261.    MIME and PEM interaction, which has evolved into the MOSS protocol.
  2262.  
  2263.    The MOSS protocol is a direct descendant of the PEM protocol.  The
  2264.    authors gratefully acknowledge the editors of those specification,
  2265.    especially John Linn and Steve Kent.  This work would not have been
  2266.    possible had it not been for all of the PEM developers, users, and
  2267.    interested persons who are always present on the PEM developers
  2268.    mailing list and at PEM working group meetings at IETF meetings,
  2269.    especially, Amanda Walker, Bob Juenemann, Steve Dusse, Jeff Thomson,
  2270.    and Rhys Weatherly.
  2271.  
  2272. 11.  References
  2273.  
  2274.    [1] Crocker, D., "Standard for the Format of ARPA Internet Text
  2275.        Messages", STD 11, RFC 822, University of Delaware, August 1982.
  2276.  
  2277.    [2] Borenstein, N., and N. Freed, "MIME (Multipurpose Internet Mail
  2278.        Extension) Part One: Mechanisms for Specifying and Describing the
  2279.        Format of Internet Message Bodies", RFC 1521, Bellcore and
  2280.        Innosoft, September 1993.
  2281.  
  2282.    [3] Linn, J., "Privacy Enhancement for Internet Electronic Mail: Part
  2283.        I: Message Encryption and Authentication Procedures", RFC 1421,
  2284.        IAB IRTF PSRG, IETF PEM WG, February 1993.
  2285.  
  2286.    [4] Kent, S., "Privacy Enhancement for Internet Electronic Mail: Part
  2287.        II: Certificate-Based Key Management", RFC 1422, BBN
  2288.        Communications, February 1993.
  2289.  
  2290.    [5] Balenson, D., "Privacy Enhancement for Internet Electronic Mail:
  2291.        Part III: Algorithms, Modes, and Identifiers", RFC 1423, Trusted
  2292.        Information Systems, February 1993.
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Crocker, et al              Standards Track                    [Page 41]
  2299.  
  2300. RFC 1848             MIME Object Security Services          October 1995
  2301.  
  2302.  
  2303.    [6] Kaliski, B., "Privacy Enhancement for Internet Electronic Mail:
  2304.        Part IV: Key Certification and Related Services", RFC 1424, RSA
  2305.        Laboratories, February 1993.
  2306.  
  2307.    [7] Galvin, J., Murphy, S., Crocker, S., and N. Freed, "Security
  2308.        Multiparts for MIME: Multipart/Signed and Multipart/Encrypted",
  2309.        RFC 1847, Trusted Information Systems and Innosoft, September
  2310.        1995.
  2311.  
  2312.    [8] The Directory -- Models.  X.501, 1988.  Developed in
  2313.        collaboration, and technically aligned, with ISO 9594-2.
  2314.  
  2315.    [9] The Directory -- Authentication Framework.  X.509, 1988.
  2316.        Developed in collaboration, and technically aligned, with ISO
  2317.        9594-8.
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Crocker, et al              Standards Track                    [Page 42]
  2355.  
  2356. RFC 1848             MIME Object Security Services          October 1995
  2357.  
  2358.  
  2359. 12.  Authors' Addresses
  2360.  
  2361.    Steve Crocker
  2362.    CyberCash, Inc.
  2363.    2086 Hunters Crest Way
  2364.    Vienna, VA 22181
  2365.  
  2366.    Phone: +1 703 620 1222
  2367.    Fax: +1 703 391 2651
  2368.    EMail:  crocker@cybercash.com
  2369.  
  2370.  
  2371.    James M. Galvin
  2372.    Trusted Information Systems
  2373.    3060 Washington Road
  2374.    Glenwood, MD  21738
  2375.  
  2376.    Phone: +1 301 854 6889
  2377.    Fax: +1 301 854 5363
  2378.    EMail:  galvin@tis.com
  2379.  
  2380.  
  2381.    Sandra Murphy
  2382.    Trusted Information Systems
  2383.    3060 Washington Road
  2384.    Glenwood, MD  21738
  2385.  
  2386.    Phone: +1 301 854 6889
  2387.    Fax: +1 301 854 5363
  2388.    EMail:  murphy@tis.com
  2389.  
  2390.  
  2391.    Ned Freed
  2392.    Innosoft International, Inc.
  2393.    1050 East Garvey Avenue South
  2394.    West Covina, CA 91790
  2395.  
  2396.    Phone: +1 818 919 3600
  2397.    Fax: +1 818 919 3614
  2398.    EMail:  ned@innosoft.com
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Crocker, et al              Standards Track                    [Page 43]
  2411.  
  2412. RFC 1848             MIME Object Security Services          October 1995
  2413.  
  2414.  
  2415. Appendix A: Collected Grammar
  2416.  
  2417.    The version of the grammar in this document is as follows:
  2418.  
  2419.       <version>       ::= "Version:" "5" CRLF
  2420.  
  2421.  
  2422.    The following grammar tokens are used throughout this specification:
  2423.  
  2424.       <encbin>        ::= 1*<encbingrp>
  2425.  
  2426.       <encbingrp>     ::= 4*4<encbinchar>
  2427.  
  2428.       <encbinchar>    ::= <ALPHA> / <DIGIT> / "+" / "/" / "="
  2429.  
  2430.       <hexchar>       ::= <DIGIT> / "A" / "B" / "C" / "D" / "E" / "F"
  2431.                           ; no lower case
  2432.  
  2433.  
  2434.    The content of an application/moss-signature body part is as follows:
  2435.  
  2436.       <mosssig>       ::= <version> ( 1*<origasymflds> )
  2437.  
  2438.       <version>       ::= "Version:" "5" CRLF
  2439.  
  2440.       <origasymflds>  ::= <origid> <micinfo>
  2441.  
  2442.       <origid>        ::= "Originator-ID:" <id> CRLF
  2443.  
  2444.       <micinfo>       ::= "MIC-Info:" <micalgid> "," <ikalgid> ","
  2445.                           <asymsignmic> CRLF
  2446.  
  2447.  
  2448.    The content of an application/moss-keys body part is as follows:
  2449.  
  2450.       <mosskeys>      ::= <version> <dekinfo> 1*<recipasymflds>
  2451.  
  2452.       <version>       ::= "Version:" "5" CRLF
  2453.  
  2454.       <dekinfo>       ::= "DEK-Info" ":" <dekalgid>
  2455.                           [ "," <dekparameters> ] CRLF
  2456.  
  2457.       <recipasymflds> ::= <recipid> <asymkeyinfo>
  2458.  
  2459.       <recipid>       ::= "Recipient-ID:" <id> CRLF
  2460.  
  2461.       <asymkeyinfo>   ::= "Key-Info" ":" <ikalgid> "," <asymencdek> CRLF
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Crocker, et al              Standards Track                    [Page 44]
  2467.  
  2468. RFC 1848             MIME Object Security Services          October 1995
  2469.  
  2470.  
  2471.    Identifiers are defined as follows:
  2472.  
  2473.       <id>            ::= <id-subset> / <id-publickey> / <id-issuer>
  2474.  
  2475.       <id-subset>     ::= <id-email> / <id-string> / <id-dname>
  2476.  
  2477.       <id-email>      ::= "EN"  "," <keysel> "," <emailstr> CRLF
  2478.  
  2479.       <id-string>     ::= "STR" "," <keysel> "," <string> CRLF
  2480.  
  2481.       <id-dname>      ::= "DN"  "," <keysel> "," <dnamestr> CRLF
  2482.  
  2483.       <id-publickey>  ::= "PK"  "," <publickey> [ "," <id-subset> ] CRLF
  2484.  
  2485.       <id-issuer>     ::= "IS"  "," <dnamestr>  "," <serial> CRLF
  2486.  
  2487.       <keysel>        ::= 1*<hexchar>
  2488.                           ; hex dump of a non-null sequence of octets
  2489.  
  2490.       <emailstr>      ::= <addr-spec> / <route-addr>
  2491.                           ; an electronic mail address as defined by
  2492.                           ; these two tokens from RFC822
  2493.  
  2494.       <string>        ::= ; a non-null sequence of characters
  2495.  
  2496.       <dnamestr>      ::= <encbin>
  2497.                           ; a printably encoded, ASN.1 encoded
  2498.                           ; distinguished name (as defined by the 'Name'
  2499.                           ; production specified in X.501 [8])
  2500.  
  2501.       <publickey>     ::= <encbin>
  2502.                           ; a printably encoded, ASN.1 encoded public
  2503.                           ; key (as defined by the
  2504.                           ; 'SubjectPublicKeyInfo' production specified
  2505.                           ; in X.509 [9])
  2506.  
  2507.       <serial>        ::= 1*<hexchar>
  2508.                           ; hex dump of a certificate serial number
  2509.  
  2510.  
  2511.    The content of an application/mosskey-request body part is as
  2512.    follows:
  2513.  
  2514.       <request>       ::= <version>
  2515.                           ( <subject> / <issuer> / <certification> )
  2516.  
  2517.       <version>       ::= "Version:" "5" CRLF
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Crocker, et al              Standards Track                    [Page 45]
  2523.  
  2524. RFC 1848             MIME Object Security Services          October 1995
  2525.  
  2526.  
  2527.       <subject>       ::= "Subject:" <id> CRLF
  2528.  
  2529.       <issuer>        ::= "Issuer:" <id> CRLF
  2530.  
  2531.       <certification> ::= "Certification:" <encbin> CRLF
  2532.  
  2533.  
  2534.    The content of an application/mosskey-data body part is as follows:
  2535.  
  2536.       <mosskeydata>   ::= <version>
  2537.                           ( <publickeydata> / <certchain> / <crlchain> )
  2538.  
  2539.       <version>       ::= "Version:" "5" CRLF
  2540.  
  2541.       <publickeydata> ::= "Key:" "PK" "," <publickey> ","
  2542.                           <id-subset> CRLF
  2543.  
  2544.       <certchain>     ::= <cert> *( [ <crl> ] <cert> )
  2545.  
  2546.       <crlchain>      ::= 1*( <crl> [ <cert> ] )
  2547.  
  2548.       <cert>          ::= "Certificate:" <encbin> CRLF
  2549.  
  2550.       <crl>           ::= "CRL:" <encbin> CRLF
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. Crocker, et al              Standards Track                    [Page 46]
  2579.  
  2580. RFC 1848             MIME Object Security Services          October 1995
  2581.  
  2582.  
  2583. Appendix B: Imported Grammar
  2584.  
  2585.    Options normally present in the grammar reprinted here which are
  2586.    illegal in MOSS are excluded in this reprinting, for the convenience
  2587.    of the reader.
  2588.  
  2589.    The following productions are taken from [5].  The grammar presented
  2590.    in [5] remains the authoritative source for these productions; they
  2591.    are repeated here for the convenience of the reader.
  2592.  
  2593.       <dekalgid>         ::= "DES-CBC"
  2594.       <ikalgid>          ::= "RSA"
  2595.       <micalgid>         ::= "RSA-MD2" / "RSA-MD5"
  2596.  
  2597.       <dekparameters>    ::= <DESCBCparameters>
  2598.       <DESCBCparameters> ::= <IV>
  2599.       <IV>               ::= <hexchar16>
  2600.       <hexchar16>        ::= 16*16<hexchar>
  2601.  
  2602.       <asymsignmic>      ::= <RSAsignmic>
  2603.       <RSAsignmic>       ::= <encbin>
  2604.  
  2605.       <asymencdek>       ::= <RSAencdek>
  2606.       <RSAencdek>        ::= <encbin>
  2607.  
  2608.    The following productions are taken from [1].  The grammar presented
  2609.    in [1] remains the authoritative source for these productions; they
  2610.    are repeated here for the convenience of the reader.
  2611.  
  2612.       <route-addr>    ::= "<" [ <route> ] <addr-spec> ">"
  2613.  
  2614.       <route>         ::=  1# ( "@" <domain> ) ":" ; path-relative
  2615.  
  2616.  
  2617.       <addr-spec>     ::= <local-part> "@" <domain>; global address
  2618.  
  2619.       <local-part>    ::= <word> *( "." <word> )   ; uninterpreted
  2620.                                                    ; case-preserved
  2621.  
  2622.       <domain>        ::= <sub-domain> *( "." <sub-domain> )
  2623.  
  2624.       <sub-domain>    ::= <domain-ref> / <domain-literal>
  2625.  
  2626.       <domain-ref>    ::= <atom>                   ; symbolic
  2627.                                                    ; reference
  2628.  
  2629.       <domain-literal>::= "[" *( <dtext> / <quoted-pair> ) "]"
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Crocker, et al              Standards Track                    [Page 47]
  2635.  
  2636. RFC 1848             MIME Object Security Services          October 1995
  2637.  
  2638.  
  2639.       <dtext>         ::= <any CHAR excluding "[", "]",
  2640.                           "\" & <CR>, & including
  2641.                           linear-white-space>
  2642.                                                    ; => may be folded
  2643.  
  2644.  
  2645.       <word>          ::= <atom> / <quoted-string>
  2646.  
  2647.       <quoted-string> ::= """ *( <qtext> / <quoted-pair> ) """
  2648.  
  2649.       <qtext>         ::= (any <CHAR> excepting """, "\", and CR,
  2650.                            and including <linear-white-space>)
  2651.  
  2652.       <quoted-pair>   ::= "\" <CHAR>               ; may quote any
  2653.                                                    ; char
  2654.  
  2655.       <linear-white-space> ::= 1*( [ CRLF ] <LWSP-char> )
  2656.                                                    ; semantics = SPACE
  2657.                                                    ; CRLF => folding
  2658.  
  2659.       <LWSP-char>     ::= SPACE / HTAB             ; semantics = SPACE
  2660.  
  2661.  
  2662.       <atom>          ::= 1*(any <CHAR>
  2663.                           except <specials>, SPACE and <CTL>s)
  2664.  
  2665.       <CHAR>          ::= <any ASCII character>
  2666.  
  2667.       <CTL>           ::= <any ASCII control character and DEL>
  2668.  
  2669.       <specials>      ::= "(" / ")" / "<" / ">" / "@"
  2670.                           /  "," / ";" / ":" / "\" / <">
  2671.                           /  "." / "[" / "]"
  2672.                                                    ; Must be in quoted-
  2673.                                                    ; string, to use
  2674.                                                    ;  within a word.
  2675.  
  2676.       <ALPHA>         ::= <any ASCII alphabetic character>
  2677.                                                    ; (101-132, 65.-90.)
  2678.                                                    ; (141-172, 97.-122.)
  2679.  
  2680.       <DIGIT>         ::= <any ASCII decimal digit>; (60-71, 48.-57.)
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690. Crocker, et al              Standards Track                    [Page 48]
  2691.  
  2692.