Lines Matching refs:attributes
21 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
30 psa_set_key_type( &attributes,
32 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH );
33 psa_set_key_algorithm( &attributes, alg );
34 psa_import_key( &attributes,
60 psa_reset_key_attributes( &attributes );
79 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
88 psa_set_key_type( &attributes,
90 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH );
91 psa_set_key_algorithm( &attributes, alg );
92 psa_import_key( &attributes,
98 psa_set_key_type( &attributes,
100 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH );
101 psa_set_key_algorithm( &attributes, alg );
102 psa_import_key( &attributes,
116 psa_reset_key_attributes( &attributes );
135 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
144 psa_set_key_type( &attributes,
146 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_MESSAGE );
147 psa_set_key_algorithm( &attributes, alg );
148 psa_import_key( &attributes,
176 psa_reset_key_attributes( &attributes );
195 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
204 psa_set_key_type( &attributes,
206 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE );
207 psa_set_key_algorithm( &attributes, alg );
208 psa_import_key( &attributes,
214 psa_set_key_type( &attributes,
216 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_MESSAGE );
217 psa_set_key_algorithm( &attributes, alg );
218 psa_import_key( &attributes,
234 psa_reset_key_attributes( &attributes );
250 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
260 psa_set_key_type( &attributes,
262 psa_set_key_bits( &attributes, 256 );
263 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_EXPORT );
264 psa_set_key_algorithm( &attributes, alg );
282 actual_status = psa_generate_key( &attributes, &key );
307 psa_reset_key_attributes( &attributes );
325 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
330 psa_set_key_type( &attributes,
332 psa_set_key_bits( &attributes, 0 );
333 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_EXPORT );
339 actual_status = psa_import_key( &attributes, key_input->x, key_input->len, &key );
343 psa_reset_key_attributes( &attributes );
363 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
374 psa_set_key_type( &attributes, input_key_type );
375 psa_set_key_bits( &attributes, 256 );
376 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_EXPORT );
379 PSA_ASSERT( psa_import_key( &attributes, key_in->x, key_in->len, &handle ) );
416 psa_reset_key_attributes( &attributes );
442 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
447 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT );
448 psa_set_key_algorithm( &attributes, alg );
449 psa_set_key_type( &attributes, key_type );
457 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
535 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
555 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT );
556 psa_set_key_algorithm( &attributes, alg );
557 psa_set_key_type( &attributes, key_type );
559 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
667 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
687 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_DECRYPT );
688 psa_set_key_algorithm( &attributes, alg );
689 psa_set_key_type( &attributes, key_type );
691 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
794 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
800 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_DECRYPT );
801 psa_set_key_algorithm( &attributes, alg );
802 psa_set_key_type( &attributes, key_type );
816 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
860 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
868 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT );
869 psa_set_key_algorithm( &attributes, alg );
870 psa_set_key_type( &attributes, key_type );
872 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
1034 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1040 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_ENCRYPT );
1041 psa_set_key_algorithm( &attributes, alg );
1042 psa_set_key_type( &attributes, key_type );
1044 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
1046 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
1047 key_bits = psa_get_key_bits( &attributes );
1103 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1109 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_DECRYPT );
1110 psa_set_key_algorithm( &attributes, alg );
1111 psa_set_key_type( &attributes, key_type );
1113 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
1115 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
1116 key_bits = psa_get_key_bits( &attributes );
1162 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1177 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH );
1178 psa_set_key_algorithm( &attributes, alg );
1179 psa_set_key_type( &attributes, key_type );
1181 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
1289 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1298 psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_VERIFY_HASH );
1299 psa_set_key_algorithm( &attributes, alg );
1300 psa_set_key_type( &attributes, key_type );
1302 PSA_ASSERT( psa_import_key( &attributes, key_data->x, key_data->len,
1398 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1417 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
1418 TEST_EQUAL( psa_get_key_bits( &attributes ), builtin_key_bits );
1419 TEST_EQUAL( psa_get_key_type( &attributes ), builtin_key_type );
1420 TEST_EQUAL( psa_get_key_algorithm( &attributes ), builtin_key_alg );
1432 psa_reset_key_attributes( &attributes );
1451 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
1470 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) );
1471 TEST_EQUAL( psa_get_key_bits( &attributes ), builtin_key_bits );
1472 TEST_EQUAL( psa_get_key_type( &attributes ), builtin_key_type );
1473 TEST_EQUAL( psa_get_key_algorithm( &attributes ), builtin_key_alg );
1483 psa_reset_key_attributes( &attributes );