22 psa_key_handle_t key_handle;
23 psa_key_type_t key_type;
26 psa_key_usage_t usage;
27 psa_algorithm_t key_alg;
34 psa_status_t expected_status;
44 #ifdef ARCH_TEST_SHA256 45 {
"Test psa_generator_read to get 16 Byte data with SHA-256\n", 1, PSA_KEY_TYPE_DERIVE,
46 {0x49, 0x8E, 0xC7, 0x7D, 0x01, 0x95, 0x0D, 0x94, 0x2C, 0x16, 0xA5, 0x3E, 0x99,
48 AES_16B_KEY_SIZE, PSA_KEY_USAGE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_256),
58 #ifdef ARCH_TEST_SHA512 59 {
"Test psa_generator_read to get 32 Byte data with SHA-512\n", 2, PSA_KEY_TYPE_DERIVE,
60 {0xEA, 0xD5, 0xE6, 0xC8, 0x51, 0xF9, 0xEC, 0xBB, 0x9B, 0x57, 0x7C, 0xED, 0xD2,
61 0x4B, 0x82, 0x84, 0x9F, 0x9F, 0xE6, 0x73, 0x21, 0x3D, 0x1A, 0x05, 0xC9, 0xED,
62 0xDF, 0x25, 0x17, 0x68, 0x86, 0xAE},
63 AES_32B_KEY_SIZE, PSA_KEY_USAGE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_512),
75 {
"Test psa_generator_read to get 8 Byte data with SHA-1\n", 3, PSA_KEY_TYPE_DERIVE,
76 {0x70, 0x24, 0x55, 0x0C, 0x14, 0x9D, 0xED, 0x29},
77 DES_8B_KEY_SIZE, PSA_KEY_USAGE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_1),
79 70, PSA_ERROR_INSUFFICIENT_CAPACITY
82 {
"Test psa_generator_read to request maximum capacity\n", 4, PSA_KEY_TYPE_DERIVE,
83 {0x70, 0x24, 0x55, 0x0C, 0x14, 0x9D, 0xED, 0x29},
84 DES_8B_KEY_SIZE, PSA_KEY_USAGE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_1),
85 {0}, 0, {0}, 0, (255 * 20),
86 (255 * 20), PSA_SUCCESS
89 {
"Test psa_generator_read to request maximum capacity +1\n", 5, PSA_KEY_TYPE_DERIVE,
90 {0x70, 0x24, 0x55, 0x0C, 0x14, 0x9D, 0xED, 0x29},
91 DES_8B_KEY_SIZE, PSA_KEY_USAGE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_1),
92 {0}, 0, {0}, 0, (255 * 20),
93 ((255 * 20) + 1), PSA_ERROR_INSUFFICIENT_CAPACITY
Copyright (c) 2018-2019, Arm Limited or its affiliates.