| /optee_os/lib/libmbedtls/mbedtls/include/psa/ |
| H A D | crypto_struct.h | 335 static inline void psa_set_key_id(psa_key_attributes_t *attributes, in psa_set_key_id() argument 338 psa_key_lifetime_t lifetime = attributes->MBEDTLS_PRIVATE(lifetime); in psa_set_key_id() 340 attributes->MBEDTLS_PRIVATE(id) = key; in psa_set_key_id() 343 attributes->MBEDTLS_PRIVATE(lifetime) = in psa_set_key_id() 351 const psa_key_attributes_t *attributes) in psa_get_key_id() argument 353 return attributes->MBEDTLS_PRIVATE(id); in psa_get_key_id() 357 static inline void mbedtls_set_key_owner_id(psa_key_attributes_t *attributes, in mbedtls_set_key_owner_id() argument 360 attributes->MBEDTLS_PRIVATE(id).MBEDTLS_PRIVATE(owner) = owner; in mbedtls_set_key_owner_id() 364 static inline void psa_set_key_lifetime(psa_key_attributes_t *attributes, in psa_set_key_lifetime() argument 367 attributes->MBEDTLS_PRIVATE(lifetime) = lifetime; in psa_set_key_lifetime() [all …]
|
| H A D | crypto.h | 148 static void psa_set_key_id(psa_key_attributes_t *attributes, 166 static void mbedtls_set_key_owner_id(psa_key_attributes_t *attributes, 196 static void psa_set_key_lifetime(psa_key_attributes_t *attributes, 212 const psa_key_attributes_t *attributes); 225 const psa_key_attributes_t *attributes); 243 static void psa_set_key_usage_flags(psa_key_attributes_t *attributes, 257 const psa_key_attributes_t *attributes); 289 static void psa_set_key_algorithm(psa_key_attributes_t *attributes, 304 const psa_key_attributes_t *attributes); 320 static void psa_set_key_type(psa_key_attributes_t *attributes, [all …]
|
| H A D | crypto_compat.h | 181 psa_key_attributes_t *attributes, in psa_set_key_domain_parameters() argument 188 psa_set_key_type(attributes, type); in psa_set_key_domain_parameters() 207 const psa_key_attributes_t *attributes, in psa_get_key_domain_parameters() argument 210 (void) attributes; in psa_get_key_domain_parameters()
|
| H A D | crypto_extra.h | 69 psa_key_attributes_t *attributes, in psa_set_key_enrollment_algorithm() argument 72 attributes->MBEDTLS_PRIVATE(policy).MBEDTLS_PRIVATE(alg2) = alg2; in psa_set_key_enrollment_algorithm() 82 const psa_key_attributes_t *attributes) in psa_get_key_enrollment_algorithm() argument 84 return attributes->MBEDTLS_PRIVATE(policy).MBEDTLS_PRIVATE(alg2); in psa_get_key_enrollment_algorithm() 112 const psa_key_attributes_t *attributes, 139 psa_key_attributes_t *attributes, in psa_set_key_slot_number() argument 142 attributes->MBEDTLS_PRIVATE(has_slot_number) = 1; in psa_set_key_slot_number() 143 attributes->MBEDTLS_PRIVATE(slot_number) = slot_number; in psa_set_key_slot_number() 153 psa_key_attributes_t *attributes) in psa_clear_key_slot_number() argument 155 attributes->MBEDTLS_PRIVATE(has_slot_number) = 0; in psa_clear_key_slot_number() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto_driver_wrappers_no_static.c | 87 const psa_key_attributes_t *attributes, in psa_driver_wrapper_get_key_buffer_size() argument 90 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION( psa_get_key_lifetime(attributes) ); in psa_driver_wrapper_get_key_buffer_size() 91 psa_key_type_t key_type = psa_get_key_type(attributes); in psa_driver_wrapper_get_key_buffer_size() 92 size_t key_bits = psa_get_key_bits(attributes); in psa_driver_wrapper_get_key_buffer_size() 103 psa_get_key_id( attributes ) ) ) ) in psa_driver_wrapper_get_key_buffer_size() 123 const psa_key_attributes_t *attributes, in psa_driver_wrapper_export_public_key() argument 131 psa_get_key_lifetime( attributes ) ); in psa_driver_wrapper_export_public_key() 138 if( psa_get_se_driver( psa_get_key_lifetime(attributes), &drv, &drv_context ) ) in psa_driver_wrapper_export_public_key() 162 (attributes, in psa_driver_wrapper_export_public_key() 176 (attributes, in psa_driver_wrapper_export_public_key() [all …]
|
| H A D | psa_crypto_driver_wrappers.h | 112 const psa_key_attributes_t *attributes, in psa_driver_wrapper_sign_message() argument 124 PSA_KEY_LIFETIME_GET_LOCATION( psa_get_key_lifetime(attributes) ); in psa_driver_wrapper_sign_message() 134 attributes, in psa_driver_wrapper_sign_message() 155 attributes, in psa_driver_wrapper_sign_message() 175 return( psa_sign_message_builtin( attributes, in psa_driver_wrapper_sign_message() 187 const psa_key_attributes_t *attributes, in psa_driver_wrapper_verify_message() argument 198 PSA_KEY_LIFETIME_GET_LOCATION( psa_get_key_lifetime(attributes) ); in psa_driver_wrapper_verify_message() 208 attributes, in psa_driver_wrapper_verify_message() 228 attributes, in psa_driver_wrapper_verify_message() 247 return( psa_verify_message_builtin( attributes, in psa_driver_wrapper_verify_message() [all …]
|
| H A D | psa_crypto_ecp.c | 210 const psa_key_attributes_t *attributes, in mbedtls_psa_ecp_import_key() argument 219 status = mbedtls_psa_ecp_load_representation(attributes->type, in mbedtls_psa_ecp_import_key() 220 attributes->bits, in mbedtls_psa_ecp_import_key() 228 if (PSA_KEY_TYPE_ECC_GET_FAMILY(attributes->type) == in mbedtls_psa_ecp_import_key() 238 status = mbedtls_psa_ecp_export_key(attributes->type, in mbedtls_psa_ecp_import_key() 291 const psa_key_attributes_t *attributes, in mbedtls_psa_ecp_export_public_key() argument 299 attributes->type, attributes->bits, in mbedtls_psa_ecp_export_public_key() 307 PSA_KEY_TYPE_ECC_GET_FAMILY(attributes->type)), in mbedtls_psa_ecp_export_public_key() 321 const psa_key_attributes_t *attributes, in mbedtls_psa_ecp_generate_key() argument 325 attributes->type); in mbedtls_psa_ecp_generate_key() [all …]
|
| H A D | psa_crypto_rsa.h | 57 const psa_key_attributes_t *attributes, 101 const psa_key_attributes_t *attributes, 128 const psa_key_attributes_t *attributes, 166 const psa_key_attributes_t *attributes, 202 const psa_key_attributes_t *attributes, 251 psa_status_t mbedtls_psa_asymmetric_encrypt(const psa_key_attributes_t *attributes, 309 psa_status_t mbedtls_psa_asymmetric_decrypt(const psa_key_attributes_t *attributes,
|
| H A D | pk.c | 160 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_pk_setup_opaque() local 167 if (PSA_SUCCESS != psa_get_key_attributes(key, &attributes)) { in mbedtls_pk_setup_opaque() 170 type = psa_get_key_type(&attributes); in mbedtls_pk_setup_opaque() 171 psa_reset_key_attributes(&attributes); in mbedtls_pk_setup_opaque() 314 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_pk_can_do_ext() local 317 status = psa_get_key_attributes(ctx->priv_id, &attributes); in mbedtls_pk_can_do_ext() 322 psa_algorithm_t key_alg = psa_get_key_algorithm(&attributes); in mbedtls_pk_can_do_ext() 329 psa_algorithm_t key_alg2 = psa_get_key_enrollment_algorithm(&attributes); in mbedtls_pk_can_do_ext() 331 key_usage = psa_get_key_usage_flags(&attributes); in mbedtls_pk_can_do_ext() 332 psa_reset_key_attributes(&attributes); in mbedtls_pk_can_do_ext() [all …]
|
| H A D | psa_crypto_ecp.h | 75 const psa_key_attributes_t *attributes, 119 const psa_key_attributes_t *attributes, 143 const psa_key_attributes_t *attributes, 179 const psa_key_attributes_t *attributes, 214 const psa_key_attributes_t *attributes, 262 const psa_key_attributes_t *attributes,
|
| H A D | psa_crypto_client.c | 17 void psa_reset_key_attributes(psa_key_attributes_t *attributes) in psa_reset_key_attributes() argument 19 memset(attributes, 0, sizeof(*attributes)); in psa_reset_key_attributes()
|
| H A D | psa_crypto_mac.c | 158 const psa_key_attributes_t *attributes, in cmac_setup() argument 166 if (psa_get_key_type(attributes) == PSA_KEY_TYPE_DES && in cmac_setup() 167 (psa_get_key_bits(attributes) == 64 || in cmac_setup() 168 psa_get_key_bits(attributes) == 128)) { in cmac_setup() 176 psa_get_key_type(attributes), in cmac_setup() 177 psa_get_key_bits(attributes), in cmac_setup() 191 psa_get_key_bits(attributes)); in cmac_setup() 272 const psa_key_attributes_t *attributes, in psa_mac_setup() argument 294 status = cmac_setup(operation, attributes, key_buffer); in psa_mac_setup() 306 (void) attributes; in psa_mac_setup() [all …]
|
| H A D | psa_crypto_core.h | 322 const psa_key_attributes_t *attributes, 350 const psa_key_attributes_t *attributes, 378 const psa_key_attributes_t *attributes, 418 psa_status_t psa_generate_key_internal(const psa_key_attributes_t *attributes, 464 const psa_key_attributes_t *attributes, 501 const psa_key_attributes_t *attributes, 540 const psa_key_attributes_t *attributes, 575 const psa_key_attributes_t *attributes, 647 const psa_key_attributes_t *attributes, 764 const psa_key_attributes_t *attributes, const uint8_t *key_buffer, [all …]
|
| H A D | psa_crypto_ffdh.h | 41 const psa_key_attributes_t *attributes, 68 const psa_key_attributes_t *attributes, 97 const psa_key_attributes_t *attributes, 126 const psa_key_attributes_t *attributes,
|
| H A D | psa_crypto_ffdh.c | 144 const psa_key_attributes_t *attributes, in mbedtls_psa_ffdh_export_public_key() argument 154 psa_key_type_t type = attributes->type; in mbedtls_psa_ffdh_export_public_key() 170 size_t key_len = PSA_BITS_TO_BYTES(attributes->bits); in mbedtls_psa_ffdh_export_public_key() 202 const psa_key_attributes_t *attributes, in mbedtls_psa_ffdh_generate_key() argument 209 (void) attributes; in mbedtls_psa_ffdh_generate_key() 238 const psa_key_attributes_t *attributes, in mbedtls_psa_ffdh_import_key() argument 243 (void) attributes; in mbedtls_psa_ffdh_import_key() 258 const psa_key_attributes_t *attributes, in mbedtls_psa_ffdh_key_agreement() argument 277 if (!PSA_KEY_TYPE_IS_DH_KEY_PAIR(psa_get_key_type(attributes))) { in mbedtls_psa_ffdh_key_agreement() 286 PSA_BITS_TO_BYTES(attributes->bits), &P, &G); in mbedtls_psa_ffdh_key_agreement()
|
| H A D | psa_crypto_driver_wrappers_no_static.h | 16 const psa_key_attributes_t *attributes, 21 const psa_key_attributes_t *attributes, 26 psa_key_attributes_t *attributes,
|
| H A D | psa_crypto_rsa.c | 110 const psa_key_attributes_t *attributes, in mbedtls_psa_rsa_import_key() argument 119 status = mbedtls_psa_rsa_load_representation(attributes->type, in mbedtls_psa_rsa_import_key() 133 status = mbedtls_psa_rsa_export_key(attributes->type, in mbedtls_psa_rsa_import_key() 191 const psa_key_attributes_t *attributes, in mbedtls_psa_rsa_export_public_key() argument 199 attributes->type, key_buffer, key_buffer_size, &rsa); in mbedtls_psa_rsa_export_public_key() 241 const psa_key_attributes_t *attributes, in mbedtls_psa_rsa_generate_key() argument 262 (unsigned int) attributes->bits, in mbedtls_psa_rsa_generate_key() 269 status = mbedtls_psa_rsa_export_key(attributes->type, in mbedtls_psa_rsa_generate_key() 317 const psa_key_attributes_t *attributes, in mbedtls_psa_rsa_sign_hash() argument 327 status = mbedtls_psa_rsa_load_representation(attributes->type, in mbedtls_psa_rsa_sign_hash() [all …]
|
| H A D | pk_wrap.c | 71 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in rsa_verify_wrap() local 101 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_HASH); in rsa_verify_wrap() 102 psa_set_key_algorithm(&attributes, psa_alg_md); in rsa_verify_wrap() 103 psa_set_key_type(&attributes, PSA_KEY_TYPE_RSA_PUBLIC_KEY); in rsa_verify_wrap() 105 status = psa_import_key(&attributes, in rsa_verify_wrap() 175 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_pk_psa_rsa_sign_ext() local 199 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_HASH); in mbedtls_pk_psa_rsa_sign_ext() 200 psa_set_key_algorithm(&attributes, alg); in mbedtls_pk_psa_rsa_sign_ext() 201 psa_set_key_type(&attributes, PSA_KEY_TYPE_RSA_KEY_PAIR); in mbedtls_pk_psa_rsa_sign_ext() 203 status = psa_import_key(&attributes, in mbedtls_pk_psa_rsa_sign_ext() [all …]
|
| H A D | psa_crypto_cipher.h | 80 const psa_key_attributes_t *attributes, 110 const psa_key_attributes_t *attributes, 255 psa_status_t mbedtls_psa_cipher_encrypt(const psa_key_attributes_t *attributes, 306 psa_status_t mbedtls_psa_cipher_decrypt(const psa_key_attributes_t *attributes,
|
| H A D | psa_crypto_aead.c | 28 const psa_key_attributes_t *attributes, in psa_aead_setup() argument 36 size_t key_bits = attributes->bits; in psa_aead_setup() 39 status = mbedtls_cipher_values_from_psa(alg, attributes->type, in psa_aead_setup() 52 if (PSA_BLOCK_CIPHER_BLOCK_LENGTH(attributes->type) != 16) { in psa_aead_setup() 72 if (PSA_BLOCK_CIPHER_BLOCK_LENGTH(attributes->type) != 16) { in psa_aead_setup() 110 operation->key_type = psa_get_key_type(attributes); in psa_aead_setup() 118 const psa_key_attributes_t *attributes, in mbedtls_psa_aead_encrypt() argument 130 status = psa_aead_setup(&operation, attributes, key_buffer, in mbedtls_psa_aead_encrypt() 230 const psa_key_attributes_t *attributes, in mbedtls_psa_aead_decrypt() argument 242 status = psa_aead_setup(&operation, attributes, key_buffer, in mbedtls_psa_aead_decrypt() [all …]
|
| H A D | psa_crypto_aead.h | 68 const psa_key_attributes_t *attributes, 131 const psa_key_attributes_t *attributes, 177 const psa_key_attributes_t *attributes, 220 const psa_key_attributes_t *attributes,
|
| H A D | psa_crypto_mac.h | 47 const psa_key_attributes_t *attributes, 87 const psa_key_attributes_t *attributes, 122 const psa_key_attributes_t *attributes,
|
| H A D | ssl_ticket.c | 72 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in ssl_ticket_gen_key() local 92 psa_set_key_usage_flags(&attributes, in ssl_ticket_gen_key() 94 psa_set_key_algorithm(&attributes, key->alg); in ssl_ticket_gen_key() 95 psa_set_key_type(&attributes, key->key_type); in ssl_ticket_gen_key() 96 psa_set_key_bits(&attributes, key->key_bits); in ssl_ticket_gen_key() 99 psa_import_key(&attributes, buf, in ssl_ticket_gen_key() 165 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in mbedtls_ssl_ticket_rotate() local 181 psa_set_key_usage_flags(&attributes, in mbedtls_ssl_ticket_rotate() 183 psa_set_key_algorithm(&attributes, key->alg); in mbedtls_ssl_ticket_rotate() 184 psa_set_key_type(&attributes, key->key_type); in mbedtls_ssl_ticket_rotate() [all …]
|
| /optee_os/ta/pkcs11/src/ |
| H A D | object.c | 96 TEE_Free(obj->attributes); in cleanup_volatile_obj_ref() 138 trace_attributes("[destroy]", obj->attributes); in destroy_object() 153 if (get_bool(obj->attributes, PKCS11_CKA_TOKEN)) { in destroy_object() 183 obj->attributes = head; in create_obj_instance() 238 if (get_bool(obj->attributes, PKCS11_CKA_TOKEN)) { in create_object() 248 obj->attributes->attrs_size; in create_object() 261 obj->attributes, size, in create_object() 290 obj->attributes = NULL; in create_object() 443 if (get_bool(object->attributes, PKCS11_CKA_TOKEN) && in entry_destroy_object() 452 rc = check_access_attrs_against_token(session, object->attributes); in entry_destroy_object() [all …]
|
| /optee_os/core/drivers/scmi-msg/ |
| H A D | perf_domain.h | 43 uint32_t attributes; member 67 uint32_t attributes; member 82 uint32_t attributes; member
|