Lines Matching refs:key

86 	 * Make a copy of the signature or verification key, and save it
89 * on this original key while doing signing/verification.
104 dsa_ctx->key = tmp_key;
124 local_dsa_sign(soft_object_t *key, uchar_t *q, uint_t qlen,
136 rv = soft_get_private_value(key, CKA_PRIME, p, &plen);
141 rv = soft_get_private_value(key, CKA_BASE, g, &glen);
146 rv = soft_get_private_value(key, CKA_VALUE, x, &xlen);
170 local_dsa_verify(soft_object_t *key, CK_BYTE_PTR data, CK_BYTE_PTR sig)
183 rv = soft_get_public_value(key, CKA_PRIME, p, &plen);
188 rv = soft_get_public_value(key, CKA_SUBPRIME, q, &qlen);
193 rv = soft_get_public_value(key, CKA_BASE, g, &glen);
198 rv = soft_get_public_value(key, CKA_VALUE, y, &ylen);
231 soft_object_t *key = dsa_ctx->key;
235 if ((key->class != CKO_PRIVATE_KEY) || (key->key_type != CKK_DSA)) {
241 rv = soft_get_private_value(key, CKA_SUBPRIME, q, &qlen);
273 rv = local_dsa_sign(key, q, qlen, pData, ulDataLen, pSigned);
284 soft_cleanup_object(key);
285 free(key);
306 soft_object_t *key = dsa_ctx->key;
340 /* free the signature key */
341 soft_cleanup_object(key);
342 free(key);
348 * soft_dsa_sign() will free the signature key.
374 soft_object_t *key = dsa_ctx->key;
376 if ((key->class != CKO_PUBLIC_KEY) ||(key->key_type != CKK_DSA)) {
397 rv = local_dsa_verify(key, pData, pSignature);
405 soft_cleanup_object(key);
406 free(key);
421 soft_object_t *key = dsa_ctx->key;
430 /* free the verification key */
431 soft_cleanup_object(key);
432 free(key);
438 * soft_dsa_verify() will free the verification key.
453 * Set a DSA key attribute's value and length.
457 soft_genDSAkey_set_attribute(soft_object_t *key, CK_ATTRIBUTE_TYPE type,
469 dst = OBJ_PUB_DSA_VALUE(key);
471 dst = OBJ_PRI_DSA_VALUE(key);
476 dst = OBJ_PUB_DSA_PRIME(key);
478 dst = OBJ_PRI_DSA_PRIME(key);
483 dst = OBJ_PUB_DSA_SUBPRIME(key);
485 dst = OBJ_PRI_DSA_SUBPRIME(key);
490 dst = OBJ_PUB_DSA_BASE(key);
492 dst = OBJ_PRI_DSA_BASE(key);
505 /* Copy the attribute in the key object. */
516 * Generate a public/private DSA key pair, given attributes
559 /* Inputs to DSA key pair generation. */
569 /* Outputs from DSA key pair generation. */
581 /* Update attribute in public key. */
586 /* Update attributes in private key. */