~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/sunrpc/gss_krb5.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/sunrpc/gss_krb5.h (Architecture sparc64) and /include/linux/sunrpc/gss_krb5.h (Architecture ppc)


  1 /*                                                  1 /*
  2  *  Adapted from MIT Kerberos 5-1.2.1 lib/incl      2  *  Adapted from MIT Kerberos 5-1.2.1 lib/include/krb5.h,
  3  *  lib/gssapi/krb5/gssapiP_krb5.h, and others      3  *  lib/gssapi/krb5/gssapiP_krb5.h, and others
  4  *                                                  4  *
  5  *  Copyright (c) 2000-2008 The Regents of the      5  *  Copyright (c) 2000-2008 The Regents of the University of Michigan.
  6  *  All rights reserved.                            6  *  All rights reserved.
  7  *                                                  7  *
  8  *  Andy Adamson   <andros@umich.edu>               8  *  Andy Adamson   <andros@umich.edu>
  9  *  Bruce Fields   <bfields@umich.edu>              9  *  Bruce Fields   <bfields@umich.edu>
 10  */                                                10  */
 11                                                    11 
 12 /*                                                 12 /*
 13  * Copyright 1995 by the Massachusetts Institu     13  * Copyright 1995 by the Massachusetts Institute of Technology.
 14  * All Rights Reserved.                            14  * All Rights Reserved.
 15  *                                                 15  *
 16  * Export of this software from the United Sta     16  * Export of this software from the United States of America may
 17  *   require a specific license from the Unite     17  *   require a specific license from the United States Government.
 18  *   It is the responsibility of any person or     18  *   It is the responsibility of any person or organization contemplating
 19  *   export to obtain such a license before ex     19  *   export to obtain such a license before exporting.
 20  *                                                 20  *
 21  * WITHIN THAT CONSTRAINT, permission to use,      21  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
 22  * distribute this software and its documentat     22  * distribute this software and its documentation for any purpose and
 23  * without fee is hereby granted, provided tha     23  * without fee is hereby granted, provided that the above copyright
 24  * notice appear in all copies and that both t     24  * notice appear in all copies and that both that copyright notice and
 25  * this permission notice appear in supporting     25  * this permission notice appear in supporting documentation, and that
 26  * the name of M.I.T. not be used in advertisi     26  * the name of M.I.T. not be used in advertising or publicity pertaining
 27  * to distribution of the software without spe     27  * to distribution of the software without specific, written prior
 28  * permission.  Furthermore if you modify this     28  * permission.  Furthermore if you modify this software you must label
 29  * your software as modified software and not      29  * your software as modified software and not distribute it in such a
 30  * fashion that it might be confused with the      30  * fashion that it might be confused with the original M.I.T. software.
 31  * M.I.T. makes no representations about the s     31  * M.I.T. makes no representations about the suitability of
 32  * this software for any purpose.  It is provi     32  * this software for any purpose.  It is provided "as is" without express
 33  * or implied warranty.                            33  * or implied warranty.
 34  *                                                 34  *
 35  */                                                35  */
 36                                                    36 
 37 #ifndef _LINUX_SUNRPC_GSS_KRB5_H                   37 #ifndef _LINUX_SUNRPC_GSS_KRB5_H
 38 #define _LINUX_SUNRPC_GSS_KRB5_H                   38 #define _LINUX_SUNRPC_GSS_KRB5_H
 39                                                    39 
 40 #include <crypto/skcipher.h>                       40 #include <crypto/skcipher.h>
 41 #include <linux/sunrpc/auth_gss.h>                 41 #include <linux/sunrpc/auth_gss.h>
 42 #include <linux/sunrpc/gss_err.h>                  42 #include <linux/sunrpc/gss_err.h>
 43 #include <linux/sunrpc/gss_asn1.h>                 43 #include <linux/sunrpc/gss_asn1.h>
 44                                                    44 
 45 /* Length of constant used in key derivation *     45 /* Length of constant used in key derivation */
 46 #define GSS_KRB5_K5CLENGTH (5)                     46 #define GSS_KRB5_K5CLENGTH (5)
 47                                                    47 
 48 /* Maximum key length (in bytes) for the suppo     48 /* Maximum key length (in bytes) for the supported crypto algorithms */
 49 #define GSS_KRB5_MAX_KEYLEN (32)                   49 #define GSS_KRB5_MAX_KEYLEN (32)
 50                                                    50 
 51 /* Maximum checksum function output for the su     51 /* Maximum checksum function output for the supported enctypes */
 52 #define GSS_KRB5_MAX_CKSUM_LEN  (24)               52 #define GSS_KRB5_MAX_CKSUM_LEN  (24)
 53                                                    53 
 54 /* Maximum blocksize for the supported crypto      54 /* Maximum blocksize for the supported crypto algorithms */
 55 #define GSS_KRB5_MAX_BLOCKSIZE  (16)               55 #define GSS_KRB5_MAX_BLOCKSIZE  (16)
 56                                                    56 
 57 /* The length of the Kerberos GSS token header     57 /* The length of the Kerberos GSS token header */
 58 #define GSS_KRB5_TOK_HDR_LEN    (16)               58 #define GSS_KRB5_TOK_HDR_LEN    (16)
 59                                                    59 
 60 #define KG_TOK_MIC_MSG    0x0101                   60 #define KG_TOK_MIC_MSG    0x0101
 61 #define KG_TOK_WRAP_MSG   0x0201                   61 #define KG_TOK_WRAP_MSG   0x0201
 62                                                    62 
 63 #define KG2_TOK_INITIAL     0x0101                 63 #define KG2_TOK_INITIAL     0x0101
 64 #define KG2_TOK_RESPONSE    0x0202                 64 #define KG2_TOK_RESPONSE    0x0202
 65 #define KG2_TOK_MIC         0x0404                 65 #define KG2_TOK_MIC         0x0404
 66 #define KG2_TOK_WRAP        0x0504                 66 #define KG2_TOK_WRAP        0x0504
 67                                                    67 
 68 #define KG2_TOKEN_FLAG_SENTBYACCEPTOR   0x01       68 #define KG2_TOKEN_FLAG_SENTBYACCEPTOR   0x01
 69 #define KG2_TOKEN_FLAG_SEALED           0x02       69 #define KG2_TOKEN_FLAG_SEALED           0x02
 70 #define KG2_TOKEN_FLAG_ACCEPTORSUBKEY   0x04       70 #define KG2_TOKEN_FLAG_ACCEPTORSUBKEY   0x04
 71                                                    71 
 72 #define KG2_RESP_FLAG_ERROR             0x0001     72 #define KG2_RESP_FLAG_ERROR             0x0001
 73 #define KG2_RESP_FLAG_DELEG_OK          0x0002     73 #define KG2_RESP_FLAG_DELEG_OK          0x0002
 74                                                    74 
 75 enum sgn_alg {                                     75 enum sgn_alg {
 76         SGN_ALG_DES_MAC_MD5 = 0x0000,              76         SGN_ALG_DES_MAC_MD5 = 0x0000,
 77         SGN_ALG_MD2_5 = 0x0001,                    77         SGN_ALG_MD2_5 = 0x0001,
 78         SGN_ALG_DES_MAC = 0x0002,                  78         SGN_ALG_DES_MAC = 0x0002,
 79         SGN_ALG_3 = 0x0003,             /* not     79         SGN_ALG_3 = 0x0003,             /* not published */
 80         SGN_ALG_HMAC_SHA1_DES3_KD = 0x0004         80         SGN_ALG_HMAC_SHA1_DES3_KD = 0x0004
 81 };                                                 81 };
 82 enum seal_alg {                                    82 enum seal_alg {
 83         SEAL_ALG_NONE = 0xffff,                    83         SEAL_ALG_NONE = 0xffff,
 84         SEAL_ALG_DES = 0x0000,                     84         SEAL_ALG_DES = 0x0000,
 85         SEAL_ALG_1 = 0x0001,            /* not     85         SEAL_ALG_1 = 0x0001,            /* not published */
 86         SEAL_ALG_DES3KD = 0x0002                   86         SEAL_ALG_DES3KD = 0x0002
 87 };                                                 87 };
 88                                                    88 
 89 /*                                                 89 /*
 90  * These values are assigned by IANA and publi     90  * These values are assigned by IANA and published via the
 91  * subregistry at the link below:                  91  * subregistry at the link below:
 92  *                                                 92  *
 93  * https://www.iana.org/assignments/kerberos-p     93  * https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-2
 94  */                                                94  */
 95 #define CKSUMTYPE_CRC32                 0x0001     95 #define CKSUMTYPE_CRC32                 0x0001
 96 #define CKSUMTYPE_RSA_MD4               0x0002     96 #define CKSUMTYPE_RSA_MD4               0x0002
 97 #define CKSUMTYPE_RSA_MD4_DES           0x0003     97 #define CKSUMTYPE_RSA_MD4_DES           0x0003
 98 #define CKSUMTYPE_DESCBC                0x0004     98 #define CKSUMTYPE_DESCBC                0x0004
 99 #define CKSUMTYPE_RSA_MD5               0x0007     99 #define CKSUMTYPE_RSA_MD5               0x0007
