Lines Matching refs:proc
409 struct active_processing *proc = session->processing; in init_tee_operation() local
413 rc = pkcs2tee_rsa_nopad_context(proc); in init_tee_operation()
421 rc = pkcs2tee_proc_params_rsa_pss(proc, proc_params); in init_tee_operation()
425 rc = pkcs2tee_validate_rsa_pss(proc, obj); in init_tee_operation()
428 rc = pkcs2tee_proc_params_rsa_oaep(proc, proc_params); in init_tee_operation()
431 rc = pkcs2tee_proc_params_eddsa(proc, proc_params); in init_tee_operation()
434 rc = pkcs2tee_proc_params_rsa_aes_wrap(proc, proc_params); in init_tee_operation()
496 struct active_processing *proc = session->processing; in step_asymm_operation() local
534 switch (proc->mecha_type) { in step_asymm_operation()
548 rsa_pss_ctx = proc->extra_ctx; in step_asymm_operation()
556 eddsa_ctx = proc->extra_ctx; in step_asymm_operation()
579 rsa_oaep_ctx = proc->extra_ctx; in step_asymm_operation()
598 rsa_aes_ctx = proc->extra_ctx; in step_asymm_operation()
625 switch (proc->mecha_type) { in step_asymm_operation()
642 assert(proc->tee_op_handle2 != TEE_HANDLE_NULL); in step_asymm_operation()
644 TEE_DigestUpdate(proc->tee_op_handle2, in_buf, in_size); in step_asymm_operation()
663 switch (proc->mecha_type) { in step_asymm_operation()
680 assert(proc->tee_op_handle2 != TEE_HANDLE_NULL); in step_asymm_operation()
682 hash_size = TEE_ALG_GET_DIGEST_SIZE(proc->tee_hash_algo); in step_asymm_operation()
687 res = TEE_DigestDoFinal(proc->tee_op_handle2, in_buf, in_size, in step_asymm_operation()
705 switch (proc->mecha_type) { in step_asymm_operation()
707 sz = ecdsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation()
731 sz = ecdsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation()
758 sz = rsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation()
774 switch (proc->mecha_type) { in step_asymm_operation()
783 res = TEE_AsymmetricEncrypt(proc->tee_op_handle, in step_asymm_operation()
794 res = TEE_AsymmetricDecrypt(proc->tee_op_handle, in step_asymm_operation()
805 res = TEE_AsymmetricSignDigest(proc->tee_op_handle, in step_asymm_operation()
815 res = TEE_AsymmetricVerifyDigest(proc->tee_op_handle, in step_asymm_operation()
842 res = TEE_AsymmetricEncrypt(proc->tee_op_handle, in step_asymm_operation()
863 res = TEE_AsymmetricDecrypt(proc->tee_op_handle, in step_asymm_operation()
897 temp_buf = proc->extra_ctx; in step_asymm_operation()
898 res = TEE_AsymmetricDecrypt(proc->tee_op_handle, in step_asymm_operation()
923 temp_buf = proc->extra_ctx; in step_asymm_operation()
924 res = TEE_AsymmetricEncrypt(proc->tee_op_handle, in step_asymm_operation()
976 res = TEE_AsymmetricSignDigest(proc->tee_op_handle, in step_asymm_operation()
986 res = TEE_AsymmetricVerifyDigest(proc->tee_op_handle, in step_asymm_operation()
1000 TEE_Panic(proc->mecha_type); in step_asymm_operation()
1098 static enum pkcs11_rc wrap_rsa_aes_key(struct active_processing *proc, in wrap_rsa_aes_key() argument
1105 struct rsa_aes_key_wrap_processing_ctx *ctx = proc->extra_ctx; in wrap_rsa_aes_key()
1121 res = TEE_AsymmetricEncrypt(proc->tee_op_handle, in wrap_rsa_aes_key()
1171 static enum pkcs11_rc unwrap_rsa_aes_key(struct active_processing *proc, in unwrap_rsa_aes_key() argument
1179 struct rsa_aes_key_wrap_processing_ctx *ctx = proc->extra_ctx; in unwrap_rsa_aes_key()
1192 TEE_GetOperationInfo(proc->tee_op_handle, &info); in unwrap_rsa_aes_key()
1202 res = TEE_AsymmetricDecrypt(proc->tee_op_handle, in unwrap_rsa_aes_key()
1240 struct active_processing *proc = session->processing; in wrap_data_by_asymm_enc() local
1242 switch (proc->mecha_type) { in wrap_data_by_asymm_enc()
1244 rc = wrap_rsa_aes_key(proc, data, data_sz, out_buf, out_sz); in wrap_data_by_asymm_enc()
1258 struct active_processing *proc = session->processing; in unwrap_key_by_asymm() local
1260 switch (proc->mecha_type) { in unwrap_key_by_asymm()
1262 rc = unwrap_rsa_aes_key(proc, data, data_sz, out_buf, out_sz); in unwrap_key_by_asymm()