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

Open
wants to merge 132 commits into
base: main
Choose a base branch
from

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

ivq and others added 30 commits November 4, 2024 11:02
Signed-off-by: Chien Wong <[email protected]>
This reverts commit f5773c5188cca4e9d1037501bb9ac3c918467812.

Signed-off-by: Chien Wong <[email protected]>
This reverts commit e01b539222d462cabc6ecc927f3d2eb1e7e18615.

Signed-off-by: Chien Wong <[email protected]>
This reverts commit 0be523356005960e07ead277dbf5354823a4afae.

Signed-off-by: Chien Wong <[email protected]>
This commit adds test cases for input and output buffer overlap. The
data for the test cases is a duplicate of existing encrypt/decrypt test
cases.

The two test functions gcm_<encrypt/decrypt>_input_output_buffer_overlap
are modified to use a single malloc buffer rounded to the nearest
128-bits/16-bytes for input and output.

Signed-off-by: Harry Ramsey <[email protected]>
This commit code style and initialisation issues with the new buffer
overlap test cases for GCM.

Signed-off-by: Harry Ramsey <[email protected]>
This commit fixes an issue with GCM testing to handle edge cases by
replacing malloc with calloc. Additionally, fix an issue where different
buffers were used for encryption.

Signed-off-by: Harry Ramsey <[email protected]>
This commit updates the GCM buffer overlap documentation to explicity
state that alternative implementations may not support input/output
buffer overlap for GCM encrypt/decrypt functions.

Signed-off-by: Harry Ramsey <[email protected]>
This commit fixes a type in a comment inside gcm.h.

Signed-off-by: Harry Ramsey <[email protected]>
Ecp key data length should not be measured by mbedtls_mpi_size(), as
this does not count leading zeros, which are still part of the key. This
resulted intermittently in the code attempting to import a wrongly sized
key as the first byte was all zero.

Signed-off-by: Paul Elliott <[email protected]>
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]>
@eleuzi01 eleuzi01 added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review and removed needs-ci Needs to pass CI tests labels Nov 21, 2024
davidhorstmann-arm and others added 13 commits November 21, 2024 10:48
…framework-submodule

Update framework submodule to point to `main`
…key-headers

Add header and documentation for interruptible ECC export public-key
Add ecp prefix to internal iop generate key function names
to emphasize that the functions are doing eliptic curves
keys only and not any other types.

Signed-off-by: Waleed Elmelegy <[email protected]>
config_test_driver.h and
crypto_config_test_driver_extension.h are
configuration files thus they better fit in
mbedtls branches than in the framework.

Signed-off-by: Ronald Cron <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
Remove MBEDTLS_PSA_CRYPTO_CONFIG configuration option
Update `crypto_se_driver.h` reference
Change internal iop generate key error variable to int
instead of psa_status_t since the error variable get
passed to mbedtls_to_psa_error() when being returned

Signed-off-by: Waleed Elmelegy <[email protected]>
…plete

Add PSA interruptible key generation complete API
eleuzi01 and others added 9 commits November 27, 2024 13:15
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Add project and branch detection in shell
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Signed-off-by: Elena Uziunaite <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review 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