Open
Conversation
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.
There was a problem hiding this comment.
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) andwolfcrypt-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.
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.
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.