aboutsummaryrefslogtreecommitdiff
path: root/interface/include/psa/crypto_client_struct.h
blob: bf95c9821e5522ab0da5cfab987fdf5d349768eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */
/**
 * \file psa/crypto_client_struct.h
 *
 * \brief PSA cryptography client key attribute definitions
 *
 * \note This file may not be included directly. Applications must
 * include psa/crypto.h.
 *
 * This file contains the definitions of some data structures with
 * PSA crypto client specific definitions. This is for implementations
 * with isolation between the Client applications and the Crypto
 * Server module, it is expected that the front-end and the back-end
 * would have different versions of the data structure.
 */
#ifndef PSA_CRYPTO_CLIENT_STRUCT_H
#define PSA_CRYPTO_CLIENT_STRUCT_H

#ifdef __cplusplus
extern "C" {
#endif

/* This is the client view of the `key_attributes` structure. Only
 * fields which need to be set by the PSA crypto client are present.
 * The PSA crypto service will maintain a different version of the
 * data structure internally. */
struct psa_client_key_attributes_s
{
    uint16_t type;
    uint16_t bits;
    uint32_t lifetime;
    psa_key_id_t id;
    uint32_t usage;
    uint32_t alg;
};

#define PSA_CLIENT_KEY_ATTRIBUTES_INIT {0, 0, 0, 0, 0, 0}

#ifdef __cplusplus
}
#endif

#endif /* PSA_CRYPTO_CLIENT_STRUCT_H */