Lines Matching full:mechanism

40  * Mechanism info structure passed to KCF during registration.
118 aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx)
126 switch (mechanism->cm_type) {
138 if (param_required && mechanism->cm_param != NULL &&
139 mechanism->cm_param_len != param_len) {
172 aes_encrypt_atomic(crypto_mechanism_t *mechanism,
186 if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS)
189 ret = aes_common_init_ctx(&aes_ctx, template, mechanism, key,
194 switch (mechanism->cm_type) {
232 if (mechanism->cm_type == AES_CCM_MECH_INFO_TYPE) {
239 } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) {
271 aes_decrypt_atomic(crypto_mechanism_t *mechanism,
285 if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS)
288 ret = aes_common_init_ctx(&aes_ctx, template, mechanism, key,
293 switch (mechanism->cm_type) {
331 if (mechanism->cm_type == AES_CCM_MECH_INFO_TYPE) {
347 } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) {
387 aes_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key,
394 if (mechanism->cm_type != AES_CCM_MECH_INFO_TYPE &&
395 mechanism->cm_type != AES_GCM_MECH_INFO_TYPE)
442 crypto_mechanism_t *mechanism, crypto_key_t *key, int kmflag,
468 switch (mechanism->cm_type) {
470 if (mechanism->cm_param == NULL ||
471 mechanism->cm_param_len != sizeof (CK_AES_CCM_PARAMS)) {
474 rv = ccm_init_ctx((ccm_ctx_t *)aes_ctx, mechanism->cm_param,
479 if (mechanism->cm_param == NULL ||
480 mechanism->cm_param_len != sizeof (CK_AES_GCM_PARAMS)) {
483 rv = gcm_init_ctx((gcm_ctx_t *)aes_ctx, mechanism->cm_param,