-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
A client example failed when proper entropy collector has not been implemented #545
Comments
ARM Internal Ref: IOTSSL-907 |
mbed TLS (and any other cryptographic operations) require entropy for the random they need to do those operations securely. So that means that any target platform that wants security needs to implement support for a strong entropy source. Meaning either:
There is no way around it. A strong entropy source is required and that's not specifically an mbed TLS requirement but a TLS / crypto protocols requirement. Note: For debug (AND DEBUG ONLY) purposes it's possible to put mbed TLS in a mode where it runs without a strong entropy source, BUT THIS DISABLES ANY AND ALL SECURITY AND IS THUS NOT USING TLS/CRYPTO SECURITY AT ALL AND THUS NOT INTENDED FOR USE IN PRODUCTION ENVIRONMENTS. |
As @pjbakker explained this has to be supported on platform level, but since there is missing implementation for entropy on various platform, easiest way to work around is to add NULL_ENTROPY feature for example application on those non-K64F boards. I propose we can close this issue |
Update the version of the library to 2.7.9
The issue is moved from here.
In K64F platform, the macro
MBEDTLS_ENTROPY_HARDWARE_ALT
is defined in thetarget.json
and proper implementation has been done in the HAL.ARMmbed/mbed-os#1879
Some platforms do not support RNG hardware and expect to use software solution. e.g. build client example without
MBEDTLS_ENTROPY_HARDWARE_ALT
macro.In that case, I got connection error below if I removed the
MBEDTLS_ENTROPY_HARDWARE_ALT
macro in K64F platform (as non RNG support device).Attached files is mbed-trace log: trace_log_failed.txt
So, my question is:
MBEDTLS_ENTROPY_HARDWARE_ALT
macro and entropy collector implementation mandatory feature, or optional?If this is optional, the
nanostack-hal-mbed-cmsis-rtos
should also have software implementation and the client example should not fail.https://github.com/ARMmbed/nanostack-hal-mbed-cmsis-rtos/blob/master/arm_hal_random.c#L28
The text was updated successfully, but these errors were encountered: