2020-07-16 18:28:36 +00:00
|
|
|
/*
|
|
|
|
* Function signatures for functionality that can be provided by
|
|
|
|
* cryptographic accelerators.
|
2020-09-04 11:07:15 +00:00
|
|
|
* Warning: This file will be auto-generated in the future.
|
2020-07-16 18:28:36 +00:00
|
|
|
*/
|
2020-09-02 11:43:46 +00:00
|
|
|
/* Copyright The Mbed TLS Contributors
|
2020-07-16 18:28:36 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PSA_CRYPTO_DRIVER_WRAPPERS_H
|
|
|
|
#define PSA_CRYPTO_DRIVER_WRAPPERS_H
|
|
|
|
|
|
|
|
#include "psa/crypto.h"
|
|
|
|
#include "psa/crypto_driver_common.h"
|
|
|
|
|
2020-07-28 16:49:51 +00:00
|
|
|
/*
|
|
|
|
* Signature functions
|
|
|
|
*/
|
2020-07-16 18:28:36 +00:00
|
|
|
psa_status_t psa_driver_wrapper_sign_hash( psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *hash,
|
|
|
|
size_t hash_length,
|
|
|
|
uint8_t *signature,
|
|
|
|
size_t signature_size,
|
|
|
|
size_t *signature_length );
|
|
|
|
|
2020-07-17 17:46:15 +00:00
|
|
|
psa_status_t psa_driver_wrapper_verify_hash( psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *hash,
|
|
|
|
size_t hash_length,
|
|
|
|
const uint8_t *signature,
|
|
|
|
size_t signature_length );
|
|
|
|
|
2020-10-13 15:43:44 +00:00
|
|
|
/*
|
|
|
|
* Key handling functions
|
|
|
|
*/
|
|
|
|
|
2020-11-22 13:02:39 +00:00
|
|
|
psa_status_t psa_driver_wrapper_import_key(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *data, size_t data_length,
|
|
|
|
uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
size_t *key_buffer_length, size_t *bits );
|
2020-10-13 15:43:44 +00:00
|
|
|
|
2020-11-26 14:16:05 +00:00
|
|
|
psa_status_t psa_driver_wrapper_export_key(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
uint8_t *data, size_t data_size, size_t *data_length );
|
|
|
|
|
2020-11-25 13:30:05 +00:00
|
|
|
psa_status_t psa_driver_wrapper_export_public_key(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
uint8_t *data, size_t data_size, size_t *data_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_generate_key(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
psa_key_slot_t *slot );
|
2020-10-14 12:39:20 +00:00
|
|
|
|
2020-07-28 16:49:51 +00:00
|
|
|
/*
|
|
|
|
* Cipher functions
|
|
|
|
*/
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_encrypt(
|
|
|
|
psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
|
|
|
size_t *output_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_decrypt(
|
|
|
|
psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
|
|
|
size_t *output_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_encrypt_setup(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_decrypt_setup(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
psa_key_slot_t *slot,
|
|
|
|
psa_algorithm_t alg );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_generate_iv(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
uint8_t *iv,
|
|
|
|
size_t iv_size,
|
|
|
|
size_t *iv_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_set_iv(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
const uint8_t *iv,
|
|
|
|
size_t iv_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_update(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
|
|
|
size_t *output_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_finish(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation,
|
2020-07-28 16:49:51 +00:00
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
|
|
|
size_t *output_length );
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_abort(
|
2020-09-09 10:01:43 +00:00
|
|
|
psa_operation_driver_context_t *operation );
|
2020-07-28 16:49:51 +00:00
|
|
|
|
2020-07-16 18:28:36 +00:00
|
|
|
#endif /* PSA_CRYPTO_DRIVER_WRAPPERS_H */
|
|
|
|
|
|
|
|
/* End of automatically generated file. */
|