Searched refs:key_p (Results 1 - 25 of 29) sorted by relevance

12

/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftARCFourCrypt.c45 soft_object_t *key_p, boolean_t encrypt)
55 keyvallen = (int)OBJ_SEC_VALUE_LEN(key_p);
57 keyvallen = OBJ_SEC_VALUE_LEN(key_p);
64 keyval = OBJ_SEC_VALUE(key_p);
44 soft_arcfour_crypt_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) argument
H A DsoftBlowfishCrypt.c39 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) {
78 if (!(key_p->bool_attr_mask & SENSITIVE_BOOL_ON)) {
79 if (OBJ_KEY_SCHED(key_p) == NULL) {
82 (void) pthread_mutex_lock(&key_p->object_mutex);
83 if (OBJ_KEY_SCHED(key_p) == NULL) {
87 &key_p->object_mutex);
92 blowfish_init_keysched(OBJ_SEC_VALUE(key_p),
93 (OBJ_SEC_VALUE_LEN(key_p) * 8), ks);
95 OBJ_KEY_SCHED_LEN(key_p) = size;
96 OBJ_KEY_SCHED(key_p)
38 soft_blowfish_crypt_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) argument
[all...]
H A DsoftDESCrypt.c45 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
58 if (key_p->key_type == CKK_DES)
69 soft_des_ctx->key_type = key_p->key_type;
91 if (!(key_p->bool_attr_mask & SENSITIVE_BOOL_ON)) {
92 if (OBJ_KEY_SCHED(key_p) == NULL) {
94 (void) pthread_mutex_lock(&key_p->object_mutex);
95 if (OBJ_KEY_SCHED(key_p) == NULL) {
96 if (key_p->key_type == CKK_DES)
102 &key_p->object_mutex);
107 if (key_p
44 soft_des_crypt_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) argument
828 soft_des_sign_verify_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign_op) argument
[all...]
H A DsoftSign.c41 soft_object_t *key_p; local
58 HANDLE2OBJECT(hKey, key_p, rv);
64 if (!(key_p->bool_attr_mask & SIGN_BOOL_ON)) {
87 rv = soft_sign_init(session_p, pMechanism, key_p);
96 OBJ_REFRELE(key_p);
298 soft_object_t *key_p; local
315 HANDLE2OBJECT(hKey, key_p, rv);
321 if (!(key_p->bool_attr_mask & SIGN_RECOVER_BOOL_ON)) {
344 rv = soft_sign_recover_init(session_p, pMechanism, key_p);
353 OBJ_REFRELE(key_p);
[all...]
H A DsoftVerify.c41 soft_object_t *key_p; local
58 HANDLE2OBJECT(hKey, key_p, rv);
64 if (!(key_p->bool_attr_mask & VERIFY_BOOL_ON)) {
87 rv = soft_verify_init(session_p, pMechanism, key_p);
96 OBJ_REFRELE(key_p);
269 soft_object_t *key_p; local
286 HANDLE2OBJECT(hKey, key_p, rv);
292 if (!(key_p->bool_attr_mask & VERIFY_RECOVER_BOOL_ON)) {
315 rv = soft_verify_recover_init(session_p, pMechanism, key_p);
324 OBJ_REFRELE(key_p);
[all...]
H A DsoftEncryptUtil.c58 pMechanism, soft_object_t *key_p)
74 rv = soft_encrypt_init(session_p, pMechanism, key_p);
91 * key_p: pointer to key soft_object_t struct
107 soft_object_t *key_p)
116 if (key_p->key_type != CKK_DES) {
123 if ((key_p->key_type != CKK_DES2) &&
124 (key_p->key_type != CKK_DES3)) {
130 key_p, B_TRUE));
135 if (key_p->key_type != CKK_DES) {
147 if ((key_p
57 soft_encrypt_init_internal(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
106 soft_encrypt_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
[all...]
H A DsoftDecryptUtil.c67 * key_p: pointer to key soft_object_t struct
83 soft_object_t *key_p)
92 if (key_p->key_type != CKK_DES) {
100 if ((key_p->key_type != CKK_DES2) &&
101 (key_p->key_type != CKK_DES3)) {
108 key_p, B_FALSE));
113 if (key_p->key_type != CKK_DES) {
124 if ((key_p->key_type != CKK_DES2) &&
125 (key_p->key_type != CKK_DES3)) {
136 key_p, B_FALS
82 soft_decrypt_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
[all...]
H A DsoftVerifyUtil.c48 * key_p: pointer to key soft_object_t struct
57 soft_object_t *key_p)
76 pMechanism, key_p, B_FALSE));
87 key_p, B_FALSE));
93 key_p, B_FALSE));
99 key_p, B_FALSE));
105 key_p, B_FALSE));
421 soft_object_t *key_p)
430 key_p, B_FALSE));
56 soft_verify_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
420 soft_verify_recover_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
H A DsoftAESCrypt.c43 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
83 if (!(key_p->bool_attr_mask & SENSITIVE_BOOL_ON)) {
84 if (OBJ_KEY_SCHED(key_p) == NULL) {
87 (void) pthread_mutex_lock(&key_p->object_mutex);
88 if (OBJ_KEY_SCHED(key_p) == NULL) {
92 &key_p->object_mutex);
98 aes_init_keysched(OBJ_SEC_VALUE(key_p), (uint_t)
99 (OBJ_SEC_VALUE_LEN(key_p) * 8), ks);
101 aes_init_keysched(OBJ_SEC_VALUE(key_p),
102 (OBJ_SEC_VALUE_LEN(key_p) *
42 soft_aes_crypt_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) argument
[all...]
H A DsoftSignUtil.c47 * key_p: pointer to key soft_object_t struct
56 soft_object_t *key_p)
75 pMechanism, key_p, B_TRUE));
86 key_p, B_TRUE));
92 key_p, B_TRUE));
98 key_p, B_TRUE));
104 key_p, B_TRUE));
398 soft_object_t *key_p)
407 key_p, B_TRUE));
55 soft_sign_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
397 soft_sign_recover_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p) argument
H A DsoftDigest.c287 soft_object_t *key_p; local
302 HANDLE2OBJECT(hKey, key_p, rv);
318 OBJ_REFRELE(key_p);
332 rv = soft_digest_key(session_p, key_p);
340 OBJ_REFRELE(key_p);
345 OBJ_REFRELE(key_p);
H A DsoftEC.c88 check_key(soft_object_t *key_p, boolean_t sign) argument
94 if ((key_p->class != CKO_PRIVATE_KEY) ||
95 (key_p->key_type != CKK_EC))
98 p = OBJ_PRI_EC_VALUE(key_p);
107 if ((key_p->class != CKO_PUBLIC_KEY) ||
108 (key_p->key_type != CKK_EC))
111 p = OBJ_PUB_EC_POINT(key_p);
331 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
343 if ((rv = check_key(key_p, sign)) != CKR_OK)
364 (void) pthread_mutex_lock(&key_p
330 soft_ecc_sign_verify_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign) argument
[all...]
H A DsoftDSA.c47 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
57 if ((key_p->class != CKO_PRIVATE_KEY) ||
58 (key_p->key_type != CKK_DSA))
61 if ((key_p->class != CKO_PUBLIC_KEY) ||
62 (key_p->key_type != CKK_DSA))
85 (void) pthread_mutex_lock(&key_p->object_mutex);
86 rv = soft_copy_object(key_p, &tmp_key, SOFT_COPY_OBJ_ORIG_SH,
91 (void) pthread_mutex_unlock(&key_p->object_mutex);
97 (void) pthread_mutex_unlock(&key_p->object_mutex);
46 soft_dsa_sign_verify_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign) argument
H A DsoftDecrypt.c41 soft_object_t *key_p; local
58 HANDLE2OBJECT(hKey, key_p, rv);
63 if (!(key_p->bool_attr_mask & DECRYPT_BOOL_ON)) {
87 rv = soft_decrypt_init(session_p, pMechanism, key_p);
96 OBJ_REFRELE(key_p);
H A DsoftEncrypt.c41 soft_object_t *key_p; local
58 HANDLE2OBJECT(hKey, key_p, rv);
63 if (!(key_p->bool_attr_mask & ENCRYPT_BOOL_ON)) {
87 rv = soft_encrypt_init(session_p, pMechanism, key_p);
96 OBJ_REFRELE(key_p);
H A DsoftDigestUtil.c469 soft_digest_key(soft_session_t *session_p, soft_object_t *key_p) argument
475 if (key_p->class != CKO_SECRET_KEY)
478 if ((OBJ_SEC_VALUE(key_p) == NULL) ||
479 (OBJ_SEC_VALUE_LEN(key_p) == 0))
482 rv = soft_digest_update(session_p, OBJ_SEC_VALUE(key_p),
483 OBJ_SEC_VALUE_LEN(key_p));
H A DsoftKeystore.h123 CK_RV soft_keystore_crypt(soft_object_t *key_p, uchar_t *ivec,
127 CK_RV soft_keystore_hmac(soft_object_t *key_p, boolean_t sign,
H A DsoftRSA.c190 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
209 (void) pthread_mutex_lock(&key_p->object_mutex);
210 rv = soft_copy_object(key_p, &tmp_key, SOFT_COPY_OBJ_ORIG_SH,
215 (void) pthread_mutex_unlock(&key_p->object_mutex);
221 (void) pthread_mutex_unlock(&key_p->object_mutex);
416 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p,
425 if ((key_p->class != CKO_PRIVATE_KEY) ||
426 (key_p->key_type != CKK_RSA))
429 if ((key_p->class != CKO_PUBLIC_KEY) ||
430 (key_p
189 soft_rsa_crypt_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t encrypt) argument
415 soft_rsa_sign_verify_init_common(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign) argument
[all...]
H A DsoftCrypt.h92 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign_op);
/illumos-gate/usr/src/lib/pkcs11/pkcs11_kernel/common/
H A DkernelDecrypt.c40 kernel_decrypt_init(kernel_session_t *session_p, kernel_object_t *key_p, argument
50 if (key_p->is_lib_obj && !(key_p->bool_attr_mask & DECRYPT_BOOL_ON)) {
70 if (!key_p->is_lib_obj) {
72 decrypt_init.di_key.ck_obj_id = key_p->k_handle;
74 if (key_p->class == CKO_SECRET_KEY) {
77 get_symmetric_key_value(key_p);
84 OBJ_SEC(key_p)->sk_value_len << 3;
86 } else if (key_p->key_type == CKK_RSA) {
87 if (get_rsa_private_key(key_p,
156 kernel_object_t *key_p; local
[all...]
H A DkernelSign.c41 kernel_object_t *key_p; local
66 HANDLE2OBJECT(hKey, key_p, rv);
73 if (key_p->is_lib_obj && !(key_p->bool_attr_mask & SIGN_BOOL_ON)) {
90 if (!key_p->is_lib_obj) {
92 sign_init.si_key.ck_obj_id = key_p->k_handle;
94 if (key_p->class == CKO_SECRET_KEY) {
97 get_symmetric_key_value(key_p);
103 OBJ_SEC(key_p)->sk_value_len << 3;
105 } else if (key_p
504 kernel_object_t *key_p; local
[all...]
H A DkernelVerify.c42 kernel_object_t *key_p; local
66 HANDLE2OBJECT(hKey, key_p, rv);
73 if (key_p->is_lib_obj && !(key_p->bool_attr_mask & VERIFY_BOOL_ON)) {
87 if (!key_p->is_lib_obj) {
89 verify_init.vi_key.ck_obj_id = key_p->k_handle;
91 if (key_p->class == CKO_SECRET_KEY) {
94 get_symmetric_key_value(key_p);
100 OBJ_SEC(key_p)->sk_value_len << 3;
102 } else if (key_p
460 kernel_object_t *key_p; local
[all...]
H A DkernelEncrypt.c43 kernel_object_t *key_p; local
67 HANDLE2OBJECT(hKey, key_p, rv);
74 if (key_p->is_lib_obj && !(key_p->bool_attr_mask & ENCRYPT_BOOL_ON)) {
90 if (!key_p->is_lib_obj) {
92 encrypt_init.ei_key.ck_obj_id = key_p->k_handle;
94 if (key_p->class == CKO_SECRET_KEY) {
97 get_symmetric_key_value(key_p);
103 OBJ_SEC(key_p)->sk_value_len << 3;
105 } else if (key_p
[all...]
H A DkernelSoftCommon.c110 soft_object_t *key_p; local
128 key_p = &keyobj;
129 bzero(key_p, sizeof (soft_object_t));
130 key_p->class = CKO_SECRET_KEY;
131 key_p->key_type = CKK_GENERIC_SECRET;
134 OBJ_SEC(key_p) = &skeyobj;
135 OBJ_SEC_VALUE(key_p) = kval;
136 OBJ_SEC_VALUE_LEN(key_p) = klen;
139 key_p, opflag & OP_SIGN);
H A DkernelDigest.c403 kernel_object_t *key_p; local
423 HANDLE2OBJECT(hKey, key_p, rv);
434 if (key_p->is_lib_obj && (key_p->class != CKO_SECRET_KEY)) {
452 OBJ_REFRELE(key_p);
463 if (key_p->is_lib_obj) {
471 if (!key_p->is_lib_obj) {
477 digest_key.dk_key.ck_obj_id = key_p->k_handle;
490 ulPartLen = OBJ_SEC_VALUE_LEN(key_p);
496 pPart = (CK_BYTE_PTR) OBJ_SEC_VALUE(key_p);
[all...]

Completed in 119 milliseconds

12