Skip to content

Add TROPIC01 simulator#4

Merged
dgarske merged 1 commit intowolfSSL:mainfrom
LinuxJedi:TropicSim
May 8, 2026
Merged

Add TROPIC01 simulator#4
dgarske merged 1 commit intowolfSSL:mainfrom
LinuxJedi:TropicSim

Conversation

@LinuxJedi
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 6, 2026 09:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-sim Rust 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.

Comment thread TROPIC01Sim/tropic01-sim/src/handlers/get_info.rs Outdated
Comment thread TROPIC01Sim/tropic01-sim/src/tcp_proto.rs
Comment thread TROPIC01Sim/tropic01-sim/src/handlers/l3.rs
Comment thread TROPIC01Sim/tropic01-sim/tests/tcp.rs Outdated
Comment thread TROPIC01Sim/wolfcrypt-test/run_test.sh
Comment thread TROPIC01Sim/sdk-test/run_test.sh
Comment thread TROPIC01Sim/tropic01-sim/Cargo.toml Outdated
@dgarske
Copy link
Copy Markdown
Member

dgarske commented May 7, 2026

@LinuxJedi please resolve merge conflicts. Thanks

@LinuxJedi LinuxJedi removed their assignment May 8, 2026
@LinuxJedi
Copy link
Copy Markdown
Member Author

@LinuxJedi please resolve merge conflicts. Thanks

Done!

@dgarske dgarske merged commit 32a1430 into wolfSSL:main May 8, 2026
15 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