blob: 517933f5245d8ba07a4da23ee22c315e03ab147d [file] [log] [blame]
Ronald Cron00b7bfc2020-11-25 15:25:26 +01001/*
2 * PSA ECP layer on top of Mbed TLS crypto
3 */
4/*
5 * Copyright The Mbed TLS Contributors
6 * SPDX-License-Identifier: Apache-2.0
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#ifndef PSA_CRYPTO_ECP_H
22#define PSA_CRYPTO_ECP_H
23
24#include <psa/crypto.h>
25#include <mbedtls/ecp.h>
26
27/** Load the contents of a key buffer into an internal ECP representation
28 *
29 * \param[in] type The type of key contained in \p data.
30 * \param[in] data The buffer from which to load the representation.
31 * \param[in] data_length The size in bytes of \p data.
32 * \param[out] p_ecp Returns a pointer to an ECP context on success.
33 * The caller is responsible for freeing both the
34 * contents of the context and the context itself
35 * when done.
36 */
37psa_status_t mbedtls_psa_ecp_load_representation( psa_key_type_t type,
38 const uint8_t *data,
39 size_t data_length,
40 mbedtls_ecp_keypair **p_ecp );
41#endif /* PSA_CRYPTO_ECP */