home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-cat-idup-gss-07.txt < prev    next >
Text File  |  1997-03-25  |  143KB  |  3,723 lines

  1.  
  2. Internet Draft                            C. Adams, Entrust Technologies
  3. draft-ietf-cat-idup-gss-07.txt                             Mar. 25, 1997
  4.  
  5.  
  6.         Independent Data Unit Protection Generic Security Service
  7.              Application Program Interface  (IDUP-GSS-API)
  8.  
  9. STATUS OF THIS MEMO
  10.  
  11.    This document is an Internet-Draft. Internet-Drafts are working
  12.    documents of the Internet Engineering Task Force (IETF), its areas,
  13.    and its working groups. Note that other groups may also distribute
  14.    working documents as Internet-Drafts.
  15.  
  16.    Internet-Drafts are draft documents valid for a maximum of six 
  17.    months and may be updated, replaced, or obsoleted by 
  18.    other documents at any time. It is inappropriate to use Internet-
  19.    Drafts as reference material or to cite them other than as 
  20.    "work in progress."
  21.  
  22.    To learn the current status of any Internet Draft, please check the 
  23.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  24.    Directories on ds.internic.net (US East Coast), nic.nordu.net 
  25.    (Europe), ftp.isi.edu (US West Coast) or munnari.oz.au (Pacific Rim).
  26.  
  27.    Comments on this document should be sent to "cat-ietf@mit.edu", the 
  28.    IETF Common Authentication Technology WG discussion list.
  29.  
  30.  
  31. ABSTRACT
  32.  
  33.    The IDUP-GSS-API extends the GSS-API [RFC-2078] for applications 
  34.    requiring protection of a generic data unit (such as a file or 
  35.    message) in a way which is independent of the protection of any other 
  36.    data unit and independent of any concurrent contact with designated 
  37.    "receivers" of the data unit.  Thus, it is suitable for applications 
  38.    such as secure electronic mail where data needs to be protected 
  39.    without any on-line connection with the intended recipient(s) of that 
  40.    data.  The protection offered by IDUP includes services such as data 
  41.    origin authentication with data integrity, data confidentiality with 
  42.    data integrity, and support for non-repudiation services.  Subsequent 
  43.    to being protected, the data unit can be transferred to the 
  44.    recipient(s) - or to an archive - perhaps to be processed 
  45.    ("unprotected") only days or years later.
  46.  
  47.    Throughout the remainder of this document, the "unit" of data 
  48.    described in the above paragraph will be referred to as an IDU 
  49.    (Independent Data Unit).  The IDU can be of any size (the application 
  50.    may, if it wishes, split the IDU into pieces and have the protection 
  51.    computed a piece at a time, but the resulting protection token 
  52.    applies to the entire IDU).  However, the primary characteristic of 
  53.    an IDU is that it represents a stand-alone unit of data whose 
  54.    protection is entirely independent of any other unit of data.  If an 
  55.    application protects several IDUs and sends them all to a single 
  56.    receiver, the IDUs may be unprotected by that receiver in any order 
  57.    over any time span; no logical connection of any kind is implied by 
  58.    the protection process itself.
  59.  
  60.  
  61.  
  62. Adams               Document Expiration:  25 Sept. 1997                1
  63.  
  64.  
  65.    As with RFC-2078, this IDUP-GSS-API definition provides security 
  66.    services to callers in a generic fashion, supportable with a range of 
  67.    underlying mechanisms and technologies and hence allowing source-
  68.    level portability of applications to different environments. This 
  69.    specification defines IDUP-GSS-API services and primitives at a level 
  70.    independent of underlying mechanism and programming language environ-
  71.    ment, and is to be complemented by other, related specifications:
  72.  
  73.       - documents defining specific parameter bindings for particular
  74.         language environments;
  75.       - documents defining token formats, protocols, and procedures to
  76.         be implemented in order to realize IDUP-GSS-API services atop
  77.         particular security mechanisms.
  78.  
  79. TABLE OF CONTENTS
  80.    1.  IDUP-GSS-API Characteristics and Concepts ..................    3
  81.    1.1.  IDUP-GSS-API Constructs ..................................    5
  82.    1.1.1.  Credentials ............................................    5
  83.    1.1.2.  Tokens .................................................    5
  84.    1.1.3.  Security Environment ...................................    5
  85.    1.1.4.  Mechanism Types ........................................    5
  86.    1.1.5.  Naming .................................................    5
  87.    1.1.6.  Channel Bindings .......................................    5
  88.    1.2.  IDUP-GSS-API Features and Issues .........................    5
  89.    1.2.1.  Status Reporting .......................................    6
  90.    1.2.2.  Per-IDU Security Service Availability ..................    8
  91.    1.2.3.  Per-IDU Replay Detection and Sequencing ................    8
  92.    1.2.4.  Quality of Protection ..................................    8
  93.    1.2.5.  The Provision of Time ..................................   10
  94.    2.  Interface Descriptions .....................................   10
  95.    2.1.  Credential management calls ..............................   12
  96.    2.1.1.  Relationship to GSS-API ................................   12
  97.    2.2.  Environment-level calls ..................................   12
  98.    2.2.1.  Relationship to GSS-API ................................   12
  99.    2.2.2.  IDUP_Establish_Env call ................................   12
  100.    2.2.3.  IDUP_Abolish_Env call ..................................   15
  101.    2.2.4.  IDUP_Inquire_Env call ..................................   15
  102.    2.3.  Per-IDU calls ............................................   16
  103.    2.3.1.  Relationship to GSS-API ................................   16
  104.    2.3.2.  The "SE" Calls .........................................   17
  105.    2.3.3.  The "EV" Calls .........................................   21
  106.    2.3.4.  Parameter Bundles ......................................   29
  107.    2.3.5.  IDUP_Start_Protect .....................................   32
  108.    2.3.6.  IDUP_Protect ...........................................   34
  109.    2.3.7.  IDUP_End_Protect .......................................   35
  110.    2.3.8.  IDUP_Start_Unprotect ...................................   36
  111.    2.3.9.  IDUP_Unprotect .........................................   38
  112.    2.3.10. IDUP_End_Unprotect .....................................   38
  113.    2.4.  Special-Purpose calls ....................................   39
  114.    2.4.1.  Relationship to GSS-API ................................   39
  115.    2.4.2.  IDUP_Form_Complete_PIDU ................................   39
  116.    2.5.  Support calls ............................................   40
  117.    2.5.1.  Relationship to GSS-API ................................   40
  118.    2.5.2.  IDUP_Acquire_Cred_With_Auth ............................   41
  119.    2.5.3.  IDUP_Parse_Token .......................................   42
  120.    2.5.4.  IDUP_Get_Token_Details .................................   43
  121.    2.5.5.  IDUP_Get_Policy_Info ...................................   44
  122.  
  123.  
  124.  
  125. Adams               Document Expiration:  25 Sept. 1997                2
  126.  
  127.  
  128.    3.  Related Activities .........................................   45
  129.    4.  Acknowledgments ............................................   46
  130.    5.  Security Considerations ....................................   46
  131.    6.  References       ...........................................   46
  132.    7.  Author's Address ...........................................   46
  133.    Appendix  A ....................................................   47
  134.    Appendix  B ....................................................   48
  135.  
  136. 1. IDUP-GSS-API Characteristics and Concepts
  137.  
  138.    The paradigm within which IDUP-GSS-API operates is as follows.  An 
  139.    IDUP-GSS-API caller is any application which works with IDUs, calling 
  140.    on IDUP-GSS-API in order to protect its IDUs with services such as 
  141.    data origin authentication with integrity (DOA), confidentiality with 
  142.    integrity (CONF), and/or support for non-repudiation (e.g., evidence 
  143.    generation, where "evidence" is information that either by itself or 
  144.    when used in conjunction with other information is used to establish 
  145.    proof about an event or action (note:  the evidence itself does not 
  146.    necessarily prove truth or existence of something, but contributes to 
  147.    establish proof) -- see [ISO/IEC] for fuller discussion regarding 
  148.    evidence and its role in various types of non-repudiation).  An 
  149.    IDUP-GSS-API caller passes an IDU to, and accepts a token from, its 
  150.    local IDUP-GSS-API implementation, transferring the resulting 
  151.    protected IDU (P-IDU) to a peer or to any storage medium.  When a 
  152.    P-IDU is to be "unprotected", it must be passed to an IDUP-GSS-API 
  153.    implementation for processing.  The security services available 
  154.    through IDUP-GSS-API in this fashion are implementable over a range 
  155.    of underlying mechanisms based on secret-key and/or public-key 
  156.    cryptographic technologies.  
  157.  
  158.    During the protection operation, the input IDU buffers may be 
  159.    modified (for example, the data may be encrypted or encoded in some 
  160.    way) or may remain unchanged.  In any case, the result is termed a 
  161.    "M-IDU" (Modified IDU) in order to distinguish it from the original 
  162.    IDU.  Depending on the desire of the calling application and the 
  163.    capabilities of the underlying IDUP mechanism, the output produced by 
  164.    the protection processing may or may not encapsulate the M-IDU.  
  165.    Thus, the P-IDU may be the data in a single output parameter (if 
  166.    encapsulation is done) or may be the logical concatenation of an  
  167.    unencapsulated token parameter and a M-IDU parameter (if 
  168.    encapsulation is not done).  In the latter case, the protecting 
  169.    application may choose whatever method it wishes to concatenate or 
  170.    combine the unencapsulated token and the M-IDU into a P-IDU, provided 
  171.    the unprotecting application knows how to de-couple the P-IDU back 
  172.    into its component parts prior to calling the IDUP unprotection set 
  173.    of functions.
  174.  
  175.    It is expected that any output buffer which is returned by IDUP 
  176.    (i.e., P-IDU or portion thereof) is ready for immediate transmission 
  177.    to the intended receiver(s) by the calling application, if this is
  178.    desired.  In other words, an application wishing to transmit data
  179.    buffers as they appear from IDUP should not be unduly restricted 
  180.    from doing so by the underlying mechanism.
  181.  
  182.    The IDUP-GSS-API separates the operation of initializing a security
  183.    environment (the IDUP_Establish_Env() call) from the operations of 
  184.    providing per-IDU protection, for IDUs subsequently protected in 
  185.    conjunction with that environment. Per-IDU protection and 
  186.    unprotection calls provide DOA, CONF, evidence, and other services, 
  187.    as requested by the calling application and as supported by the 
  188.    underlying mechanism.
  189.  
  190. Adams               Document Expiration:  25 Sept. 1997                3
  191.  
  192.  
  193.    The following paragraphs provide an example illustrating the 
  194.    dataflows involved in the use of the IDUP-GSS-API by the sender and 
  195.    receiver of a P-IDU in a mechanism-independent fashion.  The example 
  196.    assumes that credential acquisition has already been completed by 
  197.    both sides.  Furthermore, the example does not cover all possible 
  198.    options available in the protection/unprotection calls.
  199.  
  200.       The sender first calls IDUP_Establish_Env() to establish a 
  201.       security environment.  Then, for the IDU to be protected the 
  202.       sender calls IDUP_Start_Protect(), IDUP_Protect() for each buffer 
  203.       of data, and IDUP_End_Protect() to complete the IDU protection.  
  204.       The resulting P-IDU, which may (depending on whether or not 
  205.       encapsulation was chosen/available) be either the token itself 
  206.       or the logical concatenation of the token and the M-IDU, is now 
  207.       ready to be sent to the target.  The sender then calls 
  208.       IDUP_Abolish_Env() to flush all environment-specific information.
  209.  
  210.       The receiver first calls IDUP_Establish_Env() to establish a 
  211.       security environment in order to unprotect the P-IDU.  Then, for 
  212.       the received P-IDU the receiver calls IDUP_Start_Unprotect(), 
  213.       IDUP_Unprotect() for each buffer of data, and IDUP_End_Unprotect() 
  214.       to complete the P-IDU unprotection.  The receiver then calls 
  215.       IDUP_Abolish_Env() to flush all environment-specific information.
  216.  
  217.  
  218.    It is important to note that absolutely no synchronization is implied 
  219.    or expected between the data buffer size used by the sender as input 
  220.    to the protection calls, the data buffer size used by the receiver as 
  221.    input to the unprotection calls, and the block sizes required by the 
  222.    underlying protection algorithms (integrity and confidentiality).  
  223.    All these sizes are meant to be independent; furthermore, the data 
  224.    buffer sizes used for the protection and unprotection calls are 
  225.    purely a function of the local environment where the calls are made.
  226.  
  227.    The IDUP-GSS-API design assumes and addresses several basic goals,
  228.    including the following.
  229.  
  230.       Mechanism independence:  The IDUP-GSS-API defines an interface to 
  231.       cryptographically implemented security services at a generic level 
  232.       which is independent of particular underlying mechanisms. For 
  233.       example, IDUP-GSS-API-provided services can be implemented by 
  234.       secret-key technologies or public-key approaches.
  235.  
  236.       Protocol environment independence: The IDUP-GSS-API is independent 
  237.       of the communications protocol suites which may be used to 
  238.       transfer P-IDUs, permitting use in a broad range of protocol 
  239.       environments.
  240.  
  241.       Protocol association independence: The IDUP-GSS-API's security 
  242.       environment construct has nothing whatever to do with 
  243.       communications protocol association constructs, so that 
  244.       IDUP-GSS-API services can be invoked by applications, wholly 
  245.       independent of protocol associations.
  246.  
  247.       Suitability for a range of implementation placements: IDUP-GSS-API
  248.       clients are not constrained to reside within any Trusted Computing
  249.       Base (TCB) perimeter defined on a system where the IDUP-GSS-API is
  250.       implemented; security services are specified in a manner suitable
  251.       for both intra-TCB and extra-TCB callers.
  252.  
  253. Adams               Document Expiration:  25 Sept. 1997                4
  254.  
  255.  
  256. 1.1. IDUP-GSS-API Constructs
  257.  
  258.    This section describes the basic elements comprising the 
  259.    IDUP-GSS-API.
  260.  
  261.  
  262. 1.1.1.  Credentials
  263.  
  264.    Credentials in IDUP-GSS-API are to be understood and used as 
  265.    described in GSS-API [RFC-2078].
  266.  
  267. 1.1.2. Tokens
  268.  
  269.    Tokens in IDUP-GSS-API are to be understood and used as described in 
  270.    GSS-API [RFC-2078] with the exception that there are no context-level 
  271.    tokens generated by IDUP-GSS-API.  The IDUP-GSS-API token 
  272.    may (depending on the underlying mechanism) encapsulate the M-IDU or 
  273.    may be logically concatenated with M-IDU prior to transfer to a 
  274.    target; furthermore, for some evidence services the token may be sent 
  275.    independently of any other data transfer.
  276.  
  277. 1.1.3.  Security Environment
  278.  
  279.    The "security environment" in IDUP-GSS-API is entirely different from 
  280.    the concept of security contexts used in GSS-API [RFC-2078].  Here, a 
  281.    security environment exists within a calling application (that is, it 
  282.    is purely local to the caller) for the purpose of protecting or 
  283.    unprotecting one or more IDUs using a particular caller credential or 
  284.    set of credentials.  In GSS-API, on the other hand, a security 
  285.    context exists between peers (the initiator and the target) for the 
  286.    purpose of protecting, in real time, the data that is exchanged 
  287.    between them.  Although they are different concepts, the env_handle 
  288.    in IDUP-GSS-API is similar to the context_handle in GSS-API in that 
  289.    it is a convenient way of tying together the entire process of 
  290.    protecting or unprotecting one or more IDUs using a particular 
  291.    underlying mechanism.  As with the GSS-API security contexts, a 
  292.    caller can initiate and maintain multiple environments using the same 
  293.    or different credentials.
  294.  
  295. 1.1.4.  Mechanism Types
  296.  
  297.    Mechanism types in IDUP-GSS-API are to be understood and used as 
  298.    described in GSS-API [RFC-2078].
  299.  
  300. 1.1.5.  Naming
  301.  
  302.    Naming in IDUP-GSS-API is to be understood and used as described in 
  303.    GSS-API [RFC-2078].
  304.  
  305. 1.1.6.  Channel Bindings
  306.  
  307.    The concept of channel bindings discussed in GSS-API [RFC-2078] is 
  308.    not relevant to the IDUP-GSS-API.
  309.  
  310.  
  311.  
  312. 1.2.  IDUP-GSS-API Features and Issues
  313.  
  314.    This section describes aspects of IDUP-GSS-API operations and of the 
  315.    security services which the IDUP-GSS-API provides.  It also provides 
  316.    commentary on design issues.
  317.  
  318. Adams               Document Expiration:  25 Sept. 1997                5
  319.  
  320.  
  321. 1.2.1.  Status Reporting
  322.  
  323.    Status reporting in IDUP-GSS-API is to be understood and used as 
  324.    described in GSS-API [RFC-2078], with the addition of a number of  
  325.    IDUP-specific status codes.  Descriptions of the major_status codes 
  326.    used in IDUP are provided in Table 1.  Codes that are informatory
  327.    (i.e., that do not cause the requested operation to fail) are 
  328.    indicated with the symbol "(I)".
  329.  
  330.    As with GSS-API, minor_status codes, which provide more detailed 
  331.    status information than major_status codes, and which may include 
  332.    status codes specific to the underlying security mechanism, are not 
  333.    specified in this document.
  334.  
  335.  
  336.  
  337. Table 1: IDUP-GSS-API Major Status Codes
  338.  
  339.      GSS_S_BAD_MECH indicates that a mech_type unsupported by the
  340.      IDUP_GSS-API implementation was requested, causing the
  341.      environment establishment operation to fail.
  342.  
  343.      GSS_S_BAD_QOP indicates that the provided qop_alg value is not 
  344.      recognized or supported for the environment.
  345.  
  346.      GSS_S_BAD_SIG indicates that the received P-IDU contains an
  347.      incorrect integrity field (e.g., signature or MAC) for the data.
  348.  
  349.      GSS_S_COMPLETE indicates that environment-level information was
  350.      successfully initialized, and that IDU / P-IDU processing can 
  351.      begin on the newly-established environment.
  352.  
  353.      GSS_S_CONTINUE_NEEDED indicates that the output buffer 
  354.      supplied is too small to hold the generated data.  The application 
  355.      should continue calling this routine (until GSS_S_COMPLETE is 
  356.      returned) in order to get all remaining data.
  357.  
  358.      GSS_S_CREDENTIALS_EXPIRED indicates that the credentials associated 
  359.      with this operation have expired, so that the requested operation 
  360.      cannot be performed.
  361.  
  362.      GSS_S_DEFECTIVE_CREDENTIAL indicates that consistency checks
  363.      performed on the credential structure referenced by
  364.      claimant_cred_handle failed, preventing further processing from
  365.      being performed using that credential structure.
  366.  
  367.      GSS_S_DEFECTIVE_TOKEN indicates that consistency checks performed 
  368.      on the received P-IDU failed, preventing further processing
  369.      from being performed.
  370.  
  371.      GSS_S_DEFECTIVE_VERIF indicates that consistency checks performed 
  372.      on Service_Verification_Info failed, preventing further processing 
  373.      from being performed with that parameter.
  374.  
  375.      GSS_S_FAILURE indicates that environment setup could not be 
  376.      accomplished for reasons unspecified at the IDUP-GSS-API level, 
  377.      and that no interface-defined recovery action is available.
  378.  
  379.      GSS_S_NO_CRED indicates that no environment was established, 
  380.      either because the input cred_handle was invalid or because the 
  381.      caller lacks authorization to access the referenced credentials.
  382.  
  383.  
  384. Adams               Document Expiration:  25 Sept. 1997                6
  385.  
  386.  
  387.      IDUP_S_BAD_DOA_KEY indicates that the key used to provide IDU 
  388.      data origin auth. / integ. has either expired or been revoked.
  389.  
  390.      IDUP_S_BAD_ENC_IDU indicates that decryption of the received IDU 
  391.      cannot be completed because the encrypted IDU was invalid/defec- 
  392.      tive (e.g., the final block was short or had incorrect padding).
  393.  
  394.      IDUP_S_BAD_KE_KEY indicates that the key used to establish a key 
  395.      for confidentiality purposes between originator and target has 
  396.      either expired or been revoked.
  397.  
  398.      IDUP_S_BAD_TARG_INFO indicates that all the information regarding 
  399.      the target(s) is invalid or is insufficient for the protection of 
  400.      an IDU, so P-IDU cannot be created.
  401.  
  402.      IDUP_S_ENCAPSULATION_UNAVAIL (I) indicates that the underlying 
  403.      mechanism does not support encapsulation of the M-IDU into the 
  404.      token.
  405.  
  406.      IDUP_S_INAPPROPRIATE_CRED indicates that the credentials supplied 
  407.      do not contain the information necessary for P-IDU unprotection.
  408.  
  409.      IDUP_S_INCOMPLETE (I) indicates that the unprotection of the P-IDU 
  410.      is not yet complete (i.e., a determination cannot yet be made on 
  411.      the validity of the P-IDU).  The application should call 
  412.      IDUP_Form_Complete_PIDU and then should call this function again 
  413.      with the complete P-IDU. 
  414.  
  415.      IDUP_S_MORE_DATA_NEEDED (I) indicates that more input data is 
  416.      needed for the requested operation (e.g., so that appropriate data 
  417.      may be generated and returned).
  418.  
  419.      IDUP_S_MORE_PIDU_NEEDED (I) indicates that not enough of the P-IDU 
  420.      has been input yet for the completion of Start_Protect.  The 
  421.      application should call this routine again with another buffer 
  422.      of P-IDU in partial_pidu_buffer. 
  423.  
  424.      IDUP_S_NO_ENV indicates that no valid environment was recognized 
  425.      for the env_handle provided.
  426.  
  427.      IDUP_S_NO_MATCH indicates that Service_Verification_Info and 
  428.      the P-IDU to be verified do not match.
  429.  
  430.      IDUP_S_REQ_TIME_SERVICE_UNAVAIL indicates that the time service 
  431.      requested (TTIME or UTIME) is not available in the environment.
  432.  
  433.      IDUP_S_SERVICE_UNAVAIL indicates that the underlying mechanism 
  434.      does not support the service requested.
  435.  
  436.      IDUP_S_SERV_VERIF_INFO_NEEDED (I) indicates that the 
  437.      Service_Verification_Info parameter bundle must be input in order 
  438.      for service verification to proceed.  The output parameter 
  439.      service_verification_info_id contains an identifier which may be 
  440.      used by the calling application to locate the necessary 
  441.      information.
  442.  
  443.      IDUP_S_UNKNOWN_OPER_ID indicates that the input prot_oper_id value 
  444.      is not recognized or supported in the underlying mechanism.
  445.  
  446.  
  447. Adams               Document Expiration:  25 Sept. 1997                7
  448.  
  449.  
  450. 1.2.2. Per-IDU Security Service Availability
  451.  
  452.    Per-IDU security service availability in IDUP-GSS-API is to be 
  453.    understood and used as described in GSS-API [RFC-2078], with the 
  454.    exception that any combination of services requested by the calling 
  455.    application and supported by the underlying mechanism can be applied 
  456.    simultaneously to any IDU.
  457.  
  458.    GSS-API callers desiring per-message security services should check 
  459.    the relevant service OBJECT IDs at environment establishment time to 
  460.    ensure that what is available in the established environment is 
  461.    suitable for their security needs.
  462.  
  463.  
  464. 1.2.3. Per-IDU Replay Detection and Sequencing
  465.  
  466.    The concept of per-IDU replay detection and sequencing discussed 
  467.    in GSS-API [RFC-2078] is not relevant to the IDUP-GSS-API.
  468.  
  469.  
  470. 1.2.4.  Quality of Protection
  471.  
  472.    The concept of QOP control in IDUP-GSS-API is to be understood 
  473.    essentially as described in GSS-API [RFC-2078].  However, the actual 
  474.    description and use of the QOP parameter is given as follows.
  475.  
  476.  
  477. The qop_algs parameter for IDUP is defined to be a 32-bit unsigned 
  478.    integer with the following bit-field assignments:
  479.  
  480.             31 (MSB)                               (LSB) 0
  481.             ----------------------------------------------
  482.             |        U(19)       | TS(5) | IA(4) | MA(4) |
  483.             ----------------------------------------------
  484.  
  485.    where 
  486.  
  487.       U is a 19-bit Unspecified field (available for future 
  488.       use/expansion) -- must be set to zero;
  489.  
  490.       TS is a 5-bit Type Specifier (a semantic qualifier whose value 
  491.       specifies the type of algorithm which may be used to protect the 
  492.       corresponding IDU -- see below for details);
  493.  
  494.       IA is a 4-bit field enumerating Implementation-specific 
  495.       Algorithms; and
  496.  
  497.       MA is a 4-bit field enumerating Mechanism-defined Algorithms.
  498.  
  499.    The interpretation of the qop_algs parameter is as follows.  The MA 
  500.    field is examined first.  If it is non-zero then the algorithm used 
  501.    to protect the IDU is the mechanism-specified algorithm corresponding 
  502.    to that integer value.
  503.  
  504.    If MA is zero then IA is examined.  If this field value is non-zero 
  505.    then the algorithm used to protect the IDU is the implementation-
  506.    specified algorithm corresponding to that integer value.  Note that 
  507.    use of this field may hinder portability since a particular value may 
  508.    specify one algorithm in one implementation of the mechanism and may 
  509.    not be supported or may specify a completely different algorithm in 
  510.    another implementation of the mechanism.
  511.  
  512.  
  513. Adams               Document Expiration:  25 Sept. 1997                8
  514.  
  515.  
  516.    Finally, if both MA and IA are zero then TS is examined.  A value of 
  517.    zero for TS specifies the default algorithm for the established 
  518.    mechanism.  A non-zero value for TS corresponds to a particular 
  519.    algorithm qualifier and selects any algorithm from the mechanism 
  520.    specification which satisfies that qualifier (which actual algorithm 
  521.    is selected is an implementation choice; the calling application need 
  522.    not be aware of the choice made).
  523.  
  524.  
  525.    The following TS values (i.e., algorithm qualifiers) are specified; 
  526.    other values may be added in the future.
  527.  
  528.    When qop_algs is used to select a confidentiality algorithm:
  529.  
  530.       00000  (0) = default confidentiality algorithm
  531.       00001  (1) = IDUP_SYM_ALG_STRENGTH_STRONG
  532.       00010  (2) = IDUP_SYM_ALG_STRENGTH_MEDIUM
  533.       00011  (3) = IDUP_SYM_ALG_STRENGTH_WEAK
  534.       11111 (31) = IDUP_NO_CONFIDENTIALITY
  535.  
  536. When qop_algs is used to select a DOA/integrity algorithm:
  537.  
  538.       00000  (0) = default integrity algorithm
  539.       00001  (1) = IDUP_INT_ALG_DIG_SIGNATURE
  540.                    (integrity provided through a digital signature)
  541.       00010  (2) = IDUP_INT_ALG_NON_DIG_SIGNATURE
  542.                    (integrity without a dig. sig. (e.g., with a MAC))
  543.       11111 (31) = IDUP_NO_INTEGRITY
  544.  
  545.    Clearly, qualifiers such as strong, medium, and weak are debatable 
  546.    and likely to change with time, but for the purposes of this version 
  547.    of the specification we define these terms as follows.  A confiden-
  548.    tiality algorithm is "weak" if the effective key length of the cipher 
  549.    is 40 bits or less; it is "medium-strength" if the effective key 
  550.    length is strictly between 40 and 80 bits; and it is "strong" if the 
  551.    effective key length is 80 bits or greater.  ("Effective key length" 
  552.    describes the computational effort required to break a cipher using 
  553.    the best-known cryptanalytic attack against that cipher.)
  554.  
  555.    A five-bit TS field allows up to 30 qualifiers for each of confiden-
  556.    tiality and integrity (since "0" is reserved for "default" and "31" 
  557.    is reserved for "none", as shown above).  This document specifies 
  558.    three for confidentiality and two for integrity, leaving a lot of 
  559.    room for future specification.  Suggestions of qualifiers such as 
  560.    "fast", "medium-speed", and "slow" have been made, but such terms are 
  561.    difficult to quantify (and in any case are platform- and processor-
  562.    dependent), and so have been left out of this initial specification.  
  563.    The intention is that the TS terms be quantitative, environment-
  564.    independent qualifiers of algorithms, as much as this is possible.
  565.  
  566.    Use of the qop_algs parameter as defined above is ultimately meant to 
  567.    be as follows.
  568.  
  569.     - TS values are specified at the IDUP-GSS-API level and are 
  570.       therefore portable across mechanisms.  Applications which know 
  571.       nothing about algorithms are still able to choose "quality" of 
  572.       protection for their message tokens.
  573.  
  574.     - MA values are specified at the mechanism level and are therefore 
  575.       portable across implementations of a mechanism.
  576.  
  577. Adams               Document Expiration:  25 Sept. 1997                9
  578.  
  579.    
  580.     - IA values are specified at the implementation level (in user 
  581.       documentation, for example) and are therefore typically non-
  582.       portable.  An application which is aware of its own mechanism 
  583.       implementation and the mechanism implementation of its intended 
  584.       P-IDU recipient, however, is free to use these values since they 
  585.       will be perfectly valid and meaningful for protecting IDUs 
  586.       between those entities.
  587.  
  588.    The receiver of a P-IDU must pass back to its calling application 
  589.    (in IDUP_Start_Unprotect()) a qop_algs parameter with all relevant 
  590.    fields set.  For example, if triple-DES has been specified by a 
  591.    mechanism as algorithm 8, then a receiver of a triple-DES-protected 
  592.    P-IDU must pass to its application (TS=1, IA=0, MA=8).  In this way, 
  593.    the application is free to read whatever part of the qop_algs 
  594.    parameter it understands (TS or IA/MA).
  595.  
  596.  
  597. 1.2.5.  The Provision of Time
  598.  
  599.    IDUP mechanisms should make provision in their protocols for the 
  600.    carrying of time information from originator to target(s).  That is, 
  601.    a target (a legitimate recipient) should get some indication during 
  602.    unprotection regarding the time at which the protection operation 
  603.    took place.  This is particularly important if the mechanism offers 
  604.    non-repudiation services because in some cases evidence verification 
  605.    may only be achievable if the time at which the evidence was 
  606.    generated is known.
  607.  
  608.    Depending upon the platform and resources available to the 
  609.    implementation, an IDUP environment may have access to a source of 
  610.    trusted (secure) time, untrusted (local) time, both kinds of time, or 
  611.    no time.  OBJECT IDs indicating such availability are returned by the 
  612.    IDUP_Establish_Env() call.  When starting a protection operation, an 
  613.    application may specify which time services it wishes to have applied 
  614.    to the IDU.  Similarly, for unprotection, an application may specify 
  615.    which kind of time (if any) to consult when the validity of the P-IDU 
  616.    is to be established.  Specifying both kinds of time is interpreted 
  617.    to mean that the calling application does not care which kind of time 
  618.    is used.
  619.  
  620.    The IDUP calls which use a time parameter specify the type of that 
  621.    parameter to be INTEGER.  This INTEGER is defined in all cases to be 
  622.    the number of seconds which have elapsed since midnight, January 1, 
  623.    1970, coordinated universal time.
  624.  
  625.  
  626. 2.  Interface Descriptions
  627.  
  628.    This section describes the IDUP-GSS-API's operational interface, 
  629.    dividing the set of calls offered into five groups.  Credential 
  630.    management calls are related to the acquisition and release of 
  631.    credentials by API callers. Environment-level calls are related to 
  632.    the management of the security environment by an API caller.  Per-IDU 
  633.    calls are related to the protection or unprotection of individual 
  634.    IDUs in established security environments.  Special-purpose calls 
  635.    deal with unusual or auxiliary evidence generation/verification 
  636.    requirements.  Support calls provide extra functions useful to 
  637.    IDUP-GSS-API callers. Table 2 groups and summarizes the calls in 
  638.    tabular fashion.
  639.  
  640.  
  641.  
  642. Adams               Document Expiration:  25 Sept. 1997               10
  643.  
  644.       
  645.       Table 2:  IDUP-GSS-API Calls
  646.  
  647.       CREDENTIAL MANAGEMENT
  648.       (see the calls given in Section 2.1 of GSS-API [RFC-2078])
  649.  
  650.       ENVIRONMENT-LEVEL CALLS
  651.       IDUP_Establish_Env 
  652.          establish IDUP environment (to protect and unprotect IDUs)
  653.       IDUP_Abolish_Env 
  654.          abolish env. when no longer needed
  655.       IDUP_Inquire_Env 
  656.          indicate characteristics of env.
  657.  
  658.       PER-IDU CALLS
  659.       IDUP_SE_SingleBuffer_Protect
  660.          protect a single buffer (signing and/or encryption only)
  661.       IDUP_SE_SingleBuffer_Unprotect
  662.          unprotect a single buffer (verifying and/or decryption only)
  663.       IDUP_SE_MultiBuffer_StartProtect
  664.          begin the protection process (sign. and/or enc. only)
  665.       IDUP_SE_MultiBuffer_EndProtect
  666.          complete the protection process (sign. and/or enc. only)
  667.       IDUP_SE_MultiBuffer_StartUnprotect
  668.          begin the unprotection process (verif. and/or dec. only)
  669.       IDUP_SE_MultiBuffer_EndUnprotect
  670.          complete the unprotection process (verif. and/or dec. only)
  671.       IDUP_SE_Process_Buffer
  672.          protect or unprotect one buffer (SE or VD only)
  673.       IDUP_Start_Protect 
  674.          begin the protection process
  675.       IDUP_Protect 
  676.          protect the IDU (perhaps 1 buffer at a time)
  677.       IDUP_End_Protect 
  678.          end the protection process; create a token which contains 
  679.          info. necessary for the legitimate receiver(s) of the P-IDU 
  680.          to unprotect it
  681.       IDUP_Start_Unprotect 
  682.          begin the unprotect process
  683.       IDUP_Unprotect 
  684.          use the token to unprotect the P-IDU 
  685.          (possibly one buffer at a time)
  686.       IDUP_End_Unprotect 
  687.          end the unprotect process
  688.  
  689.       SPECIAL-PURPOSE CALLS  (might not be supported by all mechanisms)
  690.       IDUP_Form_Complete_PIDU 
  691.          insert in P-IDU any data not provided by the protection call(s)
  692.  
  693.       SUPPORT CALLS
  694.       IDUP_Acquire_cred_with_auth 
  695.          acquire cred. using an authenticator
  696.       IDUP_Parse_Token 
  697.          examine an input token to determine mech_type 
  698.       IDUP_Get_Policy_Info 
  699.          return policy info. for a given policy_id
  700.       (see also the calls given in Section 2.4 of GSS-API [RFC-2078])
  701.  
  702.  
  703.  
  704.  
  705. Adams               Document Expiration:  25 Sept. 1997               11
  706.  
  707.  
  708. 2.1.  Credential management calls
  709.  
  710. 2.1.1.  Relationship to GSS-API
  711.  
  712.    Credential management in IDUP-GSS-API is to be understood and used as 
  713.    described in GSS-API [RFC-2078].  The calls given in Section 2.1 of 
  714.    GSS-API (including all associated parameters) are unchanged, although 
  715.    the interpretation of the cred_usage parameter in the GSS-API calls 
  716.    for IDUP purposes is as follows.
  717.  
  718.       NO_RESTRICTION 0
  719.       ENCRYPT_ONLY   1
  720.       DECRYPT_ONLY   2
  721.       SIGN_ONLY      4
  722.       VERIFY_ONLY    8
  723.  
  724.    The non-zero values above may be logically OR'ed together in any 
  725.    desired combination to restrict credential usage.  Future possible 
  726.    values for this parameter are for further study.
  727.  
  728.    The call IDUP_Acquire_cred_with_auth has been added as a support call 
  729.    in this specification to permit authenticated credential acquirement; 
  730.    see Section 2.5.2 for details.  
  731.    
  732.  
  733. 2.2.  Environment-level calls
  734.  
  735.    This group of calls is devoted to the establishment and management of
  736.    an environment for the purpose of IDU protection and unprotection.  
  737.    Before protecting or unprotecting any IDU, an application must call 
  738.    IDUP_Establish_Env() to initialize environment information and select 
  739.    the underlying IDUP-GSS mechanism to be used.  A series of protection 
  740.    or unprotection calls is made to process each IDU, the protection 
  741.    calls resulting in a P-IDU for each.  Finally, IDUP_Abolish_Env() 
  742.    is called to flush all environment information.
  743.  
  744.    Semantically, acquiring credentials and establishing an environment 
  745.    is (in many cases) analogous to logging in to a system -- it 
  746.    authenticates a local user to the system and gives that user access 
  747.    to a set of operations which can be performed.
  748.  
  749. 2.2.1.  Relationship to GSS-API
  750.  
  751.    The set of calls described in this section is used in place of the 
  752.    calls described in Section 2.2 of GSS-API [RFC-2078], since those 
  753.    calls are specific to a session-oriented environment.
  754.  
  755.  
  756. 2.2.2.  IDUP_Establish_Env call
  757.  
  758.    Inputs:
  759.  
  760.    o  claimant_cred_handle CREDENTIAL HANDLE, 
  761.       -- NULL parameter specifies "use default"
  762.    o  req_mech_type OBJECT IDENTIFIER, 
  763.       -- NULL parameter specifies "use default"
  764.    o  req_environmentPolicies EnvironmentPolicies,
  765.       -- NULL parameter specifies "use default"
  766.    o  req_services SET OF OBJECT IDENTIFIER,
  767.  
  768. Adams               Document Expiration:  25 Sept. 1997               12
  769.  
  770.  
  771.    Outputs:
  772.  
  773.    o  major_status INTEGER,
  774.    o  minor_status INTEGER,
  775.    o  env_handle ENVIRONMENT HANDLE,
  776.    o  actual_mech_type OBJECT IDENTIFIER, 
  777.       -- actual mechanism always indicated, never NULL 
  778.    o  actual_environmentPolicies EnvironmentPolicies,
  779.       -- actual values always indicated, never NULL
  780.    o  ret_services SET OF OBJECT IDENTIFIER,
  781.  
  782.  
  783.    Return major_status codes:
  784.  
  785.    o  GSS_S_COMPLETE 
  786.       -- environment-level information was successfully initialized, 
  787.       -- and IDU / P-IDU processing can begin.
  788.    o  GSS_S_DEFECTIVE_CREDENTIAL 
  789.    o  GSS_S_NO_CRED 
  790.    o  GSS_S_CREDENTIALS_EXPIRED 
  791.       -- the credentials provided through claimant_cred_handle are 
  792.       -- no longer valid, so environment cannot be established.
  793.    o  GSS_S_BAD_MECH 
  794.    o  GSS_S_FAILURE 
  795.  
  796.  
  797.    The following structures are defined to facilitate environment policy 
  798.    input and output:
  799.  
  800.    EnvironmentPolicies ::= SEQUENCE {
  801.       confPolicy     [0] PolicyAndTime OPTIONAL,
  802.       -- NULL parameter (on input) specifies "use default"
  803.       integPolicy    [1] PolicyAndTime OPTIONAL,
  804.       -- NULL parameter (on input) specifies "use default"
  805.       evidencePolicy [2] PolicyAndTime OPTIONAL
  806.       -- NULL parameter (on input) specifies "use default"
  807.    }
  808.  
  809.  
  810. PolicyAndTime ::= SEQUENCE {
  811.       policy             OBJECT IDENTIFIER,
  812.       -- this environment-level policy identifier is separate from 
  813.       -- the policy provisions connected with credentials, if they exist 
  814.       time               INTEGER
  815.       -- on input:  the policy rules available at the specified time 
  816.       -- on output: the time at which the policy rules came into effect
  817.       -- (defined to be the number of seconds elapsed since midnight,
  818.       -- January 1, 1970, coordinated universal time);
  819.    }
  820.  
  821.    This routine is used by an application which protects or unprotects 
  822.    IDUs.  Using information in the credentials structure referenced by 
  823.    claimant_cred_handle, IDUP_Establish_Env() initializes the data 
  824.    structures required to protect or unprotect IDUs.  The 
  825.    claimant_cred_handle, if non-NULL, must correspond to a valid 
  826.    credentials structure.
  827.  
  828.    This routine returns an env_handle for all future references to 
  829.    this environment; when protection, unprotection, or 
  830.    IDUP_Abolish_Env() calls are made, this handle value will be used 
  831.    as the input env_handle argument.
  832.  
  833. Adams               Document Expiration:  25 Sept. 1997               13
  834.  
  835.  
  836.    It is the caller's responsibility to establish a communications path
  837.    to the intended recipients of the P-IDU, and to transmit the P-IDU to 
  838.    those recipients over that path.  This may occur subsequent to the 
  839.    IDUP_Abolish_Env() call.
  840.  
  841.    The req_services parameter may be used by the calling application to 
  842.    request that data origin authentication with integrity, 
  843.    confidentiality with integrity, evidence generation, and/or evidence 
  844.    verification services be available in the established environment.  
  845.    Requests can also be made for "trusted" or "untrusted" time services.
  846.    Requesting evidence generation or verification indicates that the 
  847.    calling application may wish to generate or verify evidence 
  848.    information for non-repudiation purposes (note:  an IDU protector may 
  849.    request that a flag be inserted into a P-IDU asking a recipient to 
  850.    provide an evidence of the type "non-repudiation of delivery"; 
  851.    however, the IDUP-GSS-API cannot by itself guarantee that the 
  852.    evidence will be sent because there is no way to force a target to 
  853.    send an evidence_token back to the IDU protector).
  854.  
  855.    Not all features will be available in all underlying mech_types; the 
  856.    returned value of ret_services indicates, as a function 
  857.    of mech_type processing capabilities and the initiator-provided input 
  858.    OBJECT IDs, the set of features which will be available in the 
  859.    environment. The value of this parameter is undefined unless the 
  860.    routine's major_status indicates COMPLETE.  Failure to provide the 
  861.    precise set of services desired by the caller does not cause 
  862.    environment establishment to fail; it is the caller's choice to 
  863.    abolish the environment if the service set provided is unsuitable for 
  864.    the caller's use.  The returned mech_type value indicates the 
  865.    specific mechanism employed in the environment, and will never 
  866.    indicate the value for "default".
  867.  
  868.    The following OBJECT IDs are defined for protection and unprotection 
  869.    services (the OBJECT ID iso.org.dod.internet.security.services, 
  870.    1.3.6.1.5.7, has been assigned by IANA, and some of the security 
  871.    services under that node are assigned as shown below).  It is 
  872.    recognized that this list may grow over time; for example, if a 
  873.    particular order of services is required (such as sign-data-then-
  874.    encrypt-everything-including-the-signature), then an OID can be 
  875.    assigned (e.g., PER_DOA_THEN_FULL_CONF) which registers this 
  876.    new service.
  877.  
  878.       PER_CONF = { 1.3.6.1.5.7.1.1 } 
  879.          -- perform data confidentiality (i.e., encrypt data) 
  880.       PER_DOA  = { 1.3.6.1.5.7.3.1 } 
  881.          -- perform data origin authentication with data integrity 
  882.       PER_POO  = { 1.3.6.1.5.7.4.1 } 
  883.          -- perform (i.e., create) non-repudiable "proof of origin" 
  884.       PER_POD  = { 1.3.6.1.5.7.4.3 } 
  885.          -- perform (i.e., create) non-repudiable "proof of delivery" 
  886.       REC_CONF = { 1.3.6.1.5.7.1.2 } 
  887.          -- receive data confidentiality (i.e., decrypt data) 
  888.       REC_DOA  = { 1.3.6.1.5.7.3.2 } 
  889.          -- receive / verify DOA with data integrity 
  890.       REC_POO  = { 1.3.6.1.5.7.4.2 } 
  891.          -- receive / verify "proof of origin" 
  892.       REC_POD  = { 1.3.6.1.5.7.4.4 } 
  893.          -- receive / verify "proof of delivery" 
  894.       TTIME    = { 1.3.6.1.5.7.7.1 }
  895.          -- trusted time availability 
  896.       UTIME    = { 1.3.6.1.5.7.7.2 }
  897.          -- untrusted time availability 
  898.  
  899. Adams               Document Expiration:  25 Sept. 1997               14
  900.  
  901.  
  902.    The PER_CONF return value (in the ret_services paramater) indicates 
  903.    whether the environment supports confidentiality services, and so 
  904.    informs the caller whether or not a request for encryption through 
  905.    a confidentiality service input to IDUP_Start_Protect() can be 
  906.    honored.  In similar fashion, the PER_DOA return value indicates 
  907.    whether DOA services are available in the established environment, 
  908.    and the PER_POO and PER_POD return values indicate whether evidence 
  909.    generation services are available.  The TTIME and UTIME values 
  910.    indicate whether trusted time and untrusted time are available for 
  911.    protection / unprotection services.
  912.  
  913.    Note that, unlike a GSS "context", an IDUP environment does not have 
  914.    an explicit lifetime associated with it.  Instead, it relies on the 
  915.    lifetime of the calling entity's credential (set by the caller in the 
  916.    GSS_Acquire_cred() call).  When the credential expires (or is 
  917.    explicitly deleted using the gss_release_cred() call), no new 
  918.    operations are allowed in the IDUP environment (although operations 
  919.    which have begun, such as the Protection set of calls, can be taken 
  920.    to completion).
  921.  
  922.  
  923. 2.2.3. IDUP_Abolish_Env call
  924.  
  925.    Input:
  926.  
  927.    o  env_handle ENVIRONMENT HANDLE
  928.  
  929.    Outputs:
  930.  
  931.    o  major_status INTEGER,
  932.    o  minor_status INTEGER,
  933.  
  934.    Return major_status codes:
  935.  
  936.    o  GSS_S_COMPLETE 
  937.       -- the relevant environment-specific information was flushed.
  938.    o  IDUP_S_NO_ENV 
  939.    o  GSS_S_FAILURE 
  940.  
  941.    This call is made to flush environment-specific information. (Once an 
  942.    environment is established, cached credential and environment-related 
  943.    info. is expected to be retained until an IDUP_Abolish_Env() call is 
  944.    made or until the cred. lifetime expires.)  Attempts to perform IDU 
  945.    processing on a deleted environment will result in error returns.
  946.  
  947. 2.2.4. IDUP_Inquire_Env call
  948.  
  949.    Input:
  950.  
  951.    o  env_handle ENVIRONMENT HANDLE,
  952.  
  953.    Outputs:
  954.  
  955.    o  major_status INTEGER,
  956.    o  minor_status INTEGER,
  957.    o  mech_type OBJECT IDENTIFIER, 
  958.       -- the mechanism supporting this env. 
  959.    o  policy OBJECT IDENTIFIER, 
  960.       -- the policy used in this env.
  961.    o  policy_time  INTEGER, 
  962.       -- time at which the policy rules came into effect
  963.    o  ret_services SET OF OBJECT IDENTIFIER,
  964.  
  965. Adams               Document Expiration:  25 Sept. 1997               15
  966.  
  967.  
  968. Return major_status codes:
  969.  
  970.    o  GSS_S_COMPLETE 
  971.       -- referenced environment is valid and mech_type and other return 
  972.       -- values describe the characteristics of the environment.
  973.    o  GSS_S_CREDENTIALS_EXPIRED 
  974.    o  IDUP_S_NO_ENV 
  975.    o  GSS_S_FAILURE 
  976.  
  977.    This routine provides environment-related information to the caller.
  978.  
  979.  
  980. 2.3.  Per-IDU calls
  981.  
  982.    This group of calls is used to perform IDU protection and 
  983.    unprotection processing on an established IDUP environment. Some of 
  984.    these calls may block pending network interactions (depending on the 
  985.    underlying mechanism in use).  These calls may be invoked by an IDU's 
  986.    protector or by the P-IDU's recipient.  The two sets of members of 
  987.    this group form a pair; the output from the protection set is 
  988.    typically meant to be input to the unprotection set.
  989.  
  990.    The per-IDU calls can support caller-requested data origin 
  991.    authentication with data integrity, confidentiality with data 
  992.    integrity, evidence, and evidence-requested-from-target services.  
  993.    The protection operations output a token which encapsulates all the 
  994.    information required to unprotect the IDU.  The token is passed to 
  995.    the target (possibly separate from the M-IDU) and is processed by the 
  996.    unprotection calls at that system.  Unprotection performs 
  997.    decipherment, DOA verification, evidence verification, or 
  998.    notification of evidence requested, as required.
  999.  
  1000.    Each of the two main operations (protection and unprotection) may be 
  1001.    separated into three parts:  "Start_Operation"; "Operation" (which 
  1002.    may be called once for each buffer of input data); and 
  1003.    "End_Operation".  This separation is available for the case where the 
  1004.    IDU or P-IDU is to be processed one buffer at a time.  
  1005.    "Start_Operation" allows the caller to specify or retrieve the 
  1006.    appropriate "Quality" used during the processing.  "Operation" is 
  1007.    concerned with the processing itself, receiving a buffer of input 
  1008.    data and potentially returning a buffer of output data.  
  1009.    "End_Operation" performs any required clean-up and creates the 
  1010.    appropriate token or states whether the input token was verified.
  1011.  
  1012.    If the IDU or P-IDU is wholly contained in a single buffer, the 
  1013.    three-part protection/unprotection processing need not be done.  
  1014.    Instead, protection and unprotection can be accomplished using only 
  1015.    the "Start_Operation" call, simplifying application code.
  1016.  
  1017. 2.3.1.  Relationship to GSS-API
  1018.  
  1019.    The set of calls described in this section is used in place of the 
  1020.    calls GSS_GetMIC(), GSS_VerifyMIC, GSS_Wrap(), and GSS_Unwrap()  
  1021.    which are specified in [RFC-2078], since those calls are specific to 
  1022.    a session-oriented environment.
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029. Adams               Document Expiration:  25 Sept. 1997               16
  1030.  
  1031.  
  1032. 2.3.2.  The "SE" Calls
  1033.  
  1034. 2.3.2.1. IDUP_SE Purpose
  1035.  
  1036.    The "SE" group of calls provides a very simple, high-level 
  1037.    interface to underlying IDUP mechanisms when application developers 
  1038.    need access only to signature and encryption protection/unprotection 
  1039.    services.  It includes both the single-buffer and multiple-buffer IDU 
  1040.    cases and can be used for signing only, encrypting only, signing and 
  1041.    encrypting (in either order, and with or without visibility of the 
  1042.    resulting signature), and "clear signing" (where the data is not 
  1043.    modified in any way and the signature itself is returned 
  1044.    (unencapsulated) as a separate item).
  1045.  
  1046.    Note that the term "signing" is used in its most generic sense, not 
  1047.    necessarily implying the use of public-key techniques.  This concept 
  1048.    has also been called "sealing" in other contexts (e.g., in other 
  1049.    standardization efforts).
  1050.  
  1051.    The SE calls may be viewed by mechanism implementors as an "API" to 
  1052.    the more powerful Protection and Unprotection sets of calls defined 
  1053.    later and so may be implemented as simple mapping functions to those 
  1054.    calls.  Application callers, on the other hand, may find that the SE 
  1055.    calls are all they currently need for many environments and may 
  1056.    migrate to the more general calls only at some time in the future 
  1057.    when they have need of data labeling, non-repudiation, or "directed 
  1058.    receipts" types of services.  To assist in this migration path, it 
  1059.    is recommended that mechanism implementors support the full set of 
  1060.    IDUP calls (i.e., both the SE calls and the more powerful calls) even 
  1061.    though some calling applications will only use the SE calls in the 
  1062.    short term.
  1063.  
  1064. 2.3.2.2. IDUP_SE Parameter Bundles
  1065.  
  1066.    The concept of "parameter bundles" is used in the calls presented in 
  1067.    the following subsections in order to simplify their presentation and 
  1068.    clarify their intended purpose and use.  See Section 2.3.3 for a more 
  1069.    complete description of parameter bundles.
  1070.  
  1071.    The following parameter bundles are used in the "SE" protection and 
  1072.    unprotection sets of calls. 
  1073.  
  1074.    o  Protect_Options PARAMETER BUNDLE
  1075.       o  protect_operation INTEGER {
  1076.             sign_only              (0), 
  1077.             encrypt_only           (1), 
  1078.             sign_and_encrypt       (2), 
  1079.             -- let mechanism choose order (and readability of signature)
  1080.             sign_then_encrypt_data (3), 
  1081.             -- sign, then encrypt plaintext (leaving signature in clear)
  1082.             sign_then_encrypt_full (4),
  1083.             -- sign, then encrypt everything (including signature)
  1084.             encrypt_then_sign      (5),
  1085.             -- encrypt, then sign the ciphertext
  1086.             clear_sign_only        (6) 
  1087.          }
  1088.       o  sign_qop_alg      UNSIGNED INTEGER,
  1089.       o  enc_qop_alg       UNSIGNED INTEGER,
  1090.       o  idu_type_string   OCTET STRING,
  1091.          -- type of the IDU ("data", "e-mail doc", MIME type, etc.)
  1092.  
  1093. Adams               Document Expiration:  25 Sept. 1997               17
  1094.  
  1095.  
  1096.    o  PIDU_Information PARAMETER BUNDLE
  1097.       o  protect_options   Protect_Options,
  1098.       o  originator_name   INTERNAL NAME,
  1099.       o  protection_time   INTEGER,
  1100.  
  1101.    o  Bad_Target_Name PARAMETER BUNDLE,  -- same as in Section 2.3.3
  1102.       o  bad_targ_name     INTERNAL NAME, 
  1103.       o  bad_targ_status   INTEGER, 
  1104.          -- a (mechanism-defined) status flag giving the reason 
  1105.          -- for rejection of the name in bad_targ_name.
  1106.          -- Example reasons may include:
  1107.          --    SYNTAX_INVALID         the syntax of the name is invalid;
  1108.          --    NAME_UNRECOGNIZED      the name is not recognized;
  1109.          --    NAME_AMBIGUOUS         the name cannot be resolved;
  1110.          --    ACCESS_DENIED          access to this target is denied;
  1111.          --    CERTIFICATE_NOT_FOUND  the encryption certificate of the 
  1112.                                       target could not be found.
  1113.  
  1114.    o  Target_Info PARAMETER BUNDLE,      -- same as in Section 2.3.3
  1115.       o  targ_names        SET OF INTERNAL NAME, 
  1116.       o  bad_targ_count    INTEGER, 
  1117.       o  bad_target_name   Bad_Target_Name, 
  1118.  
  1119. 2.3.2.3. IDUP_SE major_status codes
  1120.  
  1121.    The following major_status return codes are defined for the "SE" 
  1122.    calls in this section:
  1123.  
  1124.    o  GSS_S_COMPLETE 
  1125.    o  GSS_S_CONTINUE_NEEDED 
  1126.    o  IDUP_S_MORE_DATA_NEEDED 
  1127.       -- indicates that more input data is needed for the StartUnprotect 
  1128.       -- operation (e.g., so that PIDU_Information or initial_idu_buffer 
  1129.       -- may be returned).
  1130.    o  GSS_S_CREDENTIALS_EXPIRED 
  1131.    o  IDUP_S_NO_ENV 
  1132.    o  GSS_S_BAD_QOP 
  1133.    o  GSS_S_FAILURE 
  1134.  
  1135.  
  1136.    If Target_Info is used as an input parameter (i.e., if an encryption 
  1137.    operation is being performed), the following major_status return code 
  1138.    is also defined:
  1139.  
  1140.    o  IDUP_S_BAD_TARG_INFO 
  1141.  
  1142.    Note for this return code that if one or more of the targets in 
  1143.    targ_names cannot be used as a valid recipient of the P-IDU, these 
  1144.    names will be returned in bad_targ_names (with associated status 
  1145.    codes in bad_targ_status).  As long as at least one of the targets 
  1146.    can be used, however, this does not cause this call to fail (i.e., 
  1147.    the failure code IDUP_S_BAD_TARG_INFO is not returned); it is the 
  1148.    caller's choice to discontinue IDU protection if the target set 
  1149.    which can be used is unsuitable for the caller's purposes.
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157. Adams               Document Expiration:  25 Sept. 1997               18
  1158.  
  1159.  
  1160. 2.3.2.4. IDUP_SE_SingleBuffer_Protect call
  1161.  
  1162.    Inputs:
  1163.    o  env_handle ENVIRONMENT HANDLE,
  1164.    o  Protect_Options PARAMETER BUNDLE,
  1165.    o  Target_Info_E PARAMETER BUNDLE, 
  1166.       -- used if Protect_Options is encrypt_only or sign_and_encrypt 
  1167.    o  Target_Info_S PARAMETER BUNDLE  OPTIONAL,
  1168.       -- used only if a separate recipient list is needed for signing
  1169.    o  idu_buffer OCTET STRING
  1170.  
  1171.    Outputs:
  1172.    o  major_status INTEGER,
  1173.    o  minor_status INTEGER,
  1174.    o  pidu_buffer OCTET STRING, 
  1175.    o  sig_token OCTET STRING
  1176.       -- used if Protect_Options is clear_sign_only 
  1177.  
  1178.    Using the security environment referenced by env_handle, encrypt 
  1179.    and/or sign the supplied IDU.  If "clear signing" is performed, the 
  1180.    signature will be returned in sig_token and pidu_buffer may be empty 
  1181.    (depends on underlying mechanism).
  1182.  
  1183.  
  1184. 2.3.2.5. IDUP_SE_SingleBuffer_Unprotect call
  1185.  
  1186.    Inputs:
  1187.    o  env_handle ENVIRONMENT HANDLE,
  1188.    o  pidu_buffer OCTET STRING,
  1189.       -- may contain an IDU if sig_token is non-NULL (i.e., if 
  1190.       -- clear_sign_only protection was applied)
  1191.    o  sig_token OCTET STRING
  1192.  
  1193.    Outputs:
  1194.    o  major_status INTEGER,
  1195.    o  minor_status INTEGER,
  1196.    o  idu_buffer OCTET STRING, 
  1197.       -- may be empty if clear_sign_only protection was applied (depends 
  1198.       -- on underlying mechanism)
  1199.    o  PIDU_Information PARAMETER BUNDLE
  1200.  
  1201.    Using the security environment referenced by env_handle, decrypt 
  1202.    and/or verify the supplied PIDU and return the contained IDU along 
  1203.    with all available PIDU_Information. 
  1204.  
  1205. 2.3.2.6. IDUP_SE_MultiBuffer_StartProtect call
  1206.  
  1207.    Inputs:
  1208.    o  env_handle ENVIRONMENT HANDLE,
  1209.    o  Protect_Options PARAMETER BUNDLE,
  1210.    o  Target_Info_E PARAMETER BUNDLE, 
  1211.       -- used if Protect_Options is encrypt_only or sign_and_encrypt 
  1212.    o  Target_Info_S PARAMETER BUNDLE  OPTIONAL,
  1213.       -- used only if a separate recipient list is needed for signing
  1214.  
  1215.    Outputs:
  1216.    o  major_status INTEGER,
  1217.    o  minor_status INTEGER,
  1218.    o  initial_pidu_buffer OCTET STRING
  1219.       -- may be empty (depends on underlying mechanism)
  1220. Adams               Document Expiration:  25 Sept. 1997               19
  1221.  
  1222.  
  1223.    Using the security environment referenced by env_handle, initialize 
  1224.    the data structures required to begin the process of signing 
  1225.    and/or encrypting the IDU (which will be supplied in multiple buffers
  1226.    to the Process_Buffer call).
  1227.  
  1228. 2.3.2.7. IDUP_SE_MultiBuffer_EndProtect call
  1229.  
  1230.    Inputs:
  1231.    o  env_handle ENVIRONMENT HANDLE
  1232.  
  1233.    Outputs:
  1234.    o  major_status INTEGER,
  1235.    o  minor_status INTEGER,
  1236.    o  final_pidu_buffer OCTET STRING,
  1237.    o  sig_token OCTET STRING
  1238.       -- used if Protect_Options was clear_sign_only 
  1239.  
  1240.    Using the security environment referenced by env_handle, complete the 
  1241.    protection processing on the data and place the computed output in 
  1242.    final_pidu_buffer and/or sig_token. Successful application of 
  1243.    IDUP_SE_MultiBuffer_EndProtect() does not guarantee that unprotection 
  1244.    can necessarily be performed successfully when the P-IDU arrives at 
  1245.    the target (for example, it may be damaged in transit).
  1246.  
  1247. 2.3.2.8. IDUP_SE_MultiBuffer_StartUnprotect call
  1248.  
  1249.    Inputs:
  1250.    o  env_handle ENVIRONMENT HANDLE,
  1251.    o  initial_pidu_buffer OCTET STRING,
  1252.    o  sign_qop_alg_in UNSIGNED INTEGER,
  1253.       -- used if Protect_Options was clear_sign_only (and calling 
  1254.       -- application has prior knowledge of signing alg. applied); 
  1255.       -- if NULL, then sig_token must be supplied
  1256.    o  sig_token OCTET STRING
  1257.       -- used if Protect_Options was clear_sign_only; 
  1258.       -- if NULL, then sign_qop_alg_in must be supplied
  1259.  
  1260.    Outputs:
  1261.    o  major_status INTEGER,
  1262.    o  minor_status INTEGER,
  1263.    o  PIDU_Information PARAMETER BUNDLE,
  1264.       -- returns all available information 
  1265.    o  initial_idu_buffer OCTET STRING
  1266.       -- may be empty 
  1267.  
  1268.    Using the security environment referenced by env_handle, initialize 
  1269.    the data structures required to begin the process of decrypting 
  1270.    and/or verifying the PIDU (which will be supplied in multiple buffers
  1271.    to the Process_Buffer call).
  1272.  
  1273. 2.3.2.9. IDUP_SE_MultiBuffer_EndUnprotect call
  1274.  
  1275.    Inputs:
  1276.    o  env_handle ENVIRONMENT HANDLE,
  1277.    o  sig_token OCTET STRING  OPTIONAL
  1278.       -- used if Protect_Options was clear_sign_only and sig_token was 
  1279.       -- not available when StartUnprotect was called
  1280.  
  1281.  
  1282.  
  1283.  
  1284. Adams               Document Expiration:  25 Sept. 1997               20
  1285.  
  1286.  
  1287.    Outputs:
  1288.    o  major_status INTEGER,
  1289.    o  minor_status INTEGER,
  1290.    o  PIDU_Information PARAMETER BUNDLE,
  1291.       -- returns all available information 
  1292.    o  final_idu_buffer OCTET STRING
  1293.       -- may be empty 
  1294.  
  1295.    Using the security environment referenced by env_handle, complete the 
  1296.    decryption and/or verification processing on the data and place any 
  1297.    residual output in final_idu_buffer. 
  1298.  
  1299. 2.3.2.10. IDUP_SE_Process_Buffer call
  1300.  
  1301.    Inputs:
  1302.    o  env_handle ENVIRONMENT HANDLE,
  1303.    o  input_buffer OCTET STRING,
  1304.  
  1305.    Outputs:
  1306.    o  major_status INTEGER,
  1307.    o  minor_status INTEGER,
  1308.    o  output_buffer OCTET STRING
  1309.       -- may be zero length (depends on underlying mechanism and 
  1310.       -- corresponding Start() call and Protect_Options value)
  1311.  
  1312.    Using the security environment referenced by env_handle, continue the 
  1313.    processing on the data in input_buffer and, if it is available, put
  1314.    any resulting output data in output_buffer.  The application calls 
  1315.    this routine over and over again with new buffers of data until it
  1316.    has processed all the data buffers of the IDU/PIDU. It then calls
  1317.    the appropriate End() call to complete the processing.
  1318.  
  1319. 2.3.3.  The "EV" Calls
  1320.  
  1321. 2.3.3.1. IDUP_EV Purpose
  1322.  
  1323.    The "EV" group of calls provides a simple, high-level interface 
  1324.    to underlying IDUP mechanisms when application developers 
  1325.    need to deal only with evidence but not with encryption or integrity
  1326.    services. It includes both the single-buffer and multiple-buffer 
  1327.    IDU cases and can be used for the generation and verification of 
  1328.    evidence tokens embodying several different types of evidences. 
  1329.  
  1330.    The following list of evidence's types are supported. This list 
  1331.    is by no means exhaustive and it is anticipated that it will be 
  1332.    extended.
  1333.  
  1334.          Non-repudiation of Origin prevents a message creator's false 
  1335.          denial of creating and sending a message.
  1336.  
  1337.          Non-repudiation of Creation prevents a message creator's false 
  1338.          denial of creating a message.
  1339.  
  1340.          Non-repudiation of Sender prevents a message creator's false 
  1341.          denial of sending a message (that was not necessarily created 
  1342.          by the sender).
  1343.  
  1344.          Non-repudiation of Delivery prevents a message recipient's 
  1345.          false denial of having received and looked at the content of a 
  1346.          message.
  1347.  
  1348. Adams               Document Expiration:  25 Sept. 1997               21
  1349.  
  1350. Non-repudiation of Receipt prevents a message recipient's 
  1351.          false denial of having received a message (whose content was 
  1352.          not necessarily looked at by the recipient).
  1353.  
  1354.          Non-repudiation of Retrieval prevents a message recipient's 
  1355.          false denial of having retrieved a message a message from a 
  1356.          message store (whose content was not necessarilly looked at by 
  1357.          the recipient).
  1358.  
  1359.          Non-repudiation of Approval prevents a message recipient's 
  1360.          false denial of having approved the content of a received 
  1361.          message.
  1362.  
  1363.    An evidence is provided in the form of a evidence token. Two forms 
  1364.    of evidence tokens are supported: 
  1365.  
  1366.       o  Tokens including the associated data,
  1367.  
  1368.       o  Tokens without included data (but with a unique reference to 
  1369.          the associated data).
  1370.  
  1371.    Evidence tokens may be freely distributed. Any possessor of an 
  1372.    evidence token (and of the associated data, if not included in the 
  1373.    token) can verify the evidence if it has the appropriate 
  1374.    credentials which include the definition of security policies (i.e., 
  1375.    keys alone do not permit the verification of evidence tokens). Any 
  1376.    holder of an evidence token may store it (along with the associated 
  1377.    data, if not included in the token) for later verification. 
  1378.  
  1379.    Calls that are specific to the support of evidence include:
  1380.  
  1381.    * Generate_token generates a non-repudiation token using the current
  1382.      environment. The generated token may consist of:
  1383.  
  1384.      1 - an evidence token 
  1385.  
  1386.      2 - a token containing a request for an evidence, which carries
  1387.          information describing which evidence type should be generated 
  1388.          by the recipient(s) and sent back to some entities (that may or
  1389.          may not include the sender).
  1390.  
  1391.      3 - a token containing an evidence token which is an answer to 
  1392.          an evidence that has been previously requested.
  1393.  
  1394.      4 - a token including both an evidence and a request for another 
  1395.          evidence to be provided.
  1396.  
  1397.    * Verify_evidence verifies the evidence token using the current
  1398.      environment. The verify_evidence operation returns a major status 
  1399.      code which can be used to determine whether the evidence 
  1400.      contained in a token is complete (i.e., can be successfully 
  1401.      verified (perhaps years) later). If a token's evidence is not 
  1402.      complete, the token can be passed to form_complete_evidence to 
  1403.      complete it.
  1404.  
  1405.    Additional useful calls for evidence services include:
  1406.  
  1407.    * IDUP_Get_token_details (see Section 2.5.4);
  1408.    * IDUP_Form_Complete_PIDU (see Section 2.4.2).
  1409.  
  1410. Adams               Document Expiration:  25 Sept. 1997               22
  1411.  
  1412.  
  1413. 2.3.3.2. IDUP_EV Parameters
  1414.  
  1415.    The following parameter bundles are used in the "EV" protection and 
  1416.    unprotection sets of calls. 
  1417.  
  1418.    o  Nr_Options PARAMETER BUNDLE
  1419.       o  evidence_type  INTEGER {
  1420.                    no_evidence         (0)  
  1421.                    -- used when request-only token desired
  1422.                    proof_of_receipt    (1), 
  1423.                    proof_of_delivery   (2), 
  1424.                    proof_of_approval   (3), 
  1425.                    proof_of_retrieval  (4), 
  1426.                    proof_of_creation   (5), 
  1427.                    proof_of_sender     (6), 
  1428.                    proof_of_origin     (7)
  1429.          },
  1430.       o  evidence_validity_duration     INTEGER,
  1431.          -- duration_in_minutes
  1432.          -- DURATION_HOUR  = 60;
  1433.          -- DURATION_DAY   = 1440;
  1434.          -- DURATION_WEEK  = 10080; 
  1435.          -- DURATION_MONTH = 43200;// 30 days
  1436.          -- DURATION_YEAR  = 525600;//365 days
  1437.  
  1438.    o  Originator_Information PARAMETER BUNDLE
  1439.       o  token_generator_name    INTERNAL NAME,
  1440.          -- obtained from the credentials of the originator 
  1441.          -- (e.g. from its public key certificate)
  1442.       o  protection_time          UTCTime OPTIONAL.
  1443.  
  1444.    o  Bad_Target_Name  PARAMETER BUNDLE  -- same as in Section 2.3.3
  1445.       o  bad_targ_name          INTERNAL NAME, 
  1446.       o  bad_targ_status        INTEGER 
  1447.          -- a (mechanism-defined) status flag giving the reason 
  1448.          -- for rejection of the name in bad_targ_name
  1449.  
  1450.    o  Target_Info PARAMETER BUNDLE       -- same as in Section 2.3.3
  1451.       o  targ_names           SET OF INTERNAL NAME, 
  1452.       o  bad_targ_count       INTEGER, 
  1453.       o  Bad_Target_Name      PARAMETER BUNDLE 
  1454.  
  1455.    o  Request_Features PARAMETER BUNDLE
  1456.       o  requested_evidence_type  INTEGER {
  1457.                  no_evidence         (0), - used when no token desired
  1458.                  proof_of_receipt    (1), 
  1459.                  proof_of_delivery   (2), 
  1460.                  proof_of_approval   (3), 
  1461.                  proof_of_retrieval  (4) 
  1462.          },
  1463.       o  nr_req_policy                        OBJECT IDENTIFIER,
  1464.       o  evidence_from                        Target_Info,
  1465.       o  evidence_to                          Target_Info,
  1466.       o  include_received_token_in evidence   BOOLEAN
  1467.  
  1468.    The following data_type is used in the "EV" protection sets 
  1469.    of calls. 
  1470.  
  1471. Adams               Document Expiration:  25 Sept. 1997               23
  1472.  
  1473.  
  1474. o  Nr_Operation  INTEGER {
  1475.             evidence_and_or_evidence_request  (1), 
  1476.             returned_evidence                 (2) 
  1477.          }
  1478.  
  1479.  
  1480. 2.3.3.3. IDUP_EV major_status codes
  1481.  
  1482.    The following major_status return codes are defined for the "EV" 
  1483.    calls in this section:
  1484.  
  1485.    o  GSS_S_COMPLETE 
  1486.       -- indicates that the evidence is complete
  1487.    o  IDUP_S_INCOMPLETE 
  1488.    o  GSS_S_CONTINUE_NEEDED 
  1489.    o  IDUP_S_MORE_DATA_NEEDED 
  1490.    o  GSS_S_CREDENTIALS_EXPIRED 
  1491.    o  IDUP_S_NO_ENV 
  1492.    o  GSS_S_FAILURE 
  1493.  
  1494.    If Target_Info is used as an input parameter (i.e., if an 
  1495.    evidence is being requested ), the following major_status return 
  1496.    code is also defined:
  1497.  
  1498.    o  IDUP_S_BAD_TARG_INFO 
  1499.  
  1500.    Note for this return code that if one or more of the targets in 
  1501.    targ_names cannot be used as a valid recipient of the P-IDU, these 
  1502.    names will be returned in bad_targ_names (with associated status 
  1503.    codes in bad_targ_status).  As long as at least one of the targets 
  1504.    can be used, however, this does not cause this call to fail (i.e., 
  1505.    the failure code IDUP_S_BAD_TARG_INFO is not returned); it is the 
  1506.    caller's choice to discontinue IDU protection if the target set 
  1507.    which can be used is unsuitable for the caller's purposes.
  1508.    
  1509. 2.3.3.4. IDUP_EV_SingleBuffer_Generate call 
  1510.  
  1511.    Inputs:
  1512.  
  1513.    o  env_handle                 ENVIRONMENT HANDLE,
  1514.    o  nr_operation               Nr_Operation,
  1515.    o  Nr_Options                 PARAMETER BUNDLE,
  1516.    o  idu_buffer                 OCTET STRING,
  1517.    o  form_complete_evidence     BOOLEAN,
  1518.       -- if TRUE the implementation will attempt to form a complete evi.
  1519.    o  include_data_in_token      BOOLEAN,
  1520.       -- if TRUE, data provided in idu_buffer will be included in the
  1521.       -- generated token; if FALSE, the data will not be included
  1522.    o  Request_Features           PARAMETER BUNDLE
  1523.       -- the type of the evidence that is requested.
  1524.       -- policy under which the returned evidence should be generated.
  1525.       -- the recipients that are supposed to send back an evidence.
  1526.       -- the recipients that should receive the requested evidence.
  1527.       -- an indicator include_received_token_in_evidence: 
  1528.       --   if TRUE, the evidence token incorporating the request will be 
  1529.       --   included in the data for which recipients will generate 
  1530.       --   evidence; if FALSE, evidence will be generated using only 
  1531.       --   the data (and not the token incorporating the request).
  1532.  
  1533. Adams               Document Expiration:  25 Sept. 1997               24
  1534.  
  1535.    
  1536.    Outputs:
  1537.  
  1538.    o  major_status               INTEGER,
  1539.    o  minor_status               INTEGER,
  1540.    o  token                      OCTET STRING,
  1541.    o  evidence_check             OCTET STRING,
  1542.       -- present only if an evidence is requested.  Consists of data to 
  1543.       -- be used to verify the requested token(s) (if any) when they are 
  1544.       -- received.
  1545.  
  1546.    Description:
  1547.  
  1548.    This operation generates a non-repudiation token associated with the 
  1549.    data passed in an input buffer. Two kinds of operations can be 
  1550.    performed (using the Nr_Operation parameter) : 
  1551.  
  1552.    a) generating a token that includes either an evidence only, or 
  1553.       an evidence request only, or both an evidence and an evidence 
  1554.       request.
  1555.  
  1556.    b) generating a response token for some recipients that includes an 
  1557.       evidence generated as a response to a request. In that case 
  1558.       the idu_buffer is used to enter the request token that was 
  1559.       received .
  1560.  
  1561.    It is possible to request the generation of complete evidence. This 
  1562.    may succeed or fail; if it fails, a subsequent call to 
  1563.    Form_Complete_Evidence can be made. 
  1564.  
  1565.  
  1566. 2.3.3.5. IDUP_EV_SingleBuffer_Verify call 
  1567.  
  1568.    Inputs:
  1569.  
  1570.    o  env_handle                     ENVIRONMENT HANDLE,
  1571.    o  token                          OCTET STRING,
  1572.    o  idu_buffer                     OCTET STRING,
  1573.       -- if not present within the token
  1574.    o  evidence_check                 OCTET STRING,
  1575.       -- present only if the input token is a response to a previous 
  1576.       -- request for evidence (this parameter is used to validate that
  1577.       -- evidence).
  1578.  
  1579.    Outputs:
  1580.  
  1581.    o  major_status                   INTEGER,
  1582.    o  minor_status                   INTEGER,
  1583.    o  Nr_Options                     PARAMETER BUNDLE,
  1584.    o  Originator_Information         PARAMETER BUNDLE,
  1585.    o  Request_Features               PARAMETER BUNDLE,
  1586.    o  trusted_time_stamping_time     INTEGER OPTIONAL,
  1587.       -- present for informational purposes only
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594. Adams               Document Expiration:  25 Sept. 1997               25
  1595.  
  1596.    
  1597.    o  complete_evidence_before       INTEGER OPTIONAL,
  1598.       -- if the major status code that is returned is 
  1599.       -- IDUP_S_INCOMPLETE, IDUP_Form_Complete_PIDU should be called
  1600.       -- with the same token before this time. 
  1601.       --    This may be required, for example, in order to insure that 
  1602.       --    the time skew between the evidence generation time and 
  1603.       --    the trusted time service's countersignature on the evidence 
  1604.       --    falls within the interval allowed by the current NR policy. 
  1605.    o  complete_evidence_after        INTEGER OPTIONAL,
  1606.       -- if the major status code that is returned is 
  1607.       -- IDUP_S_INCOMPLETE, IDUP_Form_Complete_PIDU should be called
  1608.       -- with the same token after this time. 
  1609.       --    This may be required, for example, to insure that all 
  1610.       --    authorities involved in generating the evidence have passed 
  1611.       --    the last time at which the current NR policy allows them to 
  1612.       --    repudiate their keys.
  1613.    o  idu_buffer                     OCTET STRING
  1614.       -- if the IDU was present within the token
  1615.  
  1616.    Description:
  1617.  
  1618.    Verifies the validity and discloses the content of a nr_token.
  1619.  
  1620.    If the token containing the evidence to be verified was provided to 
  1621.    the calling application by a partner responding to the calling 
  1622.    application's request, then the calling application must pass the 
  1623.    evidence check it received when it generated the request as a 
  1624.    parameter along with the token it received from the partner. 
  1625.  
  1626.    Output indicators are provided which give guidance about the time or 
  1627.    times at which form_complete_evidence should be called; see the 
  1628.    parameter descriptions for explanations of these indicators and their 
  1629.    use. Note that the time specified by complete_evidence_before may be 
  1630.    earlier than that specified by complete_evidence_after; in this case 
  1631.    it will be necessary to call form_complete_evidence twice.
  1632.  
  1633.    Because keys can be revoked or declared compromised, the return from 
  1634.    verify_evidence cannot in all cases be a definitive valid or invalid; 
  1635.    sometimes conditionally valid may be returned, depending upon the 
  1636.    policy in use. IDUP_S_INCOMPLETE will be returned if:
  1637.  
  1638.     - the interval during which the generator of the evidence may 
  1639.       permissibly declare his key invalid has not yet expired (and 
  1640.       therefore it is possible that the evidence may be declared 
  1641.       invalid in the future), or
  1642.  
  1643.     - trusted time is required for verification, and the time obtained 
  1644.       from the token is not trusted.
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656. Adams               Document Expiration:  25 Sept. 1997               26
  1657.  
  1658.  
  1659. 2.3.3.6. IDUP_EV_MultiBuffer_StartGenerate call
  1660.  
  1661.    Inputs:
  1662.  
  1663.    o  env_handle                 ENVIRONMENT HANDLE,
  1664.    o  nr_operation               Nr_Operation,
  1665.    o  Nr_Options                 PARAMETER BUNDLE,
  1666.    o  form_complete_evidence     BOOLEAN,
  1667.    o  include_data_in_token      BOOLEAN,
  1668.    o  Request_Features           PARAMETER BUNDLE
  1669.  
  1670.    Outputs:
  1671.  
  1672.    o  major_status               INTEGER,
  1673.    o  minor_status               INTEGER,
  1674.    o  initial_pidu_buffer        OCTET STRING
  1675.       -- may be empty (depends on underlying mechanism)
  1676.  
  1677.    Description:
  1678.  
  1679.    Using the security environment referenced by env_handle, initialize 
  1680.    the data structures required to begin the generation of a token.  
  1681.    The IDU will be supplied in multiple buffers to the 
  1682.    IDUP_EV_Process_Buffer call). Two kinds of operations can be 
  1683.    performed (using the Nr_Operation parameter) : 
  1684.  
  1685.      a) generating a token that includes either an evidence only, or 
  1686.         an evidence request only, or both an evidence and an evidence 
  1687.         request.
  1688.  
  1689.      b) generating a token back for some recipients that includes an 
  1690.         evidence generated as a response to a request. In that case 
  1691.         the idu_buffer is used to enter the received token. The 
  1692.         boolean include_data_in_token is ignored as the output will 
  1693.         always be contained in a single token. The Request_Features 
  1694.         are ignored in that case at this time in order to keep things 
  1695.         simple and avoid piggy-backing (that is possible in theory).
  1696.  
  1697.    It is possible to request the generation of complete evidence. This 
  1698.    may succeed or fail; if it fails, a subsequent call to 
  1699.    Form_Complete_Evidence can be made. 
  1700.  
  1701.  
  1702. 2.3.3.7. IDUP_EV_MultiBuffer_EndGenerate call
  1703.  
  1704.    Inputs:
  1705.  
  1706.    o  env_handle                 ENVIRONMENT HANDLE
  1707.  
  1708.    Outputs:
  1709.  
  1710.    o  major_status               INTEGER,
  1711.    o  minor_status               INTEGER,
  1712.    o  final_pidu                 OCTET STRING,
  1713.    o  token                      OCTET STRING,
  1714.    o  evidence_check             OCTET STRING
  1715.       -- present only if an evidence is requested.
  1716.  
  1717. Adams               Document Expiration:  25 Sept. 1997               27
  1718.  
  1719.  
  1720.    Description:
  1721.  
  1722.    Using the security environment referenced by env_handle, provide 
  1723.    the requested token or the final P-IDU. A token will be generated 
  1724.    if encapsulation was not requested; otherwise, the final P-IDU is 
  1725.    provided.
  1726.  
  1727.  
  1728. 2.3.3.8. IDUP_EV_MultiBuffer_StartVerify call
  1729.  
  1730.    Inputs:
  1731.  
  1732.    o  env_handle                     ENVIRONMENT HANDLE,
  1733.    o  token                          OCTET STRING,
  1734.    o  evidence_check                 OCTET STRING,
  1735.       -- present only if an evidence has been previously requested.
  1736.  
  1737.    Outputs:
  1738.  
  1739.    o  major_status INTEGER,
  1740.    o  minor_status INTEGER
  1741.  
  1742.    Description:
  1743.  
  1744.    Using the security environment referenced by env_handle, initialize 
  1745.    the data structures required to begin the process of verifying the 
  1746.    token.  The P-IDU will be supplied in multiple buffers to the 
  1747.    IDUP_EV_Process_Buffer call.
  1748.  
  1749.  
  1750. 2.3.3.9. IDUP_EV_MultiBuffer_EndVerify call
  1751.  
  1752.    Input:
  1753.  
  1754.    o  env_handle                     ENVIRONMENT HANDLE
  1755.  
  1756.    Outputs:
  1757.  
  1758.    o  major_status                   INTEGER,
  1759.    o  minor_status                   INTEGER,
  1760.    o  Nr_Options                     PARAMETER BUNDLE,
  1761.    o  Originator_Information         PARAMETER BUNDLE,
  1762.    o  Request_Features               PARAMETER BUNDLE,
  1763.    o  trusted_time_stamping_time     UTCTime OPTIONAL,
  1764.    o  complete_evidence_before       UTCTime OPTIONAL,
  1765.    o  complete_evidence_after        UTCTime OPTIONAL,
  1766.    o  idu_buffer                     OCTET STRING
  1767.       -- if the IDU was present within the token
  1768.  
  1769.    Description:
  1770.  
  1771.    Using the security environment referenced by env_handle, complete 
  1772.    the verification processing on the data and provide verified output 
  1773.    parameters to the caller when the major status code is either:
  1774.  
  1775.           o GSS_S_COMPLETE or 
  1776.           o IDUP_S_INCOMPLETE
  1777.  
  1778.  
  1779. Adams               Document Expiration:  25 Sept. 1997               28
  1780.  
  1781.  
  1782. 2.3.3.10. IDUP_EV_Process_Buffer call
  1783.  
  1784.    Inputs:
  1785.  
  1786.    o  env_handle         ENVIRONMENT HANDLE,
  1787.    o  input_buffer       OCTET STRING
  1788.  
  1789.    Outputs:
  1790.  
  1791.    o  major_status       INTEGER,
  1792.    o  minor_status       INTEGER,
  1793.    o  output_buffer      OCTET STRING
  1794.       -- may be zero length (depends on underlying mechanism and 
  1795.       -- corresponding Generate () call and options 
  1796.       (data_included_in_token)
  1797.  
  1798.    Description:
  1799.  
  1800.    Using the security environment referenced by env_handle, continue 
  1801.    the processing on the data in input_buffer and, if it is available,
  1802.    put any resulting output data in output_buffer. The application 
  1803.    calls this routine over and over again with new buffers of data 
  1804.    until it has processed all the data buffers of the IDU/PIDU. It 
  1805.    then calls the appropriate End() call to complete the processing.
  1806.  
  1807.  
  1808. 2.3.4. Parameter Bundles
  1809.  
  1810.    The concept of "parameter bundles" is used in the calls presented in 
  1811.    the following subsections in order to simplify their presentation and 
  1812.    (hopefully) clarify their intended purpose and use.  A parameter 
  1813.    bundle is simply a set of closely-related parameters of a call which 
  1814.    are either all used by / available to the calling application or all 
  1815.    not used by / unavailable to the calling application.  These 
  1816.    parameters may be all input parameters, all output parameters, or 
  1817.    any combination of the two.
  1818.  
  1819.    A typical use envisioned for parameter bundles in a language such as 
  1820.    C would be as a structure, where individual parameters in the bundle 
  1821.    are structure members.  The calling application wishing to use a 
  1822.    particular bundle would then allocate the appropriate structure 
  1823.    variable, assign the desired input values to the appropriate members, 
  1824.    and pass the address of the structure as the bundle "parameter".  On 
  1825.    output, the values of the appropriate output members may be read.  An 
  1826.    application not wishing to use a particular bundle (or one which is 
  1827.    satisfied with default values for all input parameters of the bundle 
  1828.    and which doesn't care about output values), can pass NULL as the 
  1829.    bundle "parameter".  From the mechanism implementor's perspective, if 
  1830.    a parameter bundle is not supported (for example, if it represents a 
  1831.    security service which is not supported by the implementation), then 
  1832.    any non-NULL value passed as the bundle parameter will generate an 
  1833.    error status return code.
  1834.  
  1835.    The following parameter bundles are used in the subsequent protection 
  1836.    and unprotection sets of calls.  A parameter preceded by "(I)" is an 
  1837.    input parameter; one preceded by "(O)" is an output parameter; one 
  1838.    preceded by neither is an input if the bundle itself is an input and 
  1839.    is an output if the bundle itself is an output; one preceded by "(X)" 
  1840.    is the opposite:  an output if the bundle itself is an input and an 
  1841.    input if the bundle itself is an output.
  1842.  
  1843. Adams               Document Expiration:  25 Sept. 1997               29
  1844.  
  1845.  
  1846.       o Mech_Specific_Info PARAMETER BUNDLE
  1847.         -- actual parameters included in this bundle are defined by (and 
  1848.         -- specific to) the underlying mechanism 
  1849.  
  1850.  
  1851.       o Sensitivity PARAMETER BUNDLE, 
  1852.         -- actual parameters included in this bundle are defined by (and 
  1853.         -- specific to) the underlying mechanism, but may include 
  1854.         -- codified values for "Unclassified", "Secret", "Top Secret", 
  1855.         -- and so on 
  1856.  
  1857.  
  1858.       o Service_Creation_Info PARAMETER BUNDLE 
  1859.         -- actual parameters included in this bundle are defined by (and 
  1860.         -- specific to) the underlying mechanism, but it is mandatory 
  1861.         -- that they include at least service_id and Quality 
  1862.  
  1863.  
  1864.       o Service_Verification_Info PARAMETER BUNDLE 
  1865.         -- actual parameters included in this bundle are defined by (and 
  1866.         -- specific to) the underlying mechanism, but it is mandatory 
  1867.         -- that they include at least service_id and Quality 
  1868.  
  1869.  
  1870.       o  Quality PARAMETER BUNDLE 
  1871.          o  qop_algs UNSIGNED INTEGER, 
  1872.          o  validity UNSIGNED INTEGER, 
  1873.             -- protection guaranteed to be valid until time specified 
  1874.          o  policy_id OBJECT IDENTIFIER, 
  1875.             -- security policy under which protection is/was carried out 
  1876.          o  allow_policy_mapping BOOLEAN, 
  1877.             -- determines whether mapping between policy IDs is allowed 
  1878.          o  actual_policy_time INTEGER
  1879.             -- time at which the above policy rules came into effect
  1880.  
  1881.       o  Idu_Information PARAMETER BUNDLE, 
  1882.          o  idu_type_oid OBJECT IDENTIFIER, 
  1883.          o  idu_type_string OCTET STRING, 
  1884.          o  idu_title OCTET STRING, 
  1885.          o  idu_sensitivity Sensitivity, 
  1886.          o  pidu_type_oid OBJECT IDENTIFIER, 
  1887.          o  pidu_type_string OCTET STRING, 
  1888.          o  pidu_title OCTET STRING, 
  1889.          o  pidu_sensitivity Sensitivity, 
  1890.  
  1891.  
  1892.       o  Prot_Information PARAMETER BUNDLE, 
  1893.          o  originator_name INTERNAL NAME, 
  1894.          o  idu_information Idu_Information, 
  1895.          o  protection_time INTEGER, 
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907. Adams               Document Expiration:  25 Sept. 1997               30
  1908.  
  1909.  
  1910.       o  Special_Conditions PARAMETER BUNDLE, 
  1911.          o  prot_oper_id INTEGER, 
  1912.          o  form_complete_evidence BOOLEAN,
  1913.             -- input to protection operations for evidence generation 
  1914.          o  pidu_in_solic_service BOOLEAN,
  1915.             -- in protection operations, used as input for service
  1916.             -- solicitation to request that receiver include the 
  1917.             -- received PIDU when generating the response.  In unprot. 
  1918.             -- operations, used as output to inform receiver that PIDU 
  1919.             -- should be included when generating the response.
  1920.          o  use_trusted_time BOOLEAN, 
  1921.          o  use_untrusted_time BOOLEAN, 
  1922.  
  1923.  
  1924.       o  Bad_Target_Name PARAMETER BUNDLE, 
  1925.          o  (O) bad_targ_name INTERNAL NAME, 
  1926.          o  (O) bad_targ_status INTEGER, 
  1927.                 -- a (mechanism-defined) status flag giving the reason 
  1928.                 -- for rejection of the name in bad_targ_name
  1929.                 -- Example reasons may include:
  1930.                 --    SYNTAX_INVALID 
  1931.                 --       the syntax of the name is invalid;
  1932.                 --    NAME_UNRECOGNIZED 
  1933.                 --       the name is not recognized;
  1934.                 --    NAME_AMBIGUOUS 
  1935.                 --       the name cannot be resolved;
  1936.                 --    ACCESS_DENIED 
  1937.                 --       access to this target is denied;
  1938.                 --    CERTIFICATE_NOT_FOUND 
  1939.                 --       the encryption certificate of the target could 
  1940.                 --       not be found.
  1941.  
  1942.       o  Target_Info PARAMETER BUNDLE, 
  1943.          o      targ_names SET OF INTERNAL NAME, 
  1944.          o  (O) bad_targ_count INTEGER, 
  1945.          o  (O) bad_target_name Bad_Target_Name, 
  1946.  
  1947.  
  1948.       o  General_Service_Data PARAMETER BUNDLE, 
  1949.          o      target_info Target_Info, 
  1950.          o  (X) unencapsulated_token OCTET STRING, 
  1951.                 -- zero length if encapsulation_request is TRUE 
  1952.          o  (O) minor_status INTEGER, 
  1953.  
  1954.  
  1955.    Three types of protection services are defined in IDUP.  These are 
  1956.  
  1957.       1. perform unsolicited service (i.e., act on a locally-generated 
  1958.          service request), 
  1959.       2. perform solicited service (i.e., act on a remotely-generated 
  1960.          service request), and 
  1961.       3. perform service solicitation (i.e., send a service request to 
  1962.          the remote end).
  1963.  
  1964.    As an originator, applying data confidentiality with data integrity, 
  1965.    or data origin authentication with data integrity, or proof of origin 
  1966.    evidence is an example of service type 1.  As a target, creating a 
  1967.    proof of delivery (i.e., receipt) evidence token as the result of a 
  1968.    request received from the originator is an example of service type 2.  
  1969.    Finally, as an originator, submitting a request that one or more 
  1970.    targets return a receipt for the data sent is an example of service 
  1971.    type 3.
  1972.  
  1973. Adams               Document Expiration:  25 Sept. 1997               31
  1974.  
  1975.  
  1976.    The first four parameters in the Prot_Service parameter bundle 
  1977.    pertain to all service types; the fifth parameter is used if and only 
  1978.    if service type 2 is desired; parameters 6-8 are used if and only if 
  1979.    service type 3 is desired. 
  1980.  
  1981.       o  Prot_Service PARAMETER BUNDLE
  1982.          o  (I) prot_service_type INTEGER, 
  1983.          o  (I) service_id OBJECT IDENTIFIER, 
  1984.          o  (I) quality Quality, 
  1985.                 -- NULL specifies default Quality
  1986.          o  (I) general_service_data General_Service_Data, 
  1987.          o  (I) service_creation_info Service_Creation_Info,
  1988.          o  (I) service_to SET OF INTERNAL NAME,
  1989.          o  (O) service_verification_info Service_Verification_Info, 
  1990.          o  (O) service_verification_info_id INTEGER, 
  1991.  
  1992.    Also, three types of unprotection services are defined.  These are
  1993.  
  1994.       1. receive unsolicited service (i.e., process unrequested 
  1995.          remotely-generated service), 
  1996.       2. receive solicited service (i.e., process remotely-generated 
  1997.          response to locally-generated request), and 
  1998.       3. receive service solicitation (i.e., process req. from rem. end)
  1999.  
  2000.    As a target, unprotecting an encrypted message, or verifying the 
  2001.    originator's proof of origin is an example of service type 1.  As an 
  2002.    originator, verifying a proof of delivery which you requested from a 
  2003.    target is an example of service type 2.  Finally, as a target, 
  2004.    receiving a request from an originator for a proof of delivery is an 
  2005.    example of service type 3.
  2006.  
  2007.    The first four parameters in the Unprot_Service parameter bundle 
  2008.    pertain to all service types; parameters 5-6 are used if and only if 
  2009.    service type 2 is required; parameters 7-8 are used only if service 
  2010.    type 3 is required.
  2011.  
  2012.       o  Unprot_Service PARAMETER BUNDLE
  2013.          o  (O) unprot_service_type INTEGER, 
  2014.          o  (O) service_id OBJECT IDENTIFIER, 
  2015.          o  (O) quality Quality, 
  2016.                 -- actual Quality specified (never NULL)
  2017.          o  (O) general_service_data General_Service_Data, 
  2018.          o  (O) service_verification_info_id INTEGER, 
  2019.          o  (I) service_verification_info Service_Verification_Info, 
  2020.          o  (O) service_to SET OF INTERNAL NAME,
  2021.          o  (O) service_creation_info Service_Creation_Info,
  2022.  
  2023. 2.3.5. IDUP_Start_Protect call
  2024.  
  2025.    Inputs:
  2026.  
  2027.    o  env_handle ENVIRONMENT HANDLE,
  2028.    o  Mech_Specific_Info PARAMETER BUNDLE, 
  2029.       -- NULL selects the mechanism-defined default values 
  2030.    o  Idu_Information PARAMETER BUNDLE,
  2031.    o  Special_Conditions PARAMETER BUNDLE, 
  2032.    o  encapsulation_request BOOLEAN, 
  2033.    o  single_idu_buffer OCTET STRING,
  2034.       -- non-zero length for this buffer means that Protect/End_Protect 
  2035.       -- won't be called (i.e., entire IDU is contained in this buffer)
  2036.    o  Target_Info PARAMETER BUNDLE, 
  2037.    o  Services_to_Perform SET OF Prot_Service, 
  2038.  
  2039. Adams               Document Expiration:  25 Sept. 1997               32
  2040.  
  2041.  
  2042. Outputs:
  2043.  
  2044.    o  major_status INTEGER,
  2045.    o  minor_status INTEGER,
  2046.    o  midu_buffer OCTET STRING,
  2047.       -- zero length if encapsulation_request is TRUE; 
  2048.       -- may be zero length otherwise (depends on underlying mechanism) 
  2049.    o  pidu_buffer OCTET STRING, 
  2050.       -- zero length if encapsulation_request is FALSE; 
  2051.       -- may be zero length otherwise (depends on underlying mechanism) 
  2052.  
  2053.  
  2054.    Return major_status codes:
  2055.  
  2056.    o  GSS_S_COMPLETE 
  2057.       -- the protection process can begin (or has completed, if 
  2058.       -- single_idu_buffer has non-zero length).
  2059.    o  GSS_S_CONTINUE_NEEDED 
  2060.    o  GSS_S_CREDENTIALS_EXPIRED 
  2061.    o  IDUP_S_NO_ENV 
  2062.    o  IDUP_S_ENCAPSULATION_UNAVAIL 
  2063.    o  IDUP_S_MORE_DATA_NEEDED 
  2064.       -- indicates whether protection is completed by this call or by 
  2065.       -- IDUP_End_Protect()  (e.g., whether more data buffers are 
  2066.       -- required for evidence generation). 
  2067.    o  IDUP_S_SERVICE_UNAVAIL 
  2068.    o  IDUP_S_REQ_TIME_SERVICE_UNAVAIL 
  2069.    o  IDUP_S_UNKNOWN_OPER_ID 
  2070.    o  GSS_S_BAD_QOP 
  2071.    o  IDUP_S_BAD_TARG_INFO 
  2072.    o  GSS_S_FAILURE
  2073.  
  2074.    Using the security environment referenced by env_handle, initialize 
  2075.    the data structures required to begin the process of protecting the 
  2076.    IDU buffers.  The caller requests specific protection services by 
  2077.    supplying the appropriate Prot_Service parameter bundles in 
  2078.    Services_to_Perform.  Each service is able to return a minor status 
  2079.    code to the calling application, if necessary.
  2080.  
  2081.    The calling application, knowing the size of the IDU it wishes to 
  2082.    protect and the buffer size which it has available to it, can choose 
  2083.    to input the entire IDU in a single buffer and omit the subsequent 
  2084.    IDUP_Protect() and IDUP_End_Protect() calls.  Furthermore, the 
  2085.    application can request that the resulting M-IDU be encapsulated in 
  2086.    the token -- so that the token contains the entire P-IDU -- rather 
  2087.    than having it be returned separately in midu_buffer.  Encapsulation, 
  2088.    however, may not be supported by all underlying mechanisms or 
  2089.    implementations; if this is the case, the 
  2090.    IDUP_S_ENCAPSULATION_UNAVAIL major status code will be returned and 
  2091.    M-IDU will be returned in midu_buffer.
  2092.  
  2093.    For those mechanisms which allow or require multiple stages of 
  2094.    processing, each producing a different aspect of protection for the 
  2095.    IDU, the operation identifier prot_oper_id is used to specify 
  2096.    which stage is currently being requested by the application.  An 
  2097.    example where this would be useful is a mechanism which implements 
  2098.    the signed Message Security Protocol [MSP].  As another example, a 
  2099.    mechanism may choose to do a digital signature in two stages:  one 
  2100.    for the hashing of the message and another for the signature on the 
  2101.    hash.  The calling application would therefore use the protection set 
  2102.    of calls on the IDU in stage 1 and then use the protection set of 
  2103.    calls on the token (from stage 1) in stage 2.  
  2104.  
  2105. Adams               Document Expiration:  25 Sept. 1997               33
  2106.  
  2107.  
  2108.    Note that prot_oper_id is simply an integer (1, 2, 3, ..., n, where 
  2109.    "n" is the number of stages as defined by the mechanism (typically 1 
  2110.    or 2)).  The calling application uses this parameter to indicate to 
  2111.    the underlying mechanism whether it wishes to do stage 1 of 
  2112.    protection / unprotection processing, or stage 2, and so on.
  2113.  
  2114.    If one or more of the targets in targ_names cannot be used as a valid 
  2115.    recipient of the P-IDU, these names will be returned in 
  2116.    bad_targ_names (with associated status codes in bad_targ_status).  As 
  2117.    long as at least one of the targets can be used, this does not cause 
  2118.    this call to fail; it is the caller's choice to discontinue IDU 
  2119.    protection if the target set which can be used is unsuitable for the 
  2120.    caller's purposes.  Note that each Prot_Service parameter bundle can 
  2121.    also input a list of targ_names; this is used if a separate list is 
  2122.    to be used for that service only (the general list of targets is to 
  2123.    be used for all services unless overridden in this way).
  2124.  
  2125. 2.3.6. IDUP_Protect call
  2126.  
  2127.    Inputs:
  2128.  
  2129.    o  env_handle ENVIRONMENT HANDLE,
  2130.    o  input_buffer OCTET STRING,
  2131.  
  2132.    Outputs:
  2133.  
  2134.    o  major_status INTEGER,
  2135.    o  minor_status INTEGER,
  2136.    o  output_buffer OCTET STRING
  2137.       -- may be zero length if encapsulation_request was set to TRUE in 
  2138.       -- IDUP_Start_Protect() (depends on underlying mechanism)
  2139.  
  2140.    Return major_status codes:
  2141.  
  2142.    o  GSS_S_COMPLETE 
  2143.    o  IDUP_S_NO_ENV 
  2144.    o  GSS_S_FAILURE 
  2145.  
  2146.    Using the security environment referenced by env_handle, continue the 
  2147.    protection processing on the data in input_buffer and, if the 
  2148.    underlying mechanism defines this, put any resulting P-IDU/M-IDU data 
  2149.    in output_buffer.  The application calls this routine over and over 
  2150.    again with new buffers of data until it has protected all the data 
  2151.    buffers of the IDU.  It then calls IDUP_End_Protect() to complete the 
  2152.    protection processing.
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170. Adams               Document Expiration:  25 Sept. 1997               34
  2171.  
  2172.  
  2173. 2.3.7. IDUP_End_Protect call
  2174.  
  2175.    Inputs:
  2176.  
  2177.    o  env_handle ENVIRONMENT HANDLE,
  2178.  
  2179.    Outputs:
  2180.  
  2181.    o  major_status INTEGER,
  2182.    o  minor_status INTEGER,
  2183.    o  Services_to_Perform SET OF Prot_Service, 
  2184.    o  final_midu_buffer OCTET STRING,
  2185.       -- zero length if encapsulation_request was set to TRUE in 
  2186.       -- IDUP_Start_Protect(), in which case pidu is used
  2187.    o  final_pidu_buffer OCTET STRING,
  2188.       -- zero length if encapsulation_request was set to FALSE in 
  2189.       -- IDUP_Start_Protect(), in which case token and midu are used
  2190.  
  2191.  
  2192.    Return major_status codes:
  2193.  
  2194.    o  GSS_S_COMPLETE 
  2195.       -- protection has successfully completed and the resulting P-IDU 
  2196.       -- is ready for transfer.  If defined by the underlying mechanism, 
  2197.       -- final_midu_buffer will contain any residual M-IDU data.
  2198.    o  GSS_S_CONTINUE_NEEDED 
  2199.    o  IDUP_S_NO_ENV 
  2200.    o  GSS_S_FAILURE 
  2201.  
  2202.  
  2203.    Using the security environment referenced by env_handle, complete the 
  2204.    protection processing on the data and place the computed output in 
  2205.    final_pidu_buffer (or final_midu_buffer and the unencapsulated_token 
  2206.    parameter for each Prot_Service).  If a service was requested from 
  2207.    one or more targets in Start_Protect() - and if this is supported by 
  2208.    the underlying mechanism - Service_Verification_Info will hold 
  2209.    whatever data is necessary for the mechanism to verify a service 
  2210.    returned by a target (unprotector) of the P-IDU.  Successful 
  2211.    application of IDUP_End_Protect() does not guarantee that the 
  2212.    corresponding unprotection set of calls can necessarily be performed 
  2213.    successfully when the P-IDU arrives at the target (for example, it 
  2214.    may be damaged in transit).
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235. Adams               Document Expiration:  25 Sept. 1997               35
  2236.  
  2237.  
  2238. 2.3.8. IDUP_Start_Unprotect call
  2239.  
  2240.    Inputs:
  2241.  
  2242.    o  env_handle ENVIRONMENT HANDLE,
  2243.    o  Mech_Specific_Info PARAMETER BUNDLE, 
  2244.       -- NULL selects the mechanism-defined default values 
  2245.    o  single_data_buffer OCTET STRING,
  2246.       -- non-zero length for this buffer means that IDUP_Unprotect() and 
  2247.       -- IDUP_End_Unprotect() will not be called (i.e., the entire P-IDU 
  2248.       -- (if encapsulation is used) or M-IDU (if encap. is not used) 
  2249.       -- is contained in this buffer) 
  2250.    o  partial_pidu_buffer OCTET STRING,
  2251.       -- may be an arbitrary-sized piece of the full pidu (if the 
  2252.       -- application's buffer isn't large enough to hold entire pidu). 
  2253.       -- Used if pidu_buffer will be input a buffer at a time (except 
  2254.       -- that the final buffer must be passed in final_pidu_buffer 
  2255.       -- rather than partial_pidu_buffer).  Only one of 
  2256.       -- single_pidu_buffer and partial(final)_pidu_buffer can have 
  2257.       -- nonzero length.
  2258.    o  final_pidu_buffer OCTET STRING,
  2259.    o  Special_Conditions PARAMETER BUNDLE, 
  2260.  
  2261.  
  2262.    Outputs:
  2263.  
  2264.    o  major_status INTEGER,
  2265.    o  minor_status INTEGER,
  2266.    o  Services_to_Receive SET OF Unprot_Service, 
  2267.    o  Prot_Information PARAMETER BUNDLE, 
  2268.    o  single_idu_buffer OCTET STRING,
  2269.       -- if this buffer has non-zero length, then service processing has 
  2270.       -- been completed on the data in single_pidu_buffer 
  2271.    o  initial_idu_buffer OCTET STRING,
  2272.       -- holds any data from partial(final)_pidu_buffer which has been 
  2273.       -- unprotected; remaining data will be returned by Unprotect and 
  2274.       -- End_Unprotect as they are called with successive buffers of 
  2275.       -- pidu 
  2276.    o  Service_Verification_Info PARAMETER BUNDLE, 
  2277.       -- used only if target is on "service_to" list in Unprot_Service 
  2278.    o  service_verification_info_id INTEGER, 
  2279.       -- used only if target is on "service_to" list in Unprot_Service 
  2280.  
  2281.  
  2282.    Return major_status codes:
  2283.  
  2284.    o  GSS_S_COMPLETE 
  2285.       -- unprotection processing can begin (or has completed, if 
  2286.       -- single_idu_buffer has non-zero length).
  2287.    o  IDUP_S_INCOMPLETE 
  2288.       -- used only if single_idu_buffer has non-zero length.
  2289.    o  GSS_S_CONTINUE_NEEDED 
  2290.    o  IDUP_S_MORE_PIDU_NEEDED  
  2291.    o  GSS_S_DEFECTIVE_TOKEN 
  2292.    o  IDUP_S_INAPPROPRIATE_CRED 
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299. Adams               Document Expiration:  25 Sept. 1997               36
  2300.  
  2301.  
  2302.    o  IDUP_S_MORE_DATA_NEEDED  
  2303.    o  GSS_S_DEFECTIVE_VERIF 
  2304.    o  IDUP_S_NO_MATCH 
  2305.    o  IDUP_S_SERVICE_UNAVAIL 
  2306.    o  IDUP_S_REQ_TIME_SERVICE_UNAVAIL 
  2307.    o  IDUP_S_SERV_VERIF_INFO_NEEDED 
  2308.    o  GSS_S_CREDENTIALS_EXPIRED 
  2309.    o  IDUP_S_NO_ENV 
  2310.    o  IDUP_S_UNKNOWN_OPER_ID 
  2311.    o  GSS_S_BAD_QOP 
  2312.       -- the qop_algs value specified in P-IDU for at least one of the 
  2313.       -- services is unavailable in the local mechanism, so processing 
  2314.       -- cannot continue.
  2315.    o  GSS_S_BAD_SIG 
  2316.    o  IDUP_S_BAD_DOA_KEY 
  2317.    o  IDUP_S_BAD_KE_KEY 
  2318.    o  IDUP_S_BAD_ENC_IDU 
  2319.    o  GSS_S_FAILURE 
  2320.  
  2321.    Using the security environment referenced by env_handle, initialize 
  2322.    the data structures required to begin the process of unprotecting a 
  2323.    P-IDU.  The caller will be alerted as to which services were applied 
  2324.    to the P-IDU in the returned Services_to_Receive set of parameters.
  2325.  
  2326.    If encapsulation was not used by the originator, it is the receiving 
  2327.    application's responsibility to separate the received P-IDU into a 
  2328.    M-IDU and one or more unencapsulated_token buffers (the latter being 
  2329.    input in separate Unprot_Service bundles in the Services_to_Receive 
  2330.    parameter).  These unencapsulated_token buffers should be input 
  2331.    before the M-IDU (i.e., in IDUP_Start_Unprotect) or after the M-IDU 
  2332.    (i.e., in IDUP_End_Unprotect) as appropriate; this order may be 
  2333.    dictated, for example, by their placement in the in-coming message.
  2334.  
  2335.    If unprotection will be applied more than once to a given P-IDU, it 
  2336.    is the responsibility of the calling application to remember if a 
  2337.    service solicitation has been responded to previously (i.e., if the 
  2338.    requested service has already been generated / sent for that P-IDU) 
  2339.    and thus ignore subsequent solicitations on unprotect. 
  2340.  
  2341.    The time flags indicate whether to consult trusted, untrusted, or no 
  2342.    time (if both flags are FALSE) during the unprotection operation.  If 
  2343.    the current time is not to be checked, then unprotection may be 
  2344.    successful even if the protector's key has expired since the P-IDU 
  2345.    was generated (that is, if the Validity period -- as specified in 
  2346.    the Quality parameter bundle -- has expired).
  2347.  
  2348.    If the underlying mechanism supports it and if this information is 
  2349.    contained in the P-IDU, information regarding the originator (that 
  2350.    is, the entity which used the protection set of calls to generate 
  2351.    this P-IDU) is returned in the Prot_Information parameter bundle.
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364. Adams               Document Expiration:  25 Sept. 1997               37
  2365.  
  2366.  
  2367. 2.3.9. IDUP_Unprotect call
  2368.  
  2369.    Inputs:
  2370.  
  2371.    o  env_handle ENVIRONMENT HANDLE,
  2372.    o  input_buffer OCTET STRING
  2373.  
  2374.    Outputs:
  2375.  
  2376.    o  major_status INTEGER,
  2377.    o  minor_status INTEGER,
  2378.    o  output_buffer OCTET STRING
  2379.  
  2380.    Return major_status codes:
  2381.  
  2382.    o  GSS_S_COMPLETE 
  2383.    o  IDUP_S_NO_ENV 
  2384.    o  GSS_S_FAILURE 
  2385.  
  2386.    Using the security environment referenced by env_handle, continue the 
  2387.    unprotection processing on the data in input_buffer, putting any 
  2388.    resulting IDU data in output_buffer (if required).
  2389.  
  2390. 2.3.10. IDUP_End_Unprotect call
  2391.  
  2392.    Inputs:
  2393.  
  2394.    o  env_handle ENVIRONMENT HANDLE,
  2395.  
  2396.    Outputs:
  2397.  
  2398.    o  major_status INTEGER,
  2399.    o  minor_status INTEGER,
  2400.    o  Prot_Information PARAMETER BUNDLE, 
  2401.    o  Services_to_Receive SET OF Unprot_Service, 
  2402.    o  final_idu_buffer OCTET STRING,
  2403.    o  Service_Verification_Info PARAMETER BUNDLE, 
  2404.       -- used only if target is on "service_to" list in Unprot_Service 
  2405.    o  service_verification_info_id INTEGER, 
  2406.       -- used only if target is on "service_to" list in Unprot_Service 
  2407.  
  2408.    Return major_status codes:
  2409.  
  2410.    o  GSS_S_COMPLETE 
  2411.       -- residual IDU data will be returned in final_idu_buffer.
  2412.    o  IDUP_S_INCOMPLETE  
  2413.    o  GSS_S_CONTINUE_NEEDED 
  2414.    o  GSS_S_BAD_SIG 
  2415.    o  IDUP_S_BAD_DOA_KEY 
  2416.    o  IDUP_S_BAD_KE_KEY 
  2417.    o  IDUP_S_BAD_ENC_IDU 
  2418.    o  IDUP_S_NO_ENV 
  2419.    o  GSS_S_FAILURE 
  2420.  
  2421.  
  2422.    Using the security environment referenced by env_handle, complete the 
  2423.    unprotection processing on the data and return the appropriate status 
  2424.    code.  If there is any residual IDU data it will be returned in 
  2425.    final_idu_buffer.
  2426.  
  2427.  
  2428.  
  2429.  
  2430. Adams               Document Expiration:  25 Sept. 1997               38
  2431.  
  2432.  
  2433.    If the IDUP_S_INCOMPLETE major status value is returned, all output 
  2434.    parameters are conditionally valid; the unprotection set of functions 
  2435.    will have to be called again (perhaps with a complete P-IDU, as 
  2436.    produced by IDUP_Form_Complete_PIDU) in order to get valid values for 
  2437.    all parameters.  "Conditional validity" may arise, for example, if 
  2438.    all relevant certificates verify correctly, but it is not yet past 
  2439.    the time up to which the current policy allows the authorities 
  2440.    involved to repudiate their keys. 
  2441.  
  2442.    If the underlying mechanism supports it and if this information is 
  2443.    contained in the token, information regarding the originator (that 
  2444.    is, the entity which used the protection set of calls to generate 
  2445.    this token) is returned in the Prot_Information parameter bundle.  
  2446.    This information may or may not be omitted if it was returned by the 
  2447.    IDUP_Start_Unprotect() call.
  2448.  
  2449.    Note that, unlike GSS-API, IDUP-GSS-API does not incorporate the 
  2450.    concept of error tokens transferred between sender and recipient 
  2451.    since the protection and unprotection of an IDU may be separated by 
  2452.    an indefinite amount of time and may or may not be performed by the 
  2453.    same entity.
  2454.  
  2455.  
  2456. 2.4. Special-Purpose Calls
  2457.  
  2458. 2.4.1.  Relationship to GSS-API
  2459.  
  2460.    The special-purpose call described in this section has no analog 
  2461.    in GSS-API [RFC-2078].  This call is used to complete a P-IDU (that 
  2462.    is, to generate a P-IDU which can be unprotected successfully with 
  2463.    no additional data at any time during its validity period).  This 
  2464.    call may not be supported by all underlying IDUP mechanisms or 
  2465.    implementations. 
  2466.  
  2467. 2.4.2. IDUP_Form_Complete_PIDU call
  2468.  
  2469.    Inputs:
  2470.  
  2471.    o  env_handle ENVIRONMENT HANDLE,
  2472.    o  single_pidu_buffer OCTET STRING, 
  2473.    o  partial_pidu_buffer OCTET STRING, 
  2474.       -- an arbitrary-sized piece of the full pidu token.  Used if pidu 
  2475.       -- will be input a buffer at a time (except that the final buffer 
  2476.       -- must be passed in final_pidu_buffer rather than 
  2477.       -- partial_pidu_buffer).  Only one of single_pidu_buffer and 
  2478.       -- partial(final)_pidu_buffer can have nonzero length.
  2479.    o  final_pidu_buffer OCTET STRING,
  2480.  
  2481.  
  2482.    Outputs:
  2483.  
  2484.    o  major_status INTEGER,
  2485.    o  minor_status INTEGER,
  2486.    o  pidu_token_out OCTET STRING 
  2487.       -- the augmented PIDU; may be complete
  2488.    o  call_again_before INTEGER,
  2489.    o  call_again_after INTEGER,
  2490.    o  trusted_time_stamping_time INTEGER
  2491.       -- for information only
  2492.  
  2493.  
  2494.  
  2495. Adams               Document Expiration:  25 Sept. 1997               39
  2496.  
  2497.  
  2498.    Return major_status codes:
  2499.  
  2500.    o  GSS_S_COMPLETE 
  2501.    o  GSS_S_CONTINUE_NEEDED 
  2502.    o  IDUP_S_INCOMPLETE 
  2503.       -- generation of the P-IDU is not yet complete.  The application 
  2504.       -- should call this function again before the time given in 
  2505.       -- call_again_before (if not NULL), or after the time given in 
  2506.       -- call_again_after (if not NULL), or both (if neither are NULL).
  2507.    o  IDUP_S_SERVICE_UNAVAIL 
  2508.    o  GSS_S_DEFECTIVE_TOKEN 
  2509.    o  GSS_S_FAILURE 
  2510.  
  2511.    Form_Complete_PIDU is used primarily by the evidence services; in 
  2512.    particular, when the evidence token itself does not contain all the 
  2513.    data required for its verification, and it is anticipated that some 
  2514.    of the data not stored in the token may become unavailable during 
  2515.    the interval between generation of the evidence token and 
  2516.    verification unless it is stored in the token. The 
  2517.    Form_Complete_PIDU operation gathers the missing information and 
  2518.    includes it in the token so that verification can be guaranteed to 
  2519.    be possible at any future time.
  2520.  
  2521.    This call generates a PIDU which can be unprotected successfully with 
  2522.    no additional data at any time during its validity period.
  2523.  
  2524.    Using the security environment referenced by env_handle, complete the 
  2525.    generation of a P-IDU token and return the appropriate status value 
  2526.    along with the completed token (if available).  Such a call may be 
  2527.    used, for example, for the purpose of batch evidence generation on an 
  2528.    "evidence server".  A local machine may be able to use the protection 
  2529.    set of calls to fill out most of an evidence token and then send a 
  2530.    number of these to a batch processor which forms the complete 
  2531.    evidence tokens (perhaps by adding a certification path, or a 
  2532.    timestamp and signature from a timestamping authority).  As another 
  2533.    example, on the receiving end an application may make such a call in 
  2534.    order to collect all the information necessary to unprotect a P-IDU 
  2535.    (such as all relevant certificates and Certificate Revocation Lists); 
  2536.    this will ensure that the calls to the unprotection set of operations 
  2537.    will be entirely local (i.e., can be performed off-line) and fast.  
  2538.  
  2539.    Note that the complete P-IDU generated will be formed using trusted 
  2540.    time if this is available in the environment referenced by env_handle 
  2541.    and will use untrusted time or no time otherwise (depending on what 
  2542.    is available).
  2543.  
  2544.  
  2545. 2.5.  Support calls
  2546.  
  2547. 2.5.1.  Relationship to GSS-API
  2548.  
  2549.    Support calls in IDUP-GSS-API are to be understood and used as 
  2550.    described in GSS-API [RFC-2078].  The calls described in Section 2.4 
  2551.    of GSS-API (including all associated parameters) are unchanged.  The 
  2552.    following additional calls are specified for IDUP-GSS-API.
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558. Adams               Document Expiration:  25 Sept. 1997               40
  2559.  
  2560.  
  2561. 2.5.2:  IDUP_Acquire_cred_with_auth call
  2562.  
  2563.    Inputs:
  2564.  
  2565.    o  desired_name INTERNAL NAME, 
  2566.       -- NULL requests locally-determined default
  2567.    o  authenticator OCTET STRING 
  2568.       -- string which authenticates the caller claiming to be 
  2569.       -- desired_name
  2570.    o  lifetime_req INTEGER,
  2571.       -- in seconds; 0 requests default
  2572.    o  desired_mechs SET OF OBJECT IDENTIFIER,
  2573.       -- empty set requests system-selected default
  2574.    o  cred_usage BIT STRING 
  2575.       -- actual values which can be used currently correspond to those 
  2576.       -- given in Section 2.1.1 (i.e., 
  2577.       --    NO_RESTRICTION 0
  2578.       --    ENCRYPT_ONLY   1
  2579.       --    DECRYPT_ONLY   2
  2580.       --    SIGN_ONLY      4
  2581.       --    VERIFY_ONLY    8
  2582.       -- with the non-zero values logically OR'ed together in any 
  2583.       -- desired combination to restrict credential usage).
  2584.       -- Future possible values for this parameter are for further 
  2585.       -- study (note that the type of this parameter is BIT STRING 
  2586.       -- (rather than INTEGER as in GSS_Acquire_cred) to facilitate 
  2587.       -- such future expansion).
  2588.  
  2589.    Outputs:
  2590.  
  2591.    o  major_status INTEGER,
  2592.    o  minor_status INTEGER,
  2593.    o  output_cred_handle CREDENTIAL HANDLE,
  2594.    o  actual_mechs SET OF OBJECT IDENTIFIER,
  2595.    o  lifetime_rec INTEGER 
  2596.       -- in seconds, or reserved value for INDEFINITE
  2597.  
  2598.    This call is identical to the GSS_Acquire_cred call, with the 
  2599.    exception of the added parameter "authenticator".  This parameter
  2600.    (typically a password, pass-phrase, or PIN) is used to 
  2601.    authenticate the caller claiming to be desired_name to the 
  2602.    underlying GSS (or mechanism) code.
  2603.  
  2604.    Implementations that are able to authenticate the caller in some
  2605.    other way are encouraged to use the GSS_Acquire_cred call;
  2606.    implementations having no other means available to them, or wishing 
  2607.    to explicitly authenticate the caller at the time of credential
  2608.    acquirement, should use the IDUP_Acquire_cred_with_auth call.
  2609.  
  2610.    Note that the return major status codes for this call are identical
  2611.    to those given for the GSS_Acquire_cred call.  If the authentication
  2612.    fails (e.g., the wrong authenticator is supplied for the given 
  2613.    desired_name), the major status GSS_S_FAILURE is returned (along with 
  2614.    an appropriate minor status code).
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622. Adams               Document Expiration:  25 Sept. 1997               41
  2623.  
  2624.  
  2625. 2.5.3. IDUP_Parse_token call
  2626.  
  2627.    Inputs:
  2628.  
  2629.    o  input_token OCTET STRING
  2630.  
  2631.    Outputs:
  2632.  
  2633.    o  major_status INTEGER,
  2634.    o  minor_status INTEGER,
  2635.    o  mech_type OBJECT IDENTIFIER,
  2636.  
  2637.  
  2638.    Return major_status codes:
  2639.  
  2640.    o  GSS_S_COMPLETE 
  2641.       -- input_token could be parsed for all relevant fields.
  2642.    o  GSS_S_CREDENTIALS_EXPIRED 
  2643.    o  GSS_S_DEFECTIVE_TOKEN 
  2644.       -- the mechanism type could be parsed, but either the other fields 
  2645.       -- could not be determined from the input_token, or their values 
  2646.       -- did not correspond to valid values for that mechanism.
  2647.    o  GSS_S_FAILURE 
  2648.       -- the mechanism type could not be parsed (for example, the 
  2649.       -- token may be corrupted).
  2650.  
  2651.    IDUP_Parse_Token() is used to return to an application the attributes 
  2652.    which correspond to a given input token.  Since IDUP-GSS-API tokens 
  2653.    are meant to be opaque to the calling application, this function 
  2654.    allows the application to determine information about the token 
  2655.    without having to violate the opaqueness intention of IDUP.  Of 
  2656.    primary importance is the mechanism type, which the application can 
  2657.    then use as input to the IDUP_Establish_Env() call in order to 
  2658.    establish the correct environment in which to have the token 
  2659.    processed.  Other token attributes may be added as outputs of this 
  2660.    call in future versions of this specification, if required (see 
  2661.    IDUP_Get_token_details below).
  2662.  
  2663.    If all tokens are framed as suggested in Section 3.1 of [RFC-2078] 
  2664.    (mandated in the Kerberos V5 GSS mechanism [RFC 1964] and in the SPKM 
  2665.    GSS Mechanism [RFC 2025]), then any mechanism implementation should 
  2666.    be able to return the mech_type parameter for any uncorrupted input 
  2667.    token.  If the mechanism implementation whose IDUP_Parse_token() 
  2668.    function is being called does recognize the token, it can return 
  2669.    other token attributes, if specified.
  2670.  
  2671.  
  2672.    The call IDUP_Get_token_details is an extension to IDUP_Parse_token 
  2673.    in that a number of token attributes are returned when the mech_type 
  2674.    is recognized.  The attributes described are specific to the 
  2675.    processing of evidence tokens; in future versions of this 
  2676.    specification it may be desirable to add parameters for integrity and 
  2677.    confidentiality services so that IDUP_Get_token_details is a more
  2678.    general-purpose call.  At such a time it may make sense to phase out 
  2679.    the IDUP_Parse_token call, since its functionality would be subsumed 
  2680.    by IDUP_Get_token_details.
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687. Adams               Document Expiration:  25 Sept. 1997               42
  2688.  
  2689.  
  2690. 2.5.4. IDUP_Get_token_details call
  2691.  
  2692.    Inputs:
  2693.  
  2694.    o  token                              OCTET STRING
  2695.    -- all the data to be returned shall be at the beginning of the 
  2696.    -- token; hence, a single call is needed. It is not necessary to 
  2697.    -- provide the entire token when the token includes the IDU.
  2698.  
  2699.    Ouputs:
  2700.  
  2701.    o  major_status                       INTEGER,
  2702.    o  minor_status                       INTEGER,
  2703.    o  mech_type                          OBJECT IDENTIFIER,
  2704.    o  data_included_in_token             BOOLEAN,
  2705.       -- true if the data is encapsulated
  2706.    o  idu_size                           INTEGER,
  2707.    o  requested_evidence_back            BOOLEAN,
  2708.       -- true if this is an evidence generated in response to a 
  2709.       -- previously-sent request
  2710.    o  evidence_check                     OCTET STRING,
  2711.       -- meaningful if the boolean above is true
  2712.    o  nr_policy                          OBJECT IDENTIFIER,
  2713.    o  Nr_Options                         PARAMETER BUNDLE,
  2714.    o  Originator_Information             PARAMETER BUNDLE,
  2715.    o  Request_Features                   PARAMETER BUNDLE,
  2716.       -- describes the included request, if any.
  2717.    o  time_stamping_time                 INTEGER  OPTIONAL
  2718.  
  2719.    Description:
  2720.  
  2721.    IDUP_Get_token_details gives only an hint about the content of the 
  2722.    token, there is no integrity check of any kind performed. When the 
  2723.    token contains an evidence it is possible to check that this 
  2724.    information is correct only by doing a proper verification of the 
  2725.    evidence.
  2726.  
  2727.    The OID of the mechanism and whether the token contains the 
  2728.    associated data is returned. In addition the size of the associated 
  2729.    data, whether inside or outside the token, is included.
  2730.  
  2731.    When the input token contains only an evidence generated 
  2732.    spontaneously, the following is returned:
  2733.  
  2734.     - the evidence type, 
  2735.     - the Non-Repudiation policy under which the evidence has been 
  2736.       generated, 
  2737.     - the name of the generator of the evidence, 
  2738.     - the date and time when the evidence was generated (if available), 
  2739.     - the date and time when it was time stamped (if available)
  2740.  
  2741.    When the input token contains only an evidence generated in response 
  2742.    to  a request from another entity, the following additional 
  2743.    information is returned:
  2744.  
  2745.     - an indicator to state that this evidence relates to a request,
  2746.     - a string significant for the requester that will allow him to 
  2747.       check whether the answer corresponds to the requested evidence.
  2748.  
  2749. Adams               Document Expiration:  25 Sept. 1997               43
  2750.  
  2751.  
  2752.    When the input token only contains a request, the following is 
  2753.    returned:
  2754.  
  2755.     - the name of the requestor of the evidence, 
  2756.     - the date and time when the request was made,
  2757.     - the evidence type to send back, 
  2758.     - the non-repudiation policy under which the evidence to send back 
  2759.       should be generated,
  2760.     - the names of the recipients which should generate and distribute 
  2761.       the requested evidence, 
  2762.     - the names of the recipients to whom the requested evidence should 
  2763.       be sent after it has been generated.
  2764.  
  2765.    When the input token contains both evidence and a request, an 
  2766.    indicator is returned describing whether the new evidence should be 
  2767.    generated using only the data in the input token, or using both the 
  2768.    data and the evidence in the input token.
  2769.  
  2770.  
  2771. 2.5.5. IDUP_Get_policy_info call
  2772.  
  2773.    Inputs:
  2774.  
  2775.    o  policy_id OBJECT IDENTIFIER
  2776.  
  2777.    Outputs:
  2778.  
  2779.    o  major_status INTEGER,
  2780.    o  minor_status INTEGER,
  2781.    o  policy_version INTEGER,
  2782.    o  policy_effective_time INTEGER,
  2783.    o  policy_expiry_time INTEGER,
  2784.    o  supported_services SET OF Service_Descriptor,
  2785.    o  supported_mechanisms SET OF Mechanism_Descriptor
  2786.  
  2787.  
  2788.    Return major_status codes:
  2789.  
  2790.    o  GSS_S_COMPLETE 
  2791.       -- policy_id recognized; all relevant fields have been returned.
  2792.    o  GSS_S_FAILURE 
  2793.       -- the policy_id was not recognized.
  2794.  
  2795.  
  2796.    This call (which need not be supported by all underlying mechanisms 
  2797.    or implementations) allows the application to retrieve information 
  2798.    pertaining to a given policy_id.  Policies define the following:  
  2799.  
  2800.       -  rules for the protection of IDUs, such as trusted third 
  2801.          parties which may be involved in P-IDU generation, the roles 
  2802.          in which they may be involved, and the duration for which the 
  2803.          generated P-IDU is valid;
  2804.  
  2805.       -  rules for the unprotection of P-IDUs, such as the interval 
  2806.          during which a trusted third party may legitimately declare its 
  2807.          key to have been compromised or revoked; and 
  2808.  
  2809.       -  rules for adjudication, such as which authorities may be used 
  2810.          to adjudicate disputes.
  2811.  
  2812. Adams               Document Expiration:  25 Sept. 1997               44
  2813.  
  2814.  
  2815.    The policy itself may be used by an adjudicator when resolving a 
  2816.    dispute.  For example, the adjudicator might refer to the policy to 
  2817.    determine whether the rules for generation of the P-IDU have been 
  2818.    followed.
  2819.  
  2820.    The following parameter bundles are associated with this call.  
  2821.  
  2822.       o  Service_Descriptor PARAMETER BUNDLE, 
  2823.          o  service_type OBJECT IDENTIFIER, 
  2824.          o  service_validity_duration INTEGER, 
  2825.          o  must_use_trusted_time BOOLEAN 
  2826.  
  2827.       o  Mechanism_Descriptor PARAMETER BUNDLE, 
  2828.          o  mechanism_type OBJECT IDENTIFIER, 
  2829.          o  Authority_List PARAMETER BUNDLE, 
  2830.          o  maximum_time_skew INTEGER 
  2831.             -- maximum permissible difference between P-IDU generation 
  2832.             -- time and the time of countersignature from a time 
  2833.             -- service (if required).  This parameter is unused if 
  2834.             -- trusted time is not required.
  2835.  
  2836.       o  Authority_List PARAMETER BUNDLE, 
  2837.          o  authority_name INTERNAL NAME, 
  2838.          o  authority_role OCTET STRING, 
  2839.          o  last_revocation_check_offset INTEGER 
  2840.             -- may be greater than 0 or less than 0.  The value of  
  2841.             -- this parameter is added to P-IDU generation time to 
  2842.             -- get latest time at which the mechanism will check to 
  2843.             -- see if this authority's key has been revoked.
  2844.  
  2845.    An example of the use of the last parameter in Authority_List is as 
  2846.    follows.  If an authority has a defined last_revocation_check_offset 
  2847.    of negative one hour, then all revocations taking effect earlier than 
  2848.    one hour before the generation of a P-IDU will render that P-IDU 
  2849.    invalid; no revocation taking place later than one hour before the 
  2850.    generation of the P-IDU will affect the P-IDU's validity.  
  2851.  
  2852.    Note that both the maximum_time_skew and the 
  2853.    last_revocation_check_offset values are given in minutes.
  2854.  
  2855.  
  2856. 3.  Related Activities
  2857.  
  2858.    In order to implement the IDUP-GSS-API atop existing, emerging, and 
  2859.    future security mechanisms, the following is necessary:
  2860.  
  2861.     - object identifiers must be assigned to candidate IDUP-GSS-API
  2862.       mechanisms and the name types which they support; and 
  2863.  
  2864.     - concrete data element (i.e., token and parameter bundle) formats 
  2865.       must be defined for candidate mechanisms.
  2866.  
  2867.    Calling applications must implement formatting conventions which will
  2868.    enable them to distinguish IDUP-GSS-API P-IDUs from other 
  2869.    IDUs in their environment.
  2870.  
  2871.    Concrete language bindings are required for the programming
  2872.    environments in which the IDUP-GSS-API is to be employed; such a 
  2873.    binding for the C language is available in the Internet Draft 
  2874.    [IDUP-C].
  2875.  
  2876. Adams               Document Expiration:  25 Sept. 1997               45
  2877.  
  2878.  
  2879. 4.  Acknowledgments
  2880.  
  2881.    Many thanks are due to Tim Moses and Dhanya Thakkar of Entrust  
  2882.    Technologies, Denis Pinkas of Bull, and David Kurn of Tandem 
  2883.    Computers for a number of helpful comments and contributions.
  2884.  
  2885.  
  2886.  
  2887. 5. Security Considerations
  2888.  
  2889.    Security issues are discussed throughout this memo.
  2890.  
  2891.  
  2892.  
  2893. 6. REFERENCES
  2894.  
  2895.    [MSP]:       U.S. National Security Agency, "Message Security 
  2896.    Protocol", Secure Data Network System SDN.701, March 1994.
  2897.  
  2898.    [RFC-1421]:  J. Linn, "Privacy Enhancement for Internet Electronic 
  2899.    Mail:  Part I: Message Encryption and Authentication Procedures", 
  2900.    RFC 1421.
  2901.  
  2902.    [RFC-2078]:  J. Linn, "Generic Security Service Application Program 
  2903.    Interface, Version 2", RFC 2078.
  2904.  
  2905.    [RFC 1964]:  J. Linn, "The Kerberos Version 5 GSS-API Mechanism",  
  2906.    RFC 1964.
  2907.  
  2908.    [RFC 2025]:  C. Adams, "The Simple Public-Key GSS-API Mechanism 
  2909.    (SPKM)", RFC 2025.
  2910.  
  2911.    [IDUP-C]:    D. Thakkar, D. Grebovich, "Independent Data Unit 
  2912.    Protection Generic Security Service Application Program Interface: C-
  2913.    bindings", Internet Draft draft-ietf-cat-idup-cbind-0x.txt (work in 
  2914.    progress).
  2915.  
  2916.    [ISO/IEC]:   2nd ISO/IEC CD 13888-1, "Information technology - 
  2917.    Security techniques - Non-repudiation - Part 1:  General Model", 
  2918.    ISO/IEC JTC 1/SC 27, May 30, 1995
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929. 7. Author's Address
  2930.  
  2931.    Carlisle Adams
  2932.    Entrust Technologies
  2933.    P.O.Box 3511, Station C
  2934.    Ottawa, Ontario, CANADA  K1Y 4H7
  2935.  
  2936.    Phone:  +1 613.763.9008
  2937.    E-mail: cadams@entrust.com
  2938.  
  2939.  
  2940. Adams               Document Expiration:  25 Sept. 1997               46
  2941.  
  2942.  
  2943. APPENDIX  A
  2944.  
  2945. MECHANISM-INDEPENDENT TOKEN FORMAT
  2946.  
  2947.    This appendix specifies the use, for IDUP-GSS-API tokens, of the 
  2948.    mechanism-independent level of encapsulating representation for 
  2949.    tokens given in Section 3.1 of GSS-API [RFC-2078].  The 
  2950.    representation given there incorporates an identifier of the 
  2951.    mechanism type to be used when processing the associated tokens.  
  2952.    Use of that octet format is recommended to the designers of 
  2953.    IDUP-GSS-API implementations based on various mechanisms so that 
  2954.    tokens can be interpreted unambiguously at IDUP-GSS-API peers. It is
  2955.    recognized, however, that for interoperability purposes with peers
  2956.    not using IDUP for specific IDU protection/unprotection protocols,
  2957.    the encapsulating representation may need to be omitted.
  2958.  
  2959.    For purely descriptive purposes, the following simple ASN.1 structure 
  2960.    is used to illustrate the structural relationships among token and 
  2961.    tag objects.  For interoperability purposes, token and tag encoding 
  2962.    shall be performed using the concrete encoding procedures described 
  2963.    in Section 3.1 of GSS-API [RFC-2078].
  2964.  
  2965.  
  2966.           -- top-level token definition to frame different mechanisms
  2967.  
  2968.           IDUP-GSS-API DEFINITIONS ::=
  2969.           BEGIN
  2970.           MechType ::= OBJECT IDENTIFIER
  2971.  
  2972.           Token ::= [APPLICATION 0] IMPLICIT SEQUENCE {
  2973.                   thisMech MechType,
  2974.                   token ANY DEFINED BY thisMech
  2975.                      -- contents mechanism-specific
  2976.                   }
  2977.           END
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006. Adams               Document Expiration:  25 Sept. 1997               47
  3007.  
  3008.  
  3009. APPENDIX  B
  3010.  
  3011. EXAMPLES OF IDUP USE
  3012.  
  3013.    This appendix provides examples of the use of IDUP to do IDU protec-
  3014.    tion and unprotection.  It should not be regarded as constrictive to 
  3015.    implementations or as defining the only means through which 
  3016.    IDUP-GSS-API functions can be realized with particular underlying 
  3017.    technology, and does not demonstrate all IDUP-GSS-API features.
  3018.  
  3019.  
  3020. B.1.  Simple Mechanism, Single Buffer
  3021.  
  3022.    To illustrate the simplest possible case, consider an underlying IDUP 
  3023.    mechanism which does straightforward encryption/decryption and 
  3024.    signing/verification only; none of the other possible services, such 
  3025.    as creation of proof-of-origin evidence, requests for proof-of-
  3026.    delivery evidence, or use of trusted time, are supported.  PEM 
  3027.    [RFC-1421] is one example of a mechanism which fits this description.  
  3028.    Furthermore (again for simplicity), assume that encapsulation is 
  3029.    chosen by the calling application during IDU protection.
  3030.  
  3031.    Such a mechanism would likely use the "SE" set of IDUP-GSS-API calls.
  3032.    The following parameter bundle uses and defaults would therefore be 
  3033.    specified in the relevant IDUP mechanism document.
  3034.  
  3035.    SENDER:
  3036.  
  3037.    Set
  3038.       env_handle                           = environment handle in use;
  3039.       idu_buffer                           = data buffer;
  3040.       Target_Info.targ_names               = receiver names;
  3041.       Protect_Options                      = as necessary;
  3042.  
  3043.    Call
  3044.       IDUP_SE_SingleBuffer_Protect() with above input parameters
  3045.    Check
  3046.       major_status.  If not GSS_S_COMPLETE, check 
  3047.          minor_status, 
  3048.          Target_Info.Bad_Targ_Name, 
  3049.       (as required) for more detailed information.
  3050.  
  3051.    Send
  3052.       Output parameter pidu_buffer to receiver.
  3053.  
  3054.  
  3055.    RECEIVER (any parameters not listed below are given the value NULL):
  3056.  
  3057.    Set
  3058.       env_handle         = environment handle in use;
  3059.       pidu_buffer        = received data buffer;
  3060.  
  3061.    Call
  3062.       IDUP_SE_SingleBuffer_Unprotect() with above input parameters
  3063.    Check
  3064.       major_status.  If not GSS_S_COMPLETE, check 
  3065.          minor_status, 
  3066.       (as required) for more detailed information
  3067.  
  3068.  
  3069.  
  3070. Adams               Document Expiration:  25 Sept. 1997               48
  3071.  
  3072.  
  3073.    Utilize
  3074.       PIDU_Information.Protect_Options.Protect_Operation, 
  3075.          (to determine which services were applied by the originator)
  3076.       PIDU_Information.Protect_Options.sign_qop_alg / enc_qop_alg, 
  3077.          (to determine the corresponding qualities of the services)
  3078.       Prot_Information.originator_name,
  3079.          (to determine the name of the originator)
  3080.       Prot_Information.protection_time,
  3081.          (to determine when the IDU was protected)
  3082.       idu_buffer
  3083.          (to retrieve the unprotected data).
  3084.  
  3085.  
  3086.  
  3087. B.2.  Simple Mechanism, Single Buffer (Again)
  3088.  
  3089.    To illustrate a slight variation on the simplest possible case, 
  3090.    assume that everything is as in the previous scenario except that 
  3091.    the "SE" calls are not used.
  3092.  
  3093.    The following parameter bundle uses and defaults would therefore be 
  3094.    specified in the relevant IDUP mechanism document.
  3095.  
  3096.  
  3097.    Mech_Specific_Info
  3098.       - NOT USED (the only acceptable input, therefore, is NULL)
  3099.  
  3100.    Idu_Sensitivity
  3101.       - NOT USED (the only acceptable input, therefore, is NULL)
  3102.  
  3103.    Service_Creation_Info
  3104.       - NOT USED (the only acceptable input, therefore, is NULL)
  3105.  
  3106.    Service_Verification_Info
  3107.       - NOT USED (the only acceptable input, therefore, is NULL)
  3108.  
  3109.    Quality
  3110.       - the qop_algs parameter must be supported, with a suitable 
  3111.         DEFAULT value specified;
  3112.       - suitable DEFAULT values for validity, policy_id, and 
  3113.         allow_policy_mapping must be specified (it may be an 
  3114.         implementation option as to whether these parameters are 
  3115.         explicitly modifiable by the calling application, or whether 
  3116.         NULLs are the only acceptable input)
  3117.  
  3118.    Idu_Information
  3119.       - the idu_type parameter must have a value representing a suitable 
  3120.         IDU type (for example, in PEM a value representing the string 
  3121.         "RFC822" or some other valid "Content-Domain" would be used), 
  3122.         with a suitable DEFAULT value specified;
  3123.       - the idu_title parameter is NOT USED (the only acceptable input, 
  3124.         therefore, is NULL)
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135. Adams               Document Expiration:  25 Sept. 1997               49
  3136.  
  3137.  
  3138.    Prot_Information
  3139.       - the originator_name and idu_type (in Idu_Information) parameters 
  3140.         are read from the encapsulating information and output by 
  3141.         IDUP_Start_Unprotect;
  3142.       - all other parameters are NOT USED (and therefore NULL)
  3143.  
  3144.    Special_Conditions
  3145.       - NOT USED (the only acceptable input, therefore, is NULL)
  3146.  
  3147.    Target_Info
  3148.       - this bundle is used as described in IDUP; no DEFAULT values are 
  3149.         specified
  3150.  
  3151.    General_Service_Data
  3152.       - the unencapsulated_token parameter is used if 
  3153.         encapsulation_request is FALSE;
  3154.       - the minor_status parameter is used to return minor status values
  3155.         as specified by the mechanism document
  3156.  
  3157.    Prot_Service
  3158.       - the prot_service_type parameter may have a value of "1" 
  3159.         ("perform unsolicited service") or NULL (which specifies the 
  3160.         DEFAULT value of "1");
  3161.       - the service_id parameter must have a value representing 
  3162.         "PER_CONF" or "PER_DOA";
  3163.       - the parameters Service_Creation_Info, service_to, 
  3164.         Service_Verification_Info, and service_verification_info_id are
  3165.         NOT USED (and therefore NULL)
  3166.  
  3167.    Unprot_Service
  3168.       - the unprot_service_type parameter will always have a value of 
  3169.         "1" ("receive unsolicited service");
  3170.       - the service_id parameter will have a value representing 
  3171.         "REC_CONF" or "REC_DOA";
  3172.       - the parameters service_verification_info_id, 
  3173.         Service_Verification_Info, service_to, and 
  3174.         Service_Creation_Info, are NOT USED (and therefore NULL)
  3175.  
  3176.  
  3177.  
  3178.    Assuming that the calling application has only a single buffer of 
  3179.    data to protect/unprotect, the following sequence of operations must 
  3180.    be performed by the sender and receivers (subsequent to environment 
  3181.    establishment).
  3182.  
  3183.  
  3184.    SENDER (any parameters not listed below are given the value NULL):
  3185.  
  3186.    Set
  3187.       env_handle                           = environment handle in use;
  3188.       encapsulation_request                = TRUE;
  3189.       single_idu_buffer                    = data buffer;
  3190.       Target_Info.targ_names               = receiver names;
  3191.       P_Services.Prot_Service_1.service_id = PER_CONF;
  3192.       P_Services.Prot_Service_2.service_id = PER_DOA;
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200. Adams               Document Expiration:  25 Sept. 1997               50
  3201.  
  3202.  
  3203.    Call
  3204.       IDUP_Start_Protect() with above input parameters
  3205.    Check
  3206.       major_status.  If not GSS_S_COMPLETE, check 
  3207.          minor_status, 
  3208.          Target_Info.bad_targ_names / Target_Info.bad_targ_status, 
  3209.          P_Services.Prot_Service_1.General_Service_Data.minor_status,
  3210.          P_Services.Prot_Service_2.General_Service_Data.minor_status
  3211.       (as required) for more detailed information.
  3212.  
  3213.    Send
  3214.       Output parameter pidu_buffer to receiver.
  3215.  
  3216.  
  3217.    RECEIVER (any parameters not listed below are given the value NULL):
  3218.  
  3219.    Set
  3220.       env_handle         = environment handle in use;
  3221.       single_pidu_buffer = received data buffer;
  3222.  
  3223.    Call
  3224.       IDUP_Start_Unprotect() with above input parameters
  3225.    Check
  3226.       major_status.  If not GSS_S_COMPLETE, check 
  3227.          minor_status, 
  3228.          R_Services.Unprot_Service_1.General_Service_Data.minor_status,
  3229.          R_Services.Unprot_Service_2.General_Service_Data.minor_status
  3230.       (as required) for more detailed information
  3231.  
  3232.    Utilize
  3233.       R_Services.Unprot_Service_1/2.service_id, 
  3234.          (to determine which services were applied by the originator)
  3235.       R_Services.Unprot_Service_1/2.Quality, 
  3236.          (to determine the corresponding qualities of the services)
  3237.       Prot_Information.originator_name,
  3238.          (to determine the name of the originator)
  3239.       single_idu_buffer
  3240.          (to retrieve the unprotected data).
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266. Adams               Document Expiration:  25 Sept. 1997               51
  3267.  
  3268.  
  3269. B.3.  Simple Mechanism, Multiple Buffers
  3270.  
  3271.    To illustrate the next step up in complexity, consider the use of the 
  3272.    simple IDUP mechanism described in B.2 above with multiple data 
  3273.    buffers.  In particular, consider the case in which a large data file 
  3274.    is to be signed.  For this example, assume that the calling 
  3275.    application does not wish to use encapsulation.
  3276.  
  3277.    Note that the parameter bundle uses and defaults are as specified in 
  3278.    B.2. above.
  3279.  
  3280.  
  3281.    SENDER (any parameters not listed below are given the value NULL):
  3282.  
  3283.    Set
  3284.       env_handle                           = environment handle in use;
  3285.       encapsulation_request                = FALSE;
  3286.       P_Services.Prot_Service.service_id   = PER_DOA;
  3287.  
  3288.    Call
  3289.       IDUP_Start_Protect() with above input parameters
  3290.    Check
  3291.       major_status.  If not GSS_S_COMPLETE, check 
  3292.          minor_status, 
  3293.          P_Services.Prot_Service.General_Service_Data.minor_status
  3294.       (as required) for more detailed information.
  3295.  
  3296.    For each buffer of input data:
  3297.       Set
  3298.          input_buffer = buffer
  3299.       Call
  3300.          IDUP_Protect() with above input parameter
  3301.       Check
  3302.          major_status.  If not GSS_S_COMPLETE, check 
  3303.             minor_status
  3304.  
  3305.    Call
  3306.       IDUP_End_Protect()
  3307.    Check
  3308.       major_status.  If not GSS_S_COMPLETE, check 
  3309.          minor_status, 
  3310.          P_Services.Prot_Service.General_Service_Data.minor_status
  3311.       (as required) for more detailed information.
  3312.  
  3313.    Send
  3314.       P_Services.Prot_Service.General_Service_Data.unencapsulated_token,
  3315.       and the file for which the signature was calculated (if required),
  3316.       to receiver.
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331. Adams               Document Expiration:  25 Sept. 1997               52
  3332.  
  3333.  
  3334.    RECEIVER (any parameters not listed below are given the value NULL):
  3335.  
  3336.    Set
  3337.       env_handle            = environment handle in use;
  3338.       R_Services.Unprot_Service_1.General_Service_Data.
  3339.       unencapsulated_token  = received unencapsulated token;
  3340.  
  3341.    Call
  3342.       IDUP_Start_Unprotect() with above input parameters
  3343.    Check
  3344.       major_status.  If not GSS_S_COMPLETE, check 
  3345.          minor_status, 
  3346.          R_Services.Unprot_Service_1.General_Service_Data.minor_status,
  3347.       (as required) for more detailed information
  3348.  
  3349.    For each buffer of input data:
  3350.       Set
  3351.          input_buffer = buffer
  3352.       Call
  3353.          IDUP_Unprotect() with above input parameter
  3354.       Check
  3355.          major_status.  If not GSS_S_COMPLETE, check 
  3356.             minor_status
  3357.  
  3358.    Call
  3359.       IDUP_End_Unprotect()
  3360.    Check
  3361.       major_status.  If not GSS_S_COMPLETE, check 
  3362.          minor_status, 
  3363.          R_Services.Unprot_Service_1.General_Service_Data.minor_status,
  3364.       (as required) for more detailed information.
  3365.  
  3366.    Utilize
  3367.       R_Services.Unprot_Service_1.service_id, 
  3368.          (to determine which service was applied by the originator; note
  3369.           that Unprot_Service_2 will have NULL in unprot_service_type
  3370.           to indicate that it is not used)
  3371.       R_Services.Unprot_Service_1.Quality, 
  3372.          (to determine the corresponding quality of the service)
  3373.       Prot_Information.originator_name, (from IDUP_Start_Unprotect)
  3374.          (to determine the name of the signer)
  3375.       major_status (from IDUP_End_Unprotect)
  3376.          (to determine pass/fail status of signature verification).
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396. Adams               Document Expiration:  25 Sept. 1997               53
  3397.  
  3398.  
  3399. B.4.  More Sophisticated Mechanism, Small Application Buffers
  3400.  
  3401.    To illustrate a higher level of complexity, consider the use of a 
  3402.    more sophisticated IDUP mechanism and a calling application with 
  3403.    small data buffers.  In particular, consider the case in which a very 
  3404.    small e-mail message is to be encrypted for a relatively large 
  3405.    receiver list (R), some subset of whom (r) will be asked to send 
  3406.    proofs of receipt of the message to some other subset (L) (which 
  3407.    includes the originator).  So that the example is not unnecessarily 
  3408.    complicated, assume again that the originating application uses 
  3409.    encapsulation.
  3410.  
  3411.    The uses and defaults for the various parameter bundles for this 
  3412.    mechanism would be specified in the relevant IDUP mechanism document 
  3413.    as follows.
  3414.  
  3415.    Mech_Specific_Info
  3416.       - NOT USED (the only acceptable input, therefore, is NULL)
  3417.  
  3418.    Idu_Sensitivity
  3419.       - NOT USED (the only acceptable input, therefore, is NULL)
  3420.  
  3421.    Service_Creation_Info
  3422.       - used to create "proof of delivery" evidence (but actual 
  3423.         structure is opaque to calling application)
  3424.  
  3425.    Service_Verification_Info
  3426.       - used to verify "proof of delivery" evidence (but actual 
  3427.         structure is opaque to calling application)
  3428.  
  3429.    Quality
  3430.       - the qop_algs parameter must be supported, with a suitable 
  3431.         DEFAULT value specified;
  3432.       - suitable DEFAULT values for validity, policy_id, and 
  3433.         allow_policy_mapping must be specified (it may be an 
  3434.         implementation option as to whether these parameters are 
  3435.         explicitly modifiable by the calling application, or whether 
  3436.         NULLs are the only acceptable input)
  3437.  
  3438.    Idu_Information
  3439.       - the idu_type parameter must have a value representing a suitable 
  3440.         IDU type, with a suitable DEFAULT value specified;
  3441.       - the idu_title parameter must have a value representing a 
  3442.         suitable IDU title, with a suitable DEFAULT value specified
  3443.  
  3444.    Prot_Information
  3445.       - the originator_name, protection_time, and idu_type / idu_title 
  3446.         (in Idu_Information) parameters are read from the contained 
  3447.         header information and output by IDUP_Start_Unprotect;
  3448.  
  3449.    Special_Conditions
  3450.       - the parameter prot_oper_id is NOT USED (the only acceptable 
  3451.         input, therefore, is NULL);
  3452.       - trusted or untrusted time may be selected by the calling 
  3453.         application, with a suitable DEFAULT value specified
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461. Adams               Document Expiration:  25 Sept. 1997               54
  3462.  
  3463.  
  3464.    Target_Info
  3465.       - this bundle is used as described in IDUP; no DEFAULT values are 
  3466.         specified
  3467.  
  3468.    General_Service_Data
  3469.       - the unencapsulated_token parameter is used if 
  3470.         encapsulation_request is FALSE;
  3471.       - the minor_status parameter is used to return minor status values
  3472.         as specified by the mechanism document
  3473.  
  3474.    Prot_Service
  3475.       - the prot_service_type parameter may have a value of "1" 
  3476.         ("perform unsolicited service"), "2" ("perform solicited 
  3477.         service"), "3" (perform service solicitation), or NULL (which 
  3478.         specifies the DEFAULT value of "1");
  3479.       - the service_id parameter must have a value representing 
  3480.         "PER_CONF", "PER_DOA", "PER_POO", or "PER_POD";
  3481.       - the parameters Service_Creation_Info, service_to, 
  3482.         Service_Verification_Info, and service_verification_info_id are
  3483.         used when required by the IDUP operation
  3484.  
  3485.    Unprot_Service
  3486.       - the unprot_service_type parameter may have a value of "1" 
  3487.         ("receive unsolicited service"), "2" ("receive solicited 
  3488.         service"), or "3" (receive service solicitation);
  3489.       - the service_id parameter will have a value representing 
  3490.         "REC_CONF", "REC_DOA", "REC_POO", or "REC_POD";
  3491.       - the parameters service_verification_info_id, 
  3492.         Service_Verification_Info, service_to, and 
  3493.         Service_Creation_Info, are used when required by the IDUP 
  3494.         operation
  3495.  
  3496.  
  3497.    SENDER (any parameters not listed below are given the value NULL):
  3498.  
  3499.    Set
  3500.       env_handle                          = environment handle in use;
  3501.       Idu_Information.idu_type            = value for "e-mail document";
  3502.       Idu_Information.idu_title           = "Contract 1234";
  3503.       Special_Conditions.use_trusted_time = TRUE;
  3504.       encapsulation_request               = TRUE;
  3505.       single_idu_buffer                   = very small e-mail message;
  3506.       Target_Info.targ_names              = receiver names (R);
  3507.       Prot_Service_1.prot_service_type    = "1";
  3508.       Prot_Service_1.service_id           = PER_CONF;
  3509.       Prot_Service_2.prot_service_type    = "3";
  3510.       Prot_Service_2.service_id           = PER_POD;
  3511.       Prot_Service_2.General_Service_Data.Target_Info.targ_names
  3512.                                           = "receipts from" list (r);
  3513.       Prot_Service_2.service_to           = "receipts to" list (L);
  3514.       P_Services.Prot_Service_1           = Prot_Service_1;
  3515.       P_Services.Prot_Service_2           = Prot_Service_2;
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527. Adams               Document Expiration:  25 Sept. 1997               55
  3528.  
  3529.  
  3530.    Call
  3531.       IDUP_Start_Protect() with above input parameters
  3532.    Check
  3533.       major_status.  If not GSS_S_COMPLETE, 
  3534.          while major_status == GSS_S_CONTINUE_NEEDED
  3535.             Save 
  3536.                pidu_buffer,
  3537.             Call 
  3538.                IDUP_Start_Protect() (to get next portion of pidu_buffer)
  3539.          Check
  3540.             major_status,
  3541.             minor_status, 
  3542.             Target_Info.bad_targ_names / Target_Info.bad_targ_status, 
  3543.             P_Services.Prot_Service_1.General_Service_Data.minor_status,
  3544.             P_Services.Prot_Service_2.General_Service_Data.minor_status
  3545.          (as required) for more detailed information.
  3546.  
  3547.    Save
  3548.       Prot_Service_2.Service_Verification_Info,
  3549.       Prot_Service_2.service_verification_info_id
  3550.  
  3551.    Send
  3552.       All saved buffers of pidu_buffer to receiver list (R).
  3553.  
  3554.  
  3555.    RECEIVER (ON RECEIVER LIST (R)):
  3556.       (any parameters not listed below are given the value NULL)
  3557.  
  3558.    Set
  3559.       env_handle          = environment handle in use;
  3560.       partial_pidu_buffer = initial buffer of received p-idu;
  3561.  
  3562.    Call
  3563.       IDUP_Start_Unprotect() with above input parameters
  3564.    While major_status == IDUP_S_MORE_PIDU_NEEDED, 
  3565.       Set
  3566.          partial_pidu_buffer = next buffer of p-idu
  3567.       Call
  3568.          IDUP_Start_Unprotect()
  3569.    Check
  3570.       major_status,
  3571.       minor_status, 
  3572.       R_Services.Unprot_Service_1.General_Service_Data.minor_status,
  3573.       R_Services.Unprot_Service_2.General_Service_Data.minor_status,
  3574.    (as required) for more detailed information
  3575.  
  3576.    Save
  3577.       initial_idu_buffer (if non-empty)
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592. Adams               Document Expiration:  25 Sept. 1997               56
  3593.  
  3594.  
  3595.    Set
  3596.       input_buffer = remaining p-idu buffer
  3597.    Call
  3598.       IDUP_Unprotect() with above input parameter
  3599.    Check
  3600.       major_status.  If not GSS_S_COMPLETE, check 
  3601.          minor_status
  3602.    Save
  3603.       output_buffer
  3604.  
  3605.    Call
  3606.       IDUP_End_Unprotect()
  3607.    Check
  3608.       major_status.  If not GSS_S_COMPLETE, check 
  3609.          minor_status, 
  3610.          R_Services.Unprot_Service_1.General_Service_Data.minor_status,
  3611.          R_Services.Unprot_Service_2.General_Service_Data.minor_status,
  3612.       (as required) for more detailed information.
  3613.  
  3614.    Utilize
  3615.       R_Services.Unprot_Service_1/2.service_id, 
  3616.          (to determine which services were applied by the originator)
  3617.       R_Services.Unprot_Service_1/2.Quality, 
  3618.          (to determine the corresponding qualities of the service)
  3619.       Prot_Information.originator_name/protection_time and 
  3620.          Prot_Information.Idu_Information.idu_type/idu_title, 
  3621.          (from IDUP_Start_Unprotect) (to determine originator info.)
  3622.       R_Services.Unprot_Service_2.General_Service_Data.Target_Info.
  3623.          targ.names, (to determine if rec. is in "receipts from" (r))
  3624.       Service_Verification_Info/service_verification_info_id
  3625.          (to determine if receiver is in "receipts to" list (L))
  3626.  
  3627.    If receiver is in "receipts from" list (r)
  3628.       Save
  3629.          R_Services.Unprot_Service_2.service_to,
  3630.          R_Services.Unprot_Service_2.Service_Creation_Info
  3631.  
  3632.    If receiver is in "receipts to" list (L) 
  3633.       Save
  3634.          Service_Verification_Info,
  3635.          service_verification_info_id
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657. Adams               Document Expiration:  25 Sept. 1997               57
  3658.  
  3659.  
  3660.    RECEIVER (ON "RECEIPTS FROM" LIST (r)):
  3661.       (procedure to generate receipt)
  3662.  
  3663.    Set
  3664.       env_handle                           = environment handle in use;
  3665.       Target_Info.targ_names               = service_to
  3666.       Prot_Service_1.prot_service_type     = "2";
  3667.       Prot_Service_1.service_id            = "PER_POD";
  3668.       Prot_Service_1.Service_Creation_Info = Service_Creation_Info;
  3669.       P_Services.Prot_Service_1            = Prot_Service_1
  3670.  
  3671.    Call
  3672.       IDUP_Start_Protect() with above input parameters 
  3673.    Check
  3674.       major_status.  If not GSS_S_COMPLETE, check 
  3675.          minor_status, 
  3676.          P_Services.Prot_Service_1.General_Service_Data.minor_status
  3677.       (as required) for more detailed information.
  3678.  
  3679.    Send
  3680.       pidu_buffer to "receipts to" list (L)
  3681.  
  3682.  
  3683.    RECEIVER (ON "RECEIPTS TO" LIST (L)):
  3684.       (procedure to process received receipt)
  3685.  
  3686.    Set 
  3687.       env_handle         = environment handle in use;
  3688.       single_pidu_buffer = received p-idu buffer (if it fits in a single 
  3689.          buffer; otherwise use partial_pidu_buffer and make multiple 
  3690.          calls, as above)
  3691.  
  3692.    Call
  3693.       IDUP_Start_Unprotect() with above input parameters
  3694.    If major_status == IDUP_S_SERV_VERIF_INFO_NEEDED 
  3695.       Utilize
  3696.          R_Services.Unprot_Service_1.service_verification_info.id
  3697.          (to assist in locating necessary Service_Verification_Info)
  3698.       Set
  3699.          R_Services.Unprot_Service_1.Service_Verification_Info
  3700.             = Service_Verification_Info
  3701.       Call
  3702.          IDUP_Start_Unprotect() with above input parameters
  3703.    Check
  3704.       major_status,
  3705.       minor_status, 
  3706.       R_Services.Unprot_Service_1.General_Service_Data.minor_status
  3707.    (as required) for more detailed information.
  3708.  
  3709.    Utilize
  3710.       R_Services.Unprot_Service_1.service_id, 
  3711.          (to determine that this is a "proof of delivery" evidence)
  3712.       R_Services.Unprot_Service_1.Quality, 
  3713.       Prot_Information.originator_name, (for evidence generator info.)
  3714.       major_status (to determine pass/fail status of evi. verif.).
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.  
  3721.  
  3722. Adams               Document Expiration:  25 Sept. 1997               58
  3723.