Lines Matching refs:mech

51  *	CRYPTO_INVALID_MECH for problems with the 'mech'.
71 * mech: crypto_mechanism_t pointer.
74 * When the mech's parameter is not NULL, its definition depends
78 * encryption or decryption with the 'mech' using 'key'.
106 crypto_mechanism_t *mech, crypto_key_t *key,
120 error = kcf_get_hardware_provider(mech->cm_type, key,
124 error = kcf_get_hardware_provider(mech->cm_type, key,
144 lmech = *mech;
145 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, real_provider, &lmech);
164 KCF_CAN_SHARE_OPSTATE(pd, mech->cm_type)) {
169 if ((kcf_get_sw_prov(mech->cm_type, &tpd, &tctxp->kc_mech,
173 sinfo = &(KCF_TO_PROV_MECHINFO(tpd, mech->cm_type));
199 mech, key, NULL, NULL, tmpl);
203 mech, key, NULL, NULL, tmpl);
229 crypto_cipher_init(crypto_mechanism_t *mech, crypto_key_t *key,
242 if ((pd = kcf_get_mech_provider(mech->cm_type, key, &me, &error,
268 error = crypto_cipher_init_prov(pd, pd->pd_sid, mech, key,
290 * mech: crypto_mechanism_t pointer.
293 * When the mech's parameter is not NULL, its definition depends
300 * encryption with the 'mech' using 'key'. 'tmpl' is created by
306 * single-part encryption of 'plaintext' with the mechanism 'mech', using
319 crypto_mechanism_t *mech, crypto_data_t *plaintext, crypto_key_t *key,
331 error = kcf_get_hardware_provider(mech->cm_type, key,
339 KCF_WRAP_ENCRYPT_OPS_PARAMS(&params, KCF_OP_ATOMIC, sid, mech, key,
354 crypto_encrypt(crypto_mechanism_t *mech, crypto_data_t *plaintext,
368 if ((pd = kcf_get_mech_provider(mech->cm_type, key, &me, &error,
398 lmech = *mech;
399 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech);
406 mech, key, plaintext, ciphertext, spi_ctx_tmpl);
431 crypto_mechanism_t *mech, crypto_key_t *key,
435 return (crypto_cipher_init_prov(pd, sid, mech, key, tmpl, ctxp, crq,
445 crypto_encrypt_init(crypto_mechanism_t *mech, crypto_key_t *key,
449 return (crypto_cipher_init(mech, key, tmpl, ctxp, crq,
571 * mech: crypto_mechanism_t pointer.
574 * When the mech's parameter is not NULL, its definition depends
581 * encryption with the 'mech' using 'key'. 'tmpl' is created by
587 * single-part decryption of 'ciphertext' with the mechanism 'mech', using
600 crypto_mechanism_t *mech, crypto_data_t *ciphertext, crypto_key_t *key,
612 rv = kcf_get_hardware_provider(mech->cm_type, key,
620 KCF_WRAP_DECRYPT_OPS_PARAMS(&params, KCF_OP_ATOMIC, sid, mech, key,
636 crypto_decrypt(crypto_mechanism_t *mech, crypto_data_t *ciphertext,
650 if ((pd = kcf_get_mech_provider(mech->cm_type, key, &me, &error,
680 lmech = *mech;
681 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech);
688 mech, key, ciphertext, plaintext, spi_ctx_tmpl);
713 crypto_mechanism_t *mech, crypto_key_t *key,
717 return (crypto_cipher_init_prov(pd, sid, mech, key, tmpl, ctxp, crq,
727 crypto_decrypt_init(crypto_mechanism_t *mech, crypto_key_t *key,
731 return (crypto_cipher_init(mech, key, tmpl, ctxp, crq,