-
Notifications
You must be signed in to change notification settings - Fork 3k
M2354: add TRNG to device_has list #14800
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
Conversation
The NU_M2354 target does have a TRNG but it is missing from the device_has list in targets.json. This commit updates this file such that DEVICE_TRNG is defined for NU_M2354. No further additions are required to port the M2345's true random number generator to Mbed OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
The TRNG implementation is based on PSA where psa_generate_random
is provided by TF-M.
Maybe in the future we can consider globally enabling TRNG on TF-M targets in Mbed OS - are TF-M targets required/guaranteed to have it? @noonfom
Was this tested on hw or if we don't have it currently, can @ARMmbed/team-nuvoton help us? |
@noonfom as you have HW, can you please run the corresponding Greentea test and share the logs?
|
@LDong-Arm TF-M targets are not required/guaranteed to have a TRNG, e.g., AN521 uses a PRNG. @0xc0170 I built and ran mbed-os-example-sockets with a TLS socket. That's about all the testing I've done so far. @MarceloSalazar Sure, I'll run the Greentea test this afternoon. |
M2354 has Actually, this PR isn't necessary. Looking into Lines 141 to 152 in 3319beb
|
Sorry, missing one point. Lines 6997 to 7002 in 3319beb
|
@noonfom How about change |
@noonfom As @ccli8 noted, the base target PSA_V8_M declares TRNG via
If TRNG is not guaranteed by TF-M, maybe we should remove it from PSA_V8_M and add it to individual PSA_V8_M targets. This would also mean |
Thanks @ccli8 and @LDong-Arm. Closing in favour of #14807. |
Summary of changes
The NU_M2354 target does have a TRNG but it is missing from the device_has list
in targets.json. This commit updates this file such that DEVICE_TRNG is defined
for NU_M2354. No further additions are required to port the M2345's true random
number generator to Mbed OS.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers
@MarceloSalazar
@ccli8