Soby Mathew | d7b79f2 | 2020-05-21 15:06:54 +0100 | [diff] [blame] | 1 | /* |
Maulik Patel | 28659c4 | 2021-01-06 14:09:22 +0000 | [diff] [blame^] | 2 | * Copyright (c) 2020-2021, Arm Limited. All rights reserved. |
Soby Mathew | d7b79f2 | 2020-05-21 15:06:54 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | /** |
| 8 | * \file psa/crypto_client_struct.h |
| 9 | * |
| 10 | * \brief PSA cryptography client key attribute definitions |
| 11 | * |
| 12 | * \note This file may not be included directly. Applications must |
| 13 | * include psa/crypto.h. |
| 14 | * |
| 15 | * This file contains the definitions of some data structures with |
| 16 | * PSA crypto client specific definitions. This is for implementations |
| 17 | * with isolation between the Client applications and the Crypto |
| 18 | * Server module, it is expected that the front-end and the back-end |
| 19 | * would have different versions of the data structure. |
| 20 | */ |
| 21 | #ifndef PSA_CRYPTO_CLIENT_STRUCT_H |
| 22 | #define PSA_CRYPTO_CLIENT_STRUCT_H |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | extern "C" { |
| 26 | #endif |
| 27 | |
| 28 | /* This is the client view of the `key_attributes` structure. Only |
| 29 | * fields which need to be set by the PSA crypto client are present. |
| 30 | * The PSA crypto service will maintain a different version of the |
| 31 | * data structure internally. */ |
| 32 | struct psa_client_key_attributes_s |
| 33 | { |
Soby Mathew | d7b79f2 | 2020-05-21 15:06:54 +0100 | [diff] [blame] | 34 | uint32_t lifetime; |
Maulik Patel | 28659c4 | 2021-01-06 14:09:22 +0000 | [diff] [blame^] | 35 | psa_key_id_t id; |
Soby Mathew | d7b79f2 | 2020-05-21 15:06:54 +0100 | [diff] [blame] | 36 | uint32_t alg; |
| 37 | uint32_t usage; |
Soby Mathew | 7329d7e | 2020-09-03 15:03:28 +0100 | [diff] [blame] | 38 | size_t bits; |
| 39 | uint16_t type; |
Soby Mathew | d7b79f2 | 2020-05-21 15:06:54 +0100 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | #define PSA_CLIENT_KEY_ATTRIBUTES_INIT {0, 0, 0, 0, 0, 0} |
| 43 | |
| 44 | #ifdef __cplusplus |
| 45 | } |
| 46 | #endif |
| 47 | |
| 48 | #endif /* PSA_CRYPTO_CLIENT_STRUCT_H */ |