# SM Remote Crypto Service ## Module SmRemote ## Status VERIFIED ## Description Dedicated remote service for Chinese SM2/SM3/SM4 cryptographic operations, running as an independent microservice. ## Implementation Details - **Service Entry Point**: `src/SmRemote/StellaOps.SmRemote.Service/Program.cs` -- ASP.NET Core minimal API service exposing `/status`, `/health`, `/sign`, `/verify`, `/hash`, `/encrypt`, and `/decrypt`. - **SmRemote Integration Tests**: `src/SmRemote/__Tests/StellaOps.SmRemote.Service.Tests/SmRemoteServiceApiTests.cs` -- endpoint-level integration coverage for positive and negative paths. - **Docker Compose Overlay**: `devops/compose/docker-compose.sm-remote.yml` -- overlay configuration for running SM Remote alongside the base platform compose stack. ## E2E Test Plan - [x] Start the SM Remote service and verify `/health` and `/status` return success responses. - [x] Submit an SM3 hash request with known test input and verify digest output from `/hash`. - [x] Submit an SM2 signing request and verify the returned signature via `/verify`. - [x] Submit an SM4 encryption request, then decrypt the ciphertext via `/decrypt`, and verify the round-trip matches the original plaintext. - [x] Verify negative-path validation for invalid hash payloads, invalid SM4 key lengths, and invalid sign input (HTTP 400 responses). - [x] Confirm compose overlay contract remains documented for alongside-platform deployment (`devops/compose/docker-compose.sm-remote.yml`). ## Verification - Verified on 2026-02-11 via FLOW Tier 0/1/2 replay in `run-005`. - Tier 0: `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-005/tier0-source-check.json` - Tier 1: `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-005/tier1-build-check.json` - Tier 2: `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-005/tier2-api-check.json` - Failure-loop closure from initial blocked run: `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-001/triage.json`, `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-001/confirmation.json`. - Latest strict recheck closure artifacts: `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-005/fix-summary.json`, `docs/qa/feature-checks/runs/smremote/sm-remote-crypto-service/run-005/retest-result.json`.