Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add various configuration components #151

Open
wants to merge 42 commits into
base: development
Choose a base branch
from

Conversation

Harry-Ramsey
Copy link
Contributor

@Harry-Ramsey Harry-Ramsey commented Jan 13, 2025

This commit adds various configuration components to TF-PSA-Crypto. These components have been adapted from Mbed TLS to use CMake. Closes #125.

This pull request has a dependency on: #164

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog not required because: testing enhancement.
  • framework PR not required.
  • mbedtls PR not required.
  • tests provided.

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

gilles-peskine-arm and others added 30 commits October 10, 2019 20:30
Add a reference configuration with most symmetric cryptographic
algorithms enabled, but without any asymmetric cryptography. This
checks that we don't have spurious unexpected dependencies on
asymmetric-only modules such as bignum.

Keep HAVE_ASM disabled because it's platform-specific.

Keep HAVEGE disabled because it's untested and not recommended.

Keep MEMORY_BUFFER_ALLOC out because it isn't related to cryptography
at all and it makes memory sanitizers ineffective.

Keep THREADING disabled because it requires special build options.
As a result, the copyright of contributors other than Arm is now
acknowledged, and the years of publishing are no longer tracked in the
source files.

Also remove the now-redundant lines declaring that the files are part of
MbedTLS.

This commit was generated using the following script:

# ========================
#!/bin/sh

# Find files
find '(' -path './.git' -o -path './3rdparty' ')' -prune -o -type f -print | xargs sed -bi '

# Replace copyright attribution line
s/Copyright.*Arm.*/Copyright The Mbed TLS Contributors/I

# Remove redundant declaration and the preceding line
$!N
/This file is part of Mbed TLS/Id
P
D
'
# ========================

Signed-off-by: Bence Szépkúti <[email protected]>
Since the symmetric only reference config is utilizing PSA
crypto library builds, the config file needs to included the
new config_psa.h so that all the PSA feature macros are setup
properly for the test.

Signed-off-by: John Durkop <[email protected]>
Signed-off-by: Mateusz Starzyk <[email protected]>
Although SHA512 is currently required to enable SHA384, this
is expected to change in the future. This commit is an
intermediate step towards fully separating SHA384 and SHA512.

check_config is the only module which enforces that SHA512 is
enabled together with SHA384.

Signed-off-by: Mateusz Starzyk <[email protected]>
These options are still dependant on each other.
This is an intermediate step.

Signed-off-by: Mateusz Starzyk <[email protected]>
Rework SHA224 and SHA283 documentation.
Define MBEDTLS_SHAxxx_C options in alphabetic order.
Fix SHA224 and SHA384 dependencies in test suites.

Signed-off-by: Mateusz Starzyk <[email protected]>
Rephrase config.h documentation and add a note to template
configs.

Signed-off-by: Mateusz Starzyk <[email protected]>
Also remove them from the example configs, but keep the one in
mbedtls_config.h.

Signed-off-by: Bence Szépkúti <[email protected]>
Add change log and non-regression test
for CCM* with no tag not supported in
CCM only configuration.

Signed-off-by: Ronald Cron <[email protected]>
Signed-off-by: Dave Rodgman <[email protected]>
Move all changes local to Mbed TLS into config-tfm.h (except for commenting
out a couple of #include's).

Signed-off-by: Dave Rodgman <[email protected]>
Signed-off-by: Dave Rodgman <[email protected]>
Replaces legacy symbols with the PSA equivalents.
This doesn't change the code generated when this config is active

Signed-off-by: Ryan Everett <[email protected]>
Enable MBEDTLS_PSA_CRYPTO_C and MBEDTLS_USE_PSA_CRYPTO
is reference configurations as we are working towards
removing (always on) them.

Signed-off-by: Ronald Cron <[email protected]>
ronald-cron-arm and others added 10 commits May 14, 2024 11:27
Kept MD in thread config as needed for
HMAC_DRBG.

Signed-off-by: Ronald Cron <[email protected]>
Moving forward the MBEDTLS_PSA_CRYPTO_CONFIG_FILE now resides in the
ts-psa/crypto configuration. This patch removes it from the library
configuration files, and updates the tests to explicitely use it.

Signed-off-by: Minos Galanakis <[email protected]>
Recent commits have changed these reference configurations and they are
not verbatim copies anymore.

Signed-off-by: Janos Follath <[email protected]>
Signed-off-by: Minos Galanakis <[email protected]>
This commit moves the tf-psa-crypto configuration options
for this test to `crypto-config-ccm-aes-sha256.h`.

A blank MbedTLS configuration file is now used for the library
side.

Signed-off-by: Minos Galanakis <[email protected]>
Remove all code guarded by `PSA_WANT_ECC_SECP_K1_224`, which is not and will
not be implemented. (It would be K1_225 anyway, but we don't intend to
implement it anyway.)

Signed-off-by: Gilles Peskine <[email protected]>
@Harry-Ramsey Harry-Ramsey self-assigned this Jan 13, 2025
@Harry-Ramsey Harry-Ramsey force-pushed the components-configuration branch 4 times, most recently from 7ebfae7 to 1bd7e54 Compare January 16, 2025 15:26
This commit updates configs/README.txt and configs/ext/README.md to
reflect the necessary files which were moved to TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <[email protected]>
@Harry-Ramsey Harry-Ramsey added the needs-preceding-pr Requires another PR to be merged first label Jan 21, 2025
This commit adds various configuration components to TF-PSA-Crypto.
These components have been adapted from Mbed TLS to use CMake.

Signed-off-by: Harry Ramsey <[email protected]>
@Harry-Ramsey Harry-Ramsey force-pushed the components-configuration branch from 1bd7e54 to 815aac7 Compare January 21, 2025 09:33
@Harry-Ramsey Harry-Ramsey added the needs-ci Needs to pass CI tests label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci Needs to pass CI tests needs-preceding-pr Requires another PR to be merged first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add components-configurations.sh