Lines Matching defs:key

65  *     priv_key    key to use for signing.
82 HMAC_Key *key;
96 key = (HMAC_Key *) d_key->dk_KEY_struct;
100 MD5Update(ctx, key->hk_ipad, HMAC_LEN);
113 MD5Update(ctx, key->hk_opad, HMAC_LEN);
136 * dkey key to use for verify.
151 HMAC_Key *key;
164 key = (HMAC_Key *) d_key->dk_KEY_struct;
167 MD5Update(ctx, key->hk_ipad, HMAC_LEN);
174 if (signature == NULL || key == NULL || sig_len != MD5_LEN)
180 MD5Update(ctx, key->hk_opad, HMAC_LEN);
199 * Converts key from raw data to an HMAC Key
202 * hkey the HMAC key to be filled in
203 * key the key in raw format
204 * keylen the length of the key
210 dst_buffer_to_hmac_md5(DST_KEY *dkey, const u_char *key, const int keylen)
218 if (dkey == NULL || key == NULL || keylen < 0)
227 /* if key is longer than HMAC_LEN bytes reset it to key=MD5(key) */
230 MD5Update(&ctx, key, (unsigned int)keylen);
233 key = tk;
236 /* start out by storing key in pads */
237 memcpy(hkey->hk_ipad, key, local_keylen);
238 memcpy(hkey->hk_opad, key, local_keylen);
240 /* XOR key with hk_ipad and opad values */
271 u_char key[HMAC_LEN];
295 key[key_len] = hkey->hk_ipad[key_len] ^ HMAC_IPAD;
297 if (key[key_len] != 0)
301 len = b64_ntop(key, key_len, bp, BUF_LEFT);
318 * Converts contents of a key file into an HMAC key.
320 * hkey structure to put key into
321 * buff buffer containing the encoded key
324 * n >= 0 Foot print of the key converted
333 u_char key[HMAC_LEN+1]; /* b64_pton needs more than 64 bytes do decode
345 memset(key, 0, sizeof(key));
359 key_len = b64_pton((char *)tmp, key, HMAC_LEN+1); /*%< see above */
362 if (dst_buffer_to_hmac_md5(dkey, key, key_len) < 0) {
370 * function to extract hmac key from DST_KEY structure
372 * in_key: HMAC-MD5 key
419 dst_hmac_md5_free_key_structure(void *key)
421 HMAC_Key *hkey = key;
429 * Creates a HMAC key of size size with a maximum size of 63 bytes
430 * generating a HMAC key larger than 63 bytes makes no sense as that key
436 dst_hmac_md5_generate_key(DST_KEY *key, const int nothing)