Internalise functions flagged as internal
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/md5.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/md5.h
index 826cca7..ee39bc8 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/md5.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/md5.h
@@ -126,22 +126,6 @@
unsigned char output[16]);
/**
- * \brief MD5 process data block (internal use only)
- *
- * \param ctx MD5 context
- * \param data buffer holding one block of data
- *
- * \return 0 if successful
- *
- * \warning MD5 is considered a weak message digest and its use
- * constitutes a security risk. We recommend considering
- * stronger message digests instead.
- *
- */
-int mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
- const unsigned char data[64]);
-
-/**
* \brief Output = MD5( input buffer )
*
* \param input buffer holding the data
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/ripemd160.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/ripemd160.h
index 570ab2e..42f2973 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/ripemd160.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/ripemd160.h
@@ -87,17 +87,6 @@
unsigned char output[20]);
/**
- * \brief RIPEMD-160 process data block (internal use only)
- *
- * \param ctx RIPEMD-160 context
- * \param data buffer holding one block of data
- *
- * \return 0 if successful
- */
-int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx,
- const unsigned char data[64]);
-
-/**
* \brief Output = RIPEMD-160( input buffer )
*
* \param input buffer holding the data
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha1.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha1.h
index 4b31c02..dd47d34 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha1.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha1.h
@@ -143,24 +143,6 @@
unsigned char output[20]);
/**
- * \brief SHA-1 process data block (internal use only).
- *
- * \warning SHA-1 is considered a weak message digest and its use
- * constitutes a security risk. We recommend considering
- * stronger message digests instead.
- *
- * \param ctx The SHA-1 context to use. This must be initialized.
- * \param data The data block being processed. This must be a
- * readable buffer of length \c 64 Bytes.
- *
- * \return \c 0 on success.
- * \return A negative error code on failure.
- *
- */
-int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx,
- const unsigned char data[64]);
-
-/**
* \brief This function calculates the SHA-1 checksum of a buffer.
*
* The function allocates the context, performs the
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha256.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha256.h
index 0253f7d..05040de 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha256.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha256.h
@@ -120,21 +120,6 @@
unsigned char *output);
/**
- * \brief This function processes a single data block within
- * the ongoing SHA-256 computation. This function is for
- * internal use only.
- *
- * \param ctx The SHA-256 context. This must be initialized.
- * \param data The buffer holding one block of data. This must
- * be a readable buffer of length \c 64 Bytes.
- *
- * \return \c 0 on success.
- * \return A negative error code on failure.
- */
-int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
- const unsigned char data[64]);
-
-/**
* \brief This function calculates the SHA-224 or SHA-256
* checksum of a buffer.
*
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha512.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha512.h
index 002fe9d..9d01918 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/sha512.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/sha512.h
@@ -121,21 +121,6 @@
unsigned char *output);
/**
- * \brief This function processes a single data block within
- * the ongoing SHA-512 computation.
- * This function is for internal use only.
- *
- * \param ctx The SHA-512 context. This must be initialized.
- * \param data The buffer holding one block of data. This
- * must be a readable buffer of length \c 128 Bytes.
- *
- * \return \c 0 on success.
- * \return A negative error code on failure.
- */
-int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
- const unsigned char data[128]);
-
-/**
* \brief This function calculates the SHA-512 or SHA-384
* checksum of a buffer.
*
diff --git a/tf-psa-crypto/drivers/builtin/src/md5.c b/tf-psa-crypto/drivers/builtin/src/md5.c
index 98b8ee4..519be43 100644
--- a/tf-psa-crypto/drivers/builtin/src/md5.c
+++ b/tf-psa-crypto/drivers/builtin/src/md5.c
@@ -58,7 +58,7 @@
return 0;
}
-int mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
+static int mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
const unsigned char data[64])
{
struct {
diff --git a/tf-psa-crypto/drivers/builtin/src/ripemd160.c b/tf-psa-crypto/drivers/builtin/src/ripemd160.c
index 835df95..e1275fb 100644
--- a/tf-psa-crypto/drivers/builtin/src/ripemd160.c
+++ b/tf-psa-crypto/drivers/builtin/src/ripemd160.c
@@ -62,7 +62,7 @@
/*
* Process one block
*/
-int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx,
+static int mbedtls_internal_ripemd160_process(mbedtls_ripemd160_context *ctx,
const unsigned char data[64])
{
struct {
diff --git a/tf-psa-crypto/drivers/builtin/src/sha1.c b/tf-psa-crypto/drivers/builtin/src/sha1.c
index b13381d..6c252f6 100644
--- a/tf-psa-crypto/drivers/builtin/src/sha1.c
+++ b/tf-psa-crypto/drivers/builtin/src/sha1.c
@@ -59,7 +59,7 @@
return 0;
}
-int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx,
+static int mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx,
const unsigned char data[64])
{
struct {
diff --git a/tf-psa-crypto/drivers/builtin/src/sha256.c b/tf-psa-crypto/drivers/builtin/src/sha256.c
index 1bfb701..6566d5f 100644
--- a/tf-psa-crypto/drivers/builtin/src/sha256.c
+++ b/tf-psa-crypto/drivers/builtin/src/sha256.c
@@ -617,7 +617,7 @@
}
}
-int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
+static int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
const unsigned char data[SHA256_BLOCK_SIZE])
{
if (mbedtls_a64_crypto_sha256_has_support()) {
diff --git a/tf-psa-crypto/drivers/builtin/src/sha512.c b/tf-psa-crypto/drivers/builtin/src/sha512.c
index 52b4f62..25ac70b 100644
--- a/tf-psa-crypto/drivers/builtin/src/sha512.c
+++ b/tf-psa-crypto/drivers/builtin/src/sha512.c
@@ -737,7 +737,7 @@
}
}
-int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
+static int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
const unsigned char data[SHA512_BLOCK_SIZE])
{
if (mbedtls_a64_crypto_sha512_has_support()) {