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

Replace legacy RNG in sample programs #9965

Open
davidhorstmann-arm opened this issue Feb 11, 2025 · 0 comments
Open

Replace legacy RNG in sample programs #9965

davidhorstmann-arm opened this issue Feb 11, 2025 · 0 comments
Labels
size-m Estimated task size: medium (~1w)

Comments

@davidhorstmann-arm
Copy link
Contributor

Part of implementing #9904

Replace the legacy random number generation with psa_generate_random() in the following programs:

  • x509/cert_app.c
  • x509/cert_req.c
  • x509/cert_write.c
  • pkey/pk_sign.c
  • pkey/rsa_sign_pss.c
  • fuzz/fuzz_dtlsclient.c
  • fuzz/fuzz_privkey.c
  • fuzz/fuzz_server.c
  • fuzz/fuzz_dtlsserver.c
  • fuzz/fuzz_client.c
  • fuzz/common.c
  • ssl/ssl_server.c
  • ssl/dtls_server.c
  • ssl/ssl_mail_client.c
  • ssl/ssl_client1.c
  • ssl/mini_client.c
  • ssl/ssl_test_lib.c
  • ssl/dtls_client.c
  • ssl/ssl_pthread_server.c
  • ssl/ssl_fork_server.c

Currently these programs call the Mbed TLS legacy entropy and DRBG functions to generate random data. Replace all of that setup with a simple call to psa_generate_random() (and add a call to psa_crypto_init() if required).

Note: where the random generation function is passed as a callback, you may need to use the mbedtls_psa_get_random() wrapper.

This task is done when none of the listed programs use the legacy API for random number generation (and they all work). Manual testing may be required as we don't have automated tests for all of the programs.

Estimate: 10 Ideal Engineering Hours

@davidhorstmann-arm davidhorstmann-arm added the size-s Estimated task size: small (~2d) label Feb 11, 2025
@davidhorstmann-arm davidhorstmann-arm moved this to Implementation needed in Mbed TLS 4.0 planning Feb 11, 2025
@davidhorstmann-arm davidhorstmann-arm added size-m Estimated task size: medium (~1w) and removed size-s Estimated task size: small (~2d) labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-m Estimated task size: medium (~1w)
Projects
Status: Implementation needed
Development

No branches or pull requests

1 participant