Home
last modified time | relevance | path

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

12345678

/illumos-gate/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()
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()
138 CK_MECHANISM mechanism; in smb_auth_DES() local
168 mechanism.mechanism = CKM_DES_ECB; in smb_auth_DES()
171 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_auth_DES()
181 rv = SUNW_C_KeyToObject(hSession, mechanism.mechanism, in smb_auth_DES()
261 mechanism.mechanism = CKM_RC4; in smb_auth_RC4()
264 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_auth_RC4()
[all …]
/illumos-gate/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()
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()
186 rv = SUNW_C_GetMechSession(mechanism.mechanism, &hSession); in smb_encrypt_RC4()
[all …]
/illumos-gate/usr/src/uts/common/crypto/io/
H A Daes.c273 switch (mechanism->cm_type) { in aes_check_mech_param()
980 switch (mechanism->cm_type) { in aes_encrypt_atomic()
1002 switch (mechanism->cm_type) { in aes_encrypt_atomic()
1051 switch (mechanism->cm_type) { in aes_encrypt_atomic()
1133 switch (mechanism->cm_type) { in aes_decrypt_atomic()
1154 switch (mechanism->cm_type) { in aes_decrypt_atomic()
1205 switch (mechanism->cm_type) { in aes_decrypt_atomic()
1368 switch (mechanism->cm_type) { in aes_common_init_ctx()
1379 if (mechanism->cm_param == NULL || in aes_common_init_ctx()
1389 if (mechanism->cm_param == NULL || in aes_common_init_ctx()
[all …]
H A Dskein_mod.c195 if (mechanism->cm_param != NULL) { in skein_get_digest_bitlen()
199 if (mechanism->cm_param_len != sizeof (*param) || in skein_get_digest_bitlen()
205 switch (mechanism->cm_type) { in skein_get_digest_bitlen()
502 if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) in skein_digest_init()
510 SKEIN_CTX(ctx)->sc_mech_type = mechanism->cm_type; in skein_digest_init()
511 error = skein_get_digest_bitlen(mechanism, in skein_digest_init()
656 if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) in skein_digest_atomic()
658 skein_ctx.sc_mech_type = mechanism->cm_type; in skein_digest_atomic()
690 if (!VALID_SKEIN_MAC_MECH(mechanism->cm_type)) in skein_mac_ctx_build()
694 ctx->sc_mech_type = mechanism->cm_type; in skein_mac_ctx_build()
[all …]
H A Dsha2_mod.c935 switch (mechanism->cm_type) { in sha2_is_general_hmech()
960 switch (mechanism->cm_type) { in sha2_mac_init()
1015 if (sha2_is_general_hmech(mechanism)) { in sha2_mac_init()
1016 if (mechanism->cm_param == NULL || in sha2_mac_init()
1019 PROV_SHA2_GET_DIGEST_LEN(mechanism, in sha2_mac_init()
1205 switch (mechanism->cm_type) { in sha2_mac_atomic()
1250 if (sha2_is_general_hmech(mechanism)) { in sha2_mac_atomic()
1251 if (mechanism->cm_param == NULL || in sha2_mac_atomic()
1347 switch (mechanism->cm_type) { in sha2_mac_verify_atomic()
1393 if (mechanism->cm_param == NULL || in sha2_mac_verify_atomic()
[all …]
H A Dblowfish.c290 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()
620 if (!BLOWFISH_VALID_MECH(mechanism)) in blowfish_encrypt_atomic()
623 if (mechanism->cm_param_len != 0 && in blowfish_encrypt_atomic()
707 if (!BLOWFISH_VALID_MECH(mechanism)) in blowfish_decrypt_atomic()
710 if (mechanism->cm_param_len != 0 && in blowfish_decrypt_atomic()
779 if (!BLOWFISH_VALID_MECH(mechanism)) in blowfish_create_ctx_template()
852 switch (mechanism->cm_type) { in blowfish_common_init_ctx()
[all …]
H A Dmd5_mod.c299 if (mechanism->cm_type != MD5_MECH_INFO_TYPE) in md5_digest_init()
780 if (mechanism->cm_type != MD5_MECH_INFO_TYPE) in md5_digest_atomic()
951 if (mechanism->cm_param == NULL || in md5_mac_init()
952 mechanism->cm_param_len != sizeof (ulong_t)) in md5_mac_init()
954 PROV_MD5_GET_DIGEST_LEN(mechanism, in md5_mac_init()
1153 if (mechanism->cm_param == NULL || in md5_mac_atomic()
1154 mechanism->cm_param_len != sizeof (ulong_t)) { in md5_mac_atomic()
1158 PROV_MD5_GET_DIGEST_LEN(mechanism, digest_len); in md5_mac_atomic()
1273 if (mechanism->cm_param == NULL || in md5_mac_verify_atomic()
1274 mechanism->cm_param_len != sizeof (ulong_t)) { in md5_mac_verify_atomic()
[all …]
/illumos-gate/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()
/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftVerifyUtil.c60 switch (pMechanism->mechanism) { in soft_verify_init()
141 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify() local
144 switch (mechanism) { in soft_verify()
237 pSignature, ulSignatureLen, mechanism)); in soft_verify()
291 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify_update() local
293 switch (mechanism) { in soft_verify_update()
364 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify_final() local
367 switch (mechanism) { in soft_verify_final()
488 switch (pMechanism->mechanism) { in soft_verify_recover_init()
507 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_verify_recover() local
[all …]
H A DsoftSignUtil.c59 switch (pMechanism->mechanism) { in soft_sign_init()
140 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign() local
143 switch (mechanism) { in soft_sign()
275 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign_update() local
277 switch (mechanism) { in soft_sign_update()
348 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign_final() local
351 switch (mechanism) { in soft_sign_final()
454 switch (pMechanism->mechanism) { in soft_sign_recover_init()
474 CK_MECHANISM_TYPE mechanism = session_p->sign.mech.mechanism; in soft_sign_recover() local
476 switch (mechanism) { in soft_sign_recover()
[all …]
H A DsoftMAC.c85 switch (pMechanism->mechanism) { in soft_hmac_sign_verify_init_common()
169 session_p->sign.mech.mechanism = pMechanism->mechanism; in soft_hmac_sign_verify_init_common()
172 session_p->verify.mech.mechanism = pMechanism->mechanism; in soft_hmac_sign_verify_init_common()
464 CK_MECHANISM_TYPE mechanism; in soft_hmac_sign_verify_common() local
474 mechanism = session_p->sign.mech.mechanism; in soft_hmac_sign_verify_common()
492 mechanism = session_p->verify.mech.mechanism; in soft_hmac_sign_verify_common()
495 switch (mechanism) { in soft_hmac_sign_verify_common()
586 CK_MECHANISM_TYPE mechanism; in soft_hmac_sign_verify_update() local
596 mechanism = session_p->sign.mech.mechanism; in soft_hmac_sign_verify_update()
599 mechanism = session_p->verify.mech.mechanism; in soft_hmac_sign_verify_update()
[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()
268 if (mechanism == CKM_RSA_PKCS) { in soft_rsa_encrypt_common()
294 if (mechanism == CKM_RSA_PKCS) { in soft_rsa_encrypt_common()
499 session_p->sign.mech.mechanism = pMechanism->mechanism; in soft_rsa_sign_verify_init_common()
502 session_p->verify.mech.mechanism = pMechanism->mechanism; in soft_rsa_sign_verify_init_common()
548 switch (mechanism) { in soft_rsa_sign_common()
581 switch (mechanism) { in soft_rsa_sign_common()
673 switch (mechanism) { in soft_rsa_verify_common()
1181 CK_MECHANISM_TYPE mechanism = session_p->verify.mech.mechanism; in soft_rsa_verify_recover() local
[all …]
H A DsoftDESCrypt.c76 session_p->encrypt.mech.mechanism = pMechanism->mechanism; in soft_des_crypt_init_common()
80 session_p->decrypt.mech.mechanism = pMechanism->mechanism; in soft_des_crypt_init_common()
186 CK_MECHANISM_TYPE mechanism = session_p->encrypt.mech.mechanism; in soft_des_encrypt_common() local
195 mechanism == CKM_DES3_CBC_PAD); in soft_des_encrypt_common()
334 switch (mechanism) { in soft_des_encrypt_common()
497 CK_MECHANISM_TYPE mechanism = session_p->decrypt.mech.mechanism; in soft_des_decrypt_common() local
506 mechanism == CKM_DES3_CBC_PAD); in soft_des_decrypt_common()
649 switch (mechanism) { in soft_des_decrypt_common()
840 switch (pMechanism->mechanism) { in soft_des_sign_verify_init_common()
885 session_p->sign.mech.mechanism = pMechanism->mechanism; in soft_des_sign_verify_init_common()
[all …]
/illumos-gate/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);
/illumos-gate/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()
/illumos-gate/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,
/illumos-gate/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()
/illumos-gate/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) {
/illumos-gate/usr/src/uts/common/des/
H A Ddes_crypt.c452 switch (mechanism->cm_type) { in des_common_init()
457 if (mechanism->cm_param != NULL && in des_common_init()
470 if (mechanism->cm_param != NULL && in des_common_init()
814 switch (mechanism->cm_type) { in des_encrypt_atomic()
817 if (mechanism->cm_param_len > 0 && in des_encrypt_atomic()
826 if (mechanism->cm_param_len > 0 && in des_encrypt_atomic()
917 switch (mechanism->cm_type) { in des_decrypt_atomic()
920 if (mechanism->cm_param_len > 0 && in des_decrypt_atomic()
929 if (mechanism->cm_param_len > 0 && in des_decrypt_atomic()
1004 switch (mechanism->cm_type) { in des_create_ctx_template()
[all …]
/illumos-gate/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)) {
/illumos-gate/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()
/illumos-gate/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()
/illumos-gate/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