Hi,
PSA driver interface specification talks about "add_entropy" entry point. Snippet pasted below.
https://github.com/Mbed-TLS/mbedtls/blob/development/docs/proposed/psa-drive...
*A driver can declare an entropy source by providing a "get_entropy" entry point. This entry point has the following prototype for a driver with the prefix "acme":*
*psa_status_t acme_get_entropy(uint32_t flags, size_t *estimate_bits, uint8_t *output, size_t output_size);*
However, in the current implementation of MbedTLS 3.x I don't see this implemented . With the psa_crypto-init() what I observe is that if the platform enables MBEDTLS_ENTROPY_HARDWARE_ALT then using " mbedtls_hardware_poll(), the entropy source can be provided.
Can you please confirm if this observation is correct and also let us know if the <driver>_get_entropy() is planned to be implemented in near future ?
Regards,
Ruchika
Hello,
Indeed we do not support the add_entropy entry point in Mbed TLS, or the rest of the random-related driver interface. For the time being, please configure entropy sources through the legacy interface in the entropy module.
Please note that the legacy entropy interface has no way to communicate the amount of entropy provided by a source: the output buffer returned by mbedtls_hardware_poll() must have len*8 bits of entropy (or at least N bits of entropy if you're happy with N-bit security overall). If your hardware interface doesn't give full-entropy output, you need to obtain enough data and compress the string (typically by hashing) in your driver code. (The PSA interface will move this concern to the core.)
I'm afraid I don't have a date for implementing the random-related driver interface. It's not in our roadmap for 2023Q1 and I don't think it is in 2023Q2. As usual, you can help get features in earlier by contributing code and/or review bandwidth.
Best regards,
mbed-tls@lists.trustedfirmware.org