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

Remove calls to MD layer functions from TLS #5164

Closed
13 tasks
mpg opened this issue Nov 12, 2021 · 1 comment
Closed
13 tasks

Remove calls to MD layer functions from TLS #5164

mpg opened this issue Nov 12, 2021 · 1 comment
Labels
enhancement size-s Estimated task size: small (~2d)

Comments

@mpg
Copy link
Contributor

mpg commented Nov 12, 2021

Currently calls to PSA for hashing in TLS are conditional to MBEDTLS_USE_PSA_CRYPTO. Since we're now auto-enabling that, we don't need the alternative code path any more.

This task is to replace all instances of:

#if defined(MBEDTLS_USE_PSA_CRYPTO)
/* code using PSA */
#else
/* code using mbedtls_md or mbedtls_shaxxx */
#endif

with:

/* code using PSA */

Then removing struct members that are no longer needed because they were only accessed by the removed code.

  • tls_prf_generic()
  • ssl_calc_verify_tls_sha256()
  • ssl_calc_verify_tls_sha384()
  • mbedtls_ssl_reset_checksum()
  • ssl_update_checksum_start()
  • ssl_update_checksum_sha256()
  • ssl_update_checksum_sha384()
  • ssl_calc_finished_tls_sha256()
  • ssl_calc_finished_tls_sha384()
  • ssl_handshake_params_init()
  • mbedtls_ssl_handshake_free()
  • mbedtls_ssl_get_key_exchange_md_tls1_2()
  • struct mbedtls_ssl_handshake_params: fin_sha256 and fin_sha512

Depends on: #5156 (to be able to use PSA without #ifdefs).

Note: this task is only about MD functions. PK functions may require more care and will be handled as a separate task. Cipher functions will also covered by other tasks.
Note: this task is only about places where a PSA-based version of the code already exists. Changing other places from MD to PSA is out of scope and will be covered by other tasks.

@mpg mpg added enhancement Product Backlog size-s Estimated task size: small (~2d) labels Nov 12, 2021
@mpg
Copy link
Contributor Author

mpg commented Dec 2, 2021

Closing as this no longer makes sense with the change of strategy (USE_PSA_CRYPTO will remain optional for now).

@mpg mpg closed this as completed Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

No branches or pull requests

1 participant