Lines Matching defs:keys
164 dh_key_set keys;
181 /* Package the context session keys into a key_set */
182 keys.dh_key_set_len = ctx->no_keys;
183 keys.dh_key_set_val = ctx->keys;
186 return (__make_token(output, NULL, &token, &keys));
251 * establish_session_keys: This routine decrypts the session keys supplied
252 * and uses those keys to verifiy the signature over the input token
257 dh_key_set_t keys, dh_signature_t sig, dh_token_t token)
267 * mechanism uses a cache of public keys, then get the public key
275 if ((saved_keys = New(des_block, keys->dh_key_set_len)) == NULL)
278 for (i = 0; i < keys->dh_key_set_len; i++)
279 saved_keys[i] = keys->dh_key_set_val[i];
289 * We will try to decrypt the session keys up to two times.
291 * public key cache, if the set of session keys fail to
293 * token, and those session keys were decrypted by a key
301 * Decrypt the session keys using the mechanism specific
308 keys->dh_key_set_val,
309 keys->dh_key_set_len,
317 fprintf(stderr, "Received session keys %s the cache:\n",
319 for (i = 0; i < keys->dh_key_set_len; i++)
321 keys->dh_key_set_val[i].key.high,
322 keys->dh_key_set_val[i].key.low);
331 if ((stat = __verify_sig(token, DH_MECH_QOP, keys, sig)) ==
339 /* Restore the keys and signature for retry */
340 for (j = 0; j < keys->dh_key_set_len; j++)
341 keys->dh_key_set_val[j] = saved_keys[j];
457 /* Decrypt the session keys and verify the signature */
459 &clnt->keys,
509 /* Stash a copy of the session keys for the context */
510 g_cntx->no_keys = clnt->keys.dh_key_set_len;
511 if ((g_cntx->keys = New(des_block, g_cntx->no_keys)) == NULL) {
518 g_cntx->keys[i] = clnt->keys.dh_key_set_val[i];
570 Free(g_cntx->keys);
595 dh_key_set keys, ukeys; /* encrypted and unencrypted keys */
599 /* Create key_set for session keys */
600 if ((keys.dh_key_set_val = New(des_block, cntx->no_keys)) == NULL)
603 keys.dh_key_set_len = cntx->no_keys;
605 keys.dh_key_set_val[i] = cntx->keys[i];
624 /* set the tokens keys */
625 remote->keys = keys;
628 /* Encrypt the keys for the other side */
631 keys.dh_key_set_val,
633 Free(keys.dh_key_set_val);
637 /* Package up our session keys */
639 ukeys.dh_key_set_val = cntx->keys;
647 /* We're don with the encrypted session keys */
648 Free(keys.dh_key_set_val);
712 dh_gss_ctx->keys = New(des_block, 3);
713 if (dh_gss_ctx->keys == NULL) {
719 if (cntx->keyopts->key_gendeskeys(dh_gss_ctx->keys, 3)) {
728 fprintf(stderr, "Generated session keys:\n");
731 dh_gss_ctx->keys[i].key.high,
732 dh_gss_ctx->keys[i].key.low);
783 Free(dh_gss_ctx->keys);
804 dh_key_set keys;
817 /* Package the session keys for __get_token) */
818 keys.dh_key_set_len = dh_gss_ctx->no_keys;
819 keys.dh_key_set_val = dh_gss_ctx->keys;
821 /* Deserialize the input token into tok using the session keys */
822 if (*minor = __get_token(token, NULL, &tok, &keys))