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

Move scripts used by all-core.sh to the framework #80

Merged
merged 266 commits into from
Dec 10, 2024
Merged

Conversation

eleuzi01
Copy link
Contributor

@eleuzi01 eleuzi01 commented Nov 20, 2024

Resolves #74

Development PR: Mbed-TLS/mbedtls#9788
3.6 PR: Mbed-TLS/mbedtls#9789

Harry-Ramsey and others added 30 commits November 11, 2024 10:09
This commit fixes issues with TEST_CALLOC in GCM buffer overlap tests
cases.

Signed-off-by: Harry Ramsey <[email protected]>
Exclude the XTS mode because it is not implemented via the PSA API.

Signed-off-by: Gabor Mezei <[email protected]>
Signed-off-by: Gabor Mezei <[email protected]>
When elements of an exclusive group have dependencies in common turning them off
breaks the elements build. Support added to handle and ignore these dependencies
when only one of the elements is enabled.

Signed-off-by: Gabor Mezei <[email protected]>
Signed-off-by: Gabor Mezei <[email protected]>
All cipher padding methods depend on CBC. To aviod switching it off
add this dependency to all of the methods and handle it as a common dependency.

Signed-off-by: Gabor Mezei <[email protected]>
Signed-off-by: Gabor Mezei <[email protected]>
Added `MBEDTLS_CIPHER_MODE_XTS` as a dependency for `PSA_WANT_ALG_XTS`.
Otherwise, `MBEDTLS_CIPHER_MODE_XTS` is always enabled which enables a
lot of code we would like to be disabled when testing CFB/CTR... only.

Signed-off-by: Gabor Mezei <[email protected]>
Signed-off-by: Gabor Mezei <[email protected]>
This commit fixes an issue with check_names failing due to not being
defined as a macro in Mbed TLS. This is instead defined by alternative
implementations of MBEDTLS_GCM.

Signed-off-by: Harry Ramsey <[email protected]>
* Used bignum helper API instead of memcpy
* changed the key length output to the size of the curve because:
  - using the bignum produces a bigger size than the curve size
    due to the limb size being 8 bytes and import key rejects
    the key if it's not exactly curve size.
  - we know that the generated key is filled with leading
    zeros becuase the generated key is bounded by the modulas.
* skipped leading zeros when passing the buffer to import_key()
  due to the intermediate buffer allocated to the maximum size
  possible and import_key() needs the exact size.

Signed-off-by: Waleed Elmelegy <[email protected]>
Add MBEDTLS_ECP_MAX_MPI define to determine the maximum
number of bytes for the biggest Elliptic curve in bignum
representation.

Signed-off-by: Waleed Elmelegy <[email protected]>
MBEDTLS_GCM_ALT has been removed in the current version.

Signed-off-by: Harry Ramsey <[email protected]>
Restrict the definition of memcheck/lcov targets
to the case where Mbed TLS/TF-PSA-Crypto is the
main project. To avoid conflict between the
targets when the integration of the TF-PSA-Crypto
build system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <[email protected]>
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto build system
into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <[email protected]>
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto cmake build
system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <[email protected]>
Keep installations on MbedTLSTargets export
crypto libraries for the sake of mbedtls.

Signed-off-by: Ronald Cron <[email protected]>
Propagate mbedtls options named differently in
TF-PSA-Crypto.

Signed-off-by: Ronald Cron <[email protected]>
The empty framework directory is temporary. It will be
removed when TF-PSA-Crypto uses its framework submodule.

Signed-off-by: Ronald Cron <[email protected]>
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.

Signed-off-by: Ronald Cron <[email protected]>
Do not do the same in the make build system yet,
cmake build system only scope for this PR.

Signed-off-by: Ronald Cron <[email protected]>
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.

Signed-off-by: Ronald Cron <[email protected]>
@mpg mpg removed the needs-reviewer This PR needs someone to pick it up for review label Dec 9, 2024
@eleuzi01 eleuzi01 dismissed stale reviews from valeriosetti and mpg via 5379712 December 9, 2024 10:21
Copy link
Contributor

@mpg mpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mpg mpg requested a review from valeriosetti December 9, 2024 10:24
…pto_config.py

Minimal `config.py` for TF-PSA-Crypto
@eleuzi01 eleuzi01 added approved Design and code approved - may be waiting for CI or backports needs-ci Needs to pass CI tests and removed needs-review Every commit must be reviewed by at least two team members, labels Dec 9, 2024
@eleuzi01 eleuzi01 added needs-review Every commit must be reviewed by at least two team members, and removed approved Design and code approved - may be waiting for CI or backports needs-ci Needs to pass CI tests labels Dec 9, 2024
@eleuzi01 eleuzi01 requested review from valeriosetti and mpg December 9, 2024 15:52
@mpg mpg added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, labels Dec 10, 2024
@mpg
Copy link
Contributor

mpg commented Dec 10, 2024

CI is green in both consuming PRs - which both point to the tip of this branch.

@mpg mpg merged commit beb5dad into Mbed-TLS:main Dec 10, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports enhancement New feature or request priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move scripts used by all-core.sh to the framework