aboutsummaryrefslogtreecommitdiff
path: root/components/service/crypto/client/cpp/crypto_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'components/service/crypto/client/cpp/crypto_client.h')
-rw-r--r--components/service/crypto/client/cpp/crypto_client.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/components/service/crypto/client/cpp/crypto_client.h b/components/service/crypto/client/cpp/crypto_client.h
index eb3065546..2a5e5b992 100644
--- a/components/service/crypto/client/cpp/crypto_client.h
+++ b/components/service/crypto/client/cpp/crypto_client.h
@@ -176,6 +176,51 @@ public:
virtual psa_status_t mac_abort(
uint32_t op_handle) = 0;
+ /* Key derivation methods */
+ virtual psa_status_t key_derivation_setup(
+ uint32_t *op_handle,
+ psa_algorithm_t alg) = 0;
+
+ virtual psa_status_t key_derivation_get_capacity(
+ const uint32_t op_handle,
+ size_t *capacity) = 0;
+
+ virtual psa_status_t key_derivation_set_capacity(
+ uint32_t op_handle,
+ size_t capacity) = 0;
+
+ virtual psa_status_t key_derivation_input_bytes(
+ uint32_t op_handle,
+ psa_key_derivation_step_t step,
+ const uint8_t *data, size_t data_length) = 0;
+
+ virtual psa_status_t key_derivation_input_key(
+ uint32_t op_handle,
+ psa_key_derivation_step_t step,
+ psa_key_id_t key) = 0;
+
+ virtual psa_status_t key_derivation_output_bytes(
+ uint32_t op_handle,
+ uint8_t *output, size_t output_length) = 0;
+
+ virtual psa_status_t key_derivation_output_key(
+ const psa_key_attributes_t *attributes,
+ uint32_t op_handle,
+ psa_key_id_t *key) = 0;
+
+ virtual psa_status_t key_derivation_abort(
+ uint32_t op_handle) = 0;
+
+ virtual psa_status_t key_derivation_key_agreement(
+ uint32_t op_handle,
+ psa_key_derivation_step_t step,
+ psa_key_id_t private_key,
+ const uint8_t *peer_key, size_t peer_key_length) = 0;
+
+ virtual psa_status_t raw_key_agreement(psa_algorithm_t alg,
+ psa_key_id_t private_key,
+ const uint8_t *peer_key, size_t peer_key_length,
+ uint8_t *output, size_t output_size, size_t *output_length) = 0;
protected:
crypto_client();