Skip to content

Add STM32U5 and H7 simulators with hardware crypto#5

Merged
dgarske merged 1 commit into
wolfSSL:mainfrom
LinuxJedi:simulator-stm32
May 7, 2026
Merged

Add STM32U5 and H7 simulators with hardware crypto#5
dgarske merged 1 commit into
wolfSSL:mainfrom
LinuxJedi:simulator-stm32

Conversation

@LinuxJedi

Copy link
Copy Markdown
Member

Add a Unicorn-Engine-based STM32 simulator for wolfSSL CI. The new STM32Sim/ tree is a Rust workspace splitting CPU + MMIO bus + ELF loader (core/), per-revision peripheral models (peripherals/), and chip wiring (chips/); two chip targets, STM32H753 (HAL v1) and STM32U575 (HAL v2), share one set of cryptographic engines (AES ECB/CBC/CTR/GCM, SHA-1/224/256/384/512 + MD5, P-256/P-384 ECC mul + RSA modexp) through revision-specific register adapters, so adding further STM32 families is a new chip file plus an adapter, not engine work. The repo includes Cortex-M7 and Cortex-M33 smoke firmwares that exercise the full peripheral stack, GitHub Actions workflows, and 29 unit tests + 2 firmware integration tests covering NIST/FIPS KATs and a cross-check against the RustCrypto aes-gcm crate (which incidentally surfaces a typo in the canonical McGrew GCM Test Case 2 tag, documented in the test).

Copilot AI review requested due to automatic review settings May 6, 2026 13:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

STM32Sim/stm32-sim/peripherals/Cargo.toml:30

  • The dev-dependency on aes-gcm pins a version directly instead of using the workspace dependency, which can lead to duplicate/discordant versions across the workspace. Prefer aes-gcm.workspace = true here to keep dependency versions consistent.

Comment thread STM32Sim/stm32-sim/peripherals/src/hash/v1.rs
Comment thread STM32Sim/stm32-sim/peripherals/src/hash/mod.rs Outdated
Comment thread STM32Sim/stm32-sim/runner-bin/src/main.rs
Comment thread STM32Sim/stm32-sim/runner-bin/src/main.rs
Comment thread STM32Sim/README.md Outdated
Comment thread STM32Sim/README.md Outdated
Add a Unicorn-Engine-based STM32 simulator for wolfSSL CI. The new
STM32Sim/ tree is a Rust workspace splitting CPU + MMIO bus + ELF
loader (core/), per-revision peripheral models (peripherals/), and chip
wiring (chips/); two chip targets, STM32H753 (HAL v1) and STM32U575
(HAL v2), share one set of cryptographic engines (AES ECB/CBC/CTR/GCM,
SHA-1/224/256/384/512 + MD5, P-256/P-384 ECC mul + RSA modexp) through
revision-specific register adapters, so adding further STM32 families
is a new chip file plus an adapter, not engine work. The repo includes
Cortex-M7 and Cortex-M33 smoke firmwares that exercise the full
peripheral stack, GitHub Actions workflows, and 29 unit tests + 2
firmware integration tests covering NIST/FIPS KATs and a cross-check
against the RustCrypto aes-gcm crate (which incidentally surfaces a
typo in the canonical McGrew GCM Test Case 2 tag, documented in the
test).
@dgarske dgarske merged commit b78a35f into wolfSSL:main May 7, 2026
12 checks passed
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.

4 participants