M2M Protocol · Machine-to-Machine Mesh
M2M is a signed, authenticated mesh protocol for machine-to-machine communication. Not REST. Not WebSocket. A dedicated protocol with HMAC-SHA256 payloads, prime-handshake auth, and distributed compute routing.
Protocol layers
Every M2M message is signed, verified, and routed. No plaintext. No trust. Verify everything.
Layer 1 — Auth
Every payload is signed with a shared secret. The receiver verifies the signature before processing. No signature = rejected. No exceptions.
Layer 2 — Identity
Nodes authenticate via prime-number handshake proofs. Not a password. Not a token. A mathematical proof that the node is who it claims to be.
Layer 3 — Routing
Messages route through the mesh based on node health, latency, and capability. Circuit breakers trip unhealthy nodes. Traffic reroutes automatically.
Layer 4 — Compute
Send a task to the mesh. The fastest available node picks it up. Inference, image generation, data processing — the mesh decides who runs it.
Layer 5 — Telemetry
Every node reports latency, load, and model availability. The mesh uses this data for routing decisions. Bad nodes get sidelined automatically.
Layer 6 — Encryption
End-to-end encryption on privileged channels. Messages are encrypted on the sender and only decrypted on the target node. The mesh sees ciphertext.
Specification
| Property | Value |
|---|---|
| Transport | HTTP/HTTPS + SSH tunnel fallback |
| Auth | HMAC-SHA256 + prime-handshake proof |
| Payload format | JSON (N27_M2M_V1 envelope) |
| Signing | HMAC-SHA256 with shared N27_INTERNAL_SECRET |
| Node discovery | Mesh registration + health polling |
| Failover | Circuit breaker (3 failures = trip, 60s cooldown) |
| Rate limiting | Per-agent RPM slots (governor service) |
| Encryption | CYPH E2EE on privileged channels |
Mesh topology
REST is for web apps. M2M is for machines that need to trust each other.