home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2660.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  95.9 KB  |  2,524 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                       E. Rescorla
  8. Request for Comments: 2660                                   RTFM, Inc.
  9. Category: Experimental                                     A. Schiffman
  10.                                                    Terisa Systems, Inc.
  11.                                                             August 1999
  12.  
  13.  
  14.                  The Secure HyperText Transfer Protocol
  15.  
  16. Status of this Memo
  17.  
  18.    This memo defines an Experimental Protocol for the Internet
  19.    community.  It does not specify an Internet standard of any kind.
  20.    Discussion and suggestions for improvement are requested.
  21.    Distribution of this memo is unlimited.
  22.  
  23. Copyright Notice
  24.  
  25.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  26.  
  27. Abstract
  28.  
  29.    This memo describes a syntax for securing messages sent using the
  30.    Hypertext Transfer Protocol (HTTP), which forms the basis for the
  31.    World Wide Web. Secure HTTP (S-HTTP) provides independently
  32.    applicable security services for transaction confidentiality,
  33.    authenticity/integrity and non-repudiability of origin.
  34.  
  35.    The protocol emphasizes maximum flexibility in choice of key
  36.    management mechanisms, security policies and cryptographic algorithms
  37.    by supporting option negotiation between parties for each
  38.    transaction.
  39.  
  40. Table of Contents
  41.  
  42.    1. Introduction .................................................. 3
  43.    1.1. Summary of Features ......................................... 3
  44.    1.2. Changes ..................................................... 4
  45.    1.3. Processing Model ............................................ 5
  46.    1.4. Modes of Operation .......................................... 6
  47.    1.5. Implementation Options ...................................... 7
  48.    2. Message Format ................................................ 7
  49.    2.1. Notational Conventions ...................................... 8
  50.    2.2. The Request Line ............................................ 8
  51.    2.3. The Status Line ............................................. 8
  52.    2.4. Secure HTTP Header Lines .................................... 8
  53.    2.5. Content .....................................................12
  54.    2.6. Encapsulation Format Options ................................13
  55.  
  56.  
  57.  
  58. Rescorla & Schiffman          Experimental                      [Page 1]
  59.  
  60. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  61.  
  62.  
  63.    2.6.1. Content-Privacy-Domain: CMS ...............................13
  64.    2.6.2. Content-Privacy-Domain: MOSS ..............................14
  65.    2.6.3. Permitted HTTP headers ....................................14
  66.    2.6.3.2. Host ....................................................15
  67.    2.6.3.3. Connection ..............................................15
  68.    3. Cryptographic Parameters ......................................15
  69.    3.1. Options Headers .............................................15
  70.    3.2. Negotiation Options .........................................16
  71.    3.2.1. Negotiation Overview ......................................16
  72.    3.2.2. Negotiation Option Format .................................16
  73.    3.2.3. Parametrization for Variable-length Key Ciphers ...........18
  74.    3.2.4. Negotiation Syntax ........................................18
  75.    3.3. Non-Negotiation Headers .....................................23
  76.    3.3.1. Encryption-Identity .......................................23
  77.    3.3.2. Certificate-Info ..........................................23
  78.    3.3.3. Key-Assign ................................................24
  79.    3.3.4. Nonces ....................................................25
  80.    3.4. Grouping Headers With SHTTP-Cryptopts .......................26
  81.    3.4.1. SHTTP-Cryptopts ...........................................26
  82.    4. New Header Lines for HTTP .....................................26
  83.    4.1. Security-Scheme .............................................26
  84.    5. (Retriable) Server Status Error Reports .......................27
  85.    5.1. Retry for Option (Re)Negotiation ............................27
  86.    5.2. Specific Retry Behavior .....................................28
  87.    5.3. Limitations On Automatic Retries ............................29
  88.    6. Other Issues ..................................................30
  89.    6.1. Compatibility of Servers with Old Clients ...................30
  90.    6.2. URL Protocol Type ...........................................30
  91.    6.3. Browser Presentation ........................................31
  92.    7. Implementation Notes ..........................................32
  93.    7.1. Preenhanced Data ............................................32
  94.    7.2. Note:Proxy Interaction ......................................34
  95.    7.2.1. Client-Proxy Authentication ...............................34
  96.    8. Implementation Recommendations and Requirements ...............34
  97.    9. Protocol Syntax Summary .......................................35
  98.    10. An Extended Example ..........................................36
  99.    Appendix: A Review of CMS ........................................40
  100.    Bibliography and References ......................................41
  101.    Security Considerations ..........................................43
  102.    Authors' Addresses ...............................................44
  103.    Full Copyright Statement..........................................45
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Rescorla & Schiffman          Experimental                      [Page 2]
  115.  
  116. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  117.  
  118.  
  119. 1.  Introduction
  120.  
  121.    The World Wide Web (WWW) is a distributed hypermedia system which has
  122.    gained widespread acceptance among Internet users.  Although WWW
  123.    browsers support other, preexisting Internet application protocols,
  124.    the native and primary protocol used between WWW clients and servers
  125.    is the HyperText Transfer Protocol (HTTP) [RFC-2616].  The ease of
  126.    use of the Web has prompted its widespread employment as a
  127.    client/server architecture for many applications.  Many such
  128.    applications require the client and server to be able to authenticate
  129.    each other and exchange sensitive information confidentially. The
  130.    original HTTP specification had only modest support for the
  131.    cryptographic mechanisms appropriate for such transactions.
  132.  
  133.    Secure HTTP (S-HTTP) provides secure communication mechanisms between
  134.    an HTTP client-server pair in order to enable spontaneous commercial
  135.    transactions for a wide range of applications.  Our design intent is
  136.    to provide a flexible protocol that supports multiple orthogonal
  137.    operation modes, key management mechanisms, trust models,
  138.    cryptographic algorithms and encapsulation formats through option
  139.    negotiation between parties for each transaction.
  140.  
  141. 1.1.  Summary of Features
  142.  
  143.    Secure HTTP is a secure message-oriented communications protocol
  144.    designed for use in conjunction with HTTP. It is designed to coexist
  145.    with HTTP's messaging model and to be easily integrated with HTTP
  146.    applications.
  147.  
  148.    Secure HTTP provides a variety of security mechanisms to HTTP clients
  149.    and servers, providing the security service options appropriate to
  150.    the wide range of potential end uses possible for the World-Wide Web.
  151.    The protocol provides symmetric capabilities to both client and
  152.    server (in that equal treatment is given to both requests and
  153.    replies, as well as for the preferences of both parties) while
  154.    preserving the transaction model and implementation characteristics
  155.    of HTTP.
  156.  
  157.    Several cryptographic message format standards may be incorporated
  158.    into S-HTTP clients and servers, particularly, but in principle not
  159.    limited to, [CMS] and [MOSS]. S-HTTP supports interoperation among a
  160.    variety of implementations, and is compatible with HTTP.  S-HTTP
  161.    aware clients can communicate with S-HTTP oblivious servers and
  162.    vice-versa, although such transactions obviously would not use S-HTTP
  163.    security features.
  164.  
  165.    S-HTTP does not require client-side public key certificates (or
  166.    public keys), as it supports symmetric key-only operation modes.
  167.  
  168.  
  169.  
  170. Rescorla & Schiffman          Experimental                      [Page 3]
  171.  
  172. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  173.  
  174.  
  175.    This is significant because it means that spontaneous private
  176.    transactions can occur without requiring individual users to have
  177.    an established public key.  While S-HTTP is able to take advantage
  178.    of ubiquitous certification infrastructures, its deployment does
  179.    not require it.
  180.  
  181.    S-HTTP supports end-to-end secure transactions, in contrast with the
  182.    original HTTP authorization mechanisms which require the client to
  183.    attempt access and be denied before the security mechanism is
  184.    employed.  Clients may be "primed" to initiate a secure transaction
  185.    (typically using information supplied in message headers); this may
  186.    be used to support encryption of fill-out forms, for example. With
  187.    S-HTTP, no sensitive data need ever be sent over the network in the
  188.    clear.
  189.  
  190.    S-HTTP provides full flexibility of cryptographic algorithms, modes
  191.    and parameters. Option negotiation is used to allow clients and
  192.    servers to agree on transaction modes (e.g., should the request be
  193.    signed or encrypted or both -- similarly for the reply?);
  194.    cryptographic algorithms (RSA vs. DSA for signing, DES vs.
  195.    RC2 for encrypting, etc.); and certificate selection
  196.    (please sign with your "Block-buster Video certificate").
  197.  
  198.    S-HTTP attempts to avoid presuming a particular trust model, although
  199.    its designers admit to a conscious effort to facilitate
  200.    multiply-rooted hierarchical trust, and anticipate that principals may
  201.    have many public key certificates.
  202.  
  203.    S-HTTP differs from Digest-Authentication, described in [RFC-2617] in
  204.    that it provides support for public key cryptography and consequently
  205.    digital signature capability, as well as providing confidentiality.
  206.  
  207. 1.2.  Changes
  208.  
  209.    This document describes S-HTTP/1.4. It differs from the previous
  210.    memo in that it differs from the previous memo in its support of
  211.    the Cryptographic Message Syntax (CMS) [CMS], a successor to PKCS-7;
  212.    and hence now supports the Diffie-Hellman and the (NIST) Digital
  213.    Signature Standard cryptosystems. CMS used in RSA mode is bits on the
  214.    wire compatible with PKCS-7.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Rescorla & Schiffman          Experimental                      [Page 4]
  227.  
  228. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  229.  
  230.  
  231. 1.3.  Processing Model
  232.  
  233. 1.3.1.  Message Preparation
  234.  
  235.    The creation of an S-HTTP message can be thought of as a a function
  236.    with three inputs:
  237.  
  238.       1. The cleartext message. This is either an HTTP message
  239.       or some other data object. Note that since the cleartext message
  240.       is carried transparently, headers and all, any version of HTTP
  241.       can be carried within an S-HTTP wrapper.
  242.       2. The receiver's cryptographic preferences and keying material.
  243.       This is either explicitly specified by the receiver or subject
  244.       to some default set of preferences.
  245.       3. The sender's cryptographic preferences and keying material.
  246.       This input to the function can be thought of as implicit
  247.       since it exists only in the memory of the sender.
  248.  
  249.    In order to create an S-HTTP message, then, the sender integrates the
  250.    sender's preferences with the receiver's preferences. The result of
  251.    this is a list of cryptographic enhancements to be applied and keying
  252.    material to be used to apply them. This may require some user
  253.    intervention. For instance, there might be multiple keys available to
  254.    sign the message. (See Section 3.2.4.9.3 for more on this topic.)
  255.    Using this data, the sender applies the enhancements to the message
  256.    clear-text to create the S-HTTP message.
  257.  
  258.    The processing steps required to transform the cleartext message into
  259.    the S-HTTP message are described in Sections 2 and 3. The processing
  260.    steps required to merge the sender's and receiver's preferences are
  261.    described in Sections 3.2.
  262.  
  263. 1.3.2.  Message Recovery
  264.  
  265.    The recovery of an S-HTTP message can be thought of as a function of
  266.    four distinct inputs:
  267.  
  268.       1. The S-HTTP message.
  269.       2. The receiver's stated cryptographic preferences and keying
  270.       material. The receiver has the opportunity to remember what
  271.       cryptographic preferences it provided in order for this
  272.       document to be dereferenced.
  273.       3. The receiver's current cryptographic preferences and
  274.       keying material.
  275.       4. The sender's previously stated cryptographic options.
  276.       The sender may have stated that he would perform certain
  277.       cryptographic operations in this message. (Again, see
  278.       sections 4 and 5 for details on how to do this.)
  279.  
  280.  
  281.  
  282. Rescorla & Schiffman          Experimental                      [Page 5]
  283.  
  284. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  285.  
  286.  
  287.    In order to recover an S-HTTP message, the receiver needs to read the
  288.    headers to discover which cryptographic transformations were
  289.    performed on the message, then remove the transformations using some
  290.    combination of the sender's and receiver's keying material, while
  291.    taking note of which enhancements were applied.
  292.  
  293.    The receiver may also choose to verify that the applied enhancements
  294.    match both the enhancements that the sender said he would apply
  295.    (input 4 above) and that the receiver requested (input 2 above) as
  296.    well as the current preferences to see if the S-HTTP message was
  297.    appropriately transformed. This process may require interaction with
  298.    the user to verify that the enhancements are acceptable to the user.
  299.    (See Section 6.4 for more on this topic.)
  300.  
  301. 1.4.  Modes of Operation
  302.  
  303.    Message protection may be provided on three orthogonal axes:
  304.    signature, authentication, and encryption. Any message may be signed,
  305.    authenticated, encrypted, or any combination of these (including no
  306.    protection).
  307.  
  308.    Multiple key management mechanisms are supported, including
  309.    password-style manually shared secrets and public-key key exchange.
  310.    In particular, provision has been made for prearranged (in an earlier
  311.    transaction or out of band) symmetric session keys in order to send
  312.    confidential messages to those who have no public key pair.
  313.  
  314.    Additionally, a challenge-response ("nonce") mechanism is provided to
  315.    allow parties to assure themselves of transaction freshness.
  316.  
  317. 1.4.1.  Signature
  318.  
  319.    If the digital signature enhancement is applied, an appropriate
  320.    certificate may either be attached to the message (possibly along
  321.    with a certificate chain) or the sender may expect the recipient to
  322.    obtain the required certificate (chain) independently.
  323.  
  324. 1.4.2.  Key Exchange and Encryption
  325.  
  326.    In support of bulk encryption, S-HTTP defines two key transfer
  327.    mechanisms, one using public-key enveloped key exchange and another
  328.    with externally arranged keys.
  329.  
  330.    In the former case, the symmetric-key cryptosystem parameter is
  331.    passed encrypted under the receiver's public key.
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Rescorla & Schiffman          Experimental                      [Page 6]
  339.  
  340. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  341.  
  342.  
  343.    In the latter mode, we encrypt the content using a prearranged
  344.    session key, with key identification information specified on one of
  345.    the header lines.
  346.  
  347. 1.4.3.  Message Integrity and Sender Authentication
  348.  
  349.    Secure HTTP provides a means to verify message integrity and sender
  350.    authenticity for a message via the computation of a Message
  351.    Authentication Code (MAC), computed as a keyed hash over the document
  352.    using a shared secret -- which could potentially have been arranged
  353.    in a number of ways, e.g.: manual arrangement or 'inband' key
  354.    management.  This technique requires neither the use of public key
  355.    cryptography nor encryption.
  356.  
  357.    This mechanism is also useful for cases where it is appropriate to
  358.    allow parties to identify each other reliably in a transaction
  359.    without providing (third-party) non-repudiability for the
  360.    transactions themselves. The provision of this mechanism is motivated
  361.    by our bias that the action of "signing" a transaction should be
  362.    explicit and conscious for the user, whereas many authentication
  363.    needs (i.e., access control) can be met with a lighter-weight
  364.    mechanism that retains the scalability advantages of public-key
  365.    cryptography for key exchange.
  366.  
  367. 1.4.4.  Freshness
  368.  
  369.    The protocol provides a simple challenge-response mechanism, allowing
  370.    both parties to insure the freshness of transmissions. Additionally,
  371.    the integrity protection provided to HTTP headers permits
  372.    implementations to consider the Date: header allowable in HTTP
  373.    messages as a freshness indicator, where appropriate (although this
  374.    requires implementations to make allowances for maximum clock skew
  375.    between parties, which we choose not to specify).
  376.  
  377. 1.5.  Implementation Options
  378.  
  379.    In order to encourage widespread adoption of secure documents for the
  380.    World-Wide Web in the face of the broad scope of application
  381.    requirements, variability of user sophistication, and disparate
  382.    implementation constraints, Secure HTTP deliberately caters to a
  383.    variety of implementation options.  See Section 8 for implementation
  384.    recommendations and requirements.
  385.  
  386. 2.  Message Format
  387.  
  388.    Syntactically, Secure HTTP messages are the same as HTTP, consisting
  389.    of a request or status line followed by headers and a body. However,
  390.    the range of headers is different and the bodies are typically
  391.  
  392.  
  393.  
  394. Rescorla & Schiffman          Experimental                      [Page 7]
  395.  
  396. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  397.  
  398.  
  399.    cryptographically enhanced.
  400.  
  401. 2.1.  Notational Conventions
  402.  
  403.    This document uses the augmented BNF from HTTP [RFC-2616]. You should
  404.    refer to that document for a description of the syntax.
  405.  
  406. 2.2.  Request Line
  407.  
  408.    In order to differentiate S-HTTP messages from HTTP messages and
  409.    allow for special processing, the request line should use the special
  410.    Secure" method and use the protocol designator "Secure-HTTP/1.4".
  411.    Consequently, Secure-HTTP and HTTP processing can be intermixed on
  412.    the same TCP port, e.g. port 80.  In order to prevent leakage of
  413.    potentially sensitive information Request-URI should be "*". For
  414.    example:
  415.  
  416.            Secure * Secure-HTTP/1.4
  417.  
  418.    When communicating via a proxy, the Request-URI should be consist of
  419.    the AbsoluteURI. Typically, the rel path section should be replaced
  420.    by "*" to minimize the information passed to in the clear.  (e.g.
  421.    http://www.terisa.com/*); proxies should remove the appropriate
  422.    amount of this information to minimize the threat of traffic
  423.    analysis.  See Section 7.2.2.1 for a situation where providing more
  424.    information is appropriate.
  425.  
  426. 2.3.  The Status Line
  427.  
  428.    S-HTTP responses should use the protocol designator "Secure-
  429.    HTTP/1.4".  For example:
  430.  
  431.            Secure-HTTP/1.4 200 OK
  432.  
  433.    Note that the status in the Secure HTTP response line does not
  434.    indicate anything about the success or failure of the unwrapped HTTP
  435.    request. Servers should always use 200 OK provided that the Secure
  436.    HTTP processing is successful. This prevents analysis of success or
  437.    failure for any request, which the correct recipient can determine
  438.    from the encapsulated data. All case variations should be accepted.
  439.  
  440. 2.4.  Secure HTTP Header Lines
  441.  
  442.    The header lines described in this section go in the header of a
  443.    Secure HTTP message. All except 'Content-Type' and 'Content-Privacy-
  444.    Domain' are optional. The message body shall be separated from the
  445.    header block by two successive CRLFs.
  446.  
  447.  
  448.  
  449.  
  450. Rescorla & Schiffman          Experimental                      [Page 8]
  451.  
  452. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  453.  
  454.  
  455.    All data and fields in header lines should be treated as case
  456.    insensitive unless otherwise specified. Linear whitespace [RFC-822]
  457.    should be used only as a token separator unless otherwise quoted.
  458.    Long header lines may be line folded in the style of [RFC-822].
  459.  
  460.    This document refers to the header block following the S-HTTP
  461.    request/response line and preceding the successive CRLFs collectively
  462.    as "S-HTTP headers".
  463.  
  464. 2.4.1.  Content-Privacy-Domain
  465.  
  466.    The two values defined by this document are 'MOSS' and 'CMS'.  CMS
  467.    refers to the privacy enhancement specified in section 2.6.1. MOSS
  468.    refers to the format defined in [RFC-1847] and [RFC-1848].
  469.  
  470. 2.4.2.  Content-Type for CMS
  471.  
  472.    Under normal conditions, the terminal encapsulated content (after all
  473.    privacy enhancements have been removed) would be an HTTP message. In
  474.    this case, there shall be a Content-Type line reading:
  475.  
  476.            Content-Type: message/http
  477.  
  478.    The message/http content type is defined in RFC-2616.
  479.  
  480.    If the inner message is an S-HTTP message, then the content type
  481.    shall be 'application/s-http'. (See Appendix for the definition of
  482.    this.)
  483.  
  484.    It is intended that these types be registered with IANA as MIME
  485.    content types.
  486.  
  487.    The terminal content may be of some other type provided that the type
  488.    is properly indicated by the use of an appropriate Content-Type
  489.    header line. In this case, the header fields for the encapsulation of
  490.    the terminal content apply to the terminal content (the 'final
  491.    headers'). But in any case, final headers should themselves always be
  492.    S-HTTP encapsulated, so that the applicable S-HTTP/HTTP headers are
  493.    never passed unenhanced.
  494.  
  495.    S-HTTP encapsulation of non-HTTP data is a useful mechanism for
  496.    passing pre-enhanced data (especially presigned data) without
  497.    requiring that the HTTP headers themselves be pre-enhanced.
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Rescorla & Schiffman          Experimental                      [Page 9]
  507.  
  508. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  509.  
  510.  
  511. 2.4.3.  Content-Type for MOSS
  512.  
  513.    The Content-Type for MOSS shall be an acceptable MIME content type
  514.    describing the cryptographic processing applied. (e.g.
  515.    multipart/signed). The content type of the inner content is described
  516.    in the content type line corresponding to that inner content, and for
  517.    HTTP messages shall be 'message/http'.
  518.  
  519. 2.4.4.  Prearranged-Key-Info
  520.  
  521.    This header line is intended to convey information about a key which
  522.    has been arranged outside of the internal cryptographic format. One
  523.    use of this is to permit in-band communication of session keys for
  524.    return encryption in the case where one of the parties does not have
  525.    a key pair. However, this should also be useful in the event that the
  526.    parties choose to use some other mechanism, for instance, a one-time
  527.    key list.
  528.  
  529.    This specification defines two methods for exchanging named keys,
  530.    Inband, Outband. Inband indicates that the session key was exchanged
  531.    previously, using a Key-Assign header of the corresponding method.
  532.    Outband arrangements imply that agents have external access to key
  533.    materials corresponding to a given name, presumably via database
  534.    access or perhaps supplied immediately by a user from keyboard input.
  535.    The syntax for the header line is:
  536.  
  537.      Prearranged-Key-Info =
  538.       "Prearranged-Key-Info" ":" Hdr-Cipher "," CoveredDEK "," CoverKey-ID
  539.      CoverKey-ID = method ":" key-name
  540.      CoveredDEK = *HEX
  541.      method = "inband" |  "outband"
  542.  
  543.    While chaining ciphers require an Initialization Vector (IV) [FIPS-
  544.    81] to start off the chaining, that information is not carried by
  545.    this field. Rather, it should be passed internal to the cryptographic
  546.    format being used. Likewise, the bulk cipher used is specified in
  547.    this fashion.
  548.  
  549.    <Hdr-Cipher> should be the name of the block cipher used to encrypt
  550.    the session key (see section 3.2.4.7)
  551.  
  552.    <CoveredDEK> is the protected Data Encryption Key (a.k.a. transaction
  553.    key) under which the encapsulated message was encrypted. It should be
  554.    appropriately (randomly) generated by the sending agent, then
  555.    encrypted under the cover of the negotiated key (a.k.a. session key)
  556.    using the indicated header cipher, and then converted into hex.
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Rescorla & Schiffman          Experimental                     [Page 10]
  563.  
  564. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  565.  
  566.  
  567.    In order to avoid name collisions, cover key namespaces must be
  568.    maintained separately by host and port.
  569.  
  570.    Note that some Content-Privacy-Domains, notably likely future
  571.    revisions of MOSS and CMS may have support for symmetric key
  572.    management.
  573.  
  574.    The Prearranged-Key-Info field need not be used in such
  575.    circumstances.  Rather, the native syntax is preferred. Keys
  576.    exchanged with Key-Assign, however, may be used in this situation.
  577.  
  578. 2.4.5.  MAC-Info
  579.  
  580.    This header is used to supply a Message Authenticity Check, providing
  581.    both message authentication and integrity, computed from the message
  582.    text, the time (optional -- to prevent replay attack), and a shared
  583.    secret between client and server. The MAC should be computed over the
  584.    encapsulated content of the S-HTTP message.  S-HTTP/1.1 defined that
  585.    MACs should be computed using the following algorithm ('||' means
  586.    concatenation):
  587.  
  588.         MAC = hex(H(Message||[<time>]||<shared key>))
  589.  
  590.    The time should be represented as an unsigned 32 bit quantity
  591.    representing seconds since 00:00:00 GMT January 1, 1970 (the UNIX
  592.    epoch), in network byte order. The shared key format is a local
  593.    matter.
  594.  
  595.    Recent research [VANO95] has demonstrated some weaknesses in this
  596.    approach, and this memo introduces a new construction, derived from
  597.    [RFC-2104]. In the name of backwards compatibility, we retain the
  598.    previous constructions with the same names as before. However, we
  599.    also introduce a new series of names (See Section 3.2.4.8 for the
  600.    names) that obey a different (hopefully stronger) construction. (^
  601.    means bitwise XOR)
  602.  
  603.    HMAC = hex(H(K' ^ pad2 || H(K' ^ pad1 ||[<time>]|| Message)))
  604.    pad1 = the byte 0x36 repeated enough times to fill out a
  605.                 hash input block. (I.e. 64 times for both MD5 and SHA-1)
  606.    pad2 = the byte 0x5c repeated enough times to fill out a
  607.                 hash input block.
  608.    K' = H(<shared key>)
  609.  
  610.    The original HMAC construction is for the use of a key with length
  611.    equal to the length of the hash output. Although it is considered
  612.    safe to use a key of a different length (Note that strength cannot be
  613.    increased past the length of the hash function itself, but can be
  614.    reduced by using a shorter key.) [KRAW96b] we hash the original key
  615.  
  616.  
  617.  
  618. Rescorla & Schiffman          Experimental                     [Page 11]
  619.  
  620. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  621.  
  622.  
  623.    to permit the use of shared keys (e.g. passphrases) longer than the
  624.    length of the hash. It is noteworthy (though obvious) that this
  625.    technique does not increase the strength of short keys.
  626.  
  627.    The format of the MAC-Info line is:
  628.  
  629.    MAC-Info =
  630.    "MAC-Info" ":"  [hex-time],
  631.    hash-alg, hex-hash-data, key-spec
  632.    hex-time = <unsigned seconds since Unix epoch represented as HEX>
  633.    hash-alg = <hash algorithms from section 3.2.4.8>
  634.    hex-hash-data = <computation as described above represented as HEX>
  635.    Key-Spec = "null" | "dek" | Key-ID
  636.  
  637.    Key-Ids can refer either to keys bound using the Key-Assign header
  638.    line or those bound in the same fashion as the Outband method
  639.    described later. The use of a 'Null' key-spec implies that a zero
  640.    length key was used, and therefore that the MAC merely represents a
  641.    hash of the message text and (optionally) the time.  The special
  642.    key-spec 'DEK' refers to the Data Exchange Key used to encrypt the
  643.    following message body (it is an error to use the DEK key-spec in
  644.    situations where the following message body is unencrypted).
  645.  
  646.    If the time is omitted from the MAC-Info line, it should simply not
  647.    be included in the hash.
  648.  
  649.    Note that this header line can be used to provide a more advanced
  650.    equivalent of the original HTTP Basic authentication mode in that the
  651.    user can be asked to provide a username and password. However, the
  652.    password remains private and message integrity can be assured.
  653.    Moreover, this can be accomplished without encryption of any kind.
  654.  
  655.    In addition, MAC-Info permits fast message integrity verification (at
  656.    the loss of non-repudiability) for messages, provided that the
  657.    participants share a key (possibly passed using Key-Assign in a
  658.    previous message).
  659.  
  660.    Note that some Content-Privacy-Domains, notably likely future
  661.    revisions of MOSS and CMS may have support for symmetric integrity
  662.    protection The MAC-Info field need not be used in such circumstances.
  663.    Rather, the native syntax is preferred. Keys exchanged with Key-
  664.    Assign, however, may be used in this situation.
  665.  
  666. 2.5.  Content
  667.  
  668.    The content of the message is largely dependent upon the values of
  669.    the Content-Privacy-Domain and Content-Transfer-Encoding fields.
  670.  
  671.  
  672.  
  673.  
  674. Rescorla & Schiffman          Experimental                     [Page 12]
  675.  
  676. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  677.  
  678.  
  679.    For a CMS message, with '8BIT' Content-Transfer-Encoding, the content
  680.    should simply be the CMS message itself.
  681.  
  682.    If the Content-Privacy-Domain is MOSS, the content should consist of
  683.    a MOSS Security Multipart as described in RFC1847.
  684.  
  685.    It is expected that once the privacy enhancements have been removed,
  686.    the resulting (possibly protected) contents will be a normal HTTP
  687.    request. Alternately, the content may be another Secure-HTTP message,
  688.    in which case privacy enhancements should be unwrapped until clear
  689.    content is obtained or privacy enhancements can no longer be removed.
  690.    (This permits embedding of enhancements, such as sequential Signed
  691.    and Enveloped enhancements.) Provided that all enhancements can be
  692.    removed, the final de-enhanced content should be a valid HTTP request
  693.    (or response) unless otherwise specified by the Content-Type line.
  694.  
  695.    Note that this recursive encapsulation of messages potentially
  696.    permits security enhancements to be applied (or removed) for the
  697.    benefit of intermediaries who may be a party to the transaction
  698.    between a client and server (e.g., a proxy requiring client
  699.    authentication).  How such intermediaries should indicate such
  700.    processing is described in Section 7.2.1.
  701.  
  702. 2.6.  Encapsulation Format Options
  703.  
  704. 2.6.1.  Content-Privacy-Domain: CMS
  705.  
  706.    Content-Privacy-Domain 'CMS' follows the form of the CMS standard
  707.    (see Appendix).
  708.  
  709.    Message protection may proceed on two orthogonal axes: signature and
  710.    encryption. Any message may be either signed, encrypted, both, or
  711.    neither. Note that the 'auth' protection mode of S-HTTP is provided
  712.    independently of CMS coding via the MAC-Info header of section 2.3.6
  713.    since CMS does not support a 'KeyDigestedData' type, although it does
  714.    support a 'DigestedData' type.
  715.  
  716. 2.6.1.1.  Signature
  717.  
  718.    This enhancement uses the 'SignedData' type of CMS.  When digital
  719.    signatures are used, an appropriate certificate may either be
  720.    attached to the message (possibly along with a certificate chain) as
  721.    specified in CMS or the sender may expect the recipient to obtain its
  722.    certificate (and/or chain) independently.  Note that an explicitly
  723.    allowed instance of this is a certificate signed with the private
  724.    component corresponding to the public component being attested to.
  725.    This shall be referred to as a self-signed certificate. What, if any,
  726.    weight to give to such a certificate is a purely local matter.  In
  727.  
  728.  
  729.  
  730. Rescorla & Schiffman          Experimental                     [Page 13]
  731.  
  732. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  733.  
  734.  
  735.    either case, a purely signed message is precisely CMS compliant.
  736.  
  737. 2.6.1.2.  Encryption
  738.  
  739. 2.6.1.2.1.  Encryption -- normal, public key
  740.  
  741.    This enhancement is performed precisely as enveloping (using either '
  742.    EnvelopedData' types) under CMS. A message encrypted in this fashion,
  743.    signed or otherwise, is CMS compliant. To have a message which is
  744.    both signed and encrypted, one simply creates the CMS SignedData
  745.    production and encapsulates it in EnvelopedData as described in CMS.
  746.  
  747. 2.6.1.2.2.  Encryption -- prearranged key
  748.  
  749.    This uses the 'EncryptedData' type of CMS. In this mode, we encrypt
  750.    the content using a DEK encrypted under cover of a prearranged
  751.    session key (how this key may be exchanged is discussed later), with
  752.    key identification information specified on one of the header lines.
  753.    The IV is in the EncryptedContentInfo type of the EncryptedData
  754.    element.  To have a message which is both signed and encrypted, one
  755.    simply creates the CMS SignedData production and encapsulates it in
  756.    EncryptedData as described in CMS.
  757.  
  758. 2.6.2.  Content-Privacy-Domain: MOSS
  759.  
  760.    The body of the message should be a MIME compliant message with
  761.    content type that matches the Content-Type line in the S-HTTP
  762.    headers.  Encrypted messages should use multipart/encrypted. Signed
  763.    messages should use multipart/signed. However, since multipart/signed
  764.    does not convey keying material, is is acceptable to use
  765.    multipart/mixed where the first part is application/mosskey-data and
  766.    the second part is multipart/mixed in order to convey certificates
  767.    for use in verifying the signature.
  768.  
  769.    Implementation Note: When both encryption and signature are applied
  770.    by the same agent, signature should in general be applied before
  771.    encryption.
  772.  
  773. 2.6.3.  Permitted HTTP headers
  774.  
  775. 2.6.3.1.  Overview
  776.  
  777.    In general, HTTP [RFC-2616] headers should appear in the inner
  778.    content (i.e. the message/http) of an S-HTTP message but should not
  779.    appear in the S-HTTP message wrapper for security reasons. However,
  780.    certain headers need to be visible to agents which do not have access
  781.    to the encapsulated data. These headers may appear in the S-HTTP
  782.    headers as well.
  783.  
  784.  
  785.  
  786. Rescorla & Schiffman          Experimental                     [Page 14]
  787.  
  788. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  789.  
  790.  
  791.    Please note that although brief descriptions of the general purposes
  792.    of these headers are provided for clarity, the definitive reference
  793.    is [RFC-2616].
  794.  
  795. 2.6.3.2.  Host
  796.  
  797.    The host header specificies the internet host and port number of the
  798.    resource being requested. This header should be used to disambiguate
  799.    among multiple potential security contexts within which this message
  800.    could be interpreted. Note that the unwrapped HTTP message will have
  801.    it's own Host field (assuming it's an HTTP/1.1 message). If these
  802.    fields do not match, the server should respond with a 400 status
  803.    code.
  804.  
  805. 2.6.3.3.  Connection
  806.  
  807.    The Connection field has precisely the same semantics in S-HTTP
  808.    headers as it does in HTTP headers. This permits persistent
  809.    connections to be used with S-HTTP.
  810.  
  811. 3.  Cryptographic Parameters
  812.  
  813. 3.1.  Options Headers
  814.  
  815.    As described in Section 1.3.2, every S-HTTP request is (at least
  816.    conceptually) preconditioned by the negotiation options provided by
  817.    the potential receiver. The two primary locations for these options
  818.    are
  819.  
  820.            1. In the headers of an HTTP Request/Response.
  821.            2. In the HTML which contains the anchor being dereferenced.
  822.  
  823.    There are two kinds of cryptographic options which may be provided:
  824.    Negotiation options, as discussed in Section 3.2 convey a potential
  825.    message recipient's cryptographic preferences. Keying options, as
  826.    discussed in Section 3.3 provide keying material (or pointers to
  827.    keying material) which may be of use to the sender when enhancing a
  828.    message.
  829.  
  830.    Binding cryptographic options to anchors using HTML extensions is the
  831.    topic of the companion document [SHTML] and will not be treated here.
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Rescorla & Schiffman          Experimental                     [Page 15]
  843.  
  844. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  845.  
  846.  
  847. 3.2.  Negotiation Options
  848.  
  849. 3.2.1.  Negotiation Overview
  850.  
  851.    Both parties are able to express their requirements and preferences
  852.    regarding what cryptographic enhancements they will permit/require
  853.    the other party to provide. The appropriate option choices depend on
  854.    implementation capabilities and the requirements of particular
  855.    applications.
  856.  
  857.    A negotiation header is a sequence of specifications each conforming
  858.    to a four-part schema detailing:
  859.  
  860.         Property -- the option being negotiated, such as bulk encryption
  861.         algorithm.
  862.  
  863.         Value -- the value being discussed for the property, such as
  864.         DES-CBC
  865.  
  866.         Direction -- the direction which is to be affected, namely:
  867.         during reception or origination (from the perspective of the
  868.         originator).
  869.  
  870.         Strength -- strength of preference, namely: required, optional,
  871.         refused
  872.  
  873.    As an example, the header line:
  874.  
  875.            SHTTP-Symmetric-Content-Algorithms: recv-optional=DES-CBC,RC2
  876.  
  877.    could be thought to say: "You are free to use DES-CBC or RC2 for bulk
  878.    encryption for encrypting messages to me."
  879.  
  880.    We define new headers (to be used in the encapsulated HTTP header,
  881.    not in the S-HTTP header) to permit negotiation of these matters.
  882.  
  883. 3.2.2.  Negotiation Option Format
  884.  
  885.    The general format for negotiation options is:
  886.  
  887.            Option = Field ":" Key-val ";" *(Key-val)
  888.            Key-val = Key "=" Value *("," Value)
  889.            Key = Mode"-"Action             ; This is represented as one
  890.                                            ; token without whitespace
  891.            Mode = "orig" | "recv"
  892.            Action = "optional" | "required" | "refused"
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Rescorla & Schiffman          Experimental                     [Page 16]
  899.  
  900. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  901.  
  902.  
  903.    The <Mode> value indicates whether this <Key-val> refers to what the
  904.    agent's actions are upon sending privacy enhanced messages as opposed
  905.    to upon receiving them. For any given mode-action pair, the
  906.    interpretation to be placed on the enhancements (<Value>s) listed is:
  907.  
  908.         'recv-optional:' The agent will process the enhancement if the
  909.         other party uses it, but will also gladly process messages
  910.         without the enhancement.
  911.  
  912.         'recv-required:' The agent will not process messages without
  913.         this enhancement.
  914.  
  915.         'recv-refused:' The agent will not process messages with this
  916.         enhancement.
  917.  
  918.         'orig-optional:' When encountering an agent which refuses this
  919.         enhancement, the agent will not provide it, and when
  920.         encountering an agent which requires it, this agent will provide
  921.         it.
  922.  
  923.         'orig-required:' The agent will always generate the enhancement.
  924.  
  925.         'orig-refused:' The agent will never generate the enhancement.
  926.  
  927.    The behavior of agents which discover that they are communicating
  928.    with an incompatible agent is at the discretion of the agents. It is
  929.    inappropriate to blindly persist in a behavior that is known to be
  930.    unacceptable to the other party. Plausible responses include simply
  931.    terminating the connection, or, in the case of a server response,
  932.    returning 'Not implemented 501'.
  933.  
  934.    Optional values are considered to be listed in decreasing order of
  935.    preference. Agents are free to choose any member of the intersection
  936.    of the optional lists (or none) however.
  937.  
  938.    If any <Key-Val> is left undefined, it should be assumed to be set to
  939.    the default. Any key which is specified by an agent shall override
  940.    any appearance of that key in any <Key-Val> in the default for that
  941.    field.
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Rescorla & Schiffman          Experimental                     [Page 17]
  955.  
  956. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  957.  
  958.  
  959. 3.2.3.  Parametrization for Variable-length Key Ciphers
  960.  
  961.    For ciphers with variable key lengths, values may be parametrized
  962.    using the syntax <cipher>'['<length>']'
  963.  
  964.    For example, 'RSA[1024]' represents a 1024 bit key for RSA. Ranges
  965.    may be represented as
  966.  
  967.            <cipher>'['<bound1>'-'<bound2>']'
  968.  
  969.    For purposes of preferences, this notation should be treated as if it
  970.    read (assuming x and y are integers)
  971.  
  972.            <cipher>[x], <cipher>[x+1],...<cipher>[y] (if x<y)
  973.  
  974.    and
  975.  
  976.            <cipher>[x], <cipher>[x-1],...<cipher>[y] (if x>y)
  977.  
  978.    The special value 'inf' may be used to denote infinite length.
  979.  
  980.    Using simply <cipher> for such a cipher shall be read as the maximum
  981.    range possible with the given cipher.
  982.  
  983. 3.2.4.  Negotiation Syntax
  984.  
  985. 3.2.4.1.  SHTTP-Privacy-Domains
  986.  
  987.    This header refers to the Content-Privacy-Domain type of section
  988.    2.3.1. Acceptable values are as listed there. For instance,
  989.  
  990.                    SHTTP-Privacy-Domains: orig-required=cms;
  991.                                           recv-optional=cms,MOSS
  992.  
  993.    would indicate that the agent always generates CMS compliant
  994.    messages, but can read CMS or MOSS (or, unenhanced messages).
  995.  
  996. 3.2.4.2.  SHTTP-Certificate-Types
  997.  
  998.    This indicates what sort of Public Key certificates the agent will
  999.    accept. Currently defined values are 'X.509' and 'X.509v3'.
  1000.  
  1001. 3.2.4.3.  SHTTP-Key-Exchange-Algorithms
  1002.  
  1003.    This header indicates which algorithms may be used for key exchange.
  1004.    Defined values are 'DH', 'RSA', 'Outband' and 'Inband'. DH refers to
  1005.    Diffie-Hellman X9.42 style enveloping. [DH] RSA refers to RSA
  1006.    enveloping. Outband refers to some sort of external key agreement.
  1007.  
  1008.  
  1009.  
  1010. Rescorla & Schiffman          Experimental                     [Page 18]
  1011.  
  1012. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1013.  
  1014.  
  1015.    Inband refers to section 3.3.3.1.
  1016.  
  1017.    The expected common configuration of clients having no certificates
  1018.    and servers having certificates would look like this (in a message
  1019.    sent by the server):
  1020.  
  1021.            SHTTP-Key-Exchange-Algorithms: orig-optional=Inband, DH;
  1022.                                          recv-required=DH
  1023.  
  1024. 3.2.4.4.  SHTTP-Signature-Algorithms
  1025.  
  1026.    This header indicates what Digital Signature algorithms may be used.
  1027.    Defined values are 'RSA' [PKCS-1] and 'NIST-DSS' [FIPS-186] Since
  1028.    NIST-DSS and RSA use variable length moduli the parametrization
  1029.    syntax of section 3.2.3 should be used.  Note that a key length
  1030.    specification may interact with the acceptability of a given
  1031.    certificate, since keys (and their lengths) are specified in public-
  1032.    key certificates.
  1033.  
  1034. 3.2.4.5.  SHTTP-Message-Digest-Algorithms
  1035.  
  1036.    This indicates what message digest algorithms may be used.
  1037.    Previously defined values are 'RSA-MD2' [RFC-1319], 'RSA-MD5' [RFC-
  1038.    1321], 'NIST-SHS' [FIPS-180].
  1039.  
  1040. 3.2.4.6.  SHTTP-Symmetric-Content-Algorithms
  1041.  
  1042.    This header specifies the symmetric-key bulk cipher used to encrypt
  1043.    message content.  Defined values are:
  1044.  
  1045.    DES-CBC -- DES in Cipher Block Chaining (CBC) mode [FIPS-81]
  1046.    DES-EDE-CBC -- 2 Key 3DES using Encrypt-Decrypt-Encrypt in outer
  1047.                   CBC mode
  1048.    DES-EDE3-CBC -- 3 Key 3DES using Encrypt-Decrypt-Encrypt in outer
  1049.                    CBC mode
  1050.    DESX-CBC -- RSA's DESX in CBC mode
  1051.    IDEA-CBC -- IDEA in CBC mode
  1052.    RC2-CBC -- RSA's RC2 in CBC mode
  1053.    CDMF-CBC -- IBM's CDMF (weakened key DES) [JOHN93] in CBC mode
  1054.  
  1055.    Since RC2 keys are variable length, the syntax of section 3.2.3
  1056.    should be used.
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Rescorla & Schiffman          Experimental                     [Page 19]
  1067.  
  1068. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1069.  
  1070.  
  1071. 3.2.4.7.  SHTTP-Symmetric-Header-Algorithms
  1072.  
  1073.    This header specifies the symmetric-key cipher used to encrypt
  1074.    message headers.
  1075.  
  1076.    DES-ECB -- DES in Electronic Codebook (ECB) mode [FIPS-81]
  1077.    DES-EDE-ECB -- 2 Key 3DES using Encrypt-Decrypt-Encrypt in ECB mode
  1078.    DES-EDE3-ECB -- 3 Key 3DES using Encrypt-Decrypt-Encrypt in ECB mode
  1079.    DESX-ECB -- RSA's DESX in ECB mode
  1080.    IDEA-ECB -- IDEA
  1081.    RC2-ECB -- RSA's RC2 in ECB mode
  1082.    CDMF-ECB -- IBM's CDMF in ECB mode
  1083.  
  1084.    Since RC2 is variable length, the syntax of section 3.2.3 should be
  1085.    used.
  1086.  
  1087. 3.2.4.8.  SHTTP-MAC-Algorithms
  1088.  
  1089.    This header indicates what algorithms are acceptable for use in
  1090.    providing a symmetric key MAC. 'RSA-MD2', 'RSA-MD5' and 'NIST-SHS'
  1091.    persist from S-HTTP/1.1 using the old MAC construction. The tokens '
  1092.    RSA-MD2-HMAC', 'RSA-MD5-HMAC' and 'NIST-SHS-HMAC' indicate the new
  1093.    HMAC construction of 2.3.6 with the MD2, MD5, and SHA-1 algorithms
  1094.    respectively.
  1095.  
  1096. 3.2.4.9.  SHTTP-Privacy-Enhancements
  1097.  
  1098.    This header indicates security enhancements to apply.  Possible
  1099.    values are 'sign', 'encrypt' and 'auth' indicating whether messages
  1100.    are signed, encrypted, or authenticated (i.e., provided with a MAC),
  1101.    respectively.
  1102.  
  1103. 3.2.4.10.  Your-Key-Pattern
  1104.  
  1105.    This is a generalized pattern match syntax to describe identifiers
  1106.    for a large number of types of keying material. The general syntax
  1107.    is:
  1108.  
  1109.         Your-Key-Pattern =
  1110.                 "Your-Key-Pattern" ":" key-use "," pattern-info
  1111.         key-use = "cover-key" | "auth-key" | "signing-key"
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Rescorla & Schiffman          Experimental                     [Page 20]
  1123.  
  1124. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1125.  
  1126.  
  1127. 3.2.4.10.1.  Cover Key Patterns
  1128.  
  1129.    This header specifies desired values for key names used for
  1130.    encryption of transaction keys using the Prearranged-Key-Info syntax
  1131.    of section 2.3.5.  The pattern-info syntax consists of a series of
  1132.    comma separated regular expressions. Commas should be escaped with
  1133.    backslashes if they appear in the regexps. The first pattern should
  1134.    be assumed to be the most preferred.
  1135.  
  1136. 3.2.4.10.2.  Auth key patterns
  1137.  
  1138.    Auth-key patterns specify name forms desired for use for MAC
  1139.    authenticators.  The pattern-info syntax consists of a series of
  1140.    comma separated regular expressions. Commas should be escaped with
  1141.    backslashes if they appear in the regexps. The first pattern should
  1142.    be assumed to be the most preferred.
  1143.  
  1144. 3.2.4.10.3.  Signing Key Pattern
  1145.  
  1146.    This parameter describes a pattern or patterns for what keys are
  1147.    acceptable for signing for the digital signature enhancement.  The
  1148.    pattern-info syntax for signing-key is:
  1149.  
  1150.            pattern-info = name-domain "," pattern-data
  1151.  
  1152.    The only currently defined name-domain is 'DN-1779'.  This parameter
  1153.    specifies desired values for fields of Distinguished Names.  DNs are
  1154.    considered to be represented as specified in RFC1779, the order of
  1155.    fields and whitespace between fields is not significant.
  1156.  
  1157.    All RFC1779 values should use ',' as a separator rather than ';',
  1158.    since ';' is used as a statement separator in S-HTTP.
  1159.  
  1160.    Pattern-data is a modified RFC1779 string, with regular expressions
  1161.    permitted as field values.  Pattern match is performed field-wise,
  1162.    unspecified fields match any value (and therefore leaving the DN-
  1163.    Pattern entirely unspecified allows for any DN). Certificate chains
  1164.    may be matched as well (to allow for certificates without name
  1165.    subordination). DN chains are considered to be ordered left-to-right
  1166.    with the issuer of a given certificate on its immediate right,
  1167.    although issuers need not be specified. A trailing '.' indicates that
  1168.    the sequence of DNs is absolute. I.e. that the one furthest to the
  1169.    right is a root.
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Rescorla & Schiffman          Experimental                     [Page 21]
  1179.  
  1180. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1181.  
  1182.  
  1183.    The syntax for the pattern values is,
  1184.  
  1185.         Value = DN-spec *("," Dn-spec)["."]
  1186.         Dn-spec = "/" *(Field-spec) "/"
  1187.         Field-spec := Attr = "Pattern"
  1188.         Attr = "CN" | "L" | "ST" | "O" |
  1189.                    "OU" | "C" | <or as appropriate>
  1190.         Pattern = <POSIX 1003.2 regular expressions>
  1191.  
  1192.    For example, to request that the other agent sign with a key
  1193.    certified by the RSA Persona CA (which uses name subordination) one
  1194.    could use the expression below.  Note the use of RFC1779 quoting to
  1195.    protect the comma (an RFC1779 field separator) and the POSIX 1003.2
  1196.    quoting to protect the dot (a regular expression metacharacter).
  1197.  
  1198.       Your-Key-Pattern: signing-key, DN-1779,
  1199.                    /OU=Persona Certificate, O="RSA Data Security,
  1200.    Inc\."/
  1201.  
  1202. 3.2.4.11.  Example
  1203.  
  1204.    A representative header block for a server follows.
  1205.  
  1206.         SHTTP-Privacy-Domains: recv-optional=MOSS, CMS;
  1207.               orig-required=CMS
  1208.         SHTTP-Certificate-Types: recv-optional=X.509;
  1209.               orig-required=X.509
  1210.         SHTTP-Key-Exchange-Algorithms: recv-required=DH;
  1211.               orig-optional=Inband,DH
  1212.         SHTTP-Signature-Algorithms: orig-required=NIST-DSS;
  1213.               recv-required=NIST-DSS
  1214.         SHTTP-Privacy-Enhancements: orig-required=sign;
  1215.               orig-optional=encrypt
  1216.  
  1217. 3.2.4.12.  Defaults
  1218.  
  1219.    Explicit negotiation parameters take precedence over default values.
  1220.    For a given negotiation option type, defaults for a given mode-action
  1221.    pair (such as 'orig-required') are implicitly merged unless
  1222.    explicitly overridden.
  1223.  
  1224.    The default values (these may be negotiated downward or upward) are:
  1225.  
  1226.         SHTTP-Privacy-Domains: orig-optional=CMS;
  1227.                                recv-optional=CMS
  1228.         SHTTP-Certificate-Types: orig-optional=X.509;
  1229.                                  recv-optional=X.509
  1230.         SHTTP-Key-Exchange-Algorithms: orig-optional=DH,Inband,Outband;
  1231.  
  1232.  
  1233.  
  1234. Rescorla & Schiffman          Experimental                     [Page 22]
  1235.  
  1236. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1237.  
  1238.  
  1239.                                        recv-optional=DH,Inband,Outband
  1240.         SHTTP-Signature-Algorithms: orig-optional=NIST-DSS;
  1241.                                     recv-optional=NIST-DSS
  1242.         SHTTP-Message-Digest-Algorithms: orig-optional=RSA-MD5;
  1243.                                          recv-optional=RSA-MD5
  1244.         SHTTP-Symmetric-Content-Algorithms: orig-optional=DES-CBC;
  1245.                                             recv-optional=DES-CBC
  1246.         SHTTP-Symmetric-Header-Algorithms: orig-optional=DES-ECB;
  1247.                                            recv-optional=DES-ECB
  1248.         SHTTP-Privacy-Enhancements: orig-optional=sign,encrypt, auth;
  1249.                                             recv-required=encrypt;
  1250.                                             recv-optional=sign, auth
  1251. 3.3.  Non-Negotiation Headers
  1252.  
  1253.    There are a number of options that are used to communicate or
  1254.    identify the potential recipient's keying material.
  1255.  
  1256. 3.3.1.  Encryption-Identity
  1257.  
  1258.    This header identifies a potential principal for whom the message
  1259.    described by these options could be encrypted; Note that this
  1260.    explicitly permits return encryption under (say) public key without
  1261.    the other agent signing first (or under a different key than that of
  1262.    the signature). The syntax of the Encryption-Identity line is:
  1263.  
  1264.            Encryption-Identity =
  1265.                    "Encryption Identity" ":" name-class,key-sel,name-arg
  1266.            name-class = "DN-1779" | MOSS name forms
  1267.  
  1268.    The name-class is an ASCII string representing the domain within
  1269.    which the name is to be interpreted, in the spirit of MOSS. In
  1270.    addition to the MOSS name forms of RFC1848, we add the DN-1779 name
  1271.    form to represent a more convenient form of distinguished name.
  1272.  
  1273. 3.3.1.1.  DN-1779 Name Class
  1274.  
  1275.    The argument is an RFC-1779 encoded DN.
  1276.  
  1277. 3.3.2.  Certificate-Info
  1278.  
  1279.    In order to permit public key operations on DNs specified by
  1280.    Encryption-Identity headers without explicit certificate fetches by
  1281.    the receiver, the sender may include certification information in the
  1282.    Certificate-Info option. The format of this option is:
  1283.  
  1284.            Certificate-Info: <Cert-Fmt>','<Cert-Group>
  1285.  
  1286.    <Cert-Fmt> should be the type of <Cert-Group> being presented.
  1287.  
  1288.  
  1289.  
  1290. Rescorla & Schiffman          Experimental                     [Page 23]
  1291.  
  1292. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1293.  
  1294.  
  1295.    Defined values are 'PEM' and 'CMS'. CMS certificate groups are
  1296.    provided as a base-64 encoded CMS SignedData message containing
  1297.    sequences of certificates with or without the SignerInfo field. A PEM
  1298.    format certificate group is a list of comma-separated base64-encoded
  1299.    PEM certificates.
  1300.  
  1301.    Multiple Certificate-Info lines may be defined.
  1302.  
  1303. 3.3.3.  Key-Assign
  1304.  
  1305.    This option serves to indicate that the agent wishes to bind a key to
  1306.    a symbolic name for (presumably) later reference.
  1307.  
  1308.    The general syntax of the key-assign header is:
  1309.  
  1310.         Key-Assign =
  1311.                 "Key-Assign" ":" Method "," Key-Name ","
  1312.                 Lifetime "," Ciphers ";" Method-args
  1313.  
  1314.         Key-name = string
  1315.         Lifetime = "this" | "reply" | ""
  1316.         Method ="inband"
  1317.         Ciphers = "null" | Cipher+
  1318.         Cipher" = <Header cipher from section 3.2.4.7>
  1319.         kv = "4" | "5"
  1320.  
  1321.    Key-Name is the symbolic name to which this key is to be bound.
  1322.    Ciphers is a list of ciphers for which this key is potentially
  1323.    applicable (see the list of header ciphers in section 3.2.4.7). The
  1324.    keyword 'null' should be used to indicate that it is inappropriate
  1325.    for use with ANY cipher. This is potentially useful for exchanging
  1326.    keys for MAC computation.
  1327.  
  1328.    Lifetime is a representation of the longest period of time during
  1329.    which the recipient of this message can expect the sender to accept
  1330.    that key. 'this' indicates that it is likely to be valid only for
  1331.    reading this transmission. 'reply' indicates that it is useful for a
  1332.    reply to this message.  If a Key-Assign with the reply lifetime
  1333.    appears in a CRYPTOPTS block, it indicates that it is good for at
  1334.    least one (but perhaps only one) dereference of this anchor.  An
  1335.    unspecified lifetime implies that this key may be reused for an
  1336.    indefinite number of transactions.
  1337.  
  1338.    Method should be one of a number of key exchange methods.  The only
  1339.    currently defined value is 'inband' referring to Inband keys (i.e.,
  1340.    direct assignment).
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Rescorla & Schiffman          Experimental                     [Page 24]
  1347.  
  1348. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1349.  
  1350.  
  1351.    This header line may appear either in an unencapsulated header or in
  1352.    an encapsulated message, though when an uncovered key is being
  1353.    directly assigned, it may only appear in an encrypted encapsulated
  1354.    content. Assigning to a key that already exists causes that key to be
  1355.    overwritten.
  1356.  
  1357.    Keys defined by this header are referred to elsewhere in this
  1358.    specification as Key-IDs, which have the syntax:
  1359.  
  1360.         Key-ID = method ":" key-name
  1361.  
  1362. 3.3.3.1.  Inband Key Assignment
  1363.  
  1364.    This refers to the direct assignment of an uncovered key to a
  1365.    symbolic name. Method-args should be just the desired session key
  1366.    encoded in hexidecimal as in:
  1367.  
  1368.         Key-Assign: inband,akey,reply,DES-ECB;0123456789abcdef
  1369.  
  1370.  
  1371.    Short keys should be derived from long keys by reading bits from left
  1372.    to right.
  1373.  
  1374.    Note that inband key assignment is especially important in order to
  1375.    permit confidential spontaneous communication between agents where
  1376.    one (but not both) of the agents have key pairs.  However, this
  1377.    mechanism is also useful to permit key changes without public key
  1378.    computations. The key information is carried in this header line must
  1379.    be in the inner secured HTTP request, therefore use in unencrypted
  1380.    messages is not permitted.
  1381.  
  1382. 3.3.4.  Nonces
  1383.  
  1384.    Nonces are opaque, transient, session-oriented identifiers which may
  1385.    be used to provide demonstrations of freshness. Nonce values are a
  1386.    local matter, although they are might well be simply random numbers
  1387.    generated by the originator. The value is supplied simply to be
  1388.    returned by the recipient.
  1389.  
  1390. 3.3.4.1.  Nonce
  1391.  
  1392.    This header is used by an originator to specify what value is to be
  1393.    returned in the reply. The field may be any value. Multiple nonces
  1394.    may be supplied, each to be echoed independently.
  1395.  
  1396.    The Nonce should be returned in a Nonce-Echo header line. See section
  1397.    4.1.1.
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Rescorla & Schiffman          Experimental                     [Page 25]
  1403.  
  1404. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1405.  
  1406.  
  1407. 3.4.  Grouping Headers With SHTTP-Cryptopts
  1408.  
  1409.    In order for servers to bind a group of headers to an HTML anchor, it
  1410.    is possible to combine a number of headers on a single S-HTTP
  1411.    Cryptopts header line. The names of the anchors to which these
  1412.    headers apply is indicated with a 'scope' parameter.
  1413.  
  1414. 3.4.1.  SHTTP-Cryptopts
  1415.  
  1416.    This option provides a set of cryptopts and a list of references to
  1417.    which it applies. (For HTML, these references would be named using
  1418.    the NAME tag). The names are provided in the scope attribute as a
  1419.    comma separated list and separated from the next header line by a
  1420.    semicolon. The format for the SHTTP-Cryptopts line is:
  1421.  
  1422. SHTTP-Cryptopts =
  1423.                    "SHTTP-Cryptopts" ":" scope ";" cryptopt-list
  1424. scope = "scope="<tag-spec>    ; This is all one token without whitespace
  1425. tag-spec = tag *("," tag) | ""
  1426. cryptopt-list = cryptopt *(";" cryptopt)
  1427. cryptopt = <S-HTTP cryptopt lines described below>
  1428. tag = <value used in HTML anchor NAME attribute>
  1429.  
  1430.       For example:
  1431.  
  1432. SHTTP-Cryptopts: scope=tag1,tag2;
  1433.                    SHTTP-Privacy-Domains:
  1434.                    orig-required=cms; recv-optional=cms,MOSS
  1435.  
  1436.    If a message contains both S-HTTP negotiation headers and headers
  1437.    grouped on SHTTP-Cryptopts line(s), the other headers shall be taken
  1438.    to apply to all anchors not bound on the SHTTP-Cryptopts line(s).
  1439.    Note that this is an all-or-nothing proposition. That is, if a
  1440.    SHTTP-Cryptopts header binds options to a reference, then none of
  1441.    these global options apply, even if some of the options headers do
  1442.    not appear in the bound options. Rather, the S-HTTP defaults found in
  1443.    Section 3.2.4.11 apply.
  1444.  
  1445. 4.  New Header Lines for HTTP
  1446.  
  1447.    Two non-negotiation header lines for HTTP are defined here.
  1448.  
  1449. 4.1.  Security-Scheme
  1450.  
  1451.    All S-HTTP compliant agents must generate the Security-Scheme header
  1452.    in the headers of all HTTP messages they generate. This header
  1453.    permits other agents to detect that they are communicating with an
  1454.    S-HTTP compliant agent and generate the appropriate cryptographic
  1455.  
  1456.  
  1457.  
  1458. Rescorla & Schiffman          Experimental                     [Page 26]
  1459.  
  1460. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1461.  
  1462.  
  1463.    options headers.
  1464.  
  1465.    For implementations compliant with this specification, the value must
  1466.    be 'S-HTTP/1.4'.
  1467.  
  1468. 4.1.1.  Nonce-Echo
  1469.  
  1470.    The header is used to return the value provided in a previously
  1471.    received Nonce: field. This has to go in the encapsulated headers so
  1472.    that it an be cryptographically protected.
  1473.  
  1474. 5.  (Retriable) Server Status Error Reports
  1475.  
  1476.    We describe here the special processing appropriate for client
  1477.    retries in the face of servers returning an error status.
  1478.  
  1479. 5.1.  Retry for Option (Re)Negotiation
  1480.  
  1481.    A server may respond to a client request with an error code that
  1482.    indicates that the request has not completely failed but rather that
  1483.    the client may possibly achieve satisfaction through another request.
  1484.    HTTP already has this concept with the 3XX redirection codes.
  1485.  
  1486.    In the case of S-HTTP, it is conceivable (and indeed likely) that the
  1487.    server expects the client to retry his request using another set of
  1488.    cryptographic options. E.g., the document which contains the anchor
  1489.    that the client is dereferencing is old and did not require digital
  1490.    signature for the request in question, but the server now has a
  1491.    policy requiring signature for dereferencing this URL. These options
  1492.    should be carried in the header of the encapsulated HTTP message,
  1493.    precisely as client options are carried.
  1494.  
  1495.    The general idea is that the client will perform the retry in the
  1496.    manner indicated by the combination of the original request and the
  1497.    precise nature of the error and the cryptographic enhancements
  1498.    depending on the options carried in the server response.
  1499.  
  1500.    The guiding principle in client response to these errors should be to
  1501.    provide the user with the same sort of informed choice with regard to
  1502.    dereference of these anchors as with normal anchor dereference. For
  1503.    instance, in the case above, it would be inappropriate for the client
  1504.    to sign the request without requesting permission for the action.
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Rescorla & Schiffman          Experimental                     [Page 27]
  1515.  
  1516. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1517.  
  1518.  
  1519. 5.2.  Specific Retry Behavior
  1520.  
  1521. 5.2.1.  Unauthorized 401, PaymentRequired 402
  1522.  
  1523.    The HTTP errors 'Unauthorized 401', 'PaymentRequired 402' represent
  1524.    failures of HTTP style authentication and payment schemes. While S-
  1525.    HTTP has no explicit support for these mechanisms, they can be
  1526.    performed under S-HTTP while taking advantage of the privacy services
  1527.    offered by S-HTTP. (There are other errors for S-HTTP specific
  1528.    authentication errors.)
  1529.  
  1530. 5.2.2.  420 SecurityRetry
  1531.  
  1532.    This server status reply is provided so that the server may inform
  1533.    the client that although the current request is rejected, a retried
  1534.    request with different cryptographic enhancements is worth
  1535.    attempting. This header shall also be used in the case where an HTTP
  1536.    request has been made but an S-HTTP request should have been made.
  1537.    Obviously, this serves no useful purpose other than signalling an
  1538.    error if the original request should have been encrypted, but in
  1539.    other situations (e.g. access control) may be useful.
  1540.  
  1541. 5.2.2.1.  SecurityRetries for S-HTTP Requests
  1542.  
  1543.    In the case of a request that was made as an SHTTP request, it
  1544.    indicates that for some reason the cryptographic enhancements applied
  1545.    to the request were unsatisfactory and that the request should be
  1546.    repeated with the options found in the response header.  Note that
  1547.    this can be used as a way to force a new public key negotiation if
  1548.    the session key in use has expired or to supply a unique nonce for
  1549.    the purposes of ensuring request freshness.
  1550.  
  1551. 5.2.2.2.  SecurityRetries for HTTP Requests
  1552.  
  1553.    If the 420 code is returned in response to an HTTP request, it
  1554.    indicates that the request should be retried using S-HTTP and the
  1555.    cryptographic options indicated in the response header.
  1556.  
  1557. 5.2.3.  421 BogusHeader
  1558.  
  1559.    This error code indicates that something about the S-HTTP request was
  1560.    bad. The error code is to be followed by an appropriate explanation,
  1561.    e.g.:
  1562.  
  1563.            421 BogusHeader Content-Privacy-Domain must be specified
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Rescorla & Schiffman          Experimental                     [Page 28]
  1571.  
  1572. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1573.  
  1574.  
  1575. 5.2.4.  422 SHTTP Proxy Authentication Required
  1576.  
  1577.    This response is analagous to the 420 response except that the
  1578.    options in the message refer to enhancements that the client must
  1579.    perform in order to satisfy the proxy.
  1580.  
  1581. 5.2.5.  320 SHTTP Not Modifed
  1582.  
  1583.    This response code is specifically for use with proxy-server
  1584.    interaction where the proxy has placed the If-Modified-Since header
  1585.    in the S-HTTP headers of its request. This response indicates that
  1586.    the following S-HTTP message contains sufficient keying material for
  1587.    the proxy to forward the cached document for the new requestor.
  1588.  
  1589.    In general, this takes the form of an S-HTTP message where the actual
  1590.    enhanced content is missing, but all the headers and keying material
  1591.    are retained. (I.e. the optional content section of the CMS message
  1592.    has been removed.) So, if the original response was encrypted, the
  1593.    response contains the original DEK re-covered for the new recipient.
  1594.    (Notice that the server performs the same processing as it would have
  1595.    in the server side caching case of 7.1 except that the message body
  1596.    is elided.)
  1597.  
  1598. 5.2.6.  Redirection 3XX
  1599.  
  1600.    These headers are again internal to HTTP, but may contain S-HTTP
  1601.    negotiation options of significance to S-HTTP. The request should be
  1602.    redirected in the sense of HTTP, with appropriate cryptographic
  1603.    precautions being observed.
  1604.  
  1605. 5.3.  Limitations On Automatic Retries
  1606.  
  1607.    Permitting automatic client retry in response to this sort of server
  1608.    response permits several forms of attack.  Consider for the moment
  1609.    the simple credit card case:
  1610.  
  1611.        The user views a document which requires his credit card.  The
  1612.        user verifies that the DN of the intended recipient is acceptable
  1613.        and that the request will be encrypted and dereferences the
  1614.        anchor.  The attacker intercepts the server's reply and responds
  1615.        with a message encrypted under the client's public key containing
  1616.        the Moved 301 header. If the client were to automatically perform
  1617.        this redirect it would allow compromise of the user's credit
  1618.        card.
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Rescorla & Schiffman          Experimental                     [Page 29]
  1627.  
  1628. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1629.  
  1630.  
  1631. 5.3.1.  Automatic Encryption Retry
  1632.  
  1633.    This shows one possible danger of automatic retries -- potential
  1634.    compromise of encrypted information. While it is impossible to
  1635.    consider all possible cases, clients should never automatically
  1636.    reencrypt data unless the server requesting the retry proves that he
  1637.    already has the data. So, situations in which it would be acceptable
  1638.    to reencrypt would be if:
  1639.  
  1640.        1. The retry response was returned encrypted under an inband key
  1641.        freshly generated for the original request.
  1642.        2. The retry response was signed by the intended recipient of the
  1643.        original request.
  1644.        3. The original request used an outband key and the response is
  1645.        encrypted under that key.
  1646.  
  1647.    This is not an exhaustive list, however the browser author would be
  1648.    well advised to consider carefully before implementing automatic
  1649.    reencryption in other cases. Note that an appropriate behavior in
  1650.    cases where automatic reencryption is not appropriate is to query the
  1651.    user for permission.
  1652.  
  1653. 5.3.2.  Automatic Signature Retry
  1654.  
  1655.    Since we discourage automatic (without user confirmation) signing in
  1656.    even the usual case, and given the dangers described above, it is
  1657.    prohibited to automatically retry signature enchancement.
  1658.  
  1659. 5.3.3.  Automatic MAC Authentication Retry
  1660.  
  1661.    Assuming that all the other conditions are followed, it is
  1662.    permissible to automatically retry MAC authentication.
  1663.  
  1664. 6.  Other Issues
  1665.  
  1666. 6.1.  Compatibility of Servers with Old Clients
  1667.  
  1668.    Servers which receive requests in the clear which should be secured
  1669.    should return 'SecurityRetry 420' with header lines set to indicate
  1670.    the required privacy enhancements.
  1671.  
  1672. 6.2.  URL Protocol Type
  1673.  
  1674.    We define a new URL protocol designator, 'shttp'. Use of this
  1675.    designator as part of an anchor URL implies that the target server is
  1676.    S-HTTP capable, and that a dereference of this URL should undergo S-
  1677.    HTTP processing.
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Rescorla & Schiffman          Experimental                     [Page 30]
  1683.  
  1684. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1685.  
  1686.  
  1687.    Note that S-HTTP oblivious agents should not be willing to
  1688.    dereference a URL with an unknown protocol specifier, and hence
  1689.    sensitive data will not be accidentally sent in the clear by users of
  1690.    non-secure clients.
  1691.  
  1692. 6.3.  Browser Presentation
  1693.  
  1694. 6.3.1.  Transaction Security Status
  1695.  
  1696.    While preparing a secure message, the browser should provide a visual
  1697.    indication of the security of the transaction, as well as an
  1698.    indication of the party who will be able to read the message. While
  1699.    reading a signed and/or enveloped message, the browser should
  1700.    indicate this and (if applicable) the identity of the signer. Self-
  1701.    signed certificates should be clearly differentiated from those
  1702.    validated by a certification hierarchy.
  1703.  
  1704. 6.3.2.  Failure Reporting
  1705.  
  1706.    Failure to authenticate or decrypt an S-HTTP message should be
  1707.    presented differently from a failure to retrieve the document.
  1708.    Compliant clients may at their option display unverifiable documents
  1709.    but must clearly indicate that they were unverifiable in a way
  1710.    clearly distinct from the manner in which they display documents
  1711.    which possessed no digital signatures or documents with verifiable
  1712.    signatures.
  1713.  
  1714. 6.3.3.  Certificate Management
  1715.  
  1716.    Clients shall provide a method for determining that HTTP requests are
  1717.    to be signed and for determining which (assuming there are many)
  1718.    certificate is to be used for signature. It is suggested that users
  1719.    be presented with some sort of selection list from which they may
  1720.    choose a default. No signing should be performed without some sort of
  1721.    explicit user interface action, though such action may take the form
  1722.    of a persistent setting via a user preferences mechanism (although
  1723.    this is discouraged.)
  1724.  
  1725. 6.3.4.  Anchor Dereference
  1726.  
  1727.    Clients shall provide a method to display the DN and certificate
  1728.    chain associated with a given anchor to be dereferenced so that users
  1729.    may determine for whom their data is being encrypted.  This should be
  1730.    distinct from the method for displaying who has signed the document
  1731.    containing the anchor since these are orthogonal pieces of encryption
  1732.    information.
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Rescorla & Schiffman          Experimental                     [Page 31]
  1739.  
  1740. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1741.  
  1742.  
  1743. 7.  Implementation Notes
  1744.  
  1745. 7.1.  Preenhanced Data
  1746.  
  1747.    While S-HTTP has always supported preenhanced documents, in previous
  1748.    versions it was never made clear how to actually implement them.
  1749.    This section describes two methods for doing so: preenhancing the
  1750.    HTTP request/response and preenhancing the underlying data.
  1751.  
  1752. 7.1.1.  Motivation
  1753.  
  1754.    The two primary motivations for preenhanced documents are security
  1755.    and performance. These advantages primarily accrue to signing but may
  1756.    also under special circumstances apply to confidentiality or
  1757.    repudiable (MAC-based) authentication.
  1758.  
  1759.    Consider the case of a server which repeatedly serves the same
  1760.    content to multiple clients. One such example would be a server which
  1761.    serves catalogs or price lists. Clearly, customers would like to be
  1762.    able to verify that these are actual prices. However, since the
  1763.    prices are typically the same to all comers, confidentiality is not
  1764.    an issue. (Note: see Section 7.1.5 below for how to deal with this
  1765.    case as well).
  1766.  
  1767.    Consequently, the server might wish to sign the document once and
  1768.    simply send the cached signed document out when a client makes a new
  1769.    request, avoiding the overhead of a private key operation each time.
  1770.    Note that conceivably, the signed document might have been generated
  1771.    by a third party and placed in the server's cache. The server might
  1772.    not even have the signing key! This illustrates the security benefit
  1773.    of presigning: Untrusted servers can serve authenticated data without
  1774.    risk even if the server is compromised.
  1775.  
  1776. 7.1.2.  Presigned Requests/Responses
  1777.  
  1778.    The obvious implementation is simply to take a single
  1779.    request/response, cache it, and send it out in situations where a new
  1780.    message would otherwise be generated.
  1781.  
  1782. 7.1.3.  Presigned Documents
  1783.  
  1784.    It is also possible using S-HTTP to sign the underlying data and send
  1785.    it as an S-HTTP messsage. In order to do this, one would take the
  1786.    signed document (a CMS or MOSS message) and attach both S-HTTP
  1787.    headers (e.g. the S-HTTP request/response line, the Content-Privacy-
  1788.    Domain) and the necessary HTTP headers (including a Content-Type that
  1789.    reflects the inner content).
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Rescorla & Schiffman          Experimental                     [Page 32]
  1795.  
  1796. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1797.  
  1798.  
  1799.            SECURE * Secure-HTTP/1.4
  1800.            Content-Type: text/html
  1801.            Content-Privacy-Domain: CMS
  1802.  
  1803.            Random signed message here...
  1804.  
  1805.    This message itself cannot be sent, but needs to be recursively
  1806.    encapsulated, as described in the next section.
  1807.  
  1808. 7.1.4.  Recursive Encapsulation
  1809.  
  1810.    As required by Section 7.3, the result above needs to be itself
  1811.    encapsulated to protect the HTTP headers. the obvious case [and the
  1812.    one illustrated here] is when confidentiality is required, but the
  1813.    auth enhancement or even the null transform might be applied instead.
  1814.    That is, the message shown above can be used as the inner content of
  1815.    a new S-HTTP message, like so:
  1816.  
  1817.            SECURE * Secure-HTTP/1.4
  1818.            Content-Type: application/s-http
  1819.            Content-Privacy-Domain: CMS
  1820.  
  1821.            Encrypted version of the message above...
  1822.  
  1823.    To unfold this, the receiver would decode the outer S-HTTP message,
  1824.    reenter the (S-)HTTP parsing loop to process the new message, see
  1825.    that that too was S-HTTP, decode that, and recover the inner content.
  1826.  
  1827.    Note that this approach can also be used to provide freshness of
  1828.    server activity (though not of the document itself) while still
  1829.    providing nonrepudiation of the document data if a NONCE is included
  1830.    in the request.
  1831.  
  1832. 7.1.5.  Preencrypted Messages
  1833.  
  1834.    Although preenhancement works best with signature, it can also be
  1835.    used with encryption under certain conditions. Consider the situation
  1836.    where the same confidential document is to be sent out repeatedly.
  1837.    The time spent to encrypt can be saved by caching the ciphertext and
  1838.    simply generating a new key exchange block for each recipient. [Note
  1839.    that this is logically equivalent to a multi- recipient message as
  1840.    defined in both MOSS and CMS and so care must be taken to use proper
  1841.    PKCS-1 padding if RSA is being used since otherwise, one may be open
  1842.    to a low encryption exponent attack [HAST96].
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Rescorla & Schiffman          Experimental                     [Page 33]
  1851.  
  1852. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1853.  
  1854.  
  1855. 7.2.  Proxy Interaction
  1856.  
  1857.    The use of S-HTTP presents implementation issues to the use of HTTP
  1858.    proxies. While simply having the proxy blindly forward responses is
  1859.    straightforward, it would be preferable if S-HTTP aware proxies were
  1860.    still able to cache responses in at least some circumstances. In
  1861.    addition, S-HTTP services should be usable to protect client-proxy
  1862.    authentication. This section describes how to achieve those goals
  1863.    using the mechanisms described above.
  1864.  
  1865. 7.2.1.  Client-Proxy Authentication
  1866.  
  1867.    When an S-HTTP aware proxy receives a request (HTTP or S-HTTP) that
  1868.    (by whatever access control rules it uses) it requires to be S-HTTP
  1869.    authenticated (and if it isn't already so), it should return the 422
  1870.    response code (5.7.4).
  1871.  
  1872.    When the client receives the 422 response code, it should read the
  1873.    cryptographic options that the proxy sent and determine whether or
  1874.    not it is willing to apply that enhancement to the message. If the
  1875.    client is willing to meet these requirements, it should recursively
  1876.    encapsulate the request it previously sent using the appropriate
  1877.    options.  (Note that since the enhancement is recursively applied,
  1878.    even clients which are unwilling to send requests to servers in the
  1879.    clear may be willing to send the already encrypted message to the
  1880.    proxy without further encryption.) (See Section 7.1 for another
  1881.    example of a recursively encapsulated message)
  1882.  
  1883.    When the proxy receives such a message, it should strip the outer
  1884.    encapsulation to recover the message which should be sent to the
  1885.    server.
  1886.  
  1887. 8.  Implementation Recommendations and Requirements
  1888.  
  1889.    All S-HTTP agents must support the MD5 message digest and MAC
  1890.    authentication. As of S-HTTP/1.4, all agents must also support the
  1891.    RSA-MD5-HMAC construction.
  1892.  
  1893.    All S-HTTP agents must support Outband, Inband, and DH key exchange.
  1894.  
  1895.    All agents must support encryption using DES-CBC.
  1896.  
  1897.    Agents must support signature generation and verification using
  1898.    NIST-DSS.
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Rescorla & Schiffman          Experimental                     [Page 34]
  1907.  
  1908. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1909.  
  1910.  
  1911. 9.  Protocol Syntax Summary
  1912.  
  1913.    We present below a summary of the main syntactic features of S-
  1914.    HTTP/1.4, excluding message encapsulation proper.
  1915.  
  1916. 9.1.  S-HTTP (Unencapsulated) Headers
  1917.  
  1918.    Content-Privacy-Domain: ('CMS' | 'MOSS')
  1919.    Prearranged-Key-Info: <Hdr-Cipher>,<Key>,<Key-ID>
  1920.    Content-Type: 'message/http'
  1921.    MAC-Info: [hex(timeofday)',']<hash-alg>','hex(<hash-data>)','
  1922.            <key-spec>
  1923.  
  1924. 9.2.  HTTP (Encapsulated) Non-negotiation Options
  1925.  
  1926.    Key-Assign: <Method>','<Key-Name>','<Lifetime>','
  1927.            <Ciphers>';'<Method-args>
  1928.    Encryption-Identity: <name-class>','<key-sel>','<name-args>
  1929.    Certificate-Info: <Cert-Fmt>','<Cert-Group>
  1930.    Nonce: <string>
  1931.    Nonce-Echo: <string>
  1932.  
  1933. 9.3.  Encapsulated Negotiation Options
  1934.  
  1935.    SHTTP-Cryptopts: <scope>';'<string>(,<string>)*
  1936.    SHTTP-Privacy-Domains: ('CMS' | 'MOSS')
  1937.    SHTTP-Certificate-Types: ('X.509')
  1938.    SHTTP-Key-Exchange-Algorithms: ('DH', 'RSA' | 'Inband' | 'Outband')
  1939.    SHTTP-Signature-Algorithms: ('RSA' | 'NIST-DSS')
  1940.    SHTTP-Message-Digest-Algorithms:  ('RSA-MD2' | 'RSA-MD5' | 'NIST-SHS'
  1941.            'RSA-MD2-HMAC', 'RSA-MD5-HMAC', 'NIST-SHS-HMAC')
  1942.    SHTTP-Symmetric-Content-Algorithms: ('DES-CBC' | 'DES-EDE-CBC' |
  1943.            'DES-EDE3-CBC' | 'DESX-CBC' | 'CDMF-CBC' | 'IDEA-CBC' |
  1944.            'RC2-CBC' )
  1945.    SHTTP-Symmetric-Header-Algorithms: ('DES-ECB' | 'DES-EDE-ECB' |
  1946.            'DES-EDE3-EBC' | 'DESX-ECB' | 'CDMF-ECB' | 'IDEA-ECB' |
  1947.            'RC2-ECB')
  1948.    SHTTP-Privacy-Enhancements: ('sign' | 'encrypt' | 'auth')
  1949.    Your-Key-Pattern: <key-use>','<pattern-info>
  1950.  
  1951. 9.4.  HTTP Methods
  1952.  
  1953.    Secure * Secure-HTTP/1.4
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Rescorla & Schiffman          Experimental                     [Page 35]
  1963.  
  1964. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  1965.  
  1966.  
  1967. 9.5.  Server Status Reports
  1968.  
  1969.    Secure-HTTP/1.4 200 OK
  1970.    SecurityRetry 420
  1971.    BogusHeader 421 <reason>
  1972.  
  1973. 10.  An Extended Example
  1974.  
  1975.    We provide here a contrived example of a series of S-HTTP requests
  1976.    and replies. Rows of equal signs are used to set off the narrative
  1977.    from sample message traces. Note that the actual encrypted or signed
  1978.    message bodies would normally be binary garbage. In an attempt to
  1979.    preserve readability while still using (mostly) genuine messages, the
  1980.    bodies of the requests have been base64 encoded. To regenerate actual
  1981.    S-HTTP messages, it is necessary to remove the base64 encoding from
  1982.    the message body.
  1983.  
  1984. 10.1.  A request using RSA key exchange with Inband key reply
  1985.  
  1986.    Alice, using an S-HTTP-capable client, begins by making an HTTP
  1987.    request which yields the following response page:
  1988.  
  1989.    ============================================================
  1990.    200 OK HTTP/1.0
  1991.    Server-Name: Navaho-0.1.3.3alpha
  1992.    Certificate-Info: CMS,MIAGCSqGSIb3DQEHAqCAMIACAQExADCABgkqh
  1993.            kiG9w0BBwEAAKCAM
  1994.            IIBrTCCAUkCAgC2MA0GCSqGSIb3DQEBAgUAME0xCzAJBgNVBAYTAlVTMSAwH
  1995.            gYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEcMBoGA1UECxMTUGVyc
  1996.            29uYSBDZXJ0aWZpY2F0ZTAeFw05NDA0MDkwMDUwMzdaFw05NDA4MDIxODM4N
  1997.            TdaMGcxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBTZWN1cml0e
  1998.            SwgSW5jLjEcMBoGA1UECxMTUGVyc29uYSBDZXJ0aWZpY2F0ZTEYMBYGA1UEA
  1999.            xMPU2V0ZWMgQXN0cm9ub215MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMy8Q
  2000.            cW7RMrB4sTdQ8Nmb2DFmJmkWn+el+NdeamIDElX/qw9mIQu4xNj1FfepfJNx
  2001.            zPvA0OtMKhy6+bkrlyMEU8CAwEAATANBgkqhkiG9w0BAQIFAANPAAYn7jDgi
  2002.            rhiIL4wnP8nGzUisGSpsFsF4/7z2P2wqne6Qk8Cg/Dstu3RyaN78vAMGP8d8
  2003.            2H5+Ndfhi2mRp4YHiGHz0HlK6VbPfnyvS2wdjCCAccwggFRAgUCQAAAFDANB
  2004.            gkqhkiG9w0BAQIFADBfMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXUlNBIERhd
  2005.            GEgU2VjdXJpdHksIEluYy4xLjAsBgNVBAsTJUxvdyBBc3N1cmFuY2UgQ2Vyd
  2006.            GlmaWNhdGlvbiBBdXRob3JpdHkwHhcNOTQwMTA3MDAwMDAwWhcNOTYwMTA3M
  2007.            jM1OTU5WjBNMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXUlNBIERhdGEgU2Vjd
  2008.            XJpdHksIEluYy4xHDAaBgNVBAsTE1BlcnNvbmEgQ2VydGlmaWNhdGUwaTANB
  2009.            gkqhkiG9w0BAQEFAANYADBVAk4GqghQDa9Xi/2zAdYEqJVIcYhlLN1FpI9tX
  2010.            Q1m6zZ39PYXK8Uhoj0Es7kWRv8hC04vqkOKwndWbzVtvoHQOmP8nOkkuBi+A
  2011.            QvgFoRcgOUCAwEAATANBgkqhkiG9w0BAQIFAANhAD/5Uo7xDdp49oZm9GoNc
  2012.            PhZcW1e+nojLvHXWAU/CBkwfcR+FSf4hQ5eFu1AjYv6Wqf430Xe9Et5+jgnM
  2013.            Tiq4LnwgTdA8xQX4elJz9QzQobkE3XVOjVAtCFcmiin80RB8AAAMYAAAAAAA
  2014.            AAAAA==
  2015.  
  2016.  
  2017.  
  2018. Rescorla & Schiffman          Experimental                     [Page 36]
  2019.  
  2020. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2021.  
  2022.  
  2023.    Encryption-Identity: DN-1779, null, CN=Setec Astronomy, OU=Persona
  2024.            Certificate,O="RSA Data Security, Inc.", C=US;
  2025.    SHTTP-Privacy-Enhancements: recv-required=encrypt
  2026.  
  2027.    <A name=tag1 HREF="shttp://www.setec.com/secret">
  2028.    Don't read this. </A>
  2029.    ============================================================
  2030.  
  2031.    An appropriate HTTP request to dereference this URL would be:
  2032.  
  2033.    ============================================================
  2034.    GET /secret HTTP/1.0
  2035.    Security-Scheme: S-HTTP/1.4
  2036.    User-Agent: Web-O-Vision 1.2beta
  2037.    Accept: *.*
  2038.    Key-Assign: Inband,1,reply,des-ecb;7878787878787878
  2039.  
  2040.    ============================================================
  2041.  
  2042.    The added Key-Assign line that would not have been in an ordinary
  2043.    HTTP request permits Bob (the server) to encrypt his reply to Alice,
  2044.    even though Alice does not have a public key, since they would share
  2045.    a key after the request is received by Bob.  This request has the
  2046.    following S-HTTP encapsulation:
  2047.  
  2048.    ============================================================
  2049.    Secure * Secure-HTTP/1.4
  2050.    Content-Type: message/http
  2051.    Content-Privacy-Domain: CMS
  2052.  
  2053.    MIAGCSqGSIb3DQEHA6CAMIACAQAxgDCBqQIBADBTME0xCzAJBgNVBAYTAlVTMSAw
  2054.    HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEcMBoGA1UECxMTUGVyc29u
  2055.    YSBDZXJ0aWZpY2F0ZQICALYwDQYJKoZIhvcNAQEBBQAEQCU/R+YCJSUsV6XLilHG
  2056.    cNVzwqKcWzmT/rZ+duOv8Ggb7oO/d8H3xUVGQ2LsX4kYGq2szwj8Q6eWhsmhf4oz
  2057.    lvMAADCABgkqhkiG9w0BBwEwEQYFKw4DAgcECFif7BadXlw3oIAEgZBNcMexKe16
  2058.    +mNxx8YQPukBCL0bWqS86lvws/AgRkKPELmysBi5lco8MBCsWK/fCyrnxIRHs1oK
  2059.    BXBVlsAhKkkusk1kCf/GbXSAphdSgG+d6LxrNZwHbBFOX6A2hYS63Iczd5bOVDDW
  2060.    Op2gcgUtMJq6k2LFrs4L7HHqRPPlqNJ6j5mFP4xkzOCNIQynpD1rV6EECMIk/T7k
  2061.    1JLSAAAAAAAAAAAAAA==
  2062.    ============================================================
  2063.  
  2064.    The data between the delimiters is a CMS message, RSA enveloped for
  2065.    Setec Astronomy.
  2066.  
  2067.    Bob decrypts the request, finds the document in question, and is
  2068.    ready to serve it back to Alice.
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Rescorla & Schiffman          Experimental                     [Page 37]
  2075.  
  2076. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2077.  
  2078.  
  2079.    An appropriate HTTP server response would be:
  2080.  
  2081.    ============================================================
  2082.    HTTP/1.0 200 OK
  2083.    Security-Scheme: S-HTTP/1.4
  2084.    Content-Type: text/html
  2085.  
  2086.    Congratulations, you've won.
  2087.    <A href="/prize.html"
  2088.     CRYPTOPTS="Key-Assign: Inband,alice1,reply,des-ecb;020406080a0c0e0f;
  2089.     SHTTP-Privacy-Enhancements: recv-required=auth">Click here to
  2090.    claim your prize</A>
  2091.    ============================================================
  2092.  
  2093.    This HTTP response, encapsulated as an S-HTTP message becomes:
  2094.  
  2095.    ============================================================
  2096.    Secure * Secure-HTTP/1.4
  2097.    Content-Type: message/http
  2098.    Prearranged-Key-Info: des-ecb,697fa820df8a6e53,inband:1
  2099.    Content-Privacy-Domain: CMS
  2100.  
  2101.    MIAGCSqGSIb3DQEHBqCAMIACAQAwgAYJKoZIhvcNAQcBMBEGBSsOAwIHBAifqtdy
  2102.    x6uIMYCCARgvFzJtOZBn773DtmXlx037ck3giqnV0WC0QAx5f+fesAiGaxMqWcir
  2103.    r9XvT0nT0LgSQ/8tiLCDBEKdyCNgdcJAduy3D0r2sb5sNTT0TyL9uydG3w55vTnW
  2104.    aPbCPCWLudArI1UHDZbnoJICrVehxG/sYX069M8v6VO8PsJS7//hh1yM+0nekzQ5
  2105.    l1p0j7uWKu4W0csrlGqhLvEJanj6dQAGSTNCOoH3jzEXGQXntgesk8poFPfHdtj0
  2106.    5RH4MuJRajDmoEjlrNcnGl/BdHAd2JaCo6uZWGcnGAgVJ/TVfSVSwN5nlCK87tXl
  2107.    nL7DJwaPRYwxb3mnPKNq7ATiJPf5u162MbwxrddmiE7e3sST7naSN+GS0ateY5X7
  2108.    AAAAAAAAAAA=
  2109.    ============================================================
  2110.  
  2111.    The data between the delimiters is a CMS message encrypted under a
  2112.    randomly-chosen DEK which can be recovered by computing:
  2113.  
  2114.            DES-DECRYPT(inband:1,697fa820df8a6e53)
  2115.  
  2116.    where 'inband:1' is the key exchanged in the Key-Assign line in the
  2117.    original request.
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Rescorla & Schiffman          Experimental                     [Page 38]
  2131.  
  2132. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2133.  
  2134.  
  2135. 10.2.  A request using the auth enhancement
  2136.  
  2137.    There is a link on the HTML page that was just returned, which Alice
  2138.    dereferences, creating the HTTP message:
  2139.  
  2140. ============================================================
  2141. GET /prize.html HTTP/1.0
  2142. Security-Scheme: S-HTTP/1.4
  2143. User-Agent: Web-O-Vision 1.1beta
  2144. Accept: *.*
  2145.  
  2146. ============================================================
  2147.  
  2148. Which, when encapsulated as an S-HTTP message, becomes:
  2149.  
  2150. ============================================================
  2151. Secure * Secure-HTTP/1.4
  2152. Content-Type: message/http
  2153. MAC-Info:31ff8122,rsa-md5,b3ca4575b841b5fc7553e69b0896c416,inband:alice1
  2154. Content-Privacy-Domain: CMS
  2155.  
  2156. MIAGCSqGSIb3DQEHAaCABGNHRVQgL3ByaXplLmh0bWwgSFRUUC8xLjAKU2VjdXJp
  2157. dHktU2NoZW1lOiBTLUhUVFAvMS4xClVzZXItQWdlbnQ6IFdlYi1PLVZpc2lvbiAx
  2158. LjFiZXRhCkFjY2VwdDogKi4qCgoAAAAA
  2159. ============================================================
  2160.  
  2161.    The data between the delimiters is a CMS 'Data' representation of the
  2162.    request.
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Rescorla & Schiffman          Experimental                     [Page 39]
  2187.  
  2188. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2189.  
  2190.  
  2191. Appendix: A Review of CMS
  2192.  
  2193.    CMS ("Cryptographic Message Syntax Standard") is a cryptographic
  2194.    message encapsulation format, similar to PEM, based on RSA's PKCS-7
  2195.    cryptographic messaging syntax.
  2196.  
  2197.    CMS is only one of two encapsulation formats supported by S-HTTP, but
  2198.    it is to be preferred since it permits the least restricted set of
  2199.    negotiable options, and permits binary encoding.  In the interest of
  2200.    making this specification more self-contained, we summarize CMS here.
  2201.  
  2202.    CMS is defined in terms of OSI's Abstract Syntax Notation (ASN.1,
  2203.    defined in X.208), and is concretely represented using ASN.1's Basic
  2204.    Encoding Rules (BER, defined in X.209).  A CMS message is a sequence
  2205.    of typed content parts. There are six content types, recursively
  2206.    composable:
  2207.  
  2208.            Data -- Some bytes, with no enhancement.
  2209.  
  2210.            SignedData -- A content part, with zero or more signature
  2211.            blocks, and associated keying materials. Keying materials
  2212.            can be transported via the degenerate case of no signature
  2213.            blocks and no data.
  2214.  
  2215.            EnvelopedData -- One or more (per recipient) key exchange
  2216.            blocks and an encrypted content part.
  2217.  
  2218.            DigestedData -- A content part with a single digest block.
  2219.  
  2220.            EncryptedData -- An encrypted content part, with key
  2221.            materials externally provided.
  2222.  
  2223.    Here we will dispense with convention for the sake of ASN.1-impaired
  2224.    readers, and present a syntax for CMS in informal BNF (with much
  2225.    gloss).  In the actual encoding, most productions have explicit tag
  2226.    and length fields.
  2227.  
  2228.    Message = *Content
  2229.    Content = Data | SignedData | EnvelopedData |
  2230.                    DigestedData | EncryptedData
  2231.    Data = Bytes
  2232.    SignedData = *DigestAlg Content *Certificates
  2233.                     *CRLs SignerInfo*
  2234.    EnvelopedData = *RecipientInfo BulkCryptAlg
  2235.                    Encrypted(Content)
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242. Rescorla & Schiffman          Experimental                     [Page 40]
  2243.  
  2244. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2245.  
  2246.  
  2247.    DigestedData = DigestAlg Content DigestBytes
  2248.    EncryptedData = BulkCryptAlg Encrypted(Bytes)
  2249.    SignerInfo = CertID ... Encrypted(DigestBytes) ...
  2250.    RecipientInfo = CertID KeyCryptAlg Encrypted(DEK)
  2251.  
  2252. Appendix: Internet Media Type message/s-http
  2253.  
  2254.    In addition to defining the S-HTTP/1.4 protocol, this document serves
  2255.    as the specification for the Internet media type "message/s-http".
  2256.    The following is to be registered with IANA.
  2257.  
  2258.            Media Type name:        message
  2259.            Media subtype name:     s-http
  2260.            Required parameters:    none
  2261.            Optional parameters:    version, msgtype
  2262.  
  2263.              version: The S-HTTP version number of the enclosed message
  2264.              (e.g. "1.4"). If not present, the version can be
  2265.                    determined from the first line of the body.
  2266.  
  2267.              msgtype: The message type -- "request" or "response".
  2268.                    If not present, the type can be determined from the
  2269.                    first line of the body.
  2270.  
  2271.              Encoding considerations: only "7bit", "8bit", or "binary"
  2272.                    are permitted.
  2273.  
  2274.              Security considerations: this is a security protocol.
  2275.  
  2276. Bibliography and References
  2277.  
  2278.    [BELL96]    Bellare, M., Canetti, R., Krawczyk, H., "Keying Hash
  2279.                Functions for Message Authentication", Preprint.
  2280.  
  2281.    [FIPS-46-1] Federal Information Processing Standards Publication
  2282.                (FIPS PUB) 46-1, Data Encryption Standard, Reaffirmed
  2283.                1988 January 22 (supersedes FIPS PUB 46, 1977 January
  2284.                15).
  2285.  
  2286.    [FIPS-81]   Federal Information Processing Standards Publication
  2287.                (FIPS PUB) 81, DES Modes of Operation, 1980 December 2.
  2288.  
  2289.    [FIPS-180]  Federal Information Processing Standards Publication
  2290.                (FIPS PUB) 180-1, "Secure Hash Standard", 1995 April 17.
  2291.  
  2292.    [FIPS-186]  Federal Information Processing Standards Publication
  2293.                (FIPS PUB) 186, Digital Signature Standard, 1994 May 19.
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Rescorla & Schiffman          Experimental                     [Page 41]
  2299.  
  2300. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2301.  
  2302.  
  2303.    [HAST86]    Hastad, J., "On Using RSA With Low Exponents in a Public
  2304.                Key Network," Advances in Cryptology-CRYPTO 95
  2305.                Proceedings, Springer-Verlag, 1986.
  2306.  
  2307.    [JOHN93]    Johnson, D.B., Matyas, S.M., Le, A.V., Wilkins, J.D.,
  2308.                "Design of the Commercial Data Masking Facility Data
  2309.                Privacy Algorithm," Proceedings 1st ACM Conference on
  2310.                Computer & Communications Security, November 1993,
  2311.                Fairfax, VA., pp. 93-96.
  2312.  
  2313.    [KRAW96b]   Krawczyk, H. personal communication.
  2314.  
  2315.    [LAI92]     Lai, X. "On the Design and Security of Block Ciphers,"
  2316.                ETH Series in Information Processing, v. 1, Konstanz:
  2317.                Hartung-Gorre Verlag, 1992.
  2318.  
  2319.    [PKCS-6]    RSA Data Security, Inc. "Extended Certificate Syntax
  2320.                Standard", PKCS-6, Nov 1, 1993.
  2321.  
  2322.    [CMS]       Housley, R., "Cryptographic Message Syntax", RFC 2630,
  2323.                June 1999.
  2324.  
  2325.    [RFC-822]   Crocker, D., "Standard For The Format Of ARPA Internet
  2326.                Text Messages", STD 11, RFC 822, August 1982.
  2327.  
  2328.    [RFC-1319]  Kaliski, B., "The MD2 Message-Digest Algorithm", RFC
  2329.                1319, April 1992.
  2330.  
  2331.    [RFC-1321]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
  2332.                April 1992.
  2333.  
  2334.    [RFC-1421]  Linn, J., "Privacy Enhancement for Internet Electronic
  2335.                Mail:  Part I: Message Encryption and Authentication
  2336.                Procedures", RFC 1421, February 1993.
  2337.  
  2338.    [RFC-1422]  Kent, S., "Privacy Enhancement for Internet Electronic
  2339.                Mail:  Part II: Certificate-Based Key Management", RFC
  2340.                1422, February 1993.
  2341.  
  2342.    [RFC-1779]  Kille, S., "A String Representation of Distinguished
  2343.                Names", RFC 1779, March 1995.
  2344.  
  2345.    [RFC-2045]  Freed, N. and N. Borenstein, "Multipurpose Internet Mail
  2346.                Extensions (MIME) Part One: Format of Internet Message
  2347.                Bodies", RFC 2045, September 1993.
  2348.  
  2349.    [RFC-1738]  T. Berners-Lee, "Uniform Resource Locators (URLs)", RFC
  2350.                1738, December 1994.
  2351.  
  2352.  
  2353.  
  2354. Rescorla & Schiffman          Experimental                     [Page 42]
  2355.  
  2356. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2357.  
  2358.  
  2359.    [RFC-1847]  Galvin, J., Murphy, S., Crocker, S., and N. Freed,
  2360.                "Security Muliparts for MIME: Multipart/Signed and
  2361.                Multipart/Encrypted", RFC 1847, October 1995.
  2362.  
  2363.    [RFC-1848]  Crocker, S., Freed, N., Galvin, J., and S. Murphy, "MIME
  2364.                Object Security Services", RFC 1848, October 1995.
  2365.  
  2366.    [RFC-1864]  Myers, J.  and M. Rose, "The Content-MD5 Header Field",
  2367.                RFC 1864, October 1995.
  2368.  
  2369.    [RFC-2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
  2370.                Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
  2371.                Transfer Protocol -- HTTP/1.1" RFC 2616, June 1999.
  2372.  
  2373.    [RFC-2617]  Franks, J., Hallam-Baker, P., Hostetler, J., Leach, P.,
  2374.                Luotonen, A. and L. Stewart, "HTTP Authentication: Basic
  2375.                and Digest Access Authentication", RFC 2617, June 1999.
  2376.  
  2377.    [RFC-2104]  Krawczyk, H., Bellare, M. and R.  Canetti, "HMAC: Keyed-
  2378.                Hashing for Message Authentication", RFC 2104, February
  2379.                1997.
  2380.  
  2381.    [SHTML]     Rescorla, E. and A. Schiffman, "Security Extensions For
  2382.                HTML", RFC 2659, August 1999.
  2383.  
  2384.    [VANO95]    B. Prennel and P. van Oorschot, "On the security of two
  2385.                MAC algorithms", to appear Eurocrypt'96.
  2386.  
  2387.    [X509]      CCITT Recommendation X.509 (1988), "The Directory -
  2388.                Authentication Framework".
  2389.  
  2390. Security Considerations
  2391.  
  2392.    This entire document is about security.
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Rescorla & Schiffman          Experimental                     [Page 43]
  2411.  
  2412. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2413.  
  2414.  
  2415. Authors' Addresses
  2416.  
  2417.    Eric Rescorla
  2418.    RTFM, Inc.
  2419.    30 Newell Road, #16
  2420.    East Palo Alto, CA 94303
  2421.  
  2422.    Phone: (650) 328-8631
  2423.    EMail: ekr@rtfm.com
  2424.  
  2425.  
  2426.    Allan M. Schiffman
  2427.    SPYRUS/Terisa
  2428.    5303 Betsy Ross Drive
  2429.    Santa Clara, CA 95054
  2430.  
  2431.    Phone: (408) 327-1901
  2432.    EMail: ams@terisa.com
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Rescorla & Schiffman          Experimental                     [Page 44]
  2467.  
  2468. RFC 2660         The Secure HyperText Transfer Protocol      August 1999
  2469.  
  2470.  
  2471. 15.  Full Copyright Statement
  2472.  
  2473.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  2474.  
  2475.    This document and translations of it may be copied and furnished to
  2476.    others, and derivative works that comment on or otherwise explain it
  2477.    or assist in its implementation may be prepared, copied, published
  2478.    and distributed, in whole or in part, without restriction of any
  2479.    kind, provided that the above copyright notice and this paragraph are
  2480.    included on all such copies and derivative works.  However, this
  2481.    document itself may not be modified in any way, such as by removing
  2482.    the copyright notice or references to the Internet Society or other
  2483.    Internet organizations, except as needed for the purpose of
  2484.    developing Internet standards in which case the procedures for
  2485.    copyrights defined in the Internet Standards process must be
  2486.    followed, or as required to translate it into languages other than
  2487.    English.
  2488.  
  2489.    The limited permissions granted above are perpetual and will not be
  2490.    revoked by the Internet Society or its successors or assigns.
  2491.  
  2492.    This document and the information contained herein is provided on an
  2493.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  2494.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  2495.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  2496.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  2497.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  2498.  
  2499. Acknowledgement
  2500.  
  2501.    Funding for the RFC Editor function is currently provided by the
  2502.    Internet Society.
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Rescorla & Schiffman          Experimental                     [Page 45]
  2523.  
  2524.