100 #define CKSUMTYPE_RSA_MD5_DES           0x0008    100 #define CKSUMTYPE_RSA_MD5_DES           0x0008
101 #define CKSUMTYPE_NIST_SHA              0x0009    101 #define CKSUMTYPE_NIST_SHA              0x0009
102 #define CKSUMTYPE_HMAC_SHA1_DES3        0x000c    102 #define CKSUMTYPE_HMAC_SHA1_DES3        0x000c
103 #define CKSUMTYPE_HMAC_SHA1_96_AES128   0x000f    103 #define CKSUMTYPE_HMAC_SHA1_96_AES128   0x000f
104 #define CKSUMTYPE_HMAC_SHA1_96_AES256   0x0010    104 #define CKSUMTYPE_HMAC_SHA1_96_AES256   0x0010
105 #define CKSUMTYPE_CMAC_CAMELLIA128      0x0011    105 #define CKSUMTYPE_CMAC_CAMELLIA128      0x0011
106 #define CKSUMTYPE_CMAC_CAMELLIA256      0x0012    106 #define CKSUMTYPE_CMAC_CAMELLIA256      0x0012
107 #define CKSUMTYPE_HMAC_SHA256_128_AES128          107 #define CKSUMTYPE_HMAC_SHA256_128_AES128        0x0013
108 #define CKSUMTYPE_HMAC_SHA384_192_AES256          108 #define CKSUMTYPE_HMAC_SHA384_192_AES256        0x0014
109 #define CKSUMTYPE_HMAC_MD5_ARCFOUR      -138 /    109 #define CKSUMTYPE_HMAC_MD5_ARCFOUR      -138 /* Microsoft md5 hmac cksumtype */
110                                                   110 
111 /* from gssapi_err_krb5.h */                      111 /* from gssapi_err_krb5.h */
112 #define KG_CCACHE_NOMATCH                         112 #define KG_CCACHE_NOMATCH                        (39756032L)
113 #define KG_KEYTAB_NOMATCH                         113 #define KG_KEYTAB_NOMATCH                        (39756033L)
114 #define KG_TGT_MISSING                            114 #define KG_TGT_MISSING                           (39756034L)
115 #define KG_NO_SUBKEY                              115 #define KG_NO_SUBKEY                             (39756035L)
116 #define KG_CONTEXT_ESTABLISHED                    116 #define KG_CONTEXT_ESTABLISHED                   (39756036L)
117 #define KG_BAD_SIGN_TYPE                          117 #define KG_BAD_SIGN_TYPE                         (39756037L)
118 #define KG_BAD_LENGTH                             118 #define KG_BAD_LENGTH                            (39756038L)
119 #define KG_CTX_INCOMPLETE                         119 #define KG_CTX_INCOMPLETE                        (39756039L)
120 #define KG_CONTEXT                                120 #define KG_CONTEXT                               (39756040L)
121 #define KG_CRED                                   121 #define KG_CRED                                  (39756041L)
122 #define KG_ENC_DESC                               122 #define KG_ENC_DESC                              (39756042L)
123 #define KG_BAD_SEQ                                123 #define KG_BAD_SEQ                               (39756043L)
124 #define KG_EMPTY_CCACHE                           124 #define KG_EMPTY_CCACHE                          (39756044L)
125 #define KG_NO_CTYPES                              125 #define KG_NO_CTYPES                             (39756045L)
126                                                   126 
127 /* per Kerberos v5 protocol spec crypto types     127 /* per Kerberos v5 protocol spec crypto types from the wire. 
128  * these get mapped to linux kernel crypto rou    128  * these get mapped to linux kernel crypto routines.  
129  *                                                129  *
130  * These values are assigned by IANA and publi    130  * These values are assigned by IANA and published via the
131  * subregistry at the link below:                 131  * subregistry at the link below:
132  *                                                132  *
133  * https://www.iana.org/assignments/kerberos-p    133  * https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-1
134  */                                               134  */
135 #define ENCTYPE_NULL            0x0000            135 #define ENCTYPE_NULL            0x0000
136 #define ENCTYPE_DES_CBC_CRC     0x0001  /* DES    136 #define ENCTYPE_DES_CBC_CRC     0x0001  /* DES cbc mode with CRC-32 */
137 #define ENCTYPE_DES_CBC_MD4     0x0002  /* DES    137 #define ENCTYPE_DES_CBC_MD4     0x0002  /* DES cbc mode with RSA-MD4 */
138 #define ENCTYPE_DES_CBC_MD5     0x0003  /* DES    138 #define ENCTYPE_DES_CBC_MD5     0x0003  /* DES cbc mode with RSA-MD5 */
139 #define ENCTYPE_DES_CBC_RAW     0x0004  /* DES    139 #define ENCTYPE_DES_CBC_RAW     0x0004  /* DES cbc mode raw */
140 /* XXX deprecated? */                             140 /* XXX deprecated? */
141 #define ENCTYPE_DES3_CBC_SHA    0x0005  /* DES    141 #define ENCTYPE_DES3_CBC_SHA    0x0005  /* DES-3 cbc mode with NIST-SHA */
142 #define ENCTYPE_DES3_CBC_RAW    0x0006  /* DES    142 #define ENCTYPE_DES3_CBC_RAW    0x0006  /* DES-3 cbc mode raw */
143 #define ENCTYPE_DES_HMAC_SHA1   0x0008            143 #define ENCTYPE_DES_HMAC_SHA1   0x0008
144 #define ENCTYPE_DES3_CBC_SHA1   0x0010            144 #define ENCTYPE_DES3_CBC_SHA1   0x0010
145 #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011    145 #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011
146 #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012    146 #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012
147 #define ENCTYPE_AES128_CTS_HMAC_SHA256_128        147 #define ENCTYPE_AES128_CTS_HMAC_SHA256_128      0x0013
148 #define ENCTYPE_AES256_CTS_HMAC_SHA384_192        148 #define ENCTYPE_AES256_CTS_HMAC_SHA384_192      0x0014
149 #define ENCTYPE_ARCFOUR_HMAC            0x0017    149 #define ENCTYPE_ARCFOUR_HMAC            0x0017
150 #define ENCTYPE_ARCFOUR_HMAC_EXP        0x0018    150 #define ENCTYPE_ARCFOUR_HMAC_EXP        0x0018
151 #define ENCTYPE_CAMELLIA128_CTS_CMAC    0x0019    151 #define ENCTYPE_CAMELLIA128_CTS_CMAC    0x0019
152 #define ENCTYPE_CAMELLIA256_CTS_CMAC    0x001A    152 #define ENCTYPE_CAMELLIA256_CTS_CMAC    0x001A
153 #define ENCTYPE_UNKNOWN         0x01ff            153 #define ENCTYPE_UNKNOWN         0x01ff
154                                                   154 
155 /*                                                155 /*
156  * Constants used for key derivation              156  * Constants used for key derivation
157  */                                               157  */
158 /* for 3DES */                                    158 /* for 3DES */
159 #define KG_USAGE_SEAL (22)                        159 #define KG_USAGE_SEAL (22)
160 #define KG_USAGE_SIGN (23)                        160 #define KG_USAGE_SIGN (23)
161 #define KG_USAGE_SEQ  (24)                        161 #define KG_USAGE_SEQ  (24)
162                                                   162 
163 /* from rfc3961 */                                163 /* from rfc3961 */
164 #define KEY_USAGE_SEED_CHECKSUM         (0x99)    164 #define KEY_USAGE_SEED_CHECKSUM         (0x99)
165 #define KEY_USAGE_SEED_ENCRYPTION       (0xAA)    165 #define KEY_USAGE_SEED_ENCRYPTION       (0xAA)
166 #define KEY_USAGE_SEED_INTEGRITY        (0x55)    166 #define KEY_USAGE_SEED_INTEGRITY        (0x55)
167                                                   167 
168 /* from rfc4121 */                                168 /* from rfc4121 */
169 #define KG_USAGE_ACCEPTOR_SEAL  (22)              169 #define KG_USAGE_ACCEPTOR_SEAL  (22)
170 #define KG_USAGE_ACCEPTOR_SIGN  (23)              170 #define KG_USAGE_ACCEPTOR_SIGN  (23)
171 #define KG_USAGE_INITIATOR_SEAL (24)              171 #define KG_USAGE_INITIATOR_SEAL (24)
172 #define KG_USAGE_INITIATOR_SIGN (25)              172 #define KG_USAGE_INITIATOR_SIGN (25)
173                                                   173 
174 #endif /* _LINUX_SUNRPC_GSS_KRB5_H */             174 #endif /* _LINUX_SUNRPC_GSS_KRB5_H */
175                                                   175 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php