Home
last modified time | relevance | path

Searched refs:mechanism (Results 1 – 25 of 176) sorted by relevance

12345678

/titanic_44/usr/src/lib/smbsrv/libsmb/common/
H A Dsmb_crypt.c85 CK_MECHANISM mechanism; in smb_auth_hmac_md5() local
90 mechanism.mechanism = CKM_MD5_HMAC; in smb_auth_hmac_md5()
91 mechanism.pParameter = 0; in smb_auth_hmac_md5()
92 mechanism.ulParameterLen = 0; in smb_auth_hmac_md5()
93 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_auth_hmac_md5()
98 rv = SUNW_C_KeyToObject(hSession, mechanism.mechanism, in smb_auth_hmac_md5()
106 rv = C_SignInit(hSession, &mechanism, hKey); in smb_auth_hmac_md5()
138 CK_MECHANISM mechanism; in smb_auth_DES() local
168 mechanism.mechanism = CKM_DES_ECB; in smb_auth_DES()
169 mechanism.pParameter = NULL; in smb_auth_DES()
[all …]
H A Dsmb_mac.c87 CK_MECHANISM mechanism; in smb_mac_calc() local
103 mechanism.mechanism = CKM_MD5; in smb_mac_calc()
104 mechanism.pParameter = 0; in smb_mac_calc()
105 mechanism.ulParameterLen = 0; in smb_mac_calc()
107 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_mac_calc()
112 rv = C_DigestInit(hSession, &mechanism); in smb_mac_calc()
/titanic_44/usr/src/lib/libsmbfs/smb/
H A Dcrypt.c62 CK_MECHANISM mechanism; in smb_encrypt_DES() local
92 mechanism.mechanism = CKM_DES_ECB; in smb_encrypt_DES()
93 mechanism.pParameter = NULL; in smb_encrypt_DES()
94 mechanism.ulParameterLen = 0; in smb_encrypt_DES()
95 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_encrypt_DES()
105 rv = SUNW_C_KeyToObject(hSession, mechanism.mechanism, in smb_encrypt_DES()
112 rv = C_EncryptInit(hSession, &mechanism, hKey); in smb_encrypt_DES()
172 CK_MECHANISM mechanism; in smb_encrypt_RC4() local
183 mechanism.mechanism = CKM_RC4; in smb_encrypt_RC4()
184 mechanism.pParameter = NULL; in smb_encrypt_RC4()
[all …]
/titanic_44/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftVerifyUtil.c60 switch (pMechanism->mechanism) { in soft_verify_init()
135 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify() local
138 switch (mechanism) { in soft_verify()
205 pSignature, ulSignatureLen, mechanism)); in soft_verify()
214 ulDataLen, pSignature, ulSignatureLen, mechanism, B_FALSE)); in soft_verify()
259 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify_update() local
261 switch (mechanism) { in soft_verify_update()
326 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify_final() local
329 switch (mechanism) { in soft_verify_final()
399 pSignature, ulSignatureLen, mechanism, B_TRUE)); in soft_verify_final()
[all …]
H A DsoftSignUtil.c59 switch (pMechanism->mechanism) { in soft_sign_init()
134 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign() local
137 switch (mechanism) { in soft_sign()
194 pSignature, pulSignatureLen, mechanism)); in soft_sign()
203 pSignature, pulSignatureLen, mechanism, B_FALSE)); in soft_sign()
248 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign_update() local
250 switch (mechanism) { in soft_sign_update()
315 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign_final() local
318 switch (mechanism) { in soft_sign_final()
377 pSignature, pulSignatureLen, mechanism, B_TRUE)); in soft_sign_final()
[all …]
H A DsoftAESCrypt.c67 session_p->encrypt.mech.mechanism = pMechanism->mechanism; in soft_aes_crypt_init_common()
71 session_p->decrypt.mech.mechanism = pMechanism->mechanism; in soft_aes_crypt_init_common()
164 CK_MECHANISM_TYPE mechanism = session_p->encrypt.mech.mechanism; in soft_aes_encrypt_common() local
171 if (mechanism == CKM_AES_CTR) in soft_aes_encrypt_common()
182 if ((!update) && (mechanism != CKM_AES_CBC_PAD)) { in soft_aes_encrypt_common()
193 if (mechanism == CKM_AES_CBC_PAD) { in soft_aes_encrypt_common()
228 if (mechanism == CKM_AES_CBC_PAD) { in soft_aes_encrypt_common()
251 ((mechanism == CKM_AES_CBC_PAD) && in soft_aes_encrypt_common()
314 switch (mechanism) { in soft_aes_encrypt_common()
375 } else if (mechanism == CKM_AES_CBC_PAD) { in soft_aes_encrypt_common()
[all …]
H A DsoftMAC.c86 switch (pMechanism->mechanism) { in soft_hmac_sign_verify_init_common()
163 rv = mac_init_ctx(session_p, key_p, hmac_ctx, pMechanism->mechanism); in soft_hmac_sign_verify_init_common()
170 session_p->sign.mech.mechanism = pMechanism->mechanism; in soft_hmac_sign_verify_init_common()
173 session_p->verify.mech.mechanism = pMechanism->mechanism; in soft_hmac_sign_verify_init_common()
235 digest_mech.mechanism = CKM_MD5; in mac_init_ctx()
301 digest_mech.mechanism = CKM_SHA_1; in mac_init_ctx()
341 digest_mech.mechanism = CKM_SHA256; in mac_init_ctx()
382 digest_mech.mechanism = CKM_SHA384; in mac_init_ctx()
423 digest_mech.mechanism = CKM_SHA512; in mac_init_ctx()
465 CK_MECHANISM_TYPE mechanism; in soft_hmac_sign_verify_common() local
[all …]
H A DsoftRSA.c228 session_p->encrypt.mech.mechanism = pMechanism->mechanism; in soft_rsa_crypt_init_common()
232 session_p->decrypt.mech.mechanism = pMechanism->mechanism; in soft_rsa_crypt_init_common()
242 CK_ULONG_PTR pulEncryptedLen, CK_MECHANISM_TYPE mechanism) in soft_rsa_encrypt_common() argument
268 if (mechanism == CKM_RSA_PKCS) { in soft_rsa_encrypt_common()
294 if (mechanism == CKM_RSA_PKCS) { in soft_rsa_encrypt_common()
332 CK_ULONG_PTR pulDataLen, CK_MECHANISM_TYPE mechanism) in soft_rsa_decrypt_common() argument
362 if (mechanism == CKM_RSA_X_509) { in soft_rsa_decrypt_common()
375 if (mechanism == CKM_RSA_PKCS) { in soft_rsa_decrypt_common()
434 switch (pMechanism->mechanism) { in soft_rsa_sign_verify_init_common()
436 digest_mech.mechanism = CKM_MD5; in soft_rsa_sign_verify_init_common()
[all …]
/titanic_44/usr/src/uts/common/crypto/io/
H A Daes.c250 aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx, int kmflag) in aes_check_mech_param() argument
258 switch (mechanism->cm_type) { in aes_check_mech_param()
287 if (param_required && mechanism->cm_param != NULL && in aes_check_mech_param()
288 mechanism->cm_param_len != param_len) { in aes_check_mech_param()
337 aes_encrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in aes_encrypt_init() argument
340 return (aes_common_init(ctx, mechanism, key, template, req, B_TRUE)); in aes_encrypt_init()
344 aes_decrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in aes_decrypt_init() argument
347 return (aes_common_init(ctx, mechanism, key, template, req, B_FALSE)); in aes_decrypt_init()
356 aes_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in aes_common_init() argument
372 if ((rv = aes_check_mech_param(mechanism, &aes_ctx, kmflag)) in aes_common_init()
[all …]
H A Dsha2_mod.c264 sha2_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in sha2_digest_init() argument
276 PROV_SHA2_CTX(ctx)->sc_mech_type = mechanism->cm_type; in sha2_digest_init()
277 SHA2Init(mechanism->cm_type, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); in sha2_digest_init()
775 crypto_session_id_t session_id, crypto_mechanism_t *mechanism, in sha2_digest_atomic() argument
787 SHA2Init(mechanism->cm_type, &sha2_ctx); in sha2_digest_atomic()
814 if (mechanism->cm_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) in sha2_digest_atomic()
915 sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in sha2_mac_init() argument
927 switch (mechanism->cm_type) { in sha2_mac_init()
952 PROV_SHA2_HMAC_CTX(ctx)->hc_mech_type = mechanism->cm_type; in sha2_mac_init()
968 PROV_SHA2_DIGEST_KEY(mechanism->cm_type / 3, in sha2_mac_init()
[all …]
H A Dblowfish.c275 blowfish_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in blowfish_common_init() argument
290 if (!BLOWFISH_VALID_MECH(mechanism)) in blowfish_common_init()
293 if (mechanism->cm_param != NULL && in blowfish_common_init()
294 mechanism->cm_param_len != BLOWFISH_BLOCK_LEN) in blowfish_common_init()
298 switch (mechanism->cm_type) { in blowfish_common_init()
309 rv = blowfish_common_init_ctx(blowfish_ctx, template, mechanism, in blowfish_common_init()
595 crypto_session_id_t session_id, crypto_mechanism_t *mechanism, in blowfish_encrypt_atomic() argument
620 if (!BLOWFISH_VALID_MECH(mechanism)) in blowfish_encrypt_atomic()
623 if (mechanism->cm_param_len != 0 && in blowfish_encrypt_atomic()
624 mechanism->cm_param_len != BLOWFISH_BLOCK_LEN) in blowfish_encrypt_atomic()
[all …]
H A Dmd5_mod.c117 (len) = (uint32_t)*((ulong_t *)(void *)mechanism->cm_param); \
296 md5_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in md5_digest_init() argument
299 if (mechanism->cm_type != MD5_MECH_INFO_TYPE) in md5_digest_init()
773 crypto_session_id_t session_id, crypto_mechanism_t *mechanism, in md5_digest_atomic() argument
780 if (mechanism->cm_type != MD5_MECH_INFO_TYPE) in md5_digest_atomic()
901 md5_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in md5_mac_init() argument
908 if (mechanism->cm_type != MD5_HMAC_MECH_INFO_TYPE && in md5_mac_init()
909 mechanism->cm_type != MD5_HMAC_GEN_MECH_INFO_TYPE) in md5_mac_init()
949 PROV_MD5_HMAC_CTX(ctx)->hc_mech_type = mechanism->cm_type; in md5_mac_init()
950 if (mechanism->cm_type == MD5_HMAC_GEN_MECH_INFO_TYPE) { in md5_mac_init()
[all …]
/titanic_44/usr/src/lib/gss_mechs/mech_krb5/crypto/hash_provider/
H A Dhash_md5.c46 CK_MECHANISM mechanism; in k5_md5_hash() local
48 mechanism.mechanism = CKM_MD5; in k5_md5_hash()
49 mechanism.pParameter = NULL_PTR; in k5_md5_hash()
50 mechanism.ulParameterLen = 0; in k5_md5_hash()
52 return(k5_ef_hash(context, &mechanism, icount, input, output)); in k5_md5_hash()
H A Dhash_sha1.c42 CK_MECHANISM mechanism; in k5_sha1_hash() local
44 mechanism.mechanism = CKM_SHA_1; in k5_sha1_hash()
45 mechanism.pParameter = NULL_PTR; in k5_sha1_hash()
46 mechanism.ulParameterLen = 0; in k5_sha1_hash()
48 return(k5_ef_hash(context, &mechanism, icount, input, output)); in k5_sha1_hash()
/titanic_44/usr/src/uts/common/gssapi/mechs/krb5/crypto/des/
H A Dd3_cbc.c41 CK_MECHANISM mechanism; in mit_des3_cbc_encrypt() local
61 mechanism.mechanism = algos.enc_algo; in mit_des3_cbc_encrypt()
62 mechanism.pParameter = (void*)ivec; in mit_des3_cbc_encrypt()
64 mechanism.ulParameterLen = sizeof(mit_des_cblock); in mit_des3_cbc_encrypt()
66 mechanism.ulParameterLen = 0; in mit_des3_cbc_encrypt()
69 rv = C_EncryptInit(krb_ctx_hSession(context), &mechanism, key->hKey); in mit_des3_cbc_encrypt()
71 rv = C_DecryptInit(krb_ctx_hSession(context), &mechanism, key->hKey); in mit_des3_cbc_encrypt()
H A Df_cbc.c44 CK_MECHANISM mechanism; local
64 mechanism.mechanism = algos.enc_algo;
65 mechanism.pParameter = ivec;
67 mechanism.ulParameterLen = MIT_DES_BLOCK_LENGTH;
69 mechanism.ulParameterLen = 0;
72 rv = C_EncryptInit(krb_ctx_hSession(context), &mechanism, key->hKey);
74 rv = C_DecryptInit(krb_ctx_hSession(context), &mechanism, key->hKey);
/titanic_44/usr/src/uts/common/rpc/
H A Drpcsec_gss.h103 rpc_gss_OID mechanism; member
106 char *mechanism; member
158 gss_OID_desc32 mechanism; member
172 rpc_gss_OID_desc mechanism; member
212 char *mechanism, /* security mechanism */
222 char *mechanism,
231 char *mechanism,
237 char *mechanism
256 char *mechanism,
/titanic_44/usr/src/lib/gss_mechs/mech_krb5/crypto/keyhash_provider/
H A Dk5_md5des.c58 CK_MECHANISM mechanism; in k5_md5des_hash() local
99 mechanism.mechanism = CKM_MD5; in k5_md5des_hash()
100 mechanism.pParameter = NULL_PTR; in k5_md5des_hash()
101 mechanism.ulParameterLen = 0; in k5_md5des_hash()
103 if ((rv = C_DigestInit(krb_ctx_hSession(context), &mechanism)) != CKR_OK) { in k5_md5des_hash()
167 CK_MECHANISM mechanism; in k5_md5des_verify() local
225 mechanism.mechanism = CKM_MD5; in k5_md5des_verify()
226 mechanism.pParameter = NULL_PTR; in k5_md5des_verify()
227 mechanism.ulParameterLen = 0; in k5_md5des_verify()
229 if ((rv = C_DigestInit(krb_ctx_hSession(context), &mechanism)) != CKR_OK) { in k5_md5des_verify()
/titanic_44/usr/src/lib/pkcs11/libpkcs11/common/
H A Dpkcs11Keys.c52 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_GenerateKey()
73 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_GenerateKey()
110 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_GenerateKeyPair()
133 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_GenerateKeyPair()
169 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_WrapKey()
191 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_WrapKey()
226 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_UnwrapKey()
248 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_UnwrapKey()
283 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_DeriveKey()
304 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_DeriveKey()
/titanic_44/usr/src/lib/libgss/
H A Dg_inquire_names.c36 gss_inquire_names_for_mech(minor_status, mechanism, name_types) in gss_inquire_names_for_mech() argument
39 const gss_OID mechanism;
67 mech = __gss_get_mechanism(mechanism);
75 mechanism,
124 char *mechanism; local
142 mechanism = mech_list[i];
143 if (__gss_mech_to_oid(mechanism, &mechOid) == GSS_S_COMPLETE) {
/titanic_44/usr/src/lib/gss_mechs/mech_krb5/mech/
H A Dinq_names.c35 krb5_gss_inquire_names_for_mech(minor_status, mechanism, name_types) in krb5_gss_inquire_names_for_mech() argument
37 gss_OID mechanism;
45 if ((mechanism != GSS_C_NULL_OID) &&
46 !g_OID_equal(gss_mech_krb5, mechanism) &&
47 !g_OID_equal(gss_mech_krb5_old, mechanism)) {
/titanic_44/usr/src/uts/common/des/
H A Ddes_crypt.c433 des_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, in des_common_init() argument
452 switch (mechanism->cm_type) { in des_common_init()
457 if (mechanism->cm_param != NULL && in des_common_init()
458 mechanism->cm_param_len != DES_BLOCK_LEN) in des_common_init()
470 if (mechanism->cm_param != NULL && in des_common_init()
471 mechanism->cm_param_len != DES_BLOCK_LEN) in des_common_init()
483 if ((rv = des_common_init_ctx(des_ctx, template, mechanism, key, in des_common_init()
786 crypto_session_id_t session_id, crypto_mechanism_t *mechanism, in des_encrypt_atomic() argument
814 switch (mechanism->cm_type) { in des_encrypt_atomic()
817 if (mechanism->cm_param_len > 0 && in des_encrypt_atomic()
[all …]
/titanic_44/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Ddig_mgr.c311 switch (mech->mechanism) { in digest_mgr_init()
340 ctx->mech.mechanism = mech->mechanism; in digest_mgr_init()
354 if (ctx->mech.mechanism == CKM_MD5) { in digest_mgr_cleanup()
357 } else if (ctx->mech.mechanism == CKM_SHA_1) { in digest_mgr_cleanup()
363 ctx->mech.mechanism = 0; in digest_mgr_cleanup()
395 switch (ctx->mech.mechanism) { in digest_mgr_digest()
428 switch (ctx->mech.mechanism) { in digest_mgr_digest_update()
494 switch (ctx->mech.mechanism) { in digest_mgr_digest_final()
/titanic_44/usr/src/uts/common/gssapi/mechs/krb5/crypto/enc_provider/
H A Darcfour_provider.c83 CK_MECHANISM mechanism; in k5_arcfour_decrypt() local
134 mechanism.mechanism = algos.enc_algo; in k5_arcfour_decrypt()
135 mechanism.pParameter = NULL; in k5_arcfour_decrypt()
136 mechanism.ulParameterLen = 0; in k5_arcfour_decrypt()
138 rv = C_DecryptInit(session, &mechanism, *kptr); in k5_arcfour_decrypt()
199 CK_MECHANISM mechanism; in k5_arcfour_encrypt() local
236 mechanism.mechanism = algos.enc_algo; in k5_arcfour_encrypt()
237 mechanism.pParameter = NULL; in k5_arcfour_encrypt()
238 mechanism.ulParameterLen = 0; in k5_arcfour_encrypt()
240 rv = C_EncryptInit(session, &mechanism, *kptr); in k5_arcfour_encrypt()
/titanic_44/usr/src/lib/gss_mechs/mech_krb5/crypto/
H A Dpbkdf2.c58 CK_MECHANISM mechanism; in krb5int_pbkdf2_hmac_sha1() local
66 mechanism.mechanism = CKM_PKCS5_PBKD2; in krb5int_pbkdf2_hmac_sha1()
67 mechanism.pParameter = &params; in krb5int_pbkdf2_hmac_sha1()
68 mechanism.ulParameterLen = sizeof (params); in krb5int_pbkdf2_hmac_sha1()
114 rv = C_GenerateKey(krb_ctx_hSession(context), &mechanism, tmpl, in krb5int_pbkdf2_hmac_sha1()

12345678