home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / rpc / auth_des.h next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.6 KB  |  107 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _RPC_AUTHDES_H
  11. #define _RPC_AUTHDES_H
  12.  
  13. #ident    "@(#)/usr/include/rpc/auth_des.h.sl 1.1 4.0 12/08/90 20115 AT&T-USL"
  14.  
  15. /*      @(#)auth_des.h 1.7 88/10/25 SMI      */
  16.  
  17. /*
  18.  *          PROPRIETARY NOTICE (Combined)
  19.  *  
  20.  *  This source code is unpublished proprietary information
  21.  *  constituting, or derived under license from AT&T's Unix(r) System V.
  22.  *  In addition, portions of such source code were derived from Berkeley
  23.  *  4.3 BSD under license from the Regents of the University of
  24.  *  California.
  25.  *  
  26.  *  
  27.  *  
  28.  *          Copyright Notice 
  29.  *  
  30.  *  Notice of copyright on this source code product does not indicate 
  31.  *  publication.
  32.  *  
  33.  *      (c) 1986,1987,1988,1989  Sun Microsystems, Inc.
  34.  *      (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  35.  *                All rights reserved.
  36.  */
  37.  
  38. /*
  39.  * auth_des.h, Protocol for DES style authentication for RPC
  40.  *  
  41.  */
  42.  
  43. /*
  44.  * There are two kinds of "names": fullnames and nicknames
  45.  */
  46. enum authdes_namekind {
  47.     ADN_FULLNAME, 
  48.     ADN_NICKNAME
  49. };
  50.  
  51. /*
  52.  * A fullname contains the network name of the client, 
  53.  * a conversation key and the window
  54.  */
  55. struct authdes_fullname {
  56.     char *name;        /* network name of client, up to MAXNETNAMELEN */
  57.     des_block key;        /* conversation key */
  58.     u_long window;        /* associated window */
  59. };
  60.  
  61.  
  62. /*
  63.  * A credential 
  64.  */
  65. struct authdes_cred {
  66.     enum authdes_namekind adc_namekind;
  67.     struct authdes_fullname adc_fullname;
  68.     u_long adc_nickname;
  69. };
  70.  
  71.  
  72.  
  73. /*
  74.  * A des authentication verifier 
  75.  */
  76. struct authdes_verf {
  77.     union {
  78.         struct timeval adv_ctime;    /* clear time */
  79.         des_block adv_xtime;        /* crypt time */
  80.     } adv_time_u;
  81.     u_long adv_int_u;
  82. };
  83.  
  84. /*
  85.  * des authentication verifier: client variety
  86.  *
  87.  * adv_timestamp is the current time.
  88.  * adv_winverf is the credential window + 1.
  89.  * Both are encrypted using the conversation key.
  90.  */
  91. #define adv_timestamp    adv_time_u.adv_ctime
  92. #define adv_xtimestamp    adv_time_u.adv_xtime
  93. #define adv_winverf    adv_int_u
  94.  
  95. /*
  96.  * des authentication verifier: server variety
  97.  *
  98.  * adv_timeverf is the client's timestamp + client's window
  99.  * adv_nickname is the server's nickname for the client.
  100.  * adv_timeverf is encrypted using the conversation key.
  101.  */
  102. #define adv_timeverf    adv_time_u.adv_ctime
  103. #define adv_xtimeverf    adv_time_u.adv_xtime
  104. #define adv_nickname    adv_int_u
  105.  
  106. #endif    /* _RPC_AUTHDES_H */
  107.