How targo-s/sdmo works
SDMO simulates a legacy sensor, an edge gateway, and a cloud service, with a hybrid X25519/ML-KEM protocol alongside legacy shared-key delivery. The principal workflow is: the gateway polls and optionally authenticates a device reading, then forwards it to the cloud using a negotiated encrypted session or legacy mode; the cloud validates and stores readings. Provisioning and crypto self-test/metrics are supporting capabilities. The README was empty, so subsystem coverage and links rely on the source index and sampled code; unsampled integrations are not inferred.
Main entry points: crypto.py Crypto Primitives · gateway.py Reading Forwarder · legacy_device.py Legacy Sensor · cloud.py Cloud HTTP API
Components 13
Device and Gateway
- Legacy Sensor
SDMO/sdmo/legacy_device.py - Gateway Runtime
SDMO/sdmo/gateway.py - Reading Forwarder
SDMO/sdmo/gateway.py - Hybrid Client
SDMO/sdmo/gateway.py - Fallback Ratchet
SDMO/sdmo/gateway.py
Cloud Service
- Cloud HTTP API
SDMO/sdmo/cloud.py - Sessions and Readings
SDMO/sdmo/cloud.py - JSON Helpers
SDMO/sdmo/common.py
Security and Provisioning
- Crypto Primitives
SDMO/sdmo/crypto.py - Key Provisioning
SDMO/sdmo/provision.py
Metrics
- Metrics Export
SDMO/sdmo/metrics.py
Other components
- Sensor Endpoint
- Cloud Endpoint
Connections 15
- Gateway Runtime → Legacy Sensor: polls readings
SDMO/sdmo/gateway.py - Gateway Runtime → Crypto Primitives: verifies readings
SDMO/sdmo/gateway.py - Gateway Runtime → Reading Forwarder: forwards readings
SDMO/sdmo/gateway.py - Reading Forwarder → Hybrid Client: uses hybrid mode
SDMO/sdmo/gateway.py - Reading Forwarder → Fallback Ratchet: checks fallback
SDMO/sdmo/gateway.py - Reading Forwarder → Cloud Endpoint: sends legacy readings
SDMO/sdmo/gateway.py - Hybrid Client → Cloud Endpoint: negotiates and sends
SDMO/sdmo/gateway.py - Hybrid Client → Crypto Primitives: uses primitives
SDMO/sdmo/gateway.py - Cloud Endpoint → Cloud HTTP API: submits requests
- Cloud HTTP API → Sessions and Readings: validates and updates
SDMO/sdmo/cloud.py - Cloud HTTP API → JSON Helpers: parses and replies
SDMO/sdmo/cloud.py - Sessions and Readings → Crypto Primitives: uses protocol crypto
SDMO/sdmo/cloud.py - Legacy Sensor → Crypto Primitives: signs readings
SDMO/sdmo/legacy_device.py - Legacy Sensor → JSON Helpers: formats responses
SDMO/sdmo/legacy_device.py - Metrics Export → Crypto Primitives: runs crypto self-test
SDMO/sdmo/metrics.py