Skip to content

Add ATECC608 simulator#1

Open
LinuxJedi wants to merge 2 commits intowolfSSL:mainfrom
LinuxJedi:ATECC608Sim
Open

Add ATECC608 simulator#1
LinuxJedi wants to merge 2 commits intowolfSSL:mainfrom
LinuxJedi:ATECC608Sim

Conversation

@LinuxJedi
Copy link
Copy Markdown
Member

Currently has patches to work around minor wolfCrypt issues. These will be fixed in wolfCrypt at the same time this is added to the CI.

Currently has patches to work around minor wolfCrypt issues. These will
be fixed in wolfCrypt at the same time this is added to the CI.
Copilot AI review requested due to automatic review settings April 21, 2026 11:08
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 Microchip ATECC608A secure-element simulator to this repository (alongside existing simulators), including a Rust TCP server implementing a wolfSSL/cryptoauthlib-required ATCA command subset, plus Dockerized integration tests and GitHub Actions workflows to run them in CI.

Changes:

  • Introduce ATECC608Sim/atecc608-sim: Rust simulator library + TCP server, object-store persistence, and unit/integration tests.
  • Add sdk-test (cryptoauthlib + OpenSSL cross-verification) and wolfcrypt-test (wolfCrypt suite harness) Docker test tiers.
  • Wire new CI workflows to build/run the simulator and both integration test images on PRs.

Reviewed changes

Copilot reviewed 40 out of 41 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
README.md Adds top-level documentation pointer for the new ATECC608 simulator.
ATECC608Sim/wolfcrypt-test/run_test.sh Starts simulator + runs wolfCrypt harness inside the wolfcrypt test container.
ATECC608Sim/wolfcrypt-test/main.c wolfCrypt test harness integrating custom TCP HAL and slot allocator workaround.
ATECC608Sim/sdk-test/test_helpers.h Minimal C test macros for sdk-test suite.
ATECC608Sim/sdk-test/test_atecc608.c cryptoauthlib atcab_* API tests with OpenSSL cross-verification.
ATECC608Sim/sdk-test/run_test.sh Starts simulator + runs sdk-test binary inside the sdk-test container.
ATECC608Sim/sdk-test/hal_tcp.h Public API for a custom cryptoauthlib TCP HAL (env-configured host/port).
ATECC608Sim/sdk-test/hal_tcp.c Implementation of the TCP HAL for tunneling ATCA packets over TCP.
ATECC608Sim/atecc608-sim/tests/tcp.rs End-to-end TCP framing tests (wire protocol validation).
ATECC608Sim/atecc608-sim/tests/inproc.rs In-process integration tests calling dispatch() directly.
ATECC608Sim/atecc608-sim/src/session.rs Per-connection volatile state model (TempKey + SHA context).
ATECC608Sim/atecc608-sim/src/object_store/types.rs Device/slot/config/OTP types and serde helpers for persistence.
ATECC608Sim/atecc608-sim/src/object_store/mod.rs Default device provisioning + persisted store implementation.
ATECC608Sim/atecc608-sim/src/lib.rs Crate module surface and re-exports.
ATECC608Sim/atecc608-sim/src/handlers/write_zone.rs Implements ATCA Write handling across config/OTP/data zones.
ATECC608Sim/atecc608-sim/src/handlers/verify.rs Implements ATCA Verify (external mode) using p256.
ATECC608Sim/atecc608-sim/src/handlers/sign.rs Implements ATCA Sign (external digest mode) using p256.
ATECC608Sim/atecc608-sim/src/handlers/sha.rs Implements ATCA SHA (start/update/end/public) via sha2.
ATECC608Sim/atecc608-sim/src/handlers/read_zone.rs Implements ATCA Read handling across zones and slots.
ATECC608Sim/atecc608-sim/src/handlers/random.rs Implements ATCA Random via rand.
ATECC608Sim/atecc608-sim/src/handlers/nonce.rs Implements ATCA Nonce pass-through to load TempKey.
ATECC608Sim/atecc608-sim/src/handlers/mod.rs Exposes opcode handler modules.
ATECC608Sim/atecc608-sim/src/handlers/lock.rs Implements ATCA Lock (config/data/slot) state changes.
ATECC608Sim/atecc608-sim/src/handlers/info.rs Implements ATCA Info revision query.
ATECC608Sim/atecc608-sim/src/handlers/genkey.rs Implements ATCA GenKey generation/derivation for P-256 slots.
ATECC608Sim/atecc608-sim/src/handlers/ecdh.rs Implements ATCA ECDH (clear output) via p256 ECDH.
ATECC608Sim/atecc608-sim/src/dispatch.rs Central opcode routing from parsed command to handlers.
ATECC608Sim/atecc608-sim/src/crc.rs Implements ATCA CRC-16 and tests against golden values.
ATECC608Sim/atecc608-sim/src/bin/tcp_server.rs TCP listener/connection handler wiring dispatch + persistence.
ATECC608Sim/atecc608-sim/src/atca.rs Packet framing/parsing + CRC verification + response building.
ATECC608Sim/atecc608-sim/Cargo.toml Rust crate manifest and dependencies (p256/sha2/serde/etc.).
ATECC608Sim/atecc608-sim/Cargo.lock Lockfile for reproducible simulator builds.
ATECC608Sim/README.md Detailed simulator docs (features, architecture, Docker tiers).
ATECC608Sim/LICENSE GPL-3.0 license text for the new simulator subtree.
ATECC608Sim/Dockerfile.wolfcrypt Builds simulator + cryptoauthlib + wolfSSL + wolfcrypt harness image.
ATECC608Sim/Dockerfile.sdk-test Builds simulator + cryptoauthlib + sdk-test harness image.
ATECC608Sim/Dockerfile Builds and runs Rust unit/integration tests for the simulator crate.
ATECC608Sim/.gitignore Ignores Rust build artifacts and simulator runtime state JSON.
.github/workflows/atecc608-wolfcrypt-test.yml CI job to build/run the wolfCrypt integration image.
.github/workflows/atecc608-test-suite.yml CI job to run cargo test for the simulator crate.
.github/workflows/atecc608-sdk-test.yml CI job to build/run the sdk-test integration image.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ATECC608Sim/atecc608-sim/src/handlers/read_zone.rs Outdated
Comment thread ATECC608Sim/Dockerfile.wolfcrypt Outdated
Comment thread ATECC608Sim/sdk-test/hal_tcp.c
Comment thread ATECC608Sim/sdk-test/run_test.sh
Comment thread ATECC608Sim/wolfcrypt-test/run_test.sh
Comment thread ATECC608Sim/sdk-test/hal_tcp.c Outdated
Comment thread ATECC608Sim/atecc608-sim/src/bin/tcp_server.rs Outdated
Comment thread ATECC608Sim/atecc608-sim/src/bin/tcp_server.rs Outdated
Comment thread ATECC608Sim/atecc608-sim/src/bin/tcp_server.rs Outdated
Comment thread ATECC608Sim/atecc608-sim/src/session.rs
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.

3 participants