blob: a2e52ba32228c15379eebc8556db4da2fd16048e [file] [log] [blame]
Gilles Peskine961849f2018-11-30 18:54:54 +01001/*
2 * PSA crypto layer on top of Mbed TLS crypto
3 */
4/* Copyright (C) 2018, ARM Limited, All Rights Reserved
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * This file is part of mbed TLS (https://tls.mbed.org)
20 */
21
22#ifndef PSA_CRYPTO_SLOT_MANAGEMENT_H
23#define PSA_CRYPTO_SLOT_MANAGEMENT_H
24
25/* Number of key slots (plus one because 0 is not used).
26 * The value is a compile-time constant for now, for simplicity. */
27#define PSA_KEY_SLOT_COUNT 32
28
Gilles Peskine66fb1262018-12-10 16:29:04 +010029/** Access a key slot at the given handle. */
30psa_status_t psa_get_key_slot( psa_key_handle_t handle,
31 psa_key_slot_t **p_slot );
32
33/** Initialize the key slot structures. */
34psa_status_t psa_initialize_key_slots( void );
35
36/** Delete all data from key slots in memory. This does not affect persistent
37 * storage. */
38void psa_wipe_all_key_slots( void );
39
Gilles Peskine961849f2018-11-30 18:54:54 +010040#endif /* PSA_CRYPTO_SLOT_MANAGEMENT_H */