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-08.txt < prev    next >
Text File  |  1997-10-15  |  144KB  |  3,659 lines

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