Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <string.h> |
| 8 | #include <stdlib.h> |
| 9 | #include <psa/crypto.h> |
| 10 | #include "psa_crypto_client.h" |
| 11 | #include <protocols/rpc/common/packed-c/status.h> |
| 12 | #include <protocols/service/crypto/packed-c/opcodes.h> |
| 13 | #include <common/tlv/tlv.h> |
| 14 | |
| 15 | psa_status_t psa_cipher_encrypt_setup(psa_cipher_operation_t *operation, |
| 16 | psa_key_id_t key, |
| 17 | psa_algorithm_t alg) |
| 18 | { |
| 19 | return PSA_ERROR_NOT_SUPPORTED; |
| 20 | } |
| 21 | |
| 22 | psa_status_t psa_cipher_decrypt_setup(psa_cipher_operation_t *operation, |
| 23 | psa_key_id_t key, |
| 24 | psa_algorithm_t alg) |
| 25 | { |
| 26 | return PSA_ERROR_NOT_SUPPORTED; |
| 27 | } |
| 28 | |
| 29 | psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation, |
| 30 | uint8_t *iv, |
| 31 | size_t iv_size, |
| 32 | size_t *iv_length) |
| 33 | { |
| 34 | return PSA_ERROR_NOT_SUPPORTED; |
| 35 | } |
| 36 | |
| 37 | psa_status_t psa_cipher_set_iv(psa_cipher_operation_t *operation, |
| 38 | const uint8_t *iv, |
| 39 | size_t iv_length) |
| 40 | { |
| 41 | return PSA_ERROR_NOT_SUPPORTED; |
| 42 | } |
| 43 | |
| 44 | psa_status_t psa_cipher_update(psa_cipher_operation_t *operation, |
| 45 | const uint8_t *input, |
| 46 | size_t input_length, |
| 47 | uint8_t *output, |
| 48 | size_t output_size, |
| 49 | size_t *output_length) |
| 50 | { |
| 51 | return PSA_ERROR_NOT_SUPPORTED; |
| 52 | } |
| 53 | |
| 54 | psa_status_t psa_cipher_finish(psa_cipher_operation_t *operation, |
| 55 | uint8_t *output, |
| 56 | size_t output_size, |
| 57 | size_t *output_length) |
| 58 | { |
| 59 | return PSA_ERROR_NOT_SUPPORTED; |
| 60 | } |
| 61 | |
| 62 | psa_status_t psa_cipher_abort(psa_cipher_operation_t *operation) |
| 63 | { |
| 64 | return PSA_ERROR_NOT_SUPPORTED; |
| 65 | } |