Lines Matching refs:alg1

825     psa_algorithm_t alg1,  in psa_key_policy_algorithm_intersection()  argument
829 if (alg1 == alg2) { in psa_key_policy_algorithm_intersection()
830 return alg1; in psa_key_policy_algorithm_intersection()
834 if (PSA_ALG_IS_SIGN_HASH(alg1) && in psa_key_policy_algorithm_intersection()
836 (alg1 & ~PSA_ALG_HASH_MASK) == (alg2 & ~PSA_ALG_HASH_MASK)) { in psa_key_policy_algorithm_intersection()
837 if (PSA_ALG_SIGN_GET_HASH(alg1) == PSA_ALG_ANY_HASH) { in psa_key_policy_algorithm_intersection()
841 return alg1; in psa_key_policy_algorithm_intersection()
847 if (PSA_ALG_IS_AEAD(alg1) && PSA_ALG_IS_AEAD(alg2) && in psa_key_policy_algorithm_intersection()
848 (PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg1, 0) == in psa_key_policy_algorithm_intersection()
850 size_t alg1_len = PSA_ALG_AEAD_GET_TAG_LENGTH(alg1); in psa_key_policy_algorithm_intersection()
855 if (((alg1 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
858 alg1, restricted_len); in psa_key_policy_algorithm_intersection()
861 if (((alg1 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
867 return alg1; in psa_key_policy_algorithm_intersection()
873 if (PSA_ALG_IS_MAC(alg1) && PSA_ALG_IS_MAC(alg2) && in psa_key_policy_algorithm_intersection()
874 (PSA_ALG_FULL_LENGTH_MAC(alg1) == in psa_key_policy_algorithm_intersection()
878 if (PSA_SUCCESS != psa_mac_key_can_do(alg1, key_type)) { in psa_key_policy_algorithm_intersection()
890 size_t alg1_len = PSA_MAC_LENGTH(key_type, 0, alg1); in psa_key_policy_algorithm_intersection()
895 if (((alg1 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
897 return PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg1, restricted_len); in psa_key_policy_algorithm_intersection()
903 if ((alg1 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG) != 0) { in psa_key_policy_algorithm_intersection()
907 return (alg2_len <= alg1_len) ? alg1 : 0; in psa_key_policy_algorithm_intersection()
915 return PSA_ALG_TRUNCATED_MAC(alg1, alg1_len); in psa_key_policy_algorithm_intersection()