Thomas Daubney
6cf05f9322
Remove MBEDTLS_AES_ENCRYPT_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-06 15:15:51 +01:00
Thomas Daubney
955ce58142
Remove MBEDTLS_AES_SETKEY_DEC_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-06 15:15:08 +01:00
Thomas Daubney
742a2e3619
Remove MBEDTLS_AES_SETKEY_ENC_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-06 15:09:16 +01:00
Thomas Daubney
2bcf805284
Remove MBEDTLS_DES3_CRYPT_ECB_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
29561ec658
Remove MBEDTLS_DES_CRYPT_ECB_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
43874e0a84
Remove MBEDTLS_DES_SETKEY_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
3ab1b2d00b
Remove MBEDTLS_SHA512_PROCESS_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
297b026d0a
Remove MBEDTLS_SHA256_PROCESS_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
2106f79c49
Remove MBEDTLS_SHA1_PROCESS_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
64988680c5
Remove MBEDTLS_RIPEMD160_PROCESS_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Thomas Daubney
72a88e7255
Remove MBEDTLS_MD5_PROCESS_ALT
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-08-05 15:56:09 +01:00
Elena Uziunaite
94dba720e5
Tiny fix in library/constant_time_impl.h
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-08-05 15:55:03 +01:00
Elena Uziunaite
65d102673c
Remove the hack in library/constant_time_impl.h
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-08-05 15:54:58 +01:00
Elena Uziunaite
8dde3b3dec
Replace MBEDTLS_PK_HAVE_ECC_KEYS with PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-08-05 15:41:58 +01:00
Gilles Peskine
3077f2f9c6
Remove experimental, superseded function psa_generate_key_ext
...
Remove the experimental functions psa_generate_key_ext() and
psa_key_derivation_output_key_ext(), which require a flexible array member
and therefore break C++ code that includes Mbed TLS headers. They have been
replaced by psa_generate_key_custom() and
psa_key_derivation_output_key_custom().
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
d5d69bb4a0
Match spacing in pointer types in documentation with the code style
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
63d06efc38
Rename one more deprecated identifier
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
6b2709bf06
Documentation improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
ae8fa71669
Rename internal function psa_key_production_parameters_are_default
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
ae1da9858c
Remove some tests of psa_generate_key_ext
...
We know it's a thin wrapper around psa_generate_key_custom, so we just need
to check that it's passing the information through, we don't need coverage
of the parameter interpretation.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
8ae5028a1d
Document the key_ext functions as deprecated
...
Don't formally deprecate them because we don't do that in a
long-time support branch. But do point readers away from them.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
e863f868ec
Documentation: point to key_custom instead of key_ext
...
Replace references to the deprecated functions `psa_generate_key_ext()` and
`psa_key_derivation_output_key_ext()` by their replacements
Implement `psa_generate_key_custom()` and
`psa_key_derivation_output_key_custom()`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Gilles Peskine
f9408282e8
Implement psa_generate_key_custom
...
Implement `psa_generate_key_custom()` and
`psa_key_derivation_output_key_custom()`. These functions replace
`psa_generate_key_ext()` and `psa_key_derivation_output_key_ext()`.
They have the same functionality, but a slightly different interface:
the `ext` functions use a structure with a flexible array member to pass
variable-length data, while the `custom` functions use a separate parameter.
Keep the `ext` functions for backward compatibility with Mbed TLS 3.6.0.
But make them a thin wrapper around the new `custom` functions.
Duplicate the test code and data. The test cases have to be duplicated
anyway, and the test functions are individually more readable this way.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:49:22 +02:00
Janos Follath
26561b7122
Fix typos
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-08-05 11:22:12 +01:00
Paul Elliott
e50edc0d95
Add warning about not using keys directly
...
Keys that are the result of key agreement have biases and really should
not be used directly. Warning taken in part from psa_raw_key_agreement()
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 18:28:07 +01:00
Paul Elliott
327da4774b
Clarify key type support
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 18:27:54 +01:00
Paul Elliott
623c09a1eb
Change over to psa_raw_key_agreement
...
psa_key_agreement exists, but only in the PSA spec, we have not
implemented it, so refer to the one we actually implemented.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 18:16:35 +01:00
Paul Elliott
5238475ac6
Update key attribute documentation inline with PSA
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 17:52:51 +01:00
Paul Elliott
459448b8cf
Neaten 'Please call next function' docs.
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 11:50:16 +01:00
Paul Elliott
4b0b35e1d7
Clarify PSA_ERROR_NOT_SUPPORTED error reasons
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 11:37:17 +01:00
Paul Elliott
8e412871c1
Clarify ops used reset logic
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 11:34:07 +01:00
Paul Elliott
9bcfd8981e
improve return codes and logic description
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-08-01 10:29:24 +01:00
Paul Elliott
867815d89d
Minor formatting fixes
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-31 18:56:36 +01:00
Paul Elliott
cae2bed689
Remove unneccessary 'Implementation' references
...
These were copied from the PSA docs when they should not have been.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-31 18:48:34 +01:00
Gilles Peskine
4b9141ccf4
Merge pull request #9384 from eleuzi01/replace-util-have-ecdsa
...
Replace MBEDTLS_PSA_UTIL_HAVE_ECDSA with PSA_HAVE_ALG_SOME_ECDSA
2024-07-31 15:29:51 +00:00
Elena Uziunaite
87e0550890
Replace MBEDTLS_PSA_UTIL_HAVE_ECDSA with PSA_HAVE_ALG_SOME_ECDSA
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-29 12:15:22 +01:00
Elena Uziunaite
665eda7031
Introduce crypto_adjust_config_derived.h
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-29 12:15:22 +01:00
Elena Uziunaite
417d05f7c5
Replace MBEDTLS_ECP_HAVE_SECP256R1 with PSA_WANT_ECC_SECP_R1_256
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-07-29 11:31:20 +01:00
Paul Elliott
088fd7ec85
Add psa_key_agreement_iop_abort() documentation
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 18:27:53 +01:00
Paul Elliott
b06727e463
Add psa_key_agreement_iop_complete() documentation
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 18:25:24 +01:00
Paul Elliott
2dc58fe717
Add psa_key_agreement_iop_setup() documentation
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 18:22:23 +01:00
Paul Elliott
d791062fee
Add psa_key_agreement_iop_get_num_ops() docs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 18:17:20 +01:00
Paul Elliott
03d62b1958
Add psa_key_agreement_iop_t structs and docs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-07-19 17:29:57 +01:00
Ronald Cron
375ad34985
Add programs directory in tf-psa-crypto directory
...
Add programs directory in tf-psa-crypto directory
for the tree in the directory to looks like a
TF-PSA-Crypto root tree as expected by
build_tree.py.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
9a93073710
Add tf-psa-crypto test suites build
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
50292a4c79
Duplicate tests CMake file
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
476d51e1a7
Adapt .gitignore files
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Ronald Cron
83538c4673
Adapt path to framework data files
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:23 +02:00
Ronald Cron
701b88c54a
Move crypto test suites
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 09:58:35 +02:00
Bence Szépkúti
e7fdfdb913
Merge pull request #9123 from eleuzi01/replace-mbedtls-md-can-md5
...
Replace MBEDTLS_MD_CAN_MD5 with PSA_WANT_ALG_MD5
2024-07-18 16:17:25 +00:00