Lines Matching refs:attributes
47 static inline void supp_psa_set_attributes(psa_key_attributes_t *attributes, u32 type, u32 alg, u32… in supp_psa_set_attributes() argument
49 psa_set_key_type(attributes, type); in supp_psa_set_attributes()
50 psa_set_key_algorithm(attributes, alg); in supp_psa_set_attributes()
51 psa_set_key_usage_flags(attributes, usage); in supp_psa_set_attributes()
126 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in aes_128_encrypt_block_psa() local
131 supp_psa_set_attributes(&attributes, PSA_KEY_TYPE_AES, alg, PSA_KEY_USAGE_ENCRYPT); in aes_128_encrypt_block_psa()
133 status = psa_import_key(&attributes, key, SUPP_PSA_BLOCK_SIZE_128, &key_id); in aes_128_encrypt_block_psa()
135 psa_reset_key_attributes(&attributes); in aes_128_encrypt_block_psa()
151 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in aes_128_cbc_encrypt_psa() local
164 supp_psa_set_attributes(&attributes, key_type, alg, PSA_KEY_USAGE_ENCRYPT); in aes_128_cbc_encrypt_psa()
166 status = psa_import_key(&attributes, key, SUPP_PSA_BLOCK_SIZE_128, &key_id); in aes_128_cbc_encrypt_psa()
168 psa_reset_key_attributes(&attributes); in aes_128_cbc_encrypt_psa()
194 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in aes_128_cbc_decrypt_psa() local
207 supp_psa_set_attributes(&attributes, key_type, alg, PSA_KEY_USAGE_DECRYPT); in aes_128_cbc_decrypt_psa()
209 status = psa_import_key(&attributes, key, SUPP_PSA_BLOCK_SIZE_128, &key_id); in aes_128_cbc_decrypt_psa()
211 psa_reset_key_attributes(&attributes); in aes_128_cbc_decrypt_psa()
237 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in aes_ctr_encrypt_psa() local
250 supp_psa_set_attributes(&attributes, key_type, alg, PSA_KEY_USAGE_ENCRYPT); in aes_ctr_encrypt_psa()
252 status = psa_import_key(&attributes, key, key_len, &key_id); in aes_ctr_encrypt_psa()
254 psa_reset_key_attributes(&attributes); in aes_ctr_encrypt_psa()
282 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in omac1_aes_vector_psa() local
301 supp_psa_set_attributes(&attributes, PSA_KEY_TYPE_AES, alg, PSA_KEY_USAGE_SIGN_MESSAGE); in omac1_aes_vector_psa()
303 status = psa_import_key(&attributes, key, key_len, &key_id); in omac1_aes_vector_psa()
305 psa_reset_key_attributes(&attributes); in omac1_aes_vector_psa()
372 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in hmac_vector_psa() local
387 supp_psa_set_attributes(&attributes, PSA_KEY_TYPE_HMAC, alg, PSA_KEY_USAGE_SIGN_MESSAGE); in hmac_vector_psa()
389 status = psa_import_key(&attributes, key, key_len, &key_id); in hmac_vector_psa()
391 psa_reset_key_attributes(&attributes); in hmac_vector_psa()
420 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in pbkdf2_sha1_psa() local
431 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_DERIVE); in pbkdf2_sha1_psa()
432 psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_VOLATILE); in pbkdf2_sha1_psa()
433 psa_set_key_algorithm(&attributes, PSA_ALG_PBKDF2_HMAC(alg)); in pbkdf2_sha1_psa()
434 psa_set_key_type(&attributes, PSA_KEY_TYPE_PASSWORD); in pbkdf2_sha1_psa()
435 psa_set_key_bits(&attributes, PSA_BYTES_TO_BITS(plen)); in pbkdf2_sha1_psa()
437 status = psa_import_key(&attributes, password, plen, &key_id); in pbkdf2_sha1_psa()