Removed unnecessary fns
diff --git a/include/psa/crypto_accel_driver.h b/include/psa/crypto_accel_driver.h
index e1008dc..f60c2ec 100644
--- a/include/psa/crypto_accel_driver.h
+++ b/include/psa/crypto_accel_driver.h
@@ -38,19 +38,6 @@
extern "C" {
#endif
-/** Completely wipe vendor allocated items for a slot in memory.
- *
- * Persistent storage is not affected.
- *
- * \param[in,out] slot The key slot to wipe.
- *
- * \retval PSA_SUCCESS
- * Success. This includes the case of a key slot that was
- * already fully wiped.
- * \retval PSA_ERROR_CORRUPTION_DETECTED
- */
-psa_status_t psa_remove_key_data_from_memory_vendor(psa_key_slot_t * slot);
-
/** Import vendor defined key data into a slot.
*
* `slot->type` must have been set previously.
@@ -103,78 +90,6 @@
size_t domain_parameters_size);
/**
- * \brief Sign a hash or short message with a vendor defined private key.
- * This function has to be defined by the vendor if MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C
- *is defined.
- *
- * Note that to perform a hash-and-sign signature algorithm, you must
- * first calculate the hash by calling psa_hash_setup(), psa_hash_update()
- * and psa_hash_finish(). Then pass the resulting hash as the \p hash
- * parameter to this function. You can use #PSA_ALG_SIGN_GET_HASH(\p alg)
- * to determine the hash algorithm to use.
- *
- * \param slot Key slot to use for the operation.
- * It must be an asymmetric key pair.
- * \param alg A signature algorithm that is compatible with
- * the type of \p handle.
- * \param[in] hash The hash or message to sign.
- * \param hash_length Size of the \p hash buffer in bytes.
- * \param[out] signature Buffer where the signature is to be written.
- * \param signature_size Size of the \p signature buffer in bytes.
- * \param[out] signature_length On success, the number of bytes
- * that make up the returned signature value.
- *
- * \retval #PSA_SUCCESS
- * \retval #PSA_ERROR_BUFFER_TOO_SMALL
- * The size of the \p signature buffer is too small. You can
- * determine a sufficient buffer size by calling
- * #PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE(\c key_type, \c key_bits, \p alg)
- * where \c key_type and \c key_bits are the type and bit-size
- * respectively of \p handle.
- * \retval #PSA_ERROR_NOT_SUPPORTED
- * \retval Implementation dependent
- */
-psa_status_t psa_asymmetric_sign_vendor(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);
-
-/**
- * \brief Verify the signature a hash or short message using a vendor defined public key.
- * This function has to be defined by the vendor if MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C
- * is defined.
- *
- * Note that to perform a hash-and-sign signature algorithm, you must
- * first calculate the hash by calling psa_hash_setup(), psa_hash_update()
- * and psa_hash_finish(). Then pass the resulting hash as the \p hash
- * parameter to this function. You can use #PSA_ALG_SIGN_GET_HASH(\p alg)
- * to determine the hash algorithm to use.
- *
- * \param handle Key slot to use for the operation.
- * It must be a public key or an asymmetric key pair.
- * \param alg A signature algorithm that is compatible with
- * the type of \p handle.
- * \param[in] hash The hash or message whose signature is to be
- * verified.
- * \param hash_length Size of the \p hash buffer in bytes.
- * \param[in] signature Buffer containing the signature to verify.
- * \param signature_length Size of the \p signature buffer in bytes.
- *
- * \retval #PSA_SUCCESS
- * The signature is valid.
- * \retval #PSA_ERROR_INVALID_SIGNATURE
- * \retval Implementation dependent
- */
-psa_status_t psa_asymmetric_verify_vendor(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);
-/**
* \brief Generate symmetric key of vendor defined format.
*
* \warning This function **can** fail! Callers MUST check the return status
@@ -224,20 +139,6 @@
*/
psa_status_t psa_cipher_setup_vendor(psa_cipher_operation_t * operation, psa_key_handle_t handle, psa_algorithm_t alg, mbedtls_operation_t cipher_operation);
-/** Perform any vendor specific action when aborting a cipher operation.
- *
- * This function has to be defined by the vendor if MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C
- * is defined. This function is called at the beginning of the psa_cipher_abort function.
- *
- * This function must not be called directly.
- *
- * \param[in,out] operation Initialized cipher operation.
- *
- * \retval #PSA_SUCCESS
- * \retval Implementation dependent return values.
- */
-psa_status_t psa_cipher_abort_vendor(psa_cipher_operation_t * operation);
-
/** \defgroup driver_digest Hardware-Accelerated Message Digests
*
* Generation and authentication of Message Digests (aka hashes) must be done
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 220675d..57bdb6e 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -953,14 +953,6 @@
/** Wipe key data from a slot. Preserve metadata such as the policy. */
static psa_status_t psa_remove_key_data_from_memory( psa_key_slot_t *slot )
{
- #if defined (MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C)
- if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
- {
- psa_remove_key_data_from_memory_vendor(slot);
- }
- else
-#endif /* MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C */
-
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
if( psa_key_slot_is_external( slot ) )
{
@@ -3394,16 +3386,6 @@
}
else
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
-#if defined (MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C)
- if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
- {
- status = psa_asymmetric_sign_vendor(slot,alg,
- hash, hash_length,
- signature, signature_size,
- signature_length );
- }
- else
-#endif /* MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C */
#if defined(MBEDTLS_RSA_C)
if( slot->attr.type == PSA_KEY_TYPE_RSA_KEY_PAIR )
{
@@ -3490,15 +3472,6 @@
}
else
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
-#if defined (MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C)
-if (PSA_KEY_LIFETIME_IS_VENDOR_DEFINED(slot->attr.lifetime))
- {
- return( psa_asymmetric_verify_vendor(slot,alg,
- hash, hash_length,
- signature, signature_length ) );
- }
- else
-#endif /* MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C */
#if defined(MBEDTLS_RSA_C)
if( PSA_KEY_TYPE_IS_RSA( slot->attr.type ) )
{
@@ -4032,9 +4005,6 @@
* always have been initialized to a valid value). */
if( ! PSA_ALG_IS_CIPHER( operation->alg ) )
return( PSA_ERROR_BAD_STATE );
-#if defined (MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C)
- psa_cipher_abort_vendor(operation);
-#endif //MBEDTLS_PSA_CRYPTO_ACCEL_DRV_C
mbedtls_cipher_free( &operation->ctx.cipher );
operation->alg = 0;