Lines Matching refs:usage

118                              psa_key_usage_t usage,  in exercise_mac_key()  argument
132 if( usage & PSA_KEY_USAGE_SIGN_HASH ) in exercise_mac_key()
142 if( usage & PSA_KEY_USAGE_VERIFY_HASH ) in exercise_mac_key()
145 ( usage & PSA_KEY_USAGE_SIGN_HASH ? in exercise_mac_key()
163 psa_key_usage_t usage, in exercise_cipher_key() argument
181 if( usage & PSA_KEY_USAGE_ENCRYPT ) in exercise_cipher_key()
201 if( usage & PSA_KEY_USAGE_DECRYPT ) in exercise_cipher_key()
205 if( ! ( usage & PSA_KEY_USAGE_ENCRYPT ) ) in exercise_cipher_key()
242 psa_key_usage_t usage, in exercise_aead_key() argument
264 if( usage & PSA_KEY_USAGE_ENCRYPT ) in exercise_aead_key()
274 if( usage & PSA_KEY_USAGE_DECRYPT ) in exercise_aead_key()
277 ( usage & PSA_KEY_USAGE_ENCRYPT ? in exercise_aead_key()
296 static int can_sign_or_verify_message( psa_key_usage_t usage, in can_sign_or_verify_message() argument
303 return( usage & ( PSA_KEY_USAGE_SIGN_MESSAGE | in can_sign_or_verify_message()
308 psa_key_usage_t usage, in exercise_signature_key() argument
311 if( usage & ( PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_VERIFY_HASH ) ) in exercise_signature_key()
336 if( usage & PSA_KEY_USAGE_SIGN_HASH ) in exercise_signature_key()
344 if( usage & PSA_KEY_USAGE_VERIFY_HASH ) in exercise_signature_key()
347 ( usage & PSA_KEY_USAGE_SIGN_HASH ? in exercise_signature_key()
357 if( can_sign_or_verify_message( usage, alg ) ) in exercise_signature_key()
364 if( usage & PSA_KEY_USAGE_SIGN_MESSAGE ) in exercise_signature_key()
372 if( usage & PSA_KEY_USAGE_VERIFY_MESSAGE ) in exercise_signature_key()
375 ( usage & PSA_KEY_USAGE_SIGN_MESSAGE ? in exercise_signature_key()
392 psa_key_usage_t usage, in exercise_asymmetric_encryption_key() argument
400 if( usage & PSA_KEY_USAGE_ENCRYPT ) in exercise_asymmetric_encryption_key()
409 if( usage & PSA_KEY_USAGE_DECRYPT ) in exercise_asymmetric_encryption_key()
418 ( ( usage & PSA_KEY_USAGE_ENCRYPT ) == 0 && in exercise_asymmetric_encryption_key()
480 psa_key_usage_t usage, in exercise_key_derivation_key() argument
491 if( usage & PSA_KEY_USAGE_DERIVE ) in exercise_key_derivation_key()
604 psa_key_usage_t usage, in exercise_raw_key_agreement_key() argument
609 if( usage & PSA_KEY_USAGE_DERIVE ) in exercise_raw_key_agreement_key()
622 psa_key_usage_t usage, in exercise_key_agreement_key() argument
632 if( usage & PSA_KEY_USAGE_DERIVE ) in exercise_key_agreement_key()
857 psa_key_usage_t usage ) in exercise_export_key() argument
872 if( ( usage & PSA_KEY_USAGE_EXPORT ) == 0 && in exercise_export_key()
949 psa_key_usage_t usage, in mbedtls_test_psa_exercise_key() argument
960 ok = exercise_mac_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
962 ok = exercise_cipher_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
964 ok = exercise_aead_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
966 ok = exercise_signature_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
968 ok = exercise_asymmetric_encryption_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
970 ok = exercise_key_derivation_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
972 ok = exercise_raw_key_agreement_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
974 ok = exercise_key_agreement_key( key, usage, alg ); in mbedtls_test_psa_exercise_key()
978 ok = ok && exercise_export_key( key, usage ); in mbedtls_test_psa_exercise_key()