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;
28 psa_status_t expected_status;
32 #ifdef ARCH_TEST_AES_128 33 #ifdef ARCH_TEST_CBC_NO_PADDING 34 {
"Test psa_cipher_abort - Encrypt - AES CBC_NO_PADDING\n", 1, PSA_KEY_TYPE_AES,
35 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
36 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
37 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
42 #ifdef ARCH_TEST_CBC_PKCS7 43 {
"Test psa_cipher_abort - Encrypt - AES CBC_PKCS7\n", 2, PSA_KEY_TYPE_AES,
44 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
45 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
46 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_PKCS7,
51 #ifdef ARCH_TEST_CIPER_MODE_CTR 52 {
"Test psa_cipher_abort - Encrypt - AES CTR\n", 3, PSA_KEY_TYPE_AES,
53 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
54 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
55 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CTR,
61 #ifdef ARCH_TEST_CBC_NO_PADDING 62 #ifdef ARCH_TEST_DES_1KEY 63 {
"Test psa_cipher_abort - Encrypt - DES CBC (nopad)\n", 4, PSA_KEY_TYPE_DES,
64 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e}, DES_8B_KEY_SIZE,
65 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
70 #ifdef ARCH_TEST_DES_2KEY 71 {
"Test psa_cipher_abort - Encrypt - 2-key 3DE -CBC (nopad)\n", 5, PSA_KEY_TYPE_DES,
72 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
73 0xcb, 0xcd, 0xce}, DES3_2KEY_SIZE,
74 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
79 #ifdef ARCH_TEST_DES_3KEY 80 {
"Test psa_cipher_abort - Encrypt - 3-key 3DE -CBC (nopad)\n", 6, PSA_KEY_TYPE_DES,
81 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
82 0xcb, 0xcd, 0xce, 0x31, 0x32, 0x34, 0x37, 0x38, 0x3b, 0x3d, 0x3e}, DES3_3KEY_SIZE,
83 PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
89 #ifdef ARCH_TEST_AES_128 90 #ifdef ARCH_TEST_CBC_NO_PADDING 91 {
"Test psa_cipher_abort - Decrypt - AES CBC_NO_PADDING\n", 7, PSA_KEY_TYPE_AES,
92 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
93 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
94 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
99 #ifdef ARCH_TEST_CBC_PKCS7 100 {
"Test psa_cipher_abort - Decrypt - AES CBC_PKCS7\n", 8, PSA_KEY_TYPE_AES,
101 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
102 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
103 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_PKCS7,
108 #ifdef ARCH_TEST_CIPER_MODE_CTR 109 {
"Test psa_cipher_abort - Decrypt - AES CTR\n", 9, PSA_KEY_TYPE_AES,
110 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
111 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
112 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CTR,
118 #ifdef ARCH_TEST_CBC_NO_PADDING 119 #ifdef ARCH_TEST_DES_1KEY 120 {
"Test psa_cipher_abort - Decrypt - DES CBC (nopad)\n", 10, PSA_KEY_TYPE_DES,
121 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e}, DES_8B_KEY_SIZE,
122 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
127 #ifdef ARCH_TEST_DES_2KEY 128 {
"Test psa_cipher_abort - Decrypt - 2-key 3DE -CBC (nopad)\n", 11, PSA_KEY_TYPE_DES,
129 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
130 0xcb, 0xcd, 0xce}, DES3_2KEY_SIZE,
131 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
136 #ifdef ARCH_TEST_DES_3KEY 137 {
"Test psa_cipher_abort - Decrypt - 3-key 3DE -CBC (nopad)\n", 12, PSA_KEY_TYPE_DES,
138 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
139 0xcb, 0xcd, 0xce, 0x31, 0x32, 0x34, 0x37, 0x38, 0x3b, 0x3d, 0x3e}, DES3_3KEY_SIZE,
140 PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
Copyright (c) 2018-2019, Arm Limited or its affiliates.