docs(core): document rng_fill_buffer_strong_time()
What changed, and why it matters
This commit only adds a plain-English comment explaining an existing function that estimates how long a random-number generation call takes. No code behavior changed, and nothing was fixed or added that affects security.
No action required; the change is documentation-only and has no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a documentation-only change to core/embed/sec/rng/inc/sec/rng_strong.h. It adds a Doxygen-style header comment for rng_fill_buffer_strong_time() describing that the function estimates the duration of a 32-byte rng_fill_buffer_strong() call and accumulates per-enabled secure-element TRNG request times. No implementation, signature, or call sites were modified.
Changed components
core/embed/sec/rng/inc/sec/rng_strong.hInspect captured patch +11 / −0
### core/embed/sec/rng/inc/sec/rng_strong.h
@@ -44,4 +44,15 @@
*/
void rng_fill_buffer_strong(void* buffer, size_t buffer_size);
+/**
+ * @brief Estimates the duration of a 32-byte `rng_fill_buffer_strong()`
+ * call and adds the result to `*time_ms`.
+ *
+ * Used to precompute the duration of operations that call
+ * `rng_fill_buffer_strong()`, e.g. to render progress bars. Accumulates the
+ * expected time of each enabled secure element's TRNG request. The MCU's
+ * TRNG duration is negligible and not counted.
+ *
+ * @param time_ms Running total in milliseconds to add the estimate to.
+ */
void rng_fill_buffer_strong_time(uint32_t* time_ms);Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.