2020-07-16 20:28:36 +02:00
|
|
|
/*
|
|
|
|
* Function signatures for functionality that can be provided by
|
|
|
|
* cryptographic accelerators.
|
|
|
|
*/
|
2020-09-02 13:43:46 +02:00
|
|
|
/* Copyright The Mbed TLS Contributors
|
2020-07-16 20:28:36 +02: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"
|
|
|
|
|
2021-04-10 16:57:30 +02:00
|
|
|
/*
|
|
|
|
* Initialization and termination functions
|
|
|
|
*/
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_status_t psa_driver_wrapper_init(void);
|
|
|
|
void psa_driver_wrapper_free(void);
|
2021-04-10 16:57:30 +02:00
|
|
|
|
2020-07-28 18:49:51 +02:00
|
|
|
/*
|
|
|
|
* Signature functions
|
|
|
|
*/
|
2021-04-22 11:32:19 +02:00
|
|
|
psa_status_t psa_driver_wrapper_sign_message(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *signature,
|
|
|
|
size_t signature_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *signature_length);
|
2021-04-22 11:32:19 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_verify_message(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
const uint8_t *signature,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t signature_length);
|
2021-04-22 11:32:19 +02:00
|
|
|
|
2020-12-08 17:07:25 +01:00
|
|
|
psa_status_t psa_driver_wrapper_sign_hash(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg, const uint8_t *hash, size_t hash_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *signature, size_t signature_size, size_t *signature_length);
|
2020-12-08 17:07:25 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_verify_hash(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg, const uint8_t *hash, size_t hash_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
const uint8_t *signature, size_t signature_length);
|
2020-07-17 19:46:15 +02:00
|
|
|
|
2022-11-29 15:54:44 +01:00
|
|
|
/*
|
|
|
|
* Interruptible Signature functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
void psa_driver_wrapper_interruptible_set_max_ops(uint32_t max_ops);
|
|
|
|
|
|
|
|
uint32_t psa_driver_wrapper_interruptible_get_max_ops(void);
|
|
|
|
|
|
|
|
uint32_t psa_driver_wrapper_sign_hash_get_num_ops(
|
2023-02-15 19:14:21 +01:00
|
|
|
psa_sign_hash_interruptible_operation_t *operation);
|
2022-11-29 15:54:44 +01:00
|
|
|
|
|
|
|
uint32_t psa_driver_wrapper_verify_hash_get_num_ops(
|
2023-02-15 19:14:21 +01:00
|
|
|
psa_verify_hash_interruptible_operation_t *operation);
|
2022-11-29 15:54:44 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_sign_hash_start(
|
|
|
|
psa_sign_hash_interruptible_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes, const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size, psa_algorithm_t alg,
|
|
|
|
const uint8_t *hash, size_t hash_length);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_sign_hash_complete(
|
|
|
|
psa_sign_hash_interruptible_operation_t *operation,
|
|
|
|
uint8_t *signature, size_t signature_size,
|
|
|
|
size_t *signature_length);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_sign_hash_abort(
|
|
|
|
psa_sign_hash_interruptible_operation_t *operation);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_verify_hash_start(
|
|
|
|
psa_verify_hash_interruptible_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes, const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size, psa_algorithm_t alg,
|
|
|
|
const uint8_t *hash, size_t hash_length,
|
|
|
|
const uint8_t *signature, size_t signature_length);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_verify_hash_complete(
|
|
|
|
psa_verify_hash_interruptible_operation_t *operation);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_verify_hash_abort(
|
|
|
|
psa_verify_hash_interruptible_operation_t *operation);
|
|
|
|
|
2020-10-13 17:43:44 +02:00
|
|
|
/*
|
|
|
|
* Key handling functions
|
|
|
|
*/
|
|
|
|
|
2020-11-22 14:02:39 +01: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,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *key_buffer_length, size_t *bits);
|
2020-10-13 17:43:44 +02:00
|
|
|
|
2020-11-26 15:16:05 +01: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,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *data, size_t data_size, size_t *data_length);
|
2020-11-26 15:16:05 +01:00
|
|
|
|
2020-11-25 14:30:05 +01: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,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *data, size_t data_size, size_t *data_length);
|
2020-11-25 14:30:05 +01:00
|
|
|
|
2020-12-05 19:15:23 +01:00
|
|
|
psa_status_t psa_driver_wrapper_get_key_buffer_size(
|
|
|
|
const psa_key_attributes_t *attributes,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *key_buffer_size);
|
2020-12-05 19:15:23 +01:00
|
|
|
|
2021-06-14 06:34:16 +02:00
|
|
|
psa_status_t psa_driver_wrapper_get_key_buffer_size_from_key_data(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *data,
|
|
|
|
size_t data_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *key_buffer_size);
|
2021-06-14 06:34:16 +02:00
|
|
|
|
2020-11-25 14:30:05 +01:00
|
|
|
psa_status_t psa_driver_wrapper_generate_key(
|
|
|
|
const psa_key_attributes_t *attributes,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length);
|
2020-10-14 14:39:20 +02:00
|
|
|
|
2021-02-19 17:21:22 +01:00
|
|
|
psa_status_t psa_driver_wrapper_get_builtin_key(
|
|
|
|
psa_drv_slot_number_t slot_number,
|
|
|
|
psa_key_attributes_t *attributes,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length);
|
2021-02-19 17:21:22 +01:00
|
|
|
|
2021-07-04 22:48:48 +02:00
|
|
|
psa_status_t psa_driver_wrapper_copy_key(
|
|
|
|
psa_key_attributes_t *attributes,
|
2021-09-10 02:52:44 +02:00
|
|
|
const uint8_t *source_key, size_t source_key_length,
|
2021-09-08 12:06:05 +02:00
|
|
|
uint8_t *target_key_buffer, size_t target_key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *target_key_buffer_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
/*
|
|
|
|
* Cipher functions
|
|
|
|
*/
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_encrypt(
|
2021-03-25 11:17:10 +01:00
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
2020-07-28 18:49:51 +02:00
|
|
|
psa_algorithm_t alg,
|
2021-07-09 09:19:35 +02:00
|
|
|
const uint8_t *iv,
|
|
|
|
size_t iv_length,
|
2020-07-28 18:49:51 +02:00
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_decrypt(
|
2021-03-25 11:17:10 +01:00
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
2020-07-28 18:49:51 +02:00
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_encrypt_setup(
|
2020-12-14 14:36:06 +01:00
|
|
|
psa_cipher_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_decrypt_setup(
|
2020-12-14 14:36:06 +01:00
|
|
|
psa_cipher_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_set_iv(
|
2020-12-15 13:58:07 +01:00
|
|
|
psa_cipher_operation_t *operation,
|
2020-07-28 18:49:51 +02:00
|
|
|
const uint8_t *iv,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t iv_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_update(
|
2020-12-15 13:58:07 +01:00
|
|
|
psa_cipher_operation_t *operation,
|
2020-07-28 18:49:51 +02:00
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_finish(
|
2020-12-15 13:58:07 +01:00
|
|
|
psa_cipher_operation_t *operation,
|
2020-07-28 18:49:51 +02:00
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_cipher_abort(
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_cipher_operation_t *operation);
|
2020-07-28 18:49:51 +02:00
|
|
|
|
2021-02-18 17:24:37 +01:00
|
|
|
/*
|
|
|
|
* Hashing functions
|
|
|
|
*/
|
|
|
|
psa_status_t psa_driver_wrapper_hash_compute(
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *hash,
|
|
|
|
size_t hash_size,
|
|
|
|
size_t *hash_length);
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_hash_setup(
|
2021-03-04 13:01:18 +01:00
|
|
|
psa_hash_operation_t *operation,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2021-02-18 17:24:37 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_hash_clone(
|
2021-03-04 13:01:18 +01:00
|
|
|
const psa_hash_operation_t *source_operation,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_hash_operation_t *target_operation);
|
2021-02-18 17:24:37 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_hash_update(
|
2021-03-04 13:01:18 +01:00
|
|
|
psa_hash_operation_t *operation,
|
2021-02-18 17:24:37 +01:00
|
|
|
const uint8_t *input,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t input_length);
|
2021-02-18 17:24:37 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_hash_finish(
|
2021-03-04 13:01:18 +01:00
|
|
|
psa_hash_operation_t *operation,
|
2021-02-18 17:24:37 +01:00
|
|
|
uint8_t *hash,
|
|
|
|
size_t hash_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *hash_length);
|
2021-02-18 17:24:37 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_hash_abort(
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_hash_operation_t *operation);
|
2021-02-18 17:24:37 +01:00
|
|
|
|
2021-03-17 16:08:20 +01:00
|
|
|
/*
|
|
|
|
* AEAD functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_encrypt(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *nonce, size_t nonce_length,
|
|
|
|
const uint8_t *additional_data, size_t additional_data_length,
|
|
|
|
const uint8_t *plaintext, size_t plaintext_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length);
|
2021-03-17 16:08:20 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_decrypt(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *nonce, size_t nonce_length,
|
|
|
|
const uint8_t *additional_data, size_t additional_data_length,
|
|
|
|
const uint8_t *ciphertext, size_t ciphertext_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length);
|
2021-03-17 16:08:20 +01:00
|
|
|
|
2021-04-20 18:09:36 +02:00
|
|
|
psa_status_t psa_driver_wrapper_aead_encrypt_setup(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_decrypt_setup(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer, size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_set_nonce(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
const uint8_t *nonce,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t nonce_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_set_lengths(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
size_t ad_length,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t plaintext_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_update_ad(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
const uint8_t *input,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t input_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_update(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_finish(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
uint8_t *ciphertext,
|
|
|
|
size_t ciphertext_size,
|
|
|
|
size_t *ciphertext_length,
|
|
|
|
uint8_t *tag,
|
|
|
|
size_t tag_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *tag_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_verify(
|
|
|
|
psa_aead_operation_t *operation,
|
|
|
|
uint8_t *plaintext,
|
|
|
|
size_t plaintext_size,
|
|
|
|
size_t *plaintext_length,
|
|
|
|
const uint8_t *tag,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t tag_length);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_aead_abort(
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_aead_operation_t *operation);
|
2021-04-20 18:09:36 +02:00
|
|
|
|
2021-03-19 15:24:23 +01:00
|
|
|
/*
|
|
|
|
* MAC functions
|
|
|
|
*/
|
|
|
|
psa_status_t psa_driver_wrapper_mac_compute(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
uint8_t *mac,
|
|
|
|
size_t mac_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *mac_length);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_sign_setup(
|
|
|
|
psa_mac_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_verify_setup(
|
|
|
|
psa_mac_operation_t *operation,
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_algorithm_t alg);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_update(
|
|
|
|
psa_mac_operation_t *operation,
|
|
|
|
const uint8_t *input,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t input_length);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_sign_finish(
|
|
|
|
psa_mac_operation_t *operation,
|
|
|
|
uint8_t *mac,
|
|
|
|
size_t mac_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *mac_length);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_verify_finish(
|
|
|
|
psa_mac_operation_t *operation,
|
|
|
|
const uint8_t *mac,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t mac_length);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
|
|
|
psa_status_t psa_driver_wrapper_mac_abort(
|
2023-01-11 14:50:10 +01:00
|
|
|
psa_mac_operation_t *operation);
|
2021-03-19 15:24:23 +01:00
|
|
|
|
2021-12-09 11:11:54 +01:00
|
|
|
/*
|
|
|
|
* Asymmetric cryptography
|
|
|
|
*/
|
|
|
|
psa_status_t psa_driver_wrapper_asymmetric_encrypt(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
const uint8_t *salt,
|
|
|
|
size_t salt_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2021-12-09 11:11:54 +01:00
|
|
|
|
2021-12-13 09:00:52 +01:00
|
|
|
psa_status_t psa_driver_wrapper_asymmetric_decrypt(
|
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *input,
|
|
|
|
size_t input_length,
|
|
|
|
const uint8_t *salt,
|
|
|
|
size_t salt_length,
|
|
|
|
uint8_t *output,
|
|
|
|
size_t output_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *output_length);
|
2021-12-13 09:00:52 +01:00
|
|
|
|
2022-10-13 18:21:01 +02:00
|
|
|
/*
|
|
|
|
* Raw Key Agreement
|
|
|
|
*/
|
2022-10-17 14:53:35 +02:00
|
|
|
psa_status_t psa_driver_wrapper_key_agreement(
|
2022-10-13 18:21:01 +02:00
|
|
|
const psa_key_attributes_t *attributes,
|
|
|
|
const uint8_t *key_buffer,
|
|
|
|
size_t key_buffer_size,
|
|
|
|
psa_algorithm_t alg,
|
|
|
|
const uint8_t *peer_key,
|
|
|
|
size_t peer_key_length,
|
|
|
|
uint8_t *shared_secret,
|
|
|
|
size_t shared_secret_size,
|
2023-01-11 14:50:10 +01:00
|
|
|
size_t *shared_secret_length);
|
2022-10-13 18:21:01 +02:00
|
|
|
|
2020-07-16 20:28:36 +02:00
|
|
|
#endif /* PSA_CRYPTO_DRIVER_WRAPPERS_H */
|
|
|
|
|
|
|
|
/* End of automatically generated file. */
|