group__krb5__crypto.html revision 302408
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3<title>HeimdalKerberos5library: Heimdal Kerberos 5 cryptography functions</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<p> 8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9</p> 10<!-- end of header marker --> 11<!-- Generated by Doxygen 1.5.6 --> 12<div class="navigation" id="top"> 13 <div class="tabs"> 14 <ul> 15 <li><a href="index.html"><span>Main Page</span></a></li> 16 <li><a href="pages.html"><span>Related Pages</span></a></li> 17 <li><a href="modules.html"><span>Modules</span></a></li> 18 <li><a href="annotated.html"><span>Data Structures</span></a></li> 19 </ul> 20 </div> 21</div> 22<div class="contents"> 23<h1>Heimdal Kerberos 5 cryptography functions</h1><table border="0" cellpadding="0" cellspacing="0"> 24<tr><td></td></tr> 25<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 26<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 27krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gd5f2b15d5fde369cf923e8fae4b00bec">krb5_enctype_valid</a> (krb5_context context, krb5_enctype etype)</td></tr> 28 29<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 30krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g49d7081ff071eacd28e3ffa90400580c">krb5_cksumtype_to_enctype</a> (krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)</td></tr> 31 32<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 33krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g674423844043d6beebb959bb8b7ab082">krb5_encrypt_iov_ivec</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, int num_data, void *ivec)</td></tr> 34 35<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 36krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g64cad191491a5d3309553e7d28d8ad46">krb5_decrypt_iov_ivec</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, void *ivec)</td></tr> 37 38<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 39krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gb70888d1122aeed1e5381116a5a9612e">krb5_create_checksum_iov</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, krb5_cksumtype *type)</td></tr> 40 41<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 42krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g1789d8188287750394c3b8366a90bd13">krb5_verify_checksum_iov</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, krb5_cksumtype *type)</td></tr> 43 44<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 45krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gd7003a8a81cef633cc0a2cc07c93dd32">krb5_crypto_init</a> (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)</td></tr> 46 47<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 48krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g57eaed735baab9eb3c3740be8e4d2137">krb5_crypto_destroy</a> (krb5_context context, krb5_crypto crypto)</td></tr> 49 50<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 51krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga4271d4adba2dff699dfdfe07b075b95">krb5_crypto_getblocksize</a> (krb5_context context, krb5_crypto crypto, size_t *blocksize)</td></tr> 52 53<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 54krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g6bc15d1940ecdd4558f18eeb3dda233c">krb5_crypto_getenctype</a> (krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)</td></tr> 55 56<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 57krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gfbed35e76f7d971b90cfe0806f43d279">krb5_crypto_getpadsize</a> (krb5_context context, krb5_crypto crypto, size_t *padsize)</td></tr> 58 59<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 60krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g38d88d8bf7be6913cfc7cf155a1ade8e">krb5_crypto_getconfoundersize</a> (krb5_context context, krb5_crypto crypto, size_t *confoundersize)</td></tr> 61 62<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 63krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g77acfc640aa003095ea5890de2ea1cb7">krb5_enctype_disable</a> (krb5_context context, krb5_enctype enctype)</td></tr> 64 65<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 66krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g8dfebc785c059e38c22c6ca34ed5f68a">krb5_enctype_enable</a> (krb5_context context, krb5_enctype enctype)</td></tr> 67 68<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 69krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g2790b9799fbe21ac4875c401eafb7444">krb5_allow_weak_crypto</a> (krb5_context context, krb5_boolean enable)</td></tr> 70 71<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 72krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga5f3001696f59f7d47539efe82b1c4cd">krb5_random_to_key</a> (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)</td></tr> 73 74<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 75krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g6deab998fe1c056fff541cdf0c119c44">krb5_crypto_fx_cf2</a> (krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)</td></tr> 76 77<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 78krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g147a581626c11fafee04bfda036781ea">krb5_generate_subkey_extended</a> (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)</td></tr> 79 80<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 81KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g33e1cb14ccab45ce46d51064caf07c10">krb5_keyblock_zero</a> (krb5_keyblock *keyblock)</td></tr> 82 83<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 84KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents</a> (krb5_context context, krb5_keyblock *keyblock)</td></tr> 85 86<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 87KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock</a> (krb5_context context, krb5_keyblock *keyblock)</td></tr> 88 89<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 90krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g61fbae0666b6889f539c98a45c1564ae">krb5_copy_keyblock_contents</a> (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)</td></tr> 91 92<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 93krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gb68e1eb316fba45acafd300ac6d93101">krb5_copy_keyblock</a> (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)</td></tr> 94 95<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_enctype <br> 96KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga2caa584d5a6f0bbba3e1bae7255be5c">krb5_keyblock_get_enctype</a> (const krb5_keyblock *block)</td></tr> 97 98<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 99krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g690c42630f2f6b9f7ce96cc75441803d">krb5_keyblock_init</a> (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)</td></tr> 100 101</table> 102<hr><a name="_details"></a><h2>Detailed Description</h2> 103<hr><h2>Function Documentation</h2> 104<a class="anchor" name="g2790b9799fbe21ac4875c401eafb7444"></a><!-- doxytag: member="crypto.c::krb5_allow_weak_crypto" ref="g2790b9799fbe21ac4875c401eafb7444" args="(krb5_context context, krb5_boolean enable)" --> 105<div class="memitem"> 106<div class="memproto"> 107 <table class="memname"> 108 <tr> 109 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_allow_weak_crypto </td> 110 <td>(</td> 111 <td class="paramtype">krb5_context </td> 112 <td class="paramname"> <em>context</em>, </td> 113 </tr> 114 <tr> 115 <td class="paramkey"></td> 116 <td></td> 117 <td class="paramtype">krb5_boolean </td> 118 <td class="paramname"> <em>enable</em></td><td> </td> 119 </tr> 120 <tr> 121 <td></td> 122 <td>)</td> 123 <td></td><td></td><td></td> 124 </tr> 125 </table> 126</div> 127<div class="memdoc"> 128 129<p> 130Enable or disable all weak encryption types<p> 131<dl compact><dt><b>Parameters:</b></dt><dd> 132 <table border="0" cellspacing="2" cellpadding="0"> 133 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 134 <tr><td valign="top"></td><td valign="top"><em>enable</em> </td><td>true to enable, false to disable</td></tr> 135 </table> 136</dl> 137<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 138 139</div> 140</div><p> 141<a class="anchor" name="g49d7081ff071eacd28e3ffa90400580c"></a><!-- doxytag: member="crypto.c::krb5_cksumtype_to_enctype" ref="g49d7081ff071eacd28e3ffa90400580c" args="(krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)" --> 142<div class="memitem"> 143<div class="memproto"> 144 <table class="memname"> 145 <tr> 146 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cksumtype_to_enctype </td> 147 <td>(</td> 148 <td class="paramtype">krb5_context </td> 149 <td class="paramname"> <em>context</em>, </td> 150 </tr> 151 <tr> 152 <td class="paramkey"></td> 153 <td></td> 154 <td class="paramtype">krb5_cksumtype </td> 155 <td class="paramname"> <em>ctype</em>, </td> 156 </tr> 157 <tr> 158 <td class="paramkey"></td> 159 <td></td> 160 <td class="paramtype">krb5_enctype * </td> 161 <td class="paramname"> <em>etype</em></td><td> </td> 162 </tr> 163 <tr> 164 <td></td> 165 <td>)</td> 166 <td></td><td></td><td></td> 167 </tr> 168 </table> 169</div> 170<div class="memdoc"> 171 172<p> 173Return the coresponding encryption type for a checksum type.<p> 174<dl compact><dt><b>Parameters:</b></dt><dd> 175 <table border="0" cellspacing="2" cellpadding="0"> 176 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 177 <tr><td valign="top"></td><td valign="top"><em>ctype</em> </td><td>The checksum type to get the result enctype for </td></tr> 178 <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>The returned encryption, when the matching etype is not found, etype is set to ETYPE_NULL.</td></tr> 179 </table> 180</dl> 181<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code for an failure or 0 on success. </dd></dl> 182 183</div> 184</div><p> 185<a class="anchor" name="gb68e1eb316fba45acafd300ac6d93101"></a><!-- doxytag: member="keyblock.c::krb5_copy_keyblock" ref="gb68e1eb316fba45acafd300ac6d93101" args="(krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)" --> 186<div class="memitem"> 187<div class="memproto"> 188 <table class="memname"> 189 <tr> 190 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock </td> 191 <td>(</td> 192 <td class="paramtype">krb5_context </td> 193 <td class="paramname"> <em>context</em>, </td> 194 </tr> 195 <tr> 196 <td class="paramkey"></td> 197 <td></td> 198 <td class="paramtype">const krb5_keyblock * </td> 199 <td class="paramname"> <em>inblock</em>, </td> 200 </tr> 201 <tr> 202 <td class="paramkey"></td> 203 <td></td> 204 <td class="paramtype">krb5_keyblock ** </td> 205 <td class="paramname"> <em>to</em></td><td> </td> 206 </tr> 207 <tr> 208 <td></td> 209 <td>)</td> 210 <td></td><td></td><td></td> 211 </tr> 212 </table> 213</div> 214<div class="memdoc"> 215 216<p> 217Copy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock()</a>.<p> 218<dl compact><dt><b>Parameters:</b></dt><dd> 219 <table border="0" cellspacing="2" cellpadding="0"> 220 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 221 <tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr> 222 <tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr> 223 </table> 224</dl> 225<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 226 227</div> 228</div><p> 229<a class="anchor" name="g61fbae0666b6889f539c98a45c1564ae"></a><!-- doxytag: member="keyblock.c::krb5_copy_keyblock_contents" ref="g61fbae0666b6889f539c98a45c1564ae" args="(krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)" --> 230<div class="memitem"> 231<div class="memproto"> 232 <table class="memname"> 233 <tr> 234 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock_contents </td> 235 <td>(</td> 236 <td class="paramtype">krb5_context </td> 237 <td class="paramname"> <em>context</em>, </td> 238 </tr> 239 <tr> 240 <td class="paramkey"></td> 241 <td></td> 242 <td class="paramtype">const krb5_keyblock * </td> 243 <td class="paramname"> <em>inblock</em>, </td> 244 </tr> 245 <tr> 246 <td class="paramkey"></td> 247 <td></td> 248 <td class="paramtype">krb5_keyblock * </td> 249 <td class="paramname"> <em>to</em></td><td> </td> 250 </tr> 251 <tr> 252 <td></td> 253 <td>)</td> 254 <td></td><td></td><td></td> 255 </tr> 256 </table> 257</div> 258<div class="memdoc"> 259 260<p> 261Copy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a>.<p> 262<dl compact><dt><b>Parameters:</b></dt><dd> 263 <table border="0" cellspacing="2" cellpadding="0"> 264 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 265 <tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr> 266 <tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr> 267 </table> 268</dl> 269<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 270 271</div> 272</div><p> 273<a class="anchor" name="gb70888d1122aeed1e5381116a5a9612e"></a><!-- doxytag: member="crypto.c::krb5_create_checksum_iov" ref="gb70888d1122aeed1e5381116a5a9612e" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)" --> 274<div class="memitem"> 275<div class="memproto"> 276 <table class="memname"> 277 <tr> 278 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_create_checksum_iov </td> 279 <td>(</td> 280 <td class="paramtype">krb5_context </td> 281 <td class="paramname"> <em>context</em>, </td> 282 </tr> 283 <tr> 284 <td class="paramkey"></td> 285 <td></td> 286 <td class="paramtype">krb5_crypto </td> 287 <td class="paramname"> <em>crypto</em>, </td> 288 </tr> 289 <tr> 290 <td class="paramkey"></td> 291 <td></td> 292 <td class="paramtype">unsigned </td> 293 <td class="paramname"> <em>usage</em>, </td> 294 </tr> 295 <tr> 296 <td class="paramkey"></td> 297 <td></td> 298 <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 299 <td class="paramname"> <em>data</em>, </td> 300 </tr> 301 <tr> 302 <td class="paramkey"></td> 303 <td></td> 304 <td class="paramtype">unsigned int </td> 305 <td class="paramname"> <em>num_data</em>, </td> 306 </tr> 307 <tr> 308 <td class="paramkey"></td> 309 <td></td> 310 <td class="paramtype">krb5_cksumtype * </td> 311 <td class="paramname"> <em>type</em></td><td> </td> 312 </tr> 313 <tr> 314 <td></td> 315 <td>)</td> 316 <td></td><td></td><td></td> 317 </tr> 318 </table> 319</div> 320<div class="memdoc"> 321 322<p> 323Create a Kerberos message checksum.<p> 324<dl compact><dt><b>Parameters:</b></dt><dd> 325 <table border="0" cellspacing="2" cellpadding="0"> 326 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 327 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 328 <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 329 <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 330 <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 331 <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>output data</td></tr> 332 </table> 333</dl> 334<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 335 336</div> 337</div><p> 338<a class="anchor" name="g57eaed735baab9eb3c3740be8e4d2137"></a><!-- doxytag: member="crypto.c::krb5_crypto_destroy" ref="g57eaed735baab9eb3c3740be8e4d2137" args="(krb5_context context, krb5_crypto crypto)" --> 339<div class="memitem"> 340<div class="memproto"> 341 <table class="memname"> 342 <tr> 343 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_destroy </td> 344 <td>(</td> 345 <td class="paramtype">krb5_context </td> 346 <td class="paramname"> <em>context</em>, </td> 347 </tr> 348 <tr> 349 <td class="paramkey"></td> 350 <td></td> 351 <td class="paramtype">krb5_crypto </td> 352 <td class="paramname"> <em>crypto</em></td><td> </td> 353 </tr> 354 <tr> 355 <td></td> 356 <td>)</td> 357 <td></td><td></td><td></td> 358 </tr> 359 </table> 360</div> 361<div class="memdoc"> 362 363<p> 364Free a crypto context created by <a class="el" href="group__krb5__crypto.html#gd7003a8a81cef633cc0a2cc07c93dd32">krb5_crypto_init()</a>.<p> 365<dl compact><dt><b>Parameters:</b></dt><dd> 366 <table border="0" cellspacing="2" cellpadding="0"> 367 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 368 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to free</td></tr> 369 </table> 370</dl> 371<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 372 373</div> 374</div><p> 375<a class="anchor" name="g6deab998fe1c056fff541cdf0c119c44"></a><!-- doxytag: member="crypto.c::krb5_crypto_fx_cf2" ref="g6deab998fe1c056fff541cdf0c119c44" args="(krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)" --> 376<div class="memitem"> 377<div class="memproto"> 378 <table class="memname"> 379 <tr> 380 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_fx_cf2 </td> 381 <td>(</td> 382 <td class="paramtype">krb5_context </td> 383 <td class="paramname"> <em>context</em>, </td> 384 </tr> 385 <tr> 386 <td class="paramkey"></td> 387 <td></td> 388 <td class="paramtype">const krb5_crypto </td> 389 <td class="paramname"> <em>crypto1</em>, </td> 390 </tr> 391 <tr> 392 <td class="paramkey"></td> 393 <td></td> 394 <td class="paramtype">const krb5_crypto </td> 395 <td class="paramname"> <em>crypto2</em>, </td> 396 </tr> 397 <tr> 398 <td class="paramkey"></td> 399 <td></td> 400 <td class="paramtype">krb5_data * </td> 401 <td class="paramname"> <em>pepper1</em>, </td> 402 </tr> 403 <tr> 404 <td class="paramkey"></td> 405 <td></td> 406 <td class="paramtype">krb5_data * </td> 407 <td class="paramname"> <em>pepper2</em>, </td> 408 </tr> 409 <tr> 410 <td class="paramkey"></td> 411 <td></td> 412 <td class="paramtype">krb5_enctype </td> 413 <td class="paramname"> <em>enctype</em>, </td> 414 </tr> 415 <tr> 416 <td class="paramkey"></td> 417 <td></td> 418 <td class="paramtype">krb5_keyblock * </td> 419 <td class="paramname"> <em>res</em></td><td> </td> 420 </tr> 421 <tr> 422 <td></td> 423 <td>)</td> 424 <td></td><td></td><td></td> 425 </tr> 426 </table> 427</div> 428<div class="memdoc"> 429 430<p> 431The FX-CF2 key derivation function, used in FAST and preauth framework.<p> 432<dl compact><dt><b>Parameters:</b></dt><dd> 433 <table border="0" cellspacing="2" cellpadding="0"> 434 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 435 <tr><td valign="top"></td><td valign="top"><em>crypto1</em> </td><td>first key to combine </td></tr> 436 <tr><td valign="top"></td><td valign="top"><em>crypto2</em> </td><td>second key to combine </td></tr> 437 <tr><td valign="top"></td><td valign="top"><em>pepper1</em> </td><td>factor to combine with first key to garante uniqueness </td></tr> 438 <tr><td valign="top"></td><td valign="top"><em>pepper2</em> </td><td>factor to combine with second key to garante uniqueness </td></tr> 439 <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the encryption type of the resulting key </td></tr> 440 <tr><td valign="top"></td><td valign="top"><em>res</em> </td><td>allocated key, free with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a></td></tr> 441 </table> 442</dl> 443<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 444 445</div> 446</div><p> 447<a class="anchor" name="ga4271d4adba2dff699dfdfe07b075b95"></a><!-- doxytag: member="crypto.c::krb5_crypto_getblocksize" ref="ga4271d4adba2dff699dfdfe07b075b95" args="(krb5_context context, krb5_crypto crypto, size_t *blocksize)" --> 448<div class="memitem"> 449<div class="memproto"> 450 <table class="memname"> 451 <tr> 452 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getblocksize </td> 453 <td>(</td> 454 <td class="paramtype">krb5_context </td> 455 <td class="paramname"> <em>context</em>, </td> 456 </tr> 457 <tr> 458 <td class="paramkey"></td> 459 <td></td> 460 <td class="paramtype">krb5_crypto </td> 461 <td class="paramname"> <em>crypto</em>, </td> 462 </tr> 463 <tr> 464 <td class="paramkey"></td> 465 <td></td> 466 <td class="paramtype">size_t * </td> 467 <td class="paramname"> <em>blocksize</em></td><td> </td> 468 </tr> 469 <tr> 470 <td></td> 471 <td>)</td> 472 <td></td><td></td><td></td> 473 </tr> 474 </table> 475</div> 476<div class="memdoc"> 477 478<p> 479Return the blocksize used algorithm referenced by the crypto context<p> 480<dl compact><dt><b>Parameters:</b></dt><dd> 481 <table border="0" cellspacing="2" cellpadding="0"> 482 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 483 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 484 <tr><td valign="top"></td><td valign="top"><em>blocksize</em> </td><td>the resulting blocksize</td></tr> 485 </table> 486</dl> 487<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 488 489</div> 490</div><p> 491<a class="anchor" name="g38d88d8bf7be6913cfc7cf155a1ade8e"></a><!-- doxytag: member="crypto.c::krb5_crypto_getconfoundersize" ref="g38d88d8bf7be6913cfc7cf155a1ade8e" args="(krb5_context context, krb5_crypto crypto, size_t *confoundersize)" --> 492<div class="memitem"> 493<div class="memproto"> 494 <table class="memname"> 495 <tr> 496 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getconfoundersize </td> 497 <td>(</td> 498 <td class="paramtype">krb5_context </td> 499 <td class="paramname"> <em>context</em>, </td> 500 </tr> 501 <tr> 502 <td class="paramkey"></td> 503 <td></td> 504 <td class="paramtype">krb5_crypto </td> 505 <td class="paramname"> <em>crypto</em>, </td> 506 </tr> 507 <tr> 508 <td class="paramkey"></td> 509 <td></td> 510 <td class="paramtype">size_t * </td> 511 <td class="paramname"> <em>confoundersize</em></td><td> </td> 512 </tr> 513 <tr> 514 <td></td> 515 <td>)</td> 516 <td></td><td></td><td></td> 517 </tr> 518 </table> 519</div> 520<div class="memdoc"> 521 522<p> 523Return the confounder size used by the crypto context<p> 524<dl compact><dt><b>Parameters:</b></dt><dd> 525 <table border="0" cellspacing="2" cellpadding="0"> 526 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 527 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 528 <tr><td valign="top"></td><td valign="top"><em>confoundersize</em> </td><td>the returned confounder size</td></tr> 529 </table> 530</dl> 531<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 532 533</div> 534</div><p> 535<a class="anchor" name="g6bc15d1940ecdd4558f18eeb3dda233c"></a><!-- doxytag: member="crypto.c::krb5_crypto_getenctype" ref="g6bc15d1940ecdd4558f18eeb3dda233c" args="(krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)" --> 536<div class="memitem"> 537<div class="memproto"> 538 <table class="memname"> 539 <tr> 540 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getenctype </td> 541 <td>(</td> 542 <td class="paramtype">krb5_context </td> 543 <td class="paramname"> <em>context</em>, </td> 544 </tr> 545 <tr> 546 <td class="paramkey"></td> 547 <td></td> 548 <td class="paramtype">krb5_crypto </td> 549 <td class="paramname"> <em>crypto</em>, </td> 550 </tr> 551 <tr> 552 <td class="paramkey"></td> 553 <td></td> 554 <td class="paramtype">krb5_enctype * </td> 555 <td class="paramname"> <em>enctype</em></td><td> </td> 556 </tr> 557 <tr> 558 <td></td> 559 <td>)</td> 560 <td></td><td></td><td></td> 561 </tr> 562 </table> 563</div> 564<div class="memdoc"> 565 566<p> 567Return the encryption type used by the crypto context<p> 568<dl compact><dt><b>Parameters:</b></dt><dd> 569 <table border="0" cellspacing="2" cellpadding="0"> 570 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 571 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 572 <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the resulting encryption type</td></tr> 573 </table> 574</dl> 575<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 576 577</div> 578</div><p> 579<a class="anchor" name="gfbed35e76f7d971b90cfe0806f43d279"></a><!-- doxytag: member="crypto.c::krb5_crypto_getpadsize" ref="gfbed35e76f7d971b90cfe0806f43d279" args="(krb5_context context, krb5_crypto crypto, size_t *padsize)" --> 580<div class="memitem"> 581<div class="memproto"> 582 <table class="memname"> 583 <tr> 584 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getpadsize </td> 585 <td>(</td> 586 <td class="paramtype">krb5_context </td> 587 <td class="paramname"> <em>context</em>, </td> 588 </tr> 589 <tr> 590 <td class="paramkey"></td> 591 <td></td> 592 <td class="paramtype">krb5_crypto </td> 593 <td class="paramname"> <em>crypto</em>, </td> 594 </tr> 595 <tr> 596 <td class="paramkey"></td> 597 <td></td> 598 <td class="paramtype">size_t * </td> 599 <td class="paramname"> <em>padsize</em></td><td> </td> 600 </tr> 601 <tr> 602 <td></td> 603 <td>)</td> 604 <td></td><td></td><td></td> 605 </tr> 606 </table> 607</div> 608<div class="memdoc"> 609 610<p> 611Return the padding size used by the crypto context<p> 612<dl compact><dt><b>Parameters:</b></dt><dd> 613 <table border="0" cellspacing="2" cellpadding="0"> 614 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 615 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 616 <tr><td valign="top"></td><td valign="top"><em>padsize</em> </td><td>the return padding size</td></tr> 617 </table> 618</dl> 619<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 620 621</div> 622</div><p> 623<a class="anchor" name="gd7003a8a81cef633cc0a2cc07c93dd32"></a><!-- doxytag: member="crypto.c::krb5_crypto_init" ref="gd7003a8a81cef633cc0a2cc07c93dd32" args="(krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)" --> 624<div class="memitem"> 625<div class="memproto"> 626 <table class="memname"> 627 <tr> 628 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_init </td> 629 <td>(</td> 630 <td class="paramtype">krb5_context </td> 631 <td class="paramname"> <em>context</em>, </td> 632 </tr> 633 <tr> 634 <td class="paramkey"></td> 635 <td></td> 636 <td class="paramtype">const krb5_keyblock * </td> 637 <td class="paramname"> <em>key</em>, </td> 638 </tr> 639 <tr> 640 <td class="paramkey"></td> 641 <td></td> 642 <td class="paramtype">krb5_enctype </td> 643 <td class="paramname"> <em>etype</em>, </td> 644 </tr> 645 <tr> 646 <td class="paramkey"></td> 647 <td></td> 648 <td class="paramtype">krb5_crypto * </td> 649 <td class="paramname"> <em>crypto</em></td><td> </td> 650 </tr> 651 <tr> 652 <td></td> 653 <td>)</td> 654 <td></td><td></td><td></td> 655 </tr> 656 </table> 657</div> 658<div class="memdoc"> 659 660<p> 661Create a crypto context used for all encryption and signature operation. The encryption type to use is taken from the key, but can be overridden with the enctype parameter. This can be useful for encryptions types which is compatiable (DES for example).<p> 662To free the crypto context, use <a class="el" href="group__krb5__crypto.html#g57eaed735baab9eb3c3740be8e4d2137">krb5_crypto_destroy()</a>.<p> 663<dl compact><dt><b>Parameters:</b></dt><dd> 664 <table border="0" cellspacing="2" cellpadding="0"> 665 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 666 <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>the key block information with all key data </td></tr> 667 <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>the encryption type </td></tr> 668 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>the resulting crypto context</td></tr> 669 </table> 670</dl> 671<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 672 673</div> 674</div><p> 675<a class="anchor" name="g64cad191491a5d3309553e7d28d8ad46"></a><!-- doxytag: member="crypto.c::krb5_decrypt_iov_ivec" ref="g64cad191491a5d3309553e7d28d8ad46" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, void *ivec)" --> 676<div class="memitem"> 677<div class="memproto"> 678 <table class="memname"> 679 <tr> 680 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_decrypt_iov_ivec </td> 681 <td>(</td> 682 <td class="paramtype">krb5_context </td> 683 <td class="paramname"> <em>context</em>, </td> 684 </tr> 685 <tr> 686 <td class="paramkey"></td> 687 <td></td> 688 <td class="paramtype">krb5_crypto </td> 689 <td class="paramname"> <em>crypto</em>, </td> 690 </tr> 691 <tr> 692 <td class="paramkey"></td> 693 <td></td> 694 <td class="paramtype">unsigned </td> 695 <td class="paramname"> <em>usage</em>, </td> 696 </tr> 697 <tr> 698 <td class="paramkey"></td> 699 <td></td> 700 <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 701 <td class="paramname"> <em>data</em>, </td> 702 </tr> 703 <tr> 704 <td class="paramkey"></td> 705 <td></td> 706 <td class="paramtype">unsigned int </td> 707 <td class="paramname"> <em>num_data</em>, </td> 708 </tr> 709 <tr> 710 <td class="paramkey"></td> 711 <td></td> 712 <td class="paramtype">void * </td> 713 <td class="paramname"> <em>ivec</em></td><td> </td> 714 </tr> 715 <tr> 716 <td></td> 717 <td>)</td> 718 <td></td><td></td><td></td> 719 </tr> 720 </table> 721</div> 722<div class="memdoc"> 723 724<p> 725Inline decrypt a Kerberos message.<p> 726<dl compact><dt><b>Parameters:</b></dt><dd> 727 <table border="0" cellspacing="2" cellpadding="0"> 728 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 729 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 730 <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 731 <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 732 <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 733 <tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr> 734 </table> 735</dl> 736<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl> 7371. KRB5_CRYPTO_TYPE_HEADER 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted protocol headers and trailers. The output data will be of same size as the input data or shorter. 738</div> 739</div><p> 740<a class="anchor" name="g674423844043d6beebb959bb8b7ab082"></a><!-- doxytag: member="crypto.c::krb5_encrypt_iov_ivec" ref="g674423844043d6beebb959bb8b7ab082" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, int num_data, void *ivec)" --> 741<div class="memitem"> 742<div class="memproto"> 743 <table class="memname"> 744 <tr> 745 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_encrypt_iov_ivec </td> 746 <td>(</td> 747 <td class="paramtype">krb5_context </td> 748 <td class="paramname"> <em>context</em>, </td> 749 </tr> 750 <tr> 751 <td class="paramkey"></td> 752 <td></td> 753 <td class="paramtype">krb5_crypto </td> 754 <td class="paramname"> <em>crypto</em>, </td> 755 </tr> 756 <tr> 757 <td class="paramkey"></td> 758 <td></td> 759 <td class="paramtype">unsigned </td> 760 <td class="paramname"> <em>usage</em>, </td> 761 </tr> 762 <tr> 763 <td class="paramkey"></td> 764 <td></td> 765 <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 766 <td class="paramname"> <em>data</em>, </td> 767 </tr> 768 <tr> 769 <td class="paramkey"></td> 770 <td></td> 771 <td class="paramtype">int </td> 772 <td class="paramname"> <em>num_data</em>, </td> 773 </tr> 774 <tr> 775 <td class="paramkey"></td> 776 <td></td> 777 <td class="paramtype">void * </td> 778 <td class="paramname"> <em>ivec</em></td><td> </td> 779 </tr> 780 <tr> 781 <td></td> 782 <td>)</td> 783 <td></td><td></td><td></td> 784 </tr> 785 </table> 786</div> 787<div class="memdoc"> 788 789<p> 790Inline encrypt a kerberos message<p> 791<dl compact><dt><b>Parameters:</b></dt><dd> 792 <table border="0" cellspacing="2" cellpadding="0"> 793 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 794 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 795 <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 796 <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 797 <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 798 <tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr> 799 </table> 800</dl> 801<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl> 802Kerberos encrypted data look like this:<p> 8031. KRB5_CRYPTO_TYPE_HEADER 2. array [1,...] KRB5_CRYPTO_TYPE_DATA and array [0,...] KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used headers and trailers. 3. KRB5_CRYPTO_TYPE_PADDING, at least on padsize long if padsize > 1 4. KRB5_CRYPTO_TYPE_TRAILER 804</div> 805</div><p> 806<a class="anchor" name="g77acfc640aa003095ea5890de2ea1cb7"></a><!-- doxytag: member="crypto.c::krb5_enctype_disable" ref="g77acfc640aa003095ea5890de2ea1cb7" args="(krb5_context context, krb5_enctype enctype)" --> 807<div class="memitem"> 808<div class="memproto"> 809 <table class="memname"> 810 <tr> 811 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_disable </td> 812 <td>(</td> 813 <td class="paramtype">krb5_context </td> 814 <td class="paramname"> <em>context</em>, </td> 815 </tr> 816 <tr> 817 <td class="paramkey"></td> 818 <td></td> 819 <td class="paramtype">krb5_enctype </td> 820 <td class="paramname"> <em>enctype</em></td><td> </td> 821 </tr> 822 <tr> 823 <td></td> 824 <td>)</td> 825 <td></td><td></td><td></td> 826 </tr> 827 </table> 828</div> 829<div class="memdoc"> 830 831<p> 832Disable encryption type<p> 833<dl compact><dt><b>Parameters:</b></dt><dd> 834 <table border="0" cellspacing="2" cellpadding="0"> 835 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 836 <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to disable</td></tr> 837 </table> 838</dl> 839<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 840 841</div> 842</div><p> 843<a class="anchor" name="g8dfebc785c059e38c22c6ca34ed5f68a"></a><!-- doxytag: member="crypto.c::krb5_enctype_enable" ref="g8dfebc785c059e38c22c6ca34ed5f68a" args="(krb5_context context, krb5_enctype enctype)" --> 844<div class="memitem"> 845<div class="memproto"> 846 <table class="memname"> 847 <tr> 848 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_enable </td> 849 <td>(</td> 850 <td class="paramtype">krb5_context </td> 851 <td class="paramname"> <em>context</em>, </td> 852 </tr> 853 <tr> 854 <td class="paramkey"></td> 855 <td></td> 856 <td class="paramtype">krb5_enctype </td> 857 <td class="paramname"> <em>enctype</em></td><td> </td> 858 </tr> 859 <tr> 860 <td></td> 861 <td>)</td> 862 <td></td><td></td><td></td> 863 </tr> 864 </table> 865</div> 866<div class="memdoc"> 867 868<p> 869Enable encryption type<p> 870<dl compact><dt><b>Parameters:</b></dt><dd> 871 <table border="0" cellspacing="2" cellpadding="0"> 872 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 873 <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to enable</td></tr> 874 </table> 875</dl> 876<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 877 878</div> 879</div><p> 880<a class="anchor" name="gd5f2b15d5fde369cf923e8fae4b00bec"></a><!-- doxytag: member="crypto.c::krb5_enctype_valid" ref="gd5f2b15d5fde369cf923e8fae4b00bec" args="(krb5_context context, krb5_enctype etype)" --> 881<div class="memitem"> 882<div class="memproto"> 883 <table class="memname"> 884 <tr> 885 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_valid </td> 886 <td>(</td> 887 <td class="paramtype">krb5_context </td> 888 <td class="paramname"> <em>context</em>, </td> 889 </tr> 890 <tr> 891 <td class="paramkey"></td> 892 <td></td> 893 <td class="paramtype">krb5_enctype </td> 894 <td class="paramname"> <em>etype</em></td><td> </td> 895 </tr> 896 <tr> 897 <td></td> 898 <td>)</td> 899 <td></td><td></td><td></td> 900 </tr> 901 </table> 902</div> 903<div class="memdoc"> 904 905<p> 906Check if a enctype is valid, return 0 if it is.<p> 907<dl compact><dt><b>Parameters:</b></dt><dd> 908 <table border="0" cellspacing="2" cellpadding="0"> 909 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 910 <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>enctype to check if its valid or not</td></tr> 911 </table> 912</dl> 913<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code for an failure or 0 on success (enctype valid). </dd></dl> 914 915</div> 916</div><p> 917<a class="anchor" name="g2e434abf56e7d7852358e11cdab0bb33"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock" ref="g2e434abf56e7d7852358e11cdab0bb33" args="(krb5_context context, krb5_keyblock *keyblock)" --> 918<div class="memitem"> 919<div class="memproto"> 920 <table class="memname"> 921 <tr> 922 <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock </td> 923 <td>(</td> 924 <td class="paramtype">krb5_context </td> 925 <td class="paramname"> <em>context</em>, </td> 926 </tr> 927 <tr> 928 <td class="paramkey"></td> 929 <td></td> 930 <td class="paramtype">krb5_keyblock * </td> 931 <td class="paramname"> <em>keyblock</em></td><td> </td> 932 </tr> 933 <tr> 934 <td></td> 935 <td>)</td> 936 <td></td><td></td><td></td> 937 </tr> 938 </table> 939</div> 940<div class="memdoc"> 941 942<p> 943Free a keyblock, also zero out the content of the keyblock, uses <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a> to free the content.<p> 944<dl compact><dt><b>Parameters:</b></dt><dd> 945 <table border="0" cellspacing="2" cellpadding="0"> 946 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 947 <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to free, NULL is valid argument </td></tr> 948 </table> 949</dl> 950 951</div> 952</div><p> 953<a class="anchor" name="g66d5d8067358373fdab46987503f2398"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock_contents" ref="g66d5d8067358373fdab46987503f2398" args="(krb5_context context, krb5_keyblock *keyblock)" --> 954<div class="memitem"> 955<div class="memproto"> 956 <table class="memname"> 957 <tr> 958 <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock_contents </td> 959 <td>(</td> 960 <td class="paramtype">krb5_context </td> 961 <td class="paramname"> <em>context</em>, </td> 962 </tr> 963 <tr> 964 <td class="paramkey"></td> 965 <td></td> 966 <td class="paramtype">krb5_keyblock * </td> 967 <td class="paramname"> <em>keyblock</em></td><td> </td> 968 </tr> 969 <tr> 970 <td></td> 971 <td>)</td> 972 <td></td><td></td><td></td> 973 </tr> 974 </table> 975</div> 976<div class="memdoc"> 977 978<p> 979Free a keyblock's content, also zero out the content of the keyblock.<p> 980<dl compact><dt><b>Parameters:</b></dt><dd> 981 <table border="0" cellspacing="2" cellpadding="0"> 982 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 983 <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock content to free, NULL is valid argument </td></tr> 984 </table> 985</dl> 986 987</div> 988</div><p> 989<a class="anchor" name="g147a581626c11fafee04bfda036781ea"></a><!-- doxytag: member="generate_subkey.c::krb5_generate_subkey_extended" ref="g147a581626c11fafee04bfda036781ea" args="(krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)" --> 990<div class="memitem"> 991<div class="memproto"> 992 <table class="memname"> 993 <tr> 994 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey_extended </td> 995 <td>(</td> 996 <td class="paramtype">krb5_context </td> 997 <td class="paramname"> <em>context</em>, </td> 998 </tr> 999 <tr> 1000 <td class="paramkey"></td> 1001 <td></td> 1002 <td class="paramtype">const krb5_keyblock * </td> 1003 <td class="paramname"> <em>key</em>, </td> 1004 </tr> 1005 <tr> 1006 <td class="paramkey"></td> 1007 <td></td> 1008 <td class="paramtype">krb5_enctype </td> 1009 <td class="paramname"> <em>etype</em>, </td> 1010 </tr> 1011 <tr> 1012 <td class="paramkey"></td> 1013 <td></td> 1014 <td class="paramtype">krb5_keyblock ** </td> 1015 <td class="paramname"> <em>subkey</em></td><td> </td> 1016 </tr> 1017 <tr> 1018 <td></td> 1019 <td>)</td> 1020 <td></td><td></td><td></td> 1021 </tr> 1022 </table> 1023</div> 1024<div class="memdoc"> 1025 1026<p> 1027Generate subkey, from keyblock<p> 1028<dl compact><dt><b>Parameters:</b></dt><dd> 1029 <table border="0" cellspacing="2" cellpadding="0"> 1030 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>kerberos context </td></tr> 1031 <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>session key </td></tr> 1032 <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>encryption type of subkey, if ETYPE_NULL, use key's enctype </td></tr> 1033 <tr><td valign="top"></td><td valign="top"><em>subkey</em> </td><td>returned new, free with <a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock()</a>.</td></tr> 1034 </table> 1035</dl> 1036<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 1037 1038</div> 1039</div><p> 1040<a class="anchor" name="ga2caa584d5a6f0bbba3e1bae7255be5c"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_get_enctype" ref="ga2caa584d5a6f0bbba3e1bae7255be5c" args="(const krb5_keyblock *block)" --> 1041<div class="memitem"> 1042<div class="memproto"> 1043 <table class="memname"> 1044 <tr> 1045 <td class="memname">KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL krb5_keyblock_get_enctype </td> 1046 <td>(</td> 1047 <td class="paramtype">const krb5_keyblock * </td> 1048 <td class="paramname"> <em>block</em> </td> 1049 <td> ) </td> 1050 <td></td> 1051 </tr> 1052 </table> 1053</div> 1054<div class="memdoc"> 1055 1056<p> 1057Get encryption type of a keyblock. 1058</div> 1059</div><p> 1060<a class="anchor" name="g690c42630f2f6b9f7ce96cc75441803d"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_init" ref="g690c42630f2f6b9f7ce96cc75441803d" args="(krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" --> 1061<div class="memitem"> 1062<div class="memproto"> 1063 <table class="memname"> 1064 <tr> 1065 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keyblock_init </td> 1066 <td>(</td> 1067 <td class="paramtype">krb5_context </td> 1068 <td class="paramname"> <em>context</em>, </td> 1069 </tr> 1070 <tr> 1071 <td class="paramkey"></td> 1072 <td></td> 1073 <td class="paramtype">krb5_enctype </td> 1074 <td class="paramname"> <em>type</em>, </td> 1075 </tr> 1076 <tr> 1077 <td class="paramkey"></td> 1078 <td></td> 1079 <td class="paramtype">const void * </td> 1080 <td class="paramname"> <em>data</em>, </td> 1081 </tr> 1082 <tr> 1083 <td class="paramkey"></td> 1084 <td></td> 1085 <td class="paramtype">size_t </td> 1086 <td class="paramname"> <em>size</em>, </td> 1087 </tr> 1088 <tr> 1089 <td class="paramkey"></td> 1090 <td></td> 1091 <td class="paramtype">krb5_keyblock * </td> 1092 <td class="paramname"> <em>key</em></td><td> </td> 1093 </tr> 1094 <tr> 1095 <td></td> 1096 <td>)</td> 1097 <td></td><td></td><td></td> 1098 </tr> 1099 </table> 1100</div> 1101<div class="memdoc"> 1102 1103<p> 1104Fill in `key' with key data of type `enctype' from `data' of length `size'. Key should be freed using <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a>.<p> 1105<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 1106 1107</div> 1108</div><p> 1109<a class="anchor" name="g33e1cb14ccab45ce46d51064caf07c10"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_zero" ref="g33e1cb14ccab45ce46d51064caf07c10" args="(krb5_keyblock *keyblock)" --> 1110<div class="memitem"> 1111<div class="memproto"> 1112 <table class="memname"> 1113 <tr> 1114 <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_keyblock_zero </td> 1115 <td>(</td> 1116 <td class="paramtype">krb5_keyblock * </td> 1117 <td class="paramname"> <em>keyblock</em> </td> 1118 <td> ) </td> 1119 <td></td> 1120 </tr> 1121 </table> 1122</div> 1123<div class="memdoc"> 1124 1125<p> 1126Zero out a keyblock<p> 1127<dl compact><dt><b>Parameters:</b></dt><dd> 1128 <table border="0" cellspacing="2" cellpadding="0"> 1129 <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to zero out </td></tr> 1130 </table> 1131</dl> 1132 1133</div> 1134</div><p> 1135<a class="anchor" name="ga5f3001696f59f7d47539efe82b1c4cd"></a><!-- doxytag: member="crypto.c::krb5_random_to_key" ref="ga5f3001696f59f7d47539efe82b1c4cd" args="(krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" --> 1136<div class="memitem"> 1137<div class="memproto"> 1138 <table class="memname"> 1139 <tr> 1140 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_random_to_key </td> 1141 <td>(</td> 1142 <td class="paramtype">krb5_context </td> 1143 <td class="paramname"> <em>context</em>, </td> 1144 </tr> 1145 <tr> 1146 <td class="paramkey"></td> 1147 <td></td> 1148 <td class="paramtype">krb5_enctype </td> 1149 <td class="paramname"> <em>type</em>, </td> 1150 </tr> 1151 <tr> 1152 <td class="paramkey"></td> 1153 <td></td> 1154 <td class="paramtype">const void * </td> 1155 <td class="paramname"> <em>data</em>, </td> 1156 </tr> 1157 <tr> 1158 <td class="paramkey"></td> 1159 <td></td> 1160 <td class="paramtype">size_t </td> 1161 <td class="paramname"> <em>size</em>, </td> 1162 </tr> 1163 <tr> 1164 <td class="paramkey"></td> 1165 <td></td> 1166 <td class="paramtype">krb5_keyblock * </td> 1167 <td class="paramname"> <em>key</em></td><td> </td> 1168 </tr> 1169 <tr> 1170 <td></td> 1171 <td>)</td> 1172 <td></td><td></td><td></td> 1173 </tr> 1174 </table> 1175</div> 1176<div class="memdoc"> 1177 1178<p> 1179Converts the random bytestring to a protocol key according to Kerberos crypto frame work. It may be assumed that all the bits of the input string are equally random, even though the entropy present in the random source may be limited.<p> 1180<dl compact><dt><b>Parameters:</b></dt><dd> 1181 <table border="0" cellspacing="2" cellpadding="0"> 1182 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 1183 <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the enctype resulting key will be of </td></tr> 1184 <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>input random data to convert to a key </td></tr> 1185 <tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>size of input random data, at least krb5_enctype_keysize() long </td></tr> 1186 <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>key, output key, free with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a></td></tr> 1187 </table> 1188</dl> 1189<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 1190 1191</div> 1192</div><p> 1193<a class="anchor" name="g1789d8188287750394c3b8366a90bd13"></a><!-- doxytag: member="crypto.c::krb5_verify_checksum_iov" ref="g1789d8188287750394c3b8366a90bd13" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)" --> 1194<div class="memitem"> 1195<div class="memproto"> 1196 <table class="memname"> 1197 <tr> 1198 <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verify_checksum_iov </td> 1199 <td>(</td> 1200 <td class="paramtype">krb5_context </td> 1201 <td class="paramname"> <em>context</em>, </td> 1202 </tr> 1203 <tr> 1204 <td class="paramkey"></td> 1205 <td></td> 1206 <td class="paramtype">krb5_crypto </td> 1207 <td class="paramname"> <em>crypto</em>, </td> 1208 </tr> 1209 <tr> 1210 <td class="paramkey"></td> 1211 <td></td> 1212 <td class="paramtype">unsigned </td> 1213 <td class="paramname"> <em>usage</em>, </td> 1214 </tr> 1215 <tr> 1216 <td class="paramkey"></td> 1217 <td></td> 1218 <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 1219 <td class="paramname"> <em>data</em>, </td> 1220 </tr> 1221 <tr> 1222 <td class="paramkey"></td> 1223 <td></td> 1224 <td class="paramtype">unsigned int </td> 1225 <td class="paramname"> <em>num_data</em>, </td> 1226 </tr> 1227 <tr> 1228 <td class="paramkey"></td> 1229 <td></td> 1230 <td class="paramtype">krb5_cksumtype * </td> 1231 <td class="paramname"> <em>type</em></td><td> </td> 1232 </tr> 1233 <tr> 1234 <td></td> 1235 <td>)</td> 1236 <td></td><td></td><td></td> 1237 </tr> 1238 </table> 1239</div> 1240<div class="memdoc"> 1241 1242<p> 1243Verify a Kerberos message checksum.<p> 1244<dl compact><dt><b>Parameters:</b></dt><dd> 1245 <table border="0" cellspacing="2" cellpadding="0"> 1246 <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 1247 <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 1248 <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 1249 <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 1250 <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 1251 <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>return checksum type if not NULL</td></tr> 1252 </table> 1253</dl> 1254<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 1255 1256</div> 1257</div><p> 1258</div> 1259<hr size="1"><address style="text-align: right;"><small> 1260Generated on Wed Jan 11 14:07:48 2012 for HeimdalKerberos5library by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address> 1261</body> 1262</html> 1263