Add TROPIC01 simulator#4
Merged
dgarske merged 1 commit intowolfSSL:mainfrom May 8, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Rust-based TROPIC01 secure-element simulator to the repository, including a libtropic-compatible TCP “model” server, persisted device state, and CI/Docker-based test tiers to validate wolfSSL + libtropic integration without hardware.
Changes:
- Introduces the
tropic01-simRust crate implementing TCP framing, SPI/L2 emulation, Noise KK1 handshake, and an AES-GCM–wrapped L3 command surface. - Adds SDK and wolfCrypt integration test harnesses (C test driver + bash wrappers) and Dockerfiles to build/run the simulator and upstream clients.
- Adds GitHub Actions workflows to run cargo tests and the Dockerized integration tiers on PRs.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| TROPIC01Sim/wolfcrypt-test/run_test.sh | Starts the simulator and runs Tropic Square’s wolfssl-test against it. |
| TROPIC01Sim/tropic01-sim/tests/tcp.rs | Rust end-to-end smoke tests driving the TCP server like libtropic’s HAL. |
| TROPIC01Sim/tropic01-sim/src/tcp_proto.rs | Implements libtropic posix/tcp frame format and parsing/writing. |
| TROPIC01Sim/tropic01-sim/src/spi.rs | SPI byte-exchange emulator with poll/read vs write transaction state machine. |
| TROPIC01Sim/tropic01-sim/src/session.rs | Noise KK1 handshake + AES-GCM secure-channel request/response wrapping. |
| TROPIC01Sim/tropic01-sim/src/object_store/types.rs | Serializable device/object-store types (pairing slots, ECC slots, R-mem). |
| TROPIC01Sim/tropic01-sim/src/object_store/mod.rs | Store persistence + fresh provisioning (chip ID, ST keypair, cert store, fixtures). |
| TROPIC01Sim/tropic01-sim/src/lib.rs | Crate module wiring and public re-exports. |
| TROPIC01Sim/tropic01-sim/src/handlers/mod.rs | Handler module declarations (GET_INFO + L3). |
| TROPIC01Sim/tropic01-sim/src/handlers/l3.rs | L3 plaintext command dispatcher (pairing, R-mem, RNG, ECC ops). |
| TROPIC01Sim/tropic01-sim/src/handlers/get_info.rs | L2 GET_INFO implementation (chip ID, FW versions, cert-store chunking). |
| TROPIC01Sim/tropic01-sim/src/frame.rs | L2 frame parsing/building with CRC verification. |
| TROPIC01Sim/tropic01-sim/src/dispatch.rs | L2 request router bridging frames to handlers and session logic. |
| TROPIC01Sim/tropic01-sim/src/crc.rs | libtropic-specific CRC-16 implementation and helpers. |
| TROPIC01Sim/tropic01-sim/src/bin/tcp_server.rs | Simulator TCP server binary (per-connection SPI/session + shared persisted store). |
| TROPIC01Sim/tropic01-sim/Cargo.toml | Defines Rust crate metadata and dependencies. |
| TROPIC01Sim/sdk-test/test_tropic01.c | libtropic-driven integration smoke test exercising the simulator end-to-end. |
| TROPIC01Sim/sdk-test/run_test.sh | Wrapper to run the simulator + the sdk-test binary in CI/docker. |
| TROPIC01Sim/sdk-test/CMakeLists.txt | Builds the sdk-test as a libtropic example with mbedTLS v4 CAL + posix/tcp HAL. |
| TROPIC01Sim/README.md | Documents simulator features, usage, env vars, and pinned upstream versions. |
| TROPIC01Sim/LICENSE | Adds GPLv3 license text for the simulator subtree. |
| TROPIC01Sim/Dockerfile.wolfcrypt | Docker tier building simulator + libtropic v0.1.0 + wolfSSL + upstream test app. |
| TROPIC01Sim/Dockerfile.sdk-test | Docker tier building simulator + pinned libtropic commit + sdk-test binary. |
| TROPIC01Sim/Dockerfile | Docker tier running Rust unit/integration tests for tropic01-sim. |
| TROPIC01Sim/.gitignore | Ignores build outputs and local persisted store artifacts. |
| STSAFEA120Sim/.gitignore | Adds Cargo.lock to ignored artifacts for STSAFEA120Sim. |
| README.md | Adds top-level documentation blurb linking to TROPIC01Sim. |
| .github/workflows/tropic01-wolfcrypt-test.yml | CI workflow to build/run the wolfcrypt Docker tier. |
| .github/workflows/tropic01-test-suite.yml | CI workflow to run cargo test for the Rust simulator crate. |
| .github/workflows/tropic01-sdk-test.yml | CI workflow to build/run the libtropic-driven Docker tier. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@LinuxJedi please resolve merge conflicts. Thanks |
Member
Author
Done! |
dgarske
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.