Skip to content

Seed STM32 builds on Zephyr from the Zephyr entropy driver - #12179

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:zephyr_stm32_rng
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:zephyr_stm32_rng

Conversation

@dgarske

@dgarske dgarske commented Nov 19, 2026

Copy link
Copy Markdown
Member

On Zephyr, a WOLFSSL_STM32xx define turned on STM32_RNG, so wolfSSL and Zephyr's entropy_stm32 driver both drove the RNG. settings.h now leaves STM32_RNG off when Zephyr has an entropy driver, so the seed comes from zephyr,entropy. Tested on a NUCLEO-H563ZI under Zephyr 4.4: the shared-RNG builds stalled Zephyr's entropy or failed wc_InitRng() before the change and pass after it.

@dgarske dgarske self-assigned this Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 03:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the Zephyr entropy-driver changes and accompanying documentation updates.

No open issues 🎉

What changed in this PR

This PR routes STM32 seeding through Zephyr’s entropy driver when available, preventing wolfSSL’s direct RNG implementation from competing for the same peripheral.

Changes:

  • Suppresses automatic STM32_RNG enablement when Zephyr has an entropy driver.
  • Updates comments describing Zephyr seed-source requirements and FIPS v5 handling.
  • Corrects the Realtek entropy-driver documentation and recommends using it instead of WC_HUK_DEVID on Zephyr.
File Description
zephyr/​user_settings.h Clarifies Zephyr entropy requirements and the FIPS v5 seed callback.
wolfssl/​wolfcrypt/​settings.h Leaves automatic STM32 RNG enablement off when Zephyr provides entropy.
wolfcrypt/​src/​port/​realtek/​README.md Corrects the documented driver name and Zephyr seed-source guidance.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +108 B, text +13,496 B (+4.8%, 296,076 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants