Lines Matching refs:alg1

814     psa_algorithm_t alg1,  in psa_key_policy_algorithm_intersection()  argument
818 if (alg1 == alg2) { in psa_key_policy_algorithm_intersection()
819 return alg1; in psa_key_policy_algorithm_intersection()
823 if (PSA_ALG_IS_SIGN_HASH(alg1) && in psa_key_policy_algorithm_intersection()
825 (alg1 & ~PSA_ALG_HASH_MASK) == (alg2 & ~PSA_ALG_HASH_MASK)) { in psa_key_policy_algorithm_intersection()
826 if (PSA_ALG_SIGN_GET_HASH(alg1) == PSA_ALG_ANY_HASH) { in psa_key_policy_algorithm_intersection()
830 return alg1; in psa_key_policy_algorithm_intersection()
836 if (PSA_ALG_IS_AEAD(alg1) && PSA_ALG_IS_AEAD(alg2) && in psa_key_policy_algorithm_intersection()
837 (PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg1, 0) == in psa_key_policy_algorithm_intersection()
839 size_t alg1_len = PSA_ALG_AEAD_GET_TAG_LENGTH(alg1); in psa_key_policy_algorithm_intersection()
844 if (((alg1 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
847 alg1, restricted_len); in psa_key_policy_algorithm_intersection()
850 if (((alg1 & PSA_ALG_AEAD_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
856 return alg1; in psa_key_policy_algorithm_intersection()
862 if (PSA_ALG_IS_MAC(alg1) && PSA_ALG_IS_MAC(alg2) && in psa_key_policy_algorithm_intersection()
863 (PSA_ALG_FULL_LENGTH_MAC(alg1) == in psa_key_policy_algorithm_intersection()
867 if (PSA_SUCCESS != psa_mac_key_can_do(alg1, key_type)) { in psa_key_policy_algorithm_intersection()
879 size_t alg1_len = PSA_MAC_LENGTH(key_type, 0, alg1); in psa_key_policy_algorithm_intersection()
884 if (((alg1 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG) != 0) && in psa_key_policy_algorithm_intersection()
886 return PSA_ALG_AT_LEAST_THIS_LENGTH_MAC(alg1, restricted_len); in psa_key_policy_algorithm_intersection()
892 if ((alg1 & PSA_ALG_MAC_AT_LEAST_THIS_LENGTH_FLAG) != 0) { in psa_key_policy_algorithm_intersection()
896 return (alg2_len <= alg1_len) ? alg1 : 0; in psa_key_policy_algorithm_intersection()
904 return PSA_ALG_TRUNCATED_MAC(alg1, alg1_len); in psa_key_policy_algorithm_intersection()