Mistake on this page?
Report an issue in GitHub or email us
compliance_crypto/test_c009/test_data.h
Go to the documentation of this file.
1 /** @file
2  * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
3  * SPDX-License-Identifier : Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16 **/
17 
18 #include "val_crypto.h"
19 
20 typedef struct {
21  char test_desc[75];
22  psa_key_handle_t key_handle;
23  psa_key_type_t key_type;
24  size_t key_length;
25  psa_status_t expected_status;
26 } test_data;
27 
28 static test_data check1[] = {
29 #ifdef ARCH_TEST_AES_128
30 {"Test psa_allocate_key 16 Byte AES\n", 1, PSA_KEY_TYPE_AES,
31  AES_16B_KEY_SIZE, PSA_SUCCESS
32 },
33 #endif
34 
35 #ifdef ARCH_TEST_AES_192
36 {"Test psa_allocate_key 24 Byte AES\n", 2, PSA_KEY_TYPE_AES,
37  AES_24B_KEY_SIZE, PSA_SUCCESS
38 },
39 #endif
40 
41 #ifdef ARCH_TEST_AES_256
42 {"Test psa_allocate_key 32 Byte AES\n", 3, PSA_KEY_TYPE_AES,
43  AES_32B_KEY_SIZE, PSA_SUCCESS
44 },
45 #endif
46 
47 #ifdef ARCH_TEST_RSA_2048
48 {"Test psa_allocate_key 2048 RSA public key\n", 4, PSA_KEY_TYPE_RSA_PUBLIC_KEY,
49  294, PSA_SUCCESS
50 },
51 
52 {"Test psa_allocate_key with RSA 2048 keypair\n", 5, PSA_KEY_TYPE_RSA_KEYPAIR,
53  1193, PSA_SUCCESS
54 },
55 #endif
56 
57 #ifdef ARCH_TEST_DES_1KEY
58 {"Test psa_allocate_key with DES 64 bit key\n", 6, PSA_KEY_TYPE_DES,
59  DES_8B_KEY_SIZE, PSA_SUCCESS
60 },
61 #endif
62 
63 #ifdef ARCH_TEST_DES_2KEY
64 {"Test psa_allocate_key with Triple DES 2-Key\n", 7, PSA_KEY_TYPE_DES,
65  DES3_2KEY_SIZE, PSA_SUCCESS
66 },
67 #endif
68 
69 #ifdef ARCH_TEST_DES_3KEY
70 {"Test psa_allocate_key with Triple DES 3-Key\n", 8, PSA_KEY_TYPE_DES,
71  DES3_3KEY_SIZE, PSA_SUCCESS
72 },
73 #endif
74 
75 #ifdef ARCH_TEST_ECC_CURVE_SECP192R1
76 {"Test psa_allocate_key with EC Public key\n", 9,
77  PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | PSA_ECC_CURVE_SECP192R1,
78  75, PSA_SUCCESS
79 },
80 
81 {"Test psa_allocate_key with EC keypair\n", 10,
82  PSA_KEY_TYPE_ECC_KEYPAIR_BASE | PSA_ECC_CURVE_SECP192R1,
83  97, PSA_SUCCESS
84 },
85 #endif
86 };
Copyright (c) 2018-2019, Arm Limited or its affiliates.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